iznobe
Posts: 703
Joined: Sun Feb 05, 2017 4:14 pm
Location: Avignon , FRANCE

configure GSM modem libqmi

Tue Jul 27, 2021 6:10 pm

Hi all ,

first excuse me for my bad english ...

i have a GSM modem : huawei MS2372-H153 ... on a pi3B

Code: Select all

pi@rasphomefi:~ $ lsb_release -id
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 10 (buster)
pi@rasphomefi:~ $
the power supply is a 5 Volts 3 Amperes ( 2 A recommended ) .

this one is connected , and working fine , but only for a few time , a few hours max so , i would like to configure my connection with libqmi ( it seems it is possible ) , i installed this package and look at the man page , but , use mmcli and libqmi in conjunction is very hard for me :roll:

the modem stay in state registered as in this post : https://forums.balena.io/t/mmcli-stuck- ... e/274007/9

you can find more information about in this french post : viewtopic.php?f=65&t=312053

i hope doing this will solve my problem and finally having a really working connection .

can you give me a tutorial to do this , or help me to solve this if you think using libqmi is not necessary please ?
Last edited by iznobe on Wed Jul 28, 2021 6:14 am, edited 2 times in total.

iznobe
Posts: 703
Joined: Sun Feb 05, 2017 4:14 pm
Location: Avignon , FRANCE

Re: configure GSM modem libqmi

Wed Jul 28, 2021 6:14 am

Hello here some info about GSM when all is good :

Code: Select all

pi@rasphomefi:~ $ mmcli --modem=0
  --------------------------------
  General  |            dbus path: /org/freedesktop/ModemManager1/Modem/0
           |            device id: 899b93b3a7183be08f03be8afb9f65a6a6c14466
  --------------------------------
  Hardware |         manufacturer: huawei
           |                model: MS2372h-153
           |             revision: 21.327.07.00.00
           |            supported: gsm-umts
           |              current: gsm-umts
           |         equipment id: 866129030046973
  --------------------------------
  System   |               device: /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5
           |              drivers: huawei_cdc_ncm, option1
           |               plugin: Huawei
           |         primary port: ttyUSB2
           |                ports: ttyUSB0 (at), ttyUSB2 (at), wwan0 (net)
  --------------------------------
  Status   |       unlock retries: sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)
           |                state: connected
           |          power state: on
           |          access tech: lte
           |       signal quality: 64% (recent)
  --------------------------------
  Modes    |            supported: allowed: 2g; preferred: none
           |                       allowed: 3g; preferred: none
           |                       allowed: 4g; preferred: none
           |                       allowed: 2g, 3g, 4g; preferred: none
           |              current: allowed: 4g; preferred: none
  --------------------------------
  IP       |            supported: ipv4
  --------------------------------
  3GPP     |                 imei: 866129030046973
           |        enabled locks: sim
           |          operator id: 20810
           |        operator name: F SFR
           |         registration: home
  --------------------------------
  3GPP EPS | ue mode of operation: csps-2
  --------------------------------
  SIM      |            dbus path: /org/freedesktop/ModemManager1/SIM/0
  --------------------------------
  Bearer   |            dbus path: /org/freedesktop/ModemManager1/Bearer/0
pi@rasphomefi:~
and the output of dmesg after a reboot :

Code: Select all

pi@rasphomefi:~/Scripts $ sudo dmesg | tail -100
[    9.966838] bcm2835_isp: module is from the staging directory, the quality is unknown, you have been warned.
[    9.974362] bcm2835_mmal_vchiq: Failed to open VCHI service connection (status=-1)
[   10.000671] bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.
[   10.001964] bcm2835_codec: module is from the staging directory, the quality is unknown, you have been warned.
[   10.016626] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
[   10.028887] bcm2835_mmal_vchiq: Failed to open VCHI service connection (status=-1)
[   10.029278] bcm2835_mmal_vchiq: Failed to open VCHI service connection (status=-1)
[   10.046509] bcm2835_audio bcm2835_audio: card created with 4 channels
[   10.050274] bcm2835_audio bcm2835_audio: card created with 4 channels
[   10.477597] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[   10.588859] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[   10.678809] brcmfmac: F1 signature read @0x18000000=0x1541a9a6
[   10.694333] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[   10.694638] usbcore: registered new interface driver brcmfmac
[   10.730842] brcmfmac mmc1:0001:1: Direct firmware load for brcm/brcmfmac43430-sdio.raspberrypi,3-model-b.txt failed with error -2
[   10.774953] usbcore: registered new interface driver uas
[   10.948850] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac43430-sdio for chip BCM43430/1
[   10.948973] brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-2), device may have limited channels available
[   10.949792] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Oct 22 2019 01:59:28 version 7.45.98.94 (r723000 CY) FWID 01-3b33decd
[   11.001536] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   11.314123] usb 1-1.5: new high-speed USB device number 5 using dwc_otg
[   11.445768] usb 1-1.5: New USB device found, idVendor=12d1, idProduct=14fe, bcdDevice= 1.02
[   11.445796] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   11.445812] usb 1-1.5: Product: HUAWEI_MOBILE
[   11.445827] usb 1-1.5: Manufacturer: HUAWEI_MOBILE
[   11.445842] usb 1-1.5: SerialNumber: 0123456789ABCDEF
[   11.447199] usb-storage 1-1.5:1.0: USB Mass Storage device detected
[   11.486975] scsi host1: usb-storage 1-1.5:1.0
[   12.556228] scsi 1:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[   12.557149] scsi 1:0:0:0: Attached scsi generic sg1 type 5
[   12.697301] sr 1:0:0:0: Power-on or device reset occurred
[   12.700166] sr 1:0:0:0: [sr0] scsi-1 drive
[   12.700189] cdrom: Uniform CD-ROM driver Revision: 3.20
[   12.991829] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
[   12.991899] ext4 filesystem being mounted at /home/shares/public/disk1 supports timestamps until 2038 (0x7fffffff)
[   13.007252] sr 1:0:0:0: Attached scsi CD-ROM sr0
[   14.802015] uart-pl011 3f201000.serial: no DMA platform data
[   14.926172] 8021q: 802.1Q VLAN Support v1.8
[   15.434237] Adding 102396k swap on /var/swap.  Priority:-2 extents:1 across:102396k FS
[   15.881944] usb 1-1.5: USB disconnect, device number 5
[   16.184100] usb 1-1.5: new high-speed USB device number 6 using dwc_otg
[   16.221649] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[   16.319199] usb 1-1.5: New USB device found, idVendor=12d1, idProduct=1506, bcdDevice= 1.02
[   16.319232] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   16.319249] usb 1-1.5: Product: HUAWEI_MOBILE
[   16.319264] usb 1-1.5: Manufacturer: HUAWEI_MOBILE
[   16.357227] br0: port 1(eth0) entered blocking state
[   16.357253] br0: port 1(eth0) entered disabled state
[   16.357742] device eth0 entered promiscuous mode
[   16.517048] SMSC LAN8700 usb-001:003:01: attached PHY driver [SMSC LAN8700] (mii_bus:phy_addr=usb-001:003:01, irq=POLL)
[   16.517579] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   16.535257] smsc95xx 1-1.1:1.0 eth0: Link is Down
[   16.793191] usbcore: registered new interface driver usbserial_generic
[   16.793681] usbserial: USB Serial support registered for generic
[   16.949814] usbcore: registered new interface driver cdc_ether
[   17.023330] usbcore: registered new interface driver option
[   17.023433] usbserial: USB Serial support registered for GSM modem (1-port)
[   17.024129] option 1-1.5:1.0: GSM modem (1-port) converter detected
[   17.025104] usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB0
[   17.025511] option 1-1.5:1.1: GSM modem (1-port) converter detected
[   17.027595] usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB1
[   17.028006] option 1-1.5:1.2: GSM modem (1-port) converter detected
[   17.030550] usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB2
[   17.062162] usbcore: registered new interface driver cdc_ncm
[   17.095950] usbcore: registered new interface driver cdc_wdm
[   17.126437] huawei_cdc_ncm 1-1.5:1.3: MAC-Address: 00:1e:10:1f:00:00
[   17.126467] huawei_cdc_ncm 1-1.5:1.3: setting rx_max = 16384
[   17.126866] huawei_cdc_ncm 1-1.5:1.3: NDP will be placed at end of frame for this device.
[   17.128616] huawei_cdc_ncm 1-1.5:1.3: cdc-wdm0: USB WDM device
[   17.162859] br0: port 2(wlan0) entered blocking state
[   17.162884] br0: port 2(wlan0) entered disabled state
[   17.163372] device wlan0 entered promiscuous mode
[   17.224636] huawei_cdc_ncm 1-1.5:1.3 wwan0: register 'huawei_cdc_ncm' at usb-3f980000.usb-1.5, Huawei CDC NCM device, 00:1e:10:1f:00:00
[   17.225363] usbcore: registered new interface driver huawei_cdc_ncm
[   17.550347] br0: port 2(wlan0) entered blocking state
[   17.550372] br0: port 2(wlan0) entered forwarding state
[   18.635575] smsc95xx 1-1.1:1.0 eth0: Link is Up - 100Mbps/Full - flow control off
[   18.635652] br0: port 1(eth0) entered blocking state
[   18.635679] br0: port 1(eth0) entered forwarding state
[   19.082650] NFSD: Using UMH upcall client tracking operations.
[   19.082681] NFSD: starting 90-second grace period (net f00005c9)
[   19.304185] Bluetooth: Core ver 2.22
[   19.304330] NET: Registered protocol family 31
[   19.304344] Bluetooth: HCI device and connection manager initialized
[   19.304377] Bluetooth: HCI socket layer initialized
[   19.304399] Bluetooth: L2CAP socket layer initialized
[   19.304435] Bluetooth: SCO socket layer initialized
[   19.354097] Bluetooth: HCI UART driver ver 2.3
[   19.354126] Bluetooth: HCI UART protocol H4 registered
[   19.354328] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   19.354656] Bluetooth: HCI UART protocol Broadcom registered
[   19.931682] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   19.931706] Bluetooth: BNEP filters: protocol multicast
[   19.931748] Bluetooth: BNEP socket layer initialized
[   20.063533] Bluetooth: RFCOMM TTY layer initialized
[   20.063585] Bluetooth: RFCOMM socket layer initialized
[   20.063627] Bluetooth: RFCOMM ver 1.11
[   25.258084] fuse: init (API version 7.32)
pi@rasphomefi:~/Scripts $

Return to “Networking and servers”