Commit Graph

2 Commits

Author SHA1 Message Date
Eric Wild 0de8274e99 cat: properly decode IMEI/IMEISV IE
Currently BcdAdapter(GreedyBytes), i.e. a plain swapped nibble digit
string, which is wrong, the IMEI IE is not a bcd string.
See TS 124.008 10.5.1.4 figure 10.5.4 + table 10.5.4

It currently
 - decodes framing nibble as digit
 - encodes a 15 digit IMEI as 7 bytes, wrong len, dropped last digit

Fix this, while at it add the 8.74 IMEISV as well + tests for the framing
because the current round trip missed all of this.

Change-Id: Iad7aea77513d413c338edc18ef1bcc37488ae849
2026-09-23 18:01:16 +02:00
Eric Wild 6b40fe8546 cat: fix Supported Radio Access Technologies state flag
TS 102 223 8.105 codes each supported technology in two bytes:
- the technology from 8.61
- state byte, b1 0 disabled/1 enabled
- b2-b8 RFU

Currently declared as FlagsEnum(Int8ub, enabled=0). kw value is used as
bitmask, so currently:

build {'enabled': True}      -> b4 02 08 00     disabled
build {'enabled': False}     -> b4 02 08 00     disabled
but parsed 08 00 / 08 01 / 08 ff  -> all {'enabled': True}

Use the bit the spec names + tests because well this is so easy that we
don't need tests is apparently not the right approach here..

Change-Id: I4dd16182eb06c99265aabab5d889967b890f6bf2
2026-09-23 18:01:16 +02:00