access to piksi data

500 views
Skip to first unread message

pankaj patel

unread,
Sep 5, 2015, 11:28:12 AM9/5/15
to swiftnav-discuss
I want to see piksi gps position data on my laptop(having windows). I tried this by running some python code in IDLE( python GUI):

import serial
port="com5"
ser =serial.Serial(port, 115200,timeout=2)
x = ser.read()
s = ser.read(100)
line = ser.readline()
print s
ser.close()



and what I got is this



Please tell me where I am wrong. what is the way to do it correctly. I also tried the code mentioned in this page;


that gave me error "ImportError: No module named sbp_piksi"

thanks

Clive Turvey

unread,
Sep 5, 2015, 11:58:06 AM9/5/15
to swiftnav-discuss
By default it's not outputting ASCII, you can configure UARTB to output ASCII NMEA sentences if that's easier to deal with. Go to the settings pane, and change it.

The default protocol is SBP (SwiftNav Binary Protocol)

pankaj patel

unread,
Sep 5, 2015, 3:59:28 PM9/5/15
to swiftnav-discuss
yes I did that. I replaced NMEA in place of sbp in the setting, then also it is reading the same kind of unreadable data.

Clive Turvey

unread,
Sep 5, 2015, 6:27:50 PM9/5/15
to swiftnav-discuss
Ok, how are you wiring this? The Piksi outputs at ~3V CMOS levels, this is not directly compatible with RS232 levels, which would require a MAX3232 type chip or something equivalent, or a USB-to-CMOS Serial adapter using an FTDI or SiLabs chip wired directly from the Piksi.

http://www.amazon.com/MAX3232-Female-Serial-Converter-Module/dp/B00BXX2OU2

You could also try a terminal app, like RealTerm or ClearTerminal, configured to the right COM port and baud rates, and view the data from there.

Clive Turvey

unread,
Sep 5, 2015, 9:25:44 PM9/5/15
to swiftnav-discuss
Image shows Piksi connected to supplied 3DR radio on UARTA, and an HC-06 Bluetooth radio on UARTB. Also shown are an RS232 interface board, and two clone radios with the cables modified to match the Piksi wiring scheme. The original cables had the right pin header, but the power wires needed to be swapped, and the TX/RX pairs swapped. I used an X-Acto knife blade to release the pin capture arrangement. The bluetooth and RS232 module were soldered using the supplied spare cables, and the unused power connections discarded. The Bluetooth used V+, the RS232 used 3V3.

IMG_20150905_201115_949.jpg

pankaj patel

unread,
Sep 6, 2015, 2:51:00 AM9/6/15
to swiftnav-discuss
Thanks for your reply clive, It seems I am doing something horribly wrong. I just connected the piksi with a USB cable to the computer to see its positioning data.
I have not used any of those adapters you told about.


Clive Turvey

unread,
Sep 6, 2015, 7:56:49 AM9/6/15
to swiftnav-discuss
Sorry, your use of 115200 baud had me thinking you'd used the UART connections. As I recall the USB/FTDI connection runs at 1000000 baud (1Mbaud)

dzo...@swift-nav.com

unread,
Sep 8, 2015, 11:28:31 AM9/8/15
to swiftnav-discuss
Pankaj,
If you require an SBP example, Please use this one from our SBP repo rather than the outdated gist.  This example is available here: https://github.com/swift-nav/libsbp/blob/master/python/sbp/client/examples/simple.py
This will require you to obtain the sbp python library either from source or pip .  This python example prints out the RTK baseline message when received by the Piksi.  It can be extended to receive any message.

Best,
Dennis

pankaj patel

unread,
Sep 8, 2015, 12:57:20 PM9/8/15
to swiftnav-discuss

Thanks for replying Dennis, The problem I am facing is I  downloaded libsbp from github (https://github.com/swift-nav/libsbp) and ran the setup.py inside its python folder in my windows 7 laptop , but what it shows is in the screenshot below.



It says "cannot find version number". So basically I don't know how to use this "libsbp". Please guide me what am I supposed to do with it.

Thanks 
Pankaj

Mark Fine

unread,
Sep 8, 2015, 1:47:47 PM9/8/15
to pankaj patel, swiftnav-discuss
Hi Pankaj!

Sorry you're running into issues. Part of the setup.py process is to read the version of the .git repository - when you download a repo zip from Github, the .git repository is not present, so the setup.py will not be able to figure out the version. To get the versioning to work, you'd need to clone the repository from Github (git clone g...@github.com:swift-nav/libsbp.git). I created an issue to handle setup.py without a git repository (but this may cause other problems). hope that helps!

Mark

--
You received this message because you are subscribed to the Google Groups "swiftnav-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swiftnav-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

pankaj patel

unread,
Sep 8, 2015, 5:23:51 PM9/8/15
to swiftnav-discuss, pankaj.p...@gmail.com

Thanks Mark for replying, This time I cloned the libsbp in github repository and again ran setup.py, but still it gave same error "cannot find version" .I also tried to run the libsbp in git shell , then a command window comes.


What to do after that I don't know .
Thanks 
Pankaj
Message has been deleted

pankaj patel

unread,
Sep 13, 2015, 3:00:48 PM9/13/15
to swiftnav-discuss
Hi Dennis,
              I used the SBP example you suggested  https://github.com/swift-nav/libsbp/blob/master/python/sbp/client/examples/simple.py But it is giving output as
Host Side Unhandled byte: 0x44
Host Side Unhandled byte: 0x80
Host Side Unhandled byte: 0x40
Host Side Unhandled byte: 0x00
Host Side Unhandled byte: 0x04
Host Side Unhandled byte: 0x00
Host Side Unhandled byte: 0x04
Host Side Unhandled byte: 0x00
Host Side Unhandled byte: 0x20

I saw this statement in sbp.client.handler. It is inside self.verbose .What does it mean I don't know. How to correct it?



On Tuesday, September 8, 2015 at 8:58:31 PM UTC+5:30, dzo...@swift-nav.com wrote:

dzo...@swift-nav.com

unread,
Sep 14, 2015, 11:49:23 AM9/14/15
to swiftnav-discuss
Pankaj,

This is indicative of some bytes on the serial stream that were not able to be interpreted as SBP.  I expect that this happened when you first ran the python example and then stopped.  It will occur occasionally when you begin reading from the serial port as the parser processed any incomplete messages in the serial buffer.

Best,
Dennis

Miguel PCC

unread,
Apr 19, 2017, 9:55:53 AM4/19/17
to swiftnav-discuss


Hi Dennis I have the same problem but when I run nothing happen.

Dennis Zollo

unread,
Apr 21, 2017, 2:21:18 AM4/21/17
to swiftnav-discuss
Miguel,

Only one device at a time is able to access the serial port.  I suspect that something else has the serial port open.

 Do you have Swift Console open?  Is there still a Swift Console process running that has lock on the port? Try unplugging and plugging back in your cable.  

Can you also confirm whether you are using PIksi Multi or Piksi v2.3.1?  

Best,
Dennis

Oliver Windram

unread,
Aug 10, 2017, 10:05:01 AM8/10/17
to swiftnav-discuss
Hi Dennis,

I am having the same problem as Miguel I am using a Piksi v2.3.1

I have tried plugging and unplugging to no avail
Reply all
Reply to author
Forward
0 new messages