Printable MBIM messages (e.g. in logs) not complete on failure
Certain messages (e.g. Register State response) contain additional information in the information buffer fields (e.g. NwError
) even when the message status is Failure
. We should ensure that all fields in the information buffer are printed as long as the information buffer is available, not only on successful responses.
2023-04-19T12:21:59.669680Z DEBUG ModemManager[20938]: <dbg> [/dev/cdc-wdm0] received message...
>>>>>> RAW:
>>>>>> length = 96
>>>>>> data = 03:00:00:80:60:00:00:00:25:00:00:00:01:00:00:00:00:00:00:00:A2:89:CC:33:BC:BB:8B:4F:B6:B0:13:3E:C2:AA:E6:DF:09:00:00:00:02:00:00:00:30:00:00:00:00:00:00:00:01:00:00:00:01:00:00:00:20:00:00:00:01:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:02:00:00:00
2023-04-19T12:21:59.669782Z DEBUG ModemManager[20938]: <dbg> [/dev/cdc-wdm0] received message (translated)...
>>>>>> Header:
>>>>>> length = 96
>>>>>> type = command-done (0x80000003)#01
2>>>>>> transaction = 37
>>>>>> Fragment header:
>>>>>> total = 1
>>>>>> current = 0
>>>>>> Contents:
>>>>>> status error = 'Failure' (0x00000002)
>>>>>> service = 'basic-conne
ct' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)
>>>>>> cid = 'register-state' (0x00000009)