Registry / hardware / pyubx2

pyubx2

JSON →
library1.3.2pypypi✓ verified 84d ago

A library for parsing and generating UBX protocol messages used by u-blox GNSS receivers. Current version 1.3.2, supports Python >=3.10. Actively maintained with regular releases.

pip install pyubx2
INSTALL
IMPORT
SIG · PYUBX2
P
pyubx2
hardwarepythonv1.3.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

UBXMessage
from pyubx2 import UBXMessage
from ubx2 import UBXMessage
Library is not named 'ubx2'
UBXReader
from pyubx2 import UBXReader
from pyubx2.ubxread import UBXReader
UBXReader is a top-level export, not in a submodule

Parse a raw UBX message and generate a poll request.

from pyubx2 import UBXMessage, POLL, poll msg = UBXMessage(b'\xb5\x62\x06\x01\x03\x00\x01\x06\x01\x0e', validate=False) print(msg) poll_msg = poll(0x06, 0x01) print(poll_msg)
Debug
Known issues
gotchaUBXMessage constructor expects bytes (including sync chars), not a hex string.
fix
Pass bytes object like b'\xb5\xb62...'
affects: <2.0
gotchaValidation is enabled by default; messages with invalid checksums raise errors.
fix
Set validate=False if you want to parse malformed messages.
affects: >=1.0
deprecatedThe 'serial' protocol argument in UBXReader is deprecated; use 'mode' instead.
fix
Use mode='serial' or mode='file' instead of protocol='serial'.
affects: >=1.2.0
breakingPython 3.9 support dropped; requires Python >=3.10.
fix
Upgrade Python or pin to pyubx2<1.3.0.
affects: >=1.3.0
gotchaUBXReader yields (raw_data, parsed_message) tuples; parsed_message is an UBXMessage.
fix
Access fields via parsed_message.identity and parsed_message.payload.
affects: >=1.0
gotchaThe 'poll()' function returns a message with length zero; does not communicate with device.
fix
Use poll() to generate message bytes, then send them to the receiver.
affects: >=1.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pyubx2'
Library not installed or wrong environment.
fix
pip install pyubx2
ubxMessage.identity returns None or unexpected value
Message was parsed with validate=False but the bytes are invalid.
fix
Check that you pass correct UBX frame including sync chars b'\xb5\xb62'.
AttributeError: 'NoneType' object has no attribute 'payload'
UBXReader yielded None for parsed message (e.g., invalid data).
fix
Check input data integrity or set validate=False in UBXReader constructor.
Upgrade
Version history
1.3.2latest on PyPI · released Jun 7, 2026
Audit
Dependencies
pynmea2optionalNMEA parsing support (optional)
Agent activity
23 hits · last 30 days
node
18
Amazon
1
OpenAI (training)
1
Resources

No resource links recorded.

pyubx2 — pip install pyubx2 · libregistry