-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Program stuck on ubr.read() #8
Comments
Hi - could I ask you to take a look at the bug report template and fill in as much detail as you can on the problem you're having, including the UBX device type, version of pyubx2 you're using and if possible a binary dump of the input stream. Many thanks. https://github.com/semuconsulting/pyubx2/blob/master/.github/ISSUE_TEMPLATE/bug_report.md Also, can you confirm what happens if you instantiate the UBXReader class with the validate flag set to true? i.e. ubr = UBXReader(stream, True) If you have an input stream which contains nothing but NMEA data (no UBX data) and you have the validate flag set to 'False' (the default), then - yes - the read() function will block until it receives a UBX data packet. This is expected behaviour. The resolution is either to: a) ensure that your input stream includes UBX data by setting the message rates appropriately (e.g. set CFG_MSGOUT_UBX_NAV_PVT_UART1 to 1 using the CFG-VALSET command, if it's a G9 device), pyubx2.exceptions.UBXStreamError: Unknown data header b'$G'. Looks like NMEA data. Set validate to 'False' to ignore. |
Also, have you tried running the ubxstreamer.py example in the /examples folder? This should poll the device's UBX message rates and respond with a series of CFG-MSG responses. |
Apologies, I had the validate flag set to false. I thought I tested it with both values for the validate flag, but I must've made a mistake. You're right, my data output is only nmea stream. I am getting UBX messages when I save the ubx file using u-center but I'm not seeing it directly from the serial port I guess. I will try the ubxsteamer.py today. Thanks a lot fr the support. Please go ahead and close the issue. |
No worries. FYI you might want to check out PyGPSClient, a cross-platform GUI application which uses pyubx2 and provides some of the u-center functionality. https://pypi.org/project/PyGPSClient/ |
Environment MACOS Catalina, Anaconda, Spyder:
Python version 3.8.1
Code:
Program hangs on ubr.read().
Attempted to change baudrate etc.
Can confirm that the standard stream.read() and stream.readline() functions output the data correctly
The text was updated successfully, but these errors were encountered: