Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions gsmmodem/pdu.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,11 @@ def _decodeUserData(byteIter, userDataLen, dataCoding, udhPresent):
# Since we are using 7-bit data, "fill bits" may have been added to make the UDH end on a septet boundary
shift = ((udhLen + 1) * 8) % 7 # "fill bits" needed to make the UDH end on a septet boundary
# Simulate another "shift" in the unpackSeptets algorithm in order to ignore the fill bits
prevOctet = next(byteIter)
shift += 1
if shift:
prevOctet = next(byteIter)
shift += 1
else:
prevOctet = 0

if dataCoding == 0x00: # GSM-7
if udhPresent:
Expand Down