qmi-network

Bjørn Mork bjorn at mork.no
Thu Aug 23 02:12:13 PDT 2012


Thomas Schäfer <tschaefer at t-online.de> writes:
> Am 23.08.2012 09:16, schrieb Bjørn Mork:
>> Yes, but are there more than one, and if so, which one is default?
>> You can check the whole list by doing AT+CGDCONT? I don't know how
>> to verify which profile is default using AT commands or currently
>> available QMI tools. 
> I will try that.
>
>> You need to send QMI WDS request 0x002c with TLV 0x01 set to 0.
> With qmicli directly, without the qmi-network script around?
>
> Sorry for the stupid question, do you have a proposal via command line?

That is not a stupid question :-)

No, I do not have a command line proposal.  You can always manually
stich the request together, but you would have to manually parse the
response as well and that is extremely hard in this case given that it
contains a number of complex TLVs.


Well, OK, we can try.  Sending the command:

 perl -e 'print pack("C*", map { hex }, qw/01 10 00 00 01 01 00 04 00 2c 00 04 00 01 01 00 00/)' >/dev/cdc-wdm0
                                                          ^^

Where CID=1 is reused from the one pre-allocated by qmi-network.  I got
it from /tmp/qmi-network-state. You may need to use another value.  But
using qmicli to allocate it saves you from doing that manually.

Then you need to read the response. hexdump will do line buffering so you
don't get everything, but this should be enough:

 hexdump -C /dev/cdc-wdm0

00000000  01 15 00 80 01 ff 04 00  00 22 00 09 00 01 02 00  |........."......|
00000010  02 00 12 01 00 04 01 7a  00 80 01 01 02 04 00 2c  |.......z.......,|
00000020  00 6e 00 02 04 00 00 00  00 00 31 01 00 00 30 04  |.n........1...0.|
00000030  00 00 00 00 00 2f 01 00  00 2d 01 00 00 27 01 00  |...../...-...'..|
00000040  00 26 01 00 00 25 01 00  01 22 01 00 00 21 01 00  |.&...%..."...!..|
00000050  00 20 01 00 00 1f 01 00  00 1e 04 00 00 00 00 00  |. ..............|
00000060  1d 01 00 00 1c 00 00 1b  00 00 14 0d 00 70 69 6c  |.............pil|
00000070  6f 74 2e 74 65 6c 65 6e  6f 72 13 01 00 00 12 01  |ot.telenor......|
00000080  00 00 11 01 00 00 10 08  00 70 72 6f 66 69 6c 65  |.........profile|


My APN is "pilot.telenor", which you can recongnize in the above.  The
number of the default profile is missing though.  You can see the start
of the profile name ("profile"), but the number is missing.  Repeat the
request a couple of times if you need the whole output (you will the get
multiple responses of course, and all but the last one will be complete).


Bjørn


More information about the libqmi-devel mailing list