The cdc_mbim driver supports USB devices conforming to the “UniversalSerial Bus Communications Class Subclass Specification for MobileBroadband Interface Model” , which is a further development of“Universal Serial Bus Communications Class Subclass Specifications forNetwork Control Model Devices”  optimized for Mobile Broadbanddevices, aka “3G/LTE modems”.
Command Line Parameters¶
MoTeC provides solutions to connect the device to the PC's parallel (printer) port or USB port. For most devices the USB port is preferable, however some older devices have to be connected to the PC's parallel (printer) port, see below for details. Communication hardware and device wiring to connect MoTeC products with a CAN port to the PC. Download OPEL-USB Driver On most models, supported by diagnostics of all electronic systems that have. $190 DOWNLOAD MoTeC M48 MoTeC’s M48 is a popular, earlier generation ECU with a lot to offer both road.
The cdc_mbim driver has no parameters of its own. But the probingbehaviour for NCM 1.0 backwards compatible MBIM functions (an“NCM/MBIM function” as defined in section 3.2 of ) is affectedby a cdc_ncm driver parameter:
|Valid Range:||N/Y (0-1)|
|Default Value:||Y (MBIM is preferred)|
This parameter sets the system policy for NCM/MBIM functions. Suchfunctions will be handled by either the cdc_ncm driver or the cdc_mbimdriver depending on the prefer_mbim setting. Setting prefer_mbim=Nmakes the cdc_mbim driver ignore these functions and lets the cdc_ncmdriver handle them instead.
The parameter is writable, and can be changed at any time. A manualunbind/bind is required to make the change effective for NCM/MBIMfunctions bound to the “wrong” driver
MBIM functions are inactive when unmanaged. The cdc_mbim driver onlyprovides a userspace interface to the MBIM control channel, and willnot participate in the management of the function. This implies that auserspace MBIM management application always is required to enable aMBIM function.
Such userspace applications includes, but are not limited to:
Motec Pty USB Devices Driver Download
- mbimcli (included with the libmbim  library), and
- ModemManager 
Establishing a MBIM IP session reequires at least these actions by themanagement application:
- open the control channel
- configure network connection settings
- connect to network
- configure IP interface
Management application development¶
The driver <-> userspace interfaces are described below. The MBIMcontrol channel protocol is described in .
MBIM control channel userspace ABI¶
/dev/cdc-wdmX character device¶
The driver creates a two-way pipe to the MBIM function control channelusing the cdc-wdm driver as a subdriver. The userspace end of thecontrol channel pipe is a /dev/cdc-wdmX character device.
The cdc_mbim driver does not process or police messages on the controlchannel. The channel is fully delegated to the userspace managementapplication. It is therefore up to this application to ensure that itcomplies with all the control channel requirements in .
The cdc-wdmX device is created as a child of the MBIM controlinterface USB device. The character device associated with a specificMBIM function can be looked up using sysfs. For example:
USB configuration descriptors¶
The wMaxControlMessage field of the CDC MBIM functional descriptorlimits the maximum control message size. The managament application isresponsible for negotiating a control message size complying with therequirements in section 9.3.1 of , taking this descriptor fieldinto consideration.
The userspace application can access the CDC MBIM functionaldescriptor of a MBIM function using either of the two USBconfiguration descriptor kernel interfaces described in  or .
See also the ioctl documentation below.
The userspace application is responsible for all control messagefragmentation and defragmentaion, as described in section 9.5 of .
The MBIM control messages from the management application must notexceed the negotiated control message size.
The management application must accept control messages of up thenegotiated control message size.
IOCTL_WDM_MAX_COMMAND: Get Maximum Command SizeThis ioctl returns the wMaxControlMessage field of the CDC MBIMfunctional descriptor for MBIM devices. This is intended as aconvenience, eliminating the need to parse the USB descriptors fromuserspace.
Custom device services¶
The MBIM specification allows vendors to freely define additionalservices. This is fully supported by the cdc_mbim driver.
Support for new MBIM services, including vendor specified services, isimplemented entirely in userspace, like the rest of the MBIM controlprotocol
New services should be registered in the MBIM Registry .
MBIM data channel userspace ABI¶
wwanY network device¶
The cdc_mbim driver represents the MBIM data channel as a singlenetwork device of the “wwan” type. This network device is initiallymapped to MBIM IP session 0.
Multiplexed IP sessions (IPS)¶
MBIM allows multiplexing up to 256 IP sessions over a single USB datachannel. The cdc_mbim driver models such IP sessions as 802.1q VLANsubdevices of the master wwanY device, mapping MBIM IP session Z toVLAN ID Z for all values of Z greater than 0.
The device maximum Z is given in the MBIM_DEVICE_CAPS_INFO structuredescribed in section 10.5.1 of .
Motec Pty Usb Devices Driver Download Windows 7
The userspace management application is responsible for adding newVLAN links prior to establishing MBIM IP sessions where the SessionIdis greater than 0. These links can be added by using the normal VLANkernel interfaces, either ioctl or netlink.
For example, adding a link for a MBIM IP session with SessionId 3:
The driver will automatically map the “wwan0.3” network device to MBIMIP session 3.
Device Service Streams (DSS)¶
MBIM also allows up to 256 non-IP data streams to be multiplexed overthe same shared USB data channel. The cdc_mbim driver models thesesessions as another set of 802.1q VLAN subdevices of the master wwanYdevice, mapping MBIM DSS session A to VLAN ID (256 + A) for all valuesof A.
The device maximum A is given in the MBIM_DEVICE_SERVICES_INFOstructure described in section 10.5.29 of .
The DSS VLAN subdevices are used as a practical interface between theshared MBIM data channel and a MBIM DSS aware userspace application.It is not intended to be presented as-is to an end user. Theassumption is that a userspace application initiating a DSS sessionalso takes care of the necessary framing of the DSS data, presentingthe stream to the end user in an appropriate way for the stream type.
The network device ABI requires a dummy ethernet header for every DSSdata frame being transported. The contents of this header isarbitrary, with the following exceptions:
- TX frames using an IP protocol (0x0800 or 0x86dd) will be dropped
- RX frames will have the protocol field set to ETH_P_802_3 (but willnot be properly formatted 802.3 frames)
- RX frames will have the destination address set to the hardwareaddress of the master device
The DSS supporting userspace management application is responsible foradding the dummy ethernet header on TX and stripping it on RX.
This is a simple example using tools commonly available, exportingDssSessionId 5 as a pty character device pointed to by a /dev/nmeasymlink:
This is only an example, most suitable for testing out a DSSservice. Userspace applications supporting specific MBIM DSS servicesare expected to use the tools and programming interfaces required bythat service.
Note that adding VLAN links for DSS sessions is entirely optional. Amanagement application may instead choose to bind a packet socketdirectly to the master network device, using the received VLAN tags tomap frames to the correct DSS session and adding 18 byte VLAN ethernetheaders with the appropriate tag on TX. In this case using a socketfilter is recommended, matching only the DSS VLAN subset. This avoidunnecessary copying of unrelated IP session data to userspace. Forexample:
Tagged IP session 0 VLAN¶
As described above, MBIM IP session 0 is treated as special by thedriver. It is initially mapped to untagged frames on the wwanYnetwork device.
This mapping implies a few restrictions on multiplexed IPS and DSSsessions, which may not always be practical:
- no IPS or DSS session can use a frame size greater than the MTU onIP session 0
- no IPS or DSS session can be in the up state unless the networkdevice representing IP session 0 also is up
These problems can be avoided by optionally making the driver map IPsession 0 to a VLAN subdevice, similar to all other IP sessions. Thisbehaviour is triggered by adding a VLAN link for the magic VLAN ID4094. The driver will then immediately start mapping MBIM IP session0 to this VLAN, and will drop untagged frames on the master wwanYdevice.
Tip: It might be less confusing to the end user to name this VLANsubdevice after the MBIM SessionID instead of the VLAN ID. Forexample:
Summarizing the cdc_mbim driver mapping described above, we have thisrelationship between VLAN tags on the wwanY network device and MBIMsessions on the shared USB data channel:
USB Implementers Forum, Inc. - “Universal Serial BusCommunications Class Subclass Specification for Mobile BroadbandInterface Model”, Revision 1.0 (Errata 1), May 1, 2013
USB Implementers Forum, Inc. - “Universal Serial BusCommunications Class Subclass Specifications for Network ControlModel Devices”, Revision 1.0 (Errata 1), November 24, 2010
libmbim - “a glib-based library for talking to WWAN modems anddevices which speak the Mobile Interface Broadband Model (MBIM)protocol”
ModemManager - “a DBus-activated daemon which controls mobilebroadband (2G/3G/4G) devices and connections”
“MBIM (Mobile Broadband Interface Model) Registry”
“/sys/kernel/debug/usb/devices output format”