User Tools

Site Tools


Translations of this page:

en:bpi-r3:lte

This is an old revision of the document!


LTE

to test the EM7455 Card (+ NGFF Key-B Adapter) on the BPI-R3 (mPCIe Slot)

https://www.bipom.com/documents/sierra/4117727%20AirPrime%20EM-MC74xx%20AT%20Command%20Reference%20r4.pdf

Kernel-Options:

CONFIG_USB_USBNET=m
CONFIG_USB_SERIAL_OPTION=m
CONFIG_USB_SERIAL_QUALCOMM=m
CONFIG_USB_NET_CDC_MBIM=m
CONFIG_USB_NET_QMI_WWAN=m

i'm using a Congstar-SIM

APN-settings: https://forum.congstar.de/thread/46325-mobil-surfen-mit-congstar-manuelle-einstellungen-zum-mobilen-internet-apn/

QMI-Mode

MBIM-Mode

first Test

root@bpi-r3:~# modprobe cdc_mbim

/etc/mbim-network.conf:
APN=internet.v6.telekom
PROXY=yes

root@bpi-r3:~# mbimcli --device=/dev/cdc-wdm0  --query-device-caps
[/dev/cdc-wdm0] Device capabilities retrieved:
              Device type: 'remote'
           Cellular class: 'gsm'
              Voice class: 'no-voice'
                SIM class: 'removable'
               Data class: 'umts, hsdpa, hsupa, lte'
                 SMS caps: 'pdu-receive, pdu-send'
                Ctrl caps: 'reg-manual'
             Max sessions: '8'
        Custom data class: 'unknown'
                Device ID: '352733105743066'
            Firmware info: 'SWI9X30C_02.24.03.00'
            Hardware info: 'EM7455'
root@bpi-r3:~# mbim-network /dev/cdc-wdm0 start
Loading profile at /etc/mbim-network.conf...
    APN: internet.v6.telekom
    APN auth protocol: unset
    APN user: unset
    APN password: unset
    mbim-proxy: yes
Querying subscriber ready status 'mbimcli -d /dev/cdc-wdm0 --query-subscriber-ready-status --no-close --device-open-proxy'...
[/dev/cdc-wdm0] Subscriber ready status retrieved: Ready state: 'device-locked'
Subscriber ID: 'unknown' SIM ICCID: '89490200001355851497' Ready info: 'none' Telephone numbers: (0) 'unknown' [/dev/cdc-wdm0] Session not closed: TRID: '4'
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 4)
Querying registration state 'mbimcli -d /dev/cdc-wdm0 --query-registration-state --no-open=4 --no-close --device-open-proxy'...
[/dev/cdc-wdm0] Registration status: Network error: 'unknown' Register state: 'deregistered' Register mode: 'automatic' Available data classes: 'unknown' Curren
t cellular class: 'gsm' Provider ID: 'unknown' Provider name: 'unknown' Roaming text: 'unknown' Registration flags: 'packet-service-automatic-attach' [/dev/cdc-wdm0] Session not closed: TRID: '6'                                             
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 6)
Attaching to packet service with 'mbimcli -d /dev/cdc-wdm0 --attach-packet-service --no-open=6 --no-close --device-open-proxy'...
error: operation failed: PinRequired
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 8)
Starting network with 'mbimcli -d /dev/cdc-wdm0 --connect=apn='internet.v6.telekom' --no-open=8 --no-close --device-open-proxy'...                              
error: operation failed: PinRequired
Network start failed
[/dev/cdc-wdm0] Session not closed: TRID: '10'
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 10)
root@bpi-r3:~#

so it looks like pin-problem and i tried this:

root@bpi-r3:~# mbimcli --device=/dev/cdc-wdm0 -p --enter-pin=1234
[/dev/cdc-wdm0] PIN operation successful
                                                                                
[/dev/cdc-wdm0] PIN info:
                 PIN state: 'locked'
                  PIN type: 'pin2'
        Remaining attempts: '3'
root@bpi-r3:~# mbim-network /dev/cdc-wdm0 start
Loading profile at /etc/mbim-network.conf...
    APN: internet.v6.telekom
    APN auth protocol: unset
    APN user: unset
    APN password: unset
    mbim-proxy: yes
Loading previous state from /tmp/mbim-network-state-cdc-wdm0...
    Previous Transaction ID: 10
error: no actions specified
Clearing state at /tmp/mbim-network-state-cdc-wdm0...
Querying subscriber ready status 'mbimcli -d /dev/cdc-wdm0 --query-subscriber-ready-status --no-close --device-open-proxy'...
[/dev/cdc-wdm0] Subscriber ready status retrieved: Ready state: 'initialized' Subscriber ID: '26201704168zzzz' SIM ICCID: '8949020000135585yyyy' Ready info: 'none' Telephone numbers: (1) '+491512025xxxx' [/dev/cdc-wdm0] Session not closed: 
TRID: '4'
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 4)
Querying registration state 'mbimcli -d /dev/cdc-wdm0 --query-registration-state
 --no-open=4 --no-close --device-open-proxy'...
[/dev/cdc-wdm0] Registration status: Network error: 'unknown' Register state: 'deregistered' Register mode: 'automatic' Available data classes: 'unknown' Current cellular class: 'gsm' Provider ID: 'unknown' Provider name: 'unknown' Roaming
text: 'unknown' Registration flags: 'packet-service-automatic-attach' [/dev/cdc-wdm0] Session not closed: TRID: '6'
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 6)
Attaching to packet service with 'mbimcli -d /dev/cdc-wdm0 --attach-packet-service --no-open=6 --no-close --device-open-proxy'...
error: operation failed: RadioPowerOff
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 8)
Starting network with 'mbimcli -d /dev/cdc-wdm0 --connect=apn='internet.v6.telekom' --no-open=8 --no-close --device-open-proxy'...
error: operation failed: RadioPowerOff
Network start failed
[/dev/cdc-wdm0] Session not closed: TRID: '10'
Saving state at /tmp/mbim-network-state-cdc-wdm0... (TRID: 10)
root@bpi-r3:~#

change Mode

Caution this may break functionality!

Make sure all known modules are loaded:

root@bpi-r3:~# modprobe qmi_wwan
root@bpi-r3:~# modprobe qcserial
root@bpi-r3:~# modprobe cdc_mbim

Get and switch mode (device open param should match your current Mode):

root@bpi-r3:~# qmicli -d /dev/cdc-wdm0 --device-open-mbim --dms-swi-get-usb-composition
[/dev/cdc-wdm0] Successfully retrieved USB compositions:
            USB composition 6: DM, NMEA, AT, QMI
        [*] USB composition 8: DM, NMEA, AT, MBIM
            USB composition 9: MBIM

root@bpi-r3:~# qmicli -d /dev/cdc-wdm0 --device-open-mbim --dms-swi-set-usb-composition 6

After that you will be prompted to set dwvice offline and do reset.

troubleshooting

In my case no device is recognized by driver (no serial ttyUSBx too). Fixed this by adding usb-id in qcserial and qmi_wwan driver.

But before i tried these steps:

i saw in dmesg only this (also after cold-reset):

[    3.592655] usb 1-1.1: new high-speed USB device number 4 using xhci-mtk
[    3.823392] usb 1-1.1: config 1 has an invalid interface number: 8 but max is 3
[    3.830719] usb 1-1.1: config 1 has no interface number 1

with this i have got access to the AT-Interface:

lsusb:

Bus 001 Device 004: ID 413c:81c2 Dell Computer Corp. DW5811e Snapdragon™ X7 LTE

unlock ttyUSBx with option-module:

root@bpi-r3:~# modprobe option
[  229.747728] usbcore: registered new interface driver option
[  229.753429] usbserial: USB Serial support registered for GSM modem (1-port)

root@bpi-r3:~# echo 413c 81c2 >/sys/bus/usb-serial/drivers/option1/new_id
[  300.293186] option 1-1.1:1.0: GSM modem (1-port) converter detected
[  300.299755] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB0
[  300.307011] option 1-1.1:1.2: GSM modem (1-port) converter detected
[  300.313657] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB1
[  300.320968] option 1-1.1:1.3: GSM modem (1-port) converter detected
[  300.327741] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB2
[  300.336533] option 1-1.1:1.8: GSM modem (1-port) converter detected
[  300.343262] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB3

now only with “minicom -D /dev/ttyUSB2”. (commandmode with Ctrl+AA, because already via Minicom on the R3)

ATE1

OK

AT!ENTERCND="A710"

OK

AT!CUSTOM?

!CUSTOM:

             GPSENABLE          0x04

             GPSSEL             0x01

             IPV6ENABLE         0x01

             SIMLPM             0x01

             USBSERIALENABLE    0x01

             SINGLEAPNSWITCH    0x01


OK

AT!USBCOMP?

Config Index: 1

Config Type:  1 (Generic)

Interface bitmask: 0020010D (diag,nmea,modem,rmnet0,ubist) 


OK

AT!USBCOMP=?

!USBCOMP: 

AT!USBCOMP=<Config Index>,<Config Type>,<Interface bitmask>

  <Config Index>      - configuration index to which the composition applies, s


  <Config Type>       - 1:Generic, 2:USBIF-MBIM, 3:RNDIS

                        config type 2/3 should only be used for specific Sierra

                        customized VID/PID should use config type 1


  <Interface bitmask> - DIAG     - 0x00000001,

                        NMEA     - 0x00000004,

                        MODEM    - 0x00000008,

                        RMNET0   - 0x00000100,

                        RMNET1   - 0x00000400,

                        MBIM     - 0x00001000,

  e.g.

  10D  - diag, nmea, modem, rmnet interfaces enabled

  1009 - diag, modem, mbim interfaces enabled


  The default configuration is:

  at!usbcomp=1,1,10F


OK

can't set default-mode, but the following fixes it and go back to mbim-mode after a cold-boot (ttyUSB accessible via options-module too)

AT!USBCOMP=1,1,100D
OK
AT!RESET
OK
en/bpi-r3/lte.1664294149.txt.gz · Last modified: 2023/06/08 17:06 (external edit)