[ltp] Re: Sierra Wireless EM7345 4G LTE

Bjørn Mork linux-thinkpad@linux-thinkpad.org
Sat, 05 Jul 2014 14:20:34 +0200


Vincent Bernat <bernat@luffy.cx> writes:

> I have also noticed that on resume, the cdc_acm module seems to think
> there is a problem:
>
> [69937.127857] cdc_mbim 2-4:1.0: cdc-wdm1: USB WDM device
> [69937.128063] cdc_mbim 2-4:1.0 wwan0: register 'cdc_mbim' at usb-0000:00=
:14.0-4, CDC MBIM, 52:ce:08:1e:a7:19
> [69937.129148] cdc_acm 2-4:1.2: This device cannot do calls on its own. I=
t is not a modem.
> [69937.129188] cdc_acm 2-4:1.2: ttyACM0: USB ACM device
>
> I have to unload cdc_acm and cdc_mbim and load cdc_mbim. I'll try to
> blacklist cdc_acm to see if there is some enhancement on this front.

That message is not really an error.  It just means what it says
(referring to the ttyACM0 device, not the whole composite device which
of course is a modem).  I believe the ACM function is there as a GPS
NMEA(?) output. But I have no idea how to enable it.  Any hints are
appreciated.  Maybe someone with Windows could try to enable the GPS (if
the Windows drivers/software support this?) and snoop on the
communication?


Anyway, back to the message.  If you do "lsusb -vd 1199:a001" you'll see
this part:


    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface             12 
      CDC Header:
        bcdCDC               1.20
      CDC Union:
        bMasterInterface        2
        bSlaveInterface         3 
      CDC Call Management:
        bmCapabilities       0x00
        bDataInterface          3
      CDC ACM:
        bmCapabilities       0x07
          sends break
          line coding and serial state
          get/set/clear comm features


And looking at the cdc-acm driver, the message appears when one of or
both of the two lowest bits of the bmCapabilities field in the CDC Call
Management functional descriptor are cleared:

                case USB_CDC_CALL_MANAGEMENT_TYPE:
                        call_management_function = buffer[3];
                        call_interface_num = buffer[4];
                        if ((quirks & NOT_A_MODEM) == 0 && (call_management_function & 3) != 3)
                                dev_err(&intf->dev, "This device cannot do calls on its own. It is not a modem.\n");
                        break;


This bit field is described like this in the CDC PSTN (sic) spec, table 3:

 The capabilities that this configuration supports:
 D7..D2: RESERVED (Reset to zero)

 D1: 0 - Device sends/receives call management information only over the
         Communications Class interface.
     1 - Device can send/receive call management information over a Data
         Class interface.
 D0: 0 - Device does not handle call management itself.
     1 - Device handles call management itself.

 The previous bits, in combination, identify which call management
 scenario is used. If bit D0 is reset to 0, then the value of bit D1 is
 ignored. In this case, bit D1 is reset to zero for future
 compatibility.


So all the descriptor and driver message means is that you cannot use
the ttyACM0 device for call management.  Which you do not want to do
either.  You'll use the CDC MBIM function for that.

The message appears after resume because the power to the internal modem
slot is cut off during suspend, so the modem will boot and be discovered
as a "new" device on enry resume.  I personally find this a bit
annoying, but there isn't much we can do about it.  It is part of the
laptop design and the way all Thinkpads with internal modem slots behave
AFAIK. 


Bjørn