This wiki documents Piksi v2.3.1 which was discontinued April 1st, 2017.
Visit support.swiftnav.com for newer products including Piksi Multi.

Reading SBP data from Piksi with a simple client

From Swift Navigation Wiki
Jump to: navigation, search

Warning: Because you are connecting to a serial port, make sure to close your Piksi Console before you run this program. On OS X, for example, running this program while you are running the Piksi Console may cause system instability.

You can install and run a very simple client to consume Swift Binary Protocol (SBP) data from a running Piksi in real-time in five commands from the shell. In the following sections are the guides on how to run the simple.py example client through the different platforms listed:

  1. Linux
  2. Mac OS X
  3. Windows

By the end of the guide, you should be able to print out data inputs such as shown in the image below when your Piksi has acquired RTK solutions. You can also get data inputs if you enable simulation mode in your Piksi.

200x

Linux

This assumes you have Python, Git and PIP already installed. This guide has been tested on Ubuntu Linux version 14.04.

First clone libsbp from the Swift Navigation Github site

$ sudo git clone https://github.com/swift-nav/libsbp.git

Set your Python path variable to point to the python tools:

$ export PYTHONPATH=/[path to your directory]/libsbp/python

Then, plug in the Piksi to one of your USB ports and find the name of that port which is usually in the form [ttyUSB0].

$ ls /dev/tty*

Make sure that you have read permissions on that port.

$ sudo chmod 666 /dev/[ttyUSB0]

Finally, run the simple Python client.

$ python -m sbp.client.examples.simple -p /dev/[ttyUSB0]

Mac OS X

This assumes you have Python, Git and PIP already installed. This guide has been tested on Mac OS X version 10.10.3.

Clone libsbp from the Swift Navigation Github site

$ sudo git clone https://github.com/swift-nav/libsbp.git

Set your Python path variable to point to the python tools:

$ export PYTHONPATH=/[path to your directory]/libsbp/python

Then, plug in the Piksi to one of your USB ports and find the name of that port which is usually in the form [tty.usbserial-0000xxxx] for Mac OS X.

$ ls /dev/tty*

Make sure that you have read permissions on that port.

$ sudo chmod 666 /dev/[tty.usbserial-0000xxxx]

Now navigate to the python directory in your terminal and run the simple Python client.

$ python -m sbp.client.examples.simple -p /dev/[tty.usbserial-0000xxxx]

Windows

This assumes you already have Python, Git and PIP already installed. This has been tested on Windows 8.

Clone libsbp from the Swift Navigation Github site

$ git clone https://github.com/swift-nav/libsbp.git

Set your Python path variable to point to the python tools:

$ SET PYTHONPATH=/[path to your directory]/libsbp/python

Then, plug in the Piksi to one of your USB ports and find the name of that port which is usually in the form of [COM#] such as, COM1, COM2,... COM#. To find the name of the port, check which port appears in the Device Manager under Ports (COM & LPT) when you plug your device to your computer.

200x

Now navigate to the python directory in your terminal and run the simple Python client.

$ python -m sbp.client.examples.simple -p [COM#]