Trying (failing) to get my modem to work
aleksander at aleksander.es
Sat Mar 28 10:20:52 PDT 2015
On Sat, Mar 28, 2015 at 2:04 PM, Wouter Verhelst <w at uter.be> wrote:
>> > I have a new laptop, which comes with a 4G modem. To my dismay, this
>> > thing doesn't have an AT port anymore, so I can't do what I used to do
>> > on the old laptop (i.e., send some AT command magic to /dev/ACM0 and run
>> > dhclient).
>> > After looking around a bit, I found that mbimcli manages to find the
>> > modem and can do a few things. But not much.
>> > Script started on vr 27 mrt 2015 20:14:12 CET
>> > root at gangtai:~# mbimcli -d /dev/cdc-wdm0 --query-device-caps
>> > [/dev/cdc-wdm0] Device capabilities retrieved:
>> > Device type: 'embedded'
>> > Cellular class: 'gsm'
>> > Voice class: 'no-voice'
>> > Sim class: 'removable'
>> > Data class: 'gprs, edge, umts, hsdpa, hsupa, lte'
>> > SMS caps: 'pdu-receive, pdu-send'
>> > Ctrl caps: 'reg-manual, multi-carrier'
>> > Max sessions: '8'
>> > Custom data class: 'unknown'
>> > Device ID: '353516051359501'
>> > Firmware info: 'SWI9X15C_05.05'
>> > Hardware info: 'EM7305'
>> > root at gangtai:~# mbim-network /dev/cdc-wdm0 start
>> > Loading profile...
>> > APN: gprs.base.be
>> > Loading previous state...
>> > Previous Transaction ID: 6
>> > error: no actions specified
>> > Clearing state...
>> > Querying subscriber ready status 'mbimcli -d /dev/cdc-wdm0 --query-subscriber-ready-status --no-close'...
>> > [/dev/cdc-wdm0] Subscriber ready status retrieved: Ready state: 'initialized' Subscriber ID: '206201002118395' SIM ICCID: '8932030000007170020' Ready info: 'unknown' Telephone numbers: (1) '0489402389' [/dev/cdc-wdm0] Session not closed: TRID: '3'
>> > Saving state... (TRID: 3)
>> > Querying registration state 'mbimcli -d /dev/cdc-wdm0 --query-registration-state --no-open=3 --no-close'...
>> > [/dev/cdc-wdm0] Registration status: Network error: 'unknown' Register state: 'home' Register mode: 'automatic' Available data classes: 'lte' Current cellular class: 'gsm' Provider ID: '20620' Provider name: 'BASE' Roaming text: 'unknown' Registration flags: 'packet-service-automatic-attach' [/dev/cdc-wdm0] Session not closed: TRID: '4'
>> > Saving state... (TRID: 4)
>> > Attaching to packet service with 'mbimcli -d /dev/cdc-wdm0 --attach-packet-service --no-open=4 --no-close'...
>> > Saving state... (TRID: 5)
>> > Starting network with 'mbimcli -d /dev/cdc-wdm0 --connect=gprs.base.be --no-open=5 --no-close'...
>> > error: operation failed: Transaction timed out
>> > Network start failed
>> > [/dev/cdc-wdm0] Session not closed: TRID: '6'
>> > Saving state... (TRID: 6)
>> > root at gangtai:~# exit
>> > Script done on vr 27 mrt 2015 20:14:49 CET
>> > ...not sure what's going wrong here. Help?
>> Any chance you can run it with ModemManager and NetworkManager in
>> debug mode? see:
> For clarity (I thought the "what I used to do on the old laptop" above
> made that clear, but maybe that's assuming too much), I'm not using
> Network Manager, and have no interest in changing that. I was
> assuming that mbim-network can do things all by itself.
mbim-network can set your modem in connected mode, and if your modem
supports DHCP (not all do) then you can just run a dhcp client on the
WWAN interface and that should be it. mbim-network cannot do all
things by itself because not much love was put into it .
Testing with ModemManager/NetworkManager is not a requirement, I just
want to see the debug logs to see the hex contents of your connection
failure (if any), which are easily retrieved with MM's --debug. Plus,
if it's a timeout error, we'll see it after some time - when mbimcli
has already closed the port, so not useful. Your kind of error is
easier checked with ModemManager's logs.
> If that isn't the case, I would appreciate some explanation or
> documentation on how things are supposed to work. I had a look at the
> libmbim API docs, but they seem to fall into the trap of saying "use
> FooFrobber to Frob your Foo", without explaining what a Foo is, or why
> you would want to Frob it... not very helpful.
I'm sure you can get a deeper insight of what Frobbing your Foo means
if you read the MBIM specs from the USB-IF :)
libmbim is a library to let you use the MBIM protocol; knowledge of
the MBIM protocol is required to use it. Plus, well, fair enough, the
libmbim API is autogenerated from a set of JSON files describing the
messages. Which means that they won't explain you what a Foo is or
what Frobbing does; just that you need to use a FooFrobber to Frob
your Foo (i.e. defines the API, doesn't explain it, that's what the
MBIM spec is for).
> (Yes, I'm willing to help out there, but gotta start somewhere,
All we need to debug your issue is proper debug logs. Either retrieved
from ModemManager (which will contain a full set of logs, very useful
and usually easier to get) or by calling each mbimcli command one by
one with --verbose. The benefits of the ModemManager logs are anyway
that all "unsolicited indication" messages will also be shown in the
>> Otherwise, can you try to run the mbimcli commands that the
>> mbim-network executes, BUT appending a --verbose option to each. The
>> important one would be the --connect, which is where it times out, it
>> would look like:
>> $ mbimcli -d /dev/cdc-wdm0 --connect=gprs.base.be --verbose
> I can, but not right now; will let you know when (unless you tell me
> it's no longer necessary ;-)
Why would it be no longer necessary now?
>  I think NetworkManager is ideal for my mother, but on my personal
> laptop, I prefer to be more in control than what nm allows me to do.
> Configuring networking is done through "shell scripts and duct tape"
> over here.
Then you'll likely want to read the MBIM specs before trying to play
with the mbimcli commands to know what you're doing! :)
I usually put my free-time love in integrating MBIM in ModemManager,
so that your (and my) mother can use it easily (my mother at least is
not into duct taping) ;) If you're into shell scripts we'll gladly
accept patches improving what mbim-network does!
More information about the libmbim-devel