Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packet does not contain leading DLE and trailing DLE/ETX #27

Open
mjuenema opened this issue Oct 27, 2017 · 2 comments
Open

Packet does not contain leading DLE and trailing DLE/ETX #27

mjuenema opened this issue Oct 27, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@mjuenema
Copy link
Owner

Traceback (most recent call last):
  File "docs/examples/example2.py", line 72, in <module>
    report = gps_conn.read()
  File "/home/pi/.local/lib/python2.7/site-packages/tsip-0.3.1-py2.7.egg/tsip/hlapi.py", line 175, in read
    return Packet.unpack(unstuff(unframe(pkt)))
  File "/home/pi/.local/lib/python2.7/site-packages/tsip-0.3.1-py2.7.egg/tsip/llapi.py", line 56, in unframe
    raise ValueError('packet does not contain leading DLE and trailing DLE/ETX')
@mjuenema mjuenema added the bug label Oct 27, 2017
@mjuenema mjuenema added this to the 0.4.0 milestone Oct 27, 2017
@mjuenema mjuenema self-assigned this Oct 27, 2017
@jeffsf
Copy link

jeffsf commented Jan 14, 2019

Not sure if this is the same issue as the one you're thinking of, but the low-level gps.read() constantly fails to "sync" to the start of a packet frame if it happens to start up mid-frame.

Changing the ValueError to a custom FramingError and catching it (to report and ignore it) doesn't seem to help. Once off-sync, the algorithm that looks for an even number of DLEs followed by an ETX never recovers.

@mjuenema
Copy link
Owner Author

Hi Jeff. Thanks for reporting this. I am certain there's a bug in the algorithm for decoding the binary data stream.

To be honest it's been ages that I worked on this project and at the moment I wouldn't even know where I keep my Trimble GPS receivers since we moved house a few months ago.

If you think you are able to submit a merge request that fixes the bug I'd be more than happy to include it. What would also help if you could attach a capture of the serial data stream of your GPS. What model are you using?

Markus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants