[PATCH 0/2] MBIM: Report 3GPP cause codes on errors

Bjørn Mork bjorn at mork.no
Thu Dec 19 03:55:49 PST 2013


I just had an exciting network error: 'connect' returned NwError: 28

I had to look that up in the 3GPP 24.008 as it's not even listed in the
MBIM spec.  It seems to be

  Cause value = 28 SMS provided via GPRS in this routing area

	This cause is sent to the MS if the SGSN decides not to establish
        a Gs association since the MS is supposed to send and receive short
        messages via GPRS.

which didn't make any sense to me.  So I'm still trying to find out
exactly what happened here.

But back to the MM relevance: The only message logged was this:

ModemManager[1592]: [/dev/cdc-wdm0] Received message...
>>>>>> RAW:
>>>>>>   length = 84
>>>>>>   data   = 03:00:00:80:54:00:00:00:37: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:0C:00:00:00:02:00:00:00:24:00:00:00:00:00:00:00:03:00:00:00:00:00:00:00:00:00:00:00:7E:5E:2A:7E:4E:6F:72:72:73:6B:65:6E:7E:5E:2A:7E:1C:00:00:00
ModemManager[1592]: [/dev/cdc-wdm0] Received message (translated)...
>>>>>> Header:
>>>>>>   length      = 84
>>>>>>   type        = command-done (0x80000003)
>>>>>>   transaction = 55
>>>>>> Fragment header:
>>>>>>   total   = 1
>>>>>>   current = 0
>>>>>> Contents:
>>>>>>   status error = 'Failure' (0x00000002)
>>>>>>   service      = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-133ec2aae6df)
>>>>>>   cid          = 'connect' (0x0000000c)
ModemManager[1592]: <debug> [1387444281.867047] [mm-bearer.c:466] connect_ready(): Couldn't connect bearer '/org/freedesktop/ModemManager1/Bearer/2': 'Failure'
ModemManager[1592]: <info>  [1387444281.867164] [mm-iface-modem.c:1371] __iface_modem_update_state_internal(): Modem /org/freedesktop/ModemManager1/Modem/0: state changed (connecting -> registered)
ModemManager[1592]: <debug> [1387444281.867866] [mm-iface-modem-simple.c:221] connect_bearer_ready(): Couldn't connect bearer: 'Failure'


and that generic 'Failure' was the only thing reported back.  So I had to
manually decode the MBIM message myself to get the raw 3GPP cause code
(those knowing there MBIM well enough will of course immeditately see the
1C:00:00:00 there are the end), and then go look it up.  This doesn't
look right to me.  The end users should not have to do such things.  So I
started digging into the code to find out why MM doesn't use the NwError
field.  Turns out MM won't parse the reply at all unless the status is
success.  Which doesn't seem right.

This small series is my primitive attempt on fixing this.  There are other
ways it could be done, so I'm not at all conviced that this is the correct
way.




Bjørn Mork (2):
  bearer-mbim: debug log NwError field on error
  bearer-mbim: parse replies on failure

 src/mm-bearer-mbim.c |   27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

-- 
1.7.10.4



More information about the ModemManager-devel mailing list