Huawei ME906s-158 (a.k.a. HP lt4132) IPv6 support

Bjørn Mork bjorn at mork.no
Wed Jul 5 10:35:29 UTC 2017


Aleksander Morgado <aleksander at aleksander.es> writes:

> On Tue, Jul 4, 2017 at 9:39 PM, Tore Anderson <tore at fud.no> wrote:
>> The ModemManager sources contain a tool called "ipv6pref"[3] which I
>> believe to be my last resort. I haven't been able to make it work,
>> though, so I'm turning to this list for some pointers. My (initial)
>> questions are the following:
>>
>> * It is supposed to be used with a "DM port". Is that a /dev/ttyUSB* or
>> /dev/cdc-wdm0 or something else?
>>
>> * Does the tool require the modem to be in a particular configuration?
>> It has three different configurations; 1 is a vendor specific interface
>> class where I think is meant to be used as a serial modem with PPP (MM
>> recognises it in this mode), 2 is ECM mode and also the default (MM does
>> not recognise it in this mode), 3 is MBIM mode in which MM also
>> recognises it.
>
> The "DM" port is a QCDM capable ttyUSBX. If you want to know which one
> it is, run under ModemManager, and check which of the ports is flagged
> as "qcdm" in the list of ports shown in "mmcli -m 0" output; then stop
> ModemManager and you can run that tool on the tty directly (Dan should
> have more details about what the tool does, I really never played with
> it).


The write strategy of this tool does not work with newer modems for some
reason. I don't know if this is depending on firmware (probably) or
hardware. But I guess it doesn't matter much, as they are tightly tied
together.  This is most likely implemented by the Qualcomm part of the
firmware.

In any case, with the current implemetation I get these results, where
ttyUSB5 is a Huawei E392 and ttyUSB0 is a Sierra Wireless EM7455:


bjorn at miraculix:/usr/local/src/git/modemmanager/libqcdm$ tests/ipv6pref  /dev/ttyUSB5  --debug
DM:ENC>>> (136)  26 68 07 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 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 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 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 00 
                 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
                 00 00 00 00 00 60 1c 7e 
QCDM:DEC<< (133)  26 68 07 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 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 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 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 
                  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
                  00 00 00 00 00 
IPv6: enabled
bjorn at miraculix:/usr/local/src/git/modemmanager/libqcdm$ tests/ipv6pref  /dev/ttyUSB0  --debug
DM:ENC>>> (136)  26 68 07 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 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 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 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 00 
                 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
                 00 00 00 00 00 60 1c 7e 
E: failed to receive QCDM IPv6 pref command reply
E: failed to get IPv6 state



With the attached patch it works for both these modems.  Note that the
EM7455 doesn't use this NV item setting at all (or has an inverted
default - I don't know), so the item is read as DIAG_NV_STATUS_INACTIVE
(5).  We interpret this as 'disabled' which isn't entirely correct.  The
correct would probably be 'default', where the real value of depends on
hardware/firmware versions...


Anyway, the point is that the patch allows me to read this NV item from
the EM7455 too:


bjorn at miraculix:/usr/local/src/git/modemmanager/libqcdm$ tests/ipv6pref  /dev/ttyUSB5  --debug
DM:ENC>>> (136)  26 68 07 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 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 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 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 00 
                 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
                 00 00 00 00 00 60 1c 7e 
QCDM:DEC<< (133)  26 68 07 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 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 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 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 
                  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
                  00 00 00 00 00 
IPv6: enabled
bjorn at miraculix:/usr/local/src/git/modemmanager/libqcdm$ tests/ipv6pref  /dev/ttyUSB0  --debug
DM:ENC>>> (136)  26 68 07 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 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 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 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 00 
                 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
                 00 00 00 00 00 60 1c 7e 
QCDM:DEC<< (133)  26 68 07 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 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 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 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 00 
                  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
                  00 00 00 05 00 
<info> [commands.c:278] check_nv_cmd(): The NV operation failed (status 0x5).
IPv6: disabled



I don't know if this will help Tore much anyway.  I did some testing
with the E392 to confirm that I remembered correctly: This modem does
*not* change the output of any command when IPv6 is disabled.  The only
visible difference is that IPv6 connections fail.  You can still
configure them.


In the current state, with IPv6 enabled, everything works on the E392:

root at miraculix:/tmp# qmicli -d /dev/cdc-wdm1  --wds-start-network=apn=telenor.smart,ip-type=6  --wds-follow-network
[/dev/cdc-wdm1] Network started
        Packet data handle: '34967784'

Ctrl+C will stop the network
^Ccancelling the operation...
Network cancelled... releasing resources
Network cancelled... releasing resources
error: operation failed: Cannot store transaction: Request is already cancelled
root at miraculix:/tmp# qmicli -d /dev/cdc-wdm1  --wds-start-network=apn=telenor.smart,ip-type=6   --client-no-release-cid  
[/dev/cdc-wdm1] Network started
        Packet data handle: '34967784'
[/dev/cdc-wdm1] Client ID not released:
        Service: 'wds'
            CID: '2'
root at miraculix:/tmp# 
root at miraculix:/tmp# 
root at miraculix:/tmp#  --wds-get-current-settings qmicli -d /dev/cdc-wdm1  -^C
root at miraculix:/tmp# qmicli -d /dev/cdc-wdm1  --wds-get-current-settings  --client-cid=2 --client-no-release-cid
[/dev/cdc-wdm1] Current settings retrieved:
           IP Family: IPv6
        IPv6 address: 2a02:2121:2c9:eac3:902f:2476:b07a:8be7/64
IPv6 gateway address: 2a02:2121:2c9:eac3:80ff:7398:20bd:d5f8/64
    IPv6 primary DNS: 2001:4600:4:fff::52
  IPv6 secondary DNS: 2001:4600:4:1fff::52
                 MTU: 1500
             Domains: none
[/dev/cdc-wdm1] Client ID not released:
        Service: 'wds'
            CID: '2'




Disabling IPv6 on the E392:


bjorn at miraculix:/usr/local/src/git/modemmanager/libqcdm$ tests/ipv6pref  /dev/ttyUSB5 --disable
IPv6: enabled
IPv6 successfully disabled. Replug your device.
bjorn at miraculix:/usr/local/src/git/modemmanager/libqcdm$ tests/ipv6pref  /dev/ttyUSB5  --debug 
DM:ENC>>> (136)  26 68 07 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 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 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 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 00 
                 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
                 00 00 00 00 00 60 1c 7e 
QCDM:DEC<< (133)  26 68 07 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 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 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 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 00 
                  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
                  00 00 00 00 00 
IPv6: disabled



After replugging the E392, we still see the IPV6 and IPV4V6 context types:


ati                                                                                                                                 
Manufacturer: Huawei Technologies Co., Ltd.                                                                                         
Model: E392                                                                                                                         
Revision: 11.335.13.00.000
IMEI: 860999000023707
+GCAP: +CGSM

OK
at+cgdcont=?
+CGDCONT: (1-16),"IP",,,(0-2),(0-4)
+CGDCONT: (1-16),"PPP",,,(0-2),(0-4)
+CGDCONT: (1-16),"IPV6",,,(0-2),(0-4)
+CGDCONT: (1-16),"IPV4V6",,,(0-2),(0-4)

OK
at+cgdcont?
+CGDCONT: 1,"IPV4V6","telenor.smart","0.0.0.0",0,0

OK



But now IPv6 connections do not work anymore:

root at miraculix:/tmp# qmicli -d /dev/cdc-wdm1  --wds-start-network=apn=telenor.smart,ip-type=6  --client-no-release-cid
error: couldn't start network: QMI protocol error (14): 'CallFailed'
call end reason (1): generic-unspecified
verbose call end reason (2,204): [internal] unknown-cause
[/dev/cdc-wdm1] Client ID not released:
        Service: 'wds'
            CID: '1'


IPv4 connections do of course still work:

root at miraculix:/tmp# qmicli -d /dev/cdc-wdm1  --wds-start-network=apn=telenor.smart,ip-type=4  --client-no-release-cid
[/dev/cdc-wdm1] Network started
        Packet data handle: '34969280'
[/dev/cdc-wdm1] Client ID not released:
        Service: 'wds'
            CID: '2'




This behaviour is so different from the symptoms Tore see, that I doubt
there is any relation.  Still, it can't harm to test if the attached
patch allows writing anything that NV item...  Or it can harm - I never
give out gurantees when it comes to arbitrary NVRAM writes ;-)



Bjørn

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-qcdm-replace-single-byte-write-in-ipv6pref.patch
Type: text/x-diff
Size: 1126 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20170705/2695f5f7/attachment-0001.patch>


More information about the ModemManager-devel mailing list