No IP for USB 3G modem Huawei E3131 using modemmanager
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I am trying to use a Huawei E3131 USB 3G modem on a Raspberry Pi system using raspbian (Debian 8) and modemmanager. I have two of those modems, and while they look the same, to the system they seem slightly different. They could be different revision of the same model, perhaps with slightly different firmware. One works and the other doesn't, but I would need them both to work. Kernel version is 4.1.18-v7+ and modemmanager version is 1.4.0-1.
I am connecting with modemmanager, using this command:
mmcli -m 0 --simple-connect="pin=1234,apn=internet"
SIM card shouldn't be causing this problem, because I only have one and it works with one modem.
According to modemmanager, both modems do get connected, but for some reason, the other one never gets a proper IP i.e. is left with 169.254.x.y.
There are differences at least in the modems' USB product ids (before usb_modeswitch is called, I assume) and revisions.
I know that the model that is not working for me has worked in some older Debian system that was using a 2.6 kernel, but that system didn't use modemmanager but something less automatic.
What could be causing this and how to fix it?
Google finds a lot of material about using this modem with Linux, but none of that seems to be specifically about using modemmanager to connect the modem.
The model of the modems as printed on the modem itself is E3131, but lsusb says they both are E398. Also, the one that works has number 0197 printed right after the CE sign on its label and the one doesn't has number 0979.
For the modem that works, the console output contains these lines:
usb 1-1.3: new full-speed USB device number 6 using at91_ohci
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=14fe
usb 1-1.3: New USB device strings: Mfr=2, Product=1, SerialNumber=0
usb 1-1.3: Product: HUAWEI Mobile
usb 1-1.3: Manufacturer: HUAWEI
usb-storage 1-1.3:1.0: USB Mass Storage device detected
scsi host3: usb-storage 1-1.3:1.0
usb-storage 1-1.3:1.1: USB Mass Storage device detected
scsi host4: usb-storage 1-1.3:1.1
scsi 3:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 3:0:0:0: Attached scsi generic sg0 type 5
scsi 4:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
sd 4:0:0:0: Attached scsi generic sg1 type 0
sd 4:0:0:0: [sda] Attached SCSI removable disk
usb 1-1.3: USB disconnect, device number 6
usb 1-1.3: new full-speed USB device number 7 using at91_ohci
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=1506
usb 1-1.3: New USB device strings: Mfr=3, Product=2, SerialNumber=0
usb 1-1.3: Product: HUAWEI Mobile
usb 1-1.3: Manufacturer: HUAWEI
option 1-1.3:1.0: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
huawei_cdc_ncm 1-1.3:1.1: MAC-Address: 58:2c:80:13:92:63
huawei_cdc_ncm 1-1.3:1.1: setting rx_max = 16384
huawei_cdc_ncm 1-1.3:1.1: setting tx_max = 16384
huawei_cdc_ncm 1-1.3:1.1: cdc-wdm0: USB WDM device
huawei_cdc_ncm 1-1.3:1.1 wwan0: register 'huawei_cdc_ncm' at usb-at91-1.3, Huawei CDC NCM device, 58:2c:80:13:92:63
option 1-1.3:1.2: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB3
option 1-1.3:1.3: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB4
usb-storage 1-1.3:1.4: USB Mass Storage device detected
scsi host5: usb-storage 1-1.3:1.4
usb-storage 1-1.3:1.5: USB Mass Storage device detected
scsi host6: usb-storage 1-1.3:1.5
scsi 5:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 5:0:0:0: Attached scsi generic sg0 type 5
scsi 6:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
sd 6:0:0:0: Attached scsi generic sg1 type 0
sd 6:0:0:0: [sda] Attached SCSI removable disk
For the one that doesn't work, the console output contains these lines:
usb 1-1.3: new full-speed USB device number 4 using at91_ohci
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=15ca
usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.3: Product: HUAWEI Mobile
usb 1-1.3: Manufacturer: HUAWEI
usb 1-1.3: SerialNumber: FFFFFFFFFFFFFFFF
usb-storage 1-1.3:1.0: USB Mass Storage device detected
scsi host0: usb-storage 1-1.3:1.0
usbcore: registered new interface driver usb-storage
scsi 0:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 0:0:0:0: Attached scsi generic sg0 type 5
scsi 0:0:0:1: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
sd 0:0:0:1: Attached scsi generic sg1 type 0
sd 0:0:0:1: [sda] Attached SCSI removable disk
usb 1-1.3: USB disconnect, device number 4
usb 1-1.3: new full-speed USB device number 5 using at91_ohci
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=1506
usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1.3: Product: HUAWEI Mobile
usb 1-1.3: Manufacturer: HUAWEI
usb-storage 1-1.3:1.4: USB Mass Storage device detected
scsi host1: usb-storage 1-1.3:1.4
usb-storage 1-1.3:1.5: USB Mass Storage device detected
scsi host2: usb-storage 1-1.3:1.5
usbcore: registered new interface driver option
usbserial: USB Serial support registered for GSM modem (1-port)
option 1-1.3:1.0: GSM modem (1-port) converter detected
usbcore: registered new interface driver cdc_ncm
usbcore: registered new interface driver cdc_wdm
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
option 1-1.3:1.2: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
option 1-1.3:1.3: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
huawei_cdc_ncm 1-1.3:1.1: MAC-Address: 00:1e:10:1f:00:00
huawei_cdc_ncm 1-1.3:1.1: cdc-wdm0: USB WDM device
huawei_cdc_ncm 1-1.3:1.1 wwan0: register 'huawei_cdc_ncm' at usb-at91-1.3, Huawei CDC NCM device, 00:1e:10:1f:00:00
usbcore: registered new interface driver huawei_cdc_ncm
scsi 1:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 1:0:0:0: Attached scsi generic sg0 type 5
scsi 2:0:0:0: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
sd 2:0:0:0: Attached scsi generic sg1 type 0
sd 2:0:0:0: [sda] Attached SCSI removable disk
I think these lines taken from the logs above show the difference between the working and the non-working model (working first, non-working second). I mean, the problem, whatever it is, is a consequence of the difference in product ids.
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=14fe
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=1506
usb 1-2: New USB device found, idVendor=12d1, idProduct=15ca
usb 1-2: New USB device found, idVendor=12d1, idProduct=1506
Here is what modemmanager reports as status for the modem that works when it's connected:
/org/freedesktop/ModemManager1/Modem/2 (device id 'b73c90e8e59da46b3739331c98a33d33e109f0c1')
-------------------------
Hardware | manufacturer: 'huawei'
| model: 'E3131'
| revision: '21.157.11.00.264'
| supported: 'gsm-umts'
| current: 'gsm-umts'
| equipment id: '862732015998367'
-------------------------
System | device: '/sys/devices/soc0/ahb/500000.ohci/usb1/1-1/1-1.3'
| drivers: 'huawei_cdc_ncm, option1'
| plugin: 'Huawei'
| primary port: 'ttyUSB6'
| ports: 'cdc-wdm0 (at), ttyUSB3 (at), wwan0 (net), ttyUSB6 (at)'
-------------------------
Numbers | own : 'unknown'
-------------------------
Status | lock: 'none'
| unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)'
| state: 'connected'
| power state: 'on'
| access tech: 'hspa-plus'
| signal quality: '70' (recent)
-------------------------
Modes | supported: 'allowed: 2g, 3g; preferred: none
| allowed: 2g, 3g; preferred: 2g
| allowed: 2g, 3g; preferred: 3g
| allowed: 2g; preferred: none
| allowed: 3g; preferred: none'
| current: 'allowed: 2g, 3g; preferred: 3g'
-------------------------
Bands | supported: 'unknown'
| current: 'unknown'
-------------------------
IP | supported: 'ipv4, ipv6, ipv4v6'
-------------------------
3GPP | imei: '862732015998367'
| enabled locks: 'sim'
| operator id: '24405'
| operator name: 'elisa'
| subscription: 'unknown'
| registration: 'home'
-------------------------
SIM | path: '/org/freedesktop/ModemManager1/SIM/2'
-------------------------
Bearers | paths: '/org/freedesktop/ModemManager1/Bearer/2'
Here is what modemmanager (or mmcli) reports as status for the modem that doesn't work when it's supposed to be connected:
/org/freedesktop/ModemManager1/Modem/1 (device id 'e8157c68e00ab6a13b1b9a67d42acdd180af8d81')
-------------------------
Hardware | manufacturer: 'huawei'
| model: 'E3131'
| revision: '21.521.17.00.865'
| supported: 'gsm-umts'
| current: 'gsm-umts'
| equipment id: '864716020730798'
-------------------------
System | device: '/sys/devices/soc0/ahb/500000.ohci/usb1/1-1/1-1.3'
| drivers: 'huawei_cdc_ncm, option1'
| plugin: 'Huawei'
| primary port: 'ttyUSB4'
| ports: 'ttyUSB1 (at), ttyUSB4 (at), wwan0 (net)'
-------------------------
Numbers | own : 'unknown'
-------------------------
Status | lock: 'none'
| unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)'
| state: 'connected'
| power state: 'on'
| access tech: 'edge'
| signal quality: '100' (recent)
-------------------------
Modes | supported: 'allowed: 2g, 3g; preferred: none
| allowed: 2g, 3g; preferred: 2g
| allowed: 2g, 3g; preferred: 3g
| allowed: 2g; preferred: none
| allowed: 3g; preferred: none'
| current: 'allowed: any; preferred: none'
-------------------------
Bands | supported: 'unknown'
| current: 'unknown'
-------------------------
IP | supported: 'ipv4, ipv6, ipv4v6'
-------------------------
3GPP | imei: '864716020730798'
| enabled locks: 'sim'
| operator id: '24405'
| operator name: 'elisa'
| subscription: 'unknown'
| registration: 'home'
-------------------------
SIM | path: '/org/freedesktop/ModemManager1/SIM/1'
-------------------------
Bearers | paths: '/org/freedesktop/ModemManager1/Bearer/1'
debian usb dhcp modem
add a comment |Â
up vote
1
down vote
favorite
I am trying to use a Huawei E3131 USB 3G modem on a Raspberry Pi system using raspbian (Debian 8) and modemmanager. I have two of those modems, and while they look the same, to the system they seem slightly different. They could be different revision of the same model, perhaps with slightly different firmware. One works and the other doesn't, but I would need them both to work. Kernel version is 4.1.18-v7+ and modemmanager version is 1.4.0-1.
I am connecting with modemmanager, using this command:
mmcli -m 0 --simple-connect="pin=1234,apn=internet"
SIM card shouldn't be causing this problem, because I only have one and it works with one modem.
According to modemmanager, both modems do get connected, but for some reason, the other one never gets a proper IP i.e. is left with 169.254.x.y.
There are differences at least in the modems' USB product ids (before usb_modeswitch is called, I assume) and revisions.
I know that the model that is not working for me has worked in some older Debian system that was using a 2.6 kernel, but that system didn't use modemmanager but something less automatic.
What could be causing this and how to fix it?
Google finds a lot of material about using this modem with Linux, but none of that seems to be specifically about using modemmanager to connect the modem.
The model of the modems as printed on the modem itself is E3131, but lsusb says they both are E398. Also, the one that works has number 0197 printed right after the CE sign on its label and the one doesn't has number 0979.
For the modem that works, the console output contains these lines:
usb 1-1.3: new full-speed USB device number 6 using at91_ohci
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=14fe
usb 1-1.3: New USB device strings: Mfr=2, Product=1, SerialNumber=0
usb 1-1.3: Product: HUAWEI Mobile
usb 1-1.3: Manufacturer: HUAWEI
usb-storage 1-1.3:1.0: USB Mass Storage device detected
scsi host3: usb-storage 1-1.3:1.0
usb-storage 1-1.3:1.1: USB Mass Storage device detected
scsi host4: usb-storage 1-1.3:1.1
scsi 3:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 3:0:0:0: Attached scsi generic sg0 type 5
scsi 4:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
sd 4:0:0:0: Attached scsi generic sg1 type 0
sd 4:0:0:0: [sda] Attached SCSI removable disk
usb 1-1.3: USB disconnect, device number 6
usb 1-1.3: new full-speed USB device number 7 using at91_ohci
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=1506
usb 1-1.3: New USB device strings: Mfr=3, Product=2, SerialNumber=0
usb 1-1.3: Product: HUAWEI Mobile
usb 1-1.3: Manufacturer: HUAWEI
option 1-1.3:1.0: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
huawei_cdc_ncm 1-1.3:1.1: MAC-Address: 58:2c:80:13:92:63
huawei_cdc_ncm 1-1.3:1.1: setting rx_max = 16384
huawei_cdc_ncm 1-1.3:1.1: setting tx_max = 16384
huawei_cdc_ncm 1-1.3:1.1: cdc-wdm0: USB WDM device
huawei_cdc_ncm 1-1.3:1.1 wwan0: register 'huawei_cdc_ncm' at usb-at91-1.3, Huawei CDC NCM device, 58:2c:80:13:92:63
option 1-1.3:1.2: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB3
option 1-1.3:1.3: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB4
usb-storage 1-1.3:1.4: USB Mass Storage device detected
scsi host5: usb-storage 1-1.3:1.4
usb-storage 1-1.3:1.5: USB Mass Storage device detected
scsi host6: usb-storage 1-1.3:1.5
scsi 5:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 5:0:0:0: Attached scsi generic sg0 type 5
scsi 6:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
sd 6:0:0:0: Attached scsi generic sg1 type 0
sd 6:0:0:0: [sda] Attached SCSI removable disk
For the one that doesn't work, the console output contains these lines:
usb 1-1.3: new full-speed USB device number 4 using at91_ohci
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=15ca
usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.3: Product: HUAWEI Mobile
usb 1-1.3: Manufacturer: HUAWEI
usb 1-1.3: SerialNumber: FFFFFFFFFFFFFFFF
usb-storage 1-1.3:1.0: USB Mass Storage device detected
scsi host0: usb-storage 1-1.3:1.0
usbcore: registered new interface driver usb-storage
scsi 0:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 0:0:0:0: Attached scsi generic sg0 type 5
scsi 0:0:0:1: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
sd 0:0:0:1: Attached scsi generic sg1 type 0
sd 0:0:0:1: [sda] Attached SCSI removable disk
usb 1-1.3: USB disconnect, device number 4
usb 1-1.3: new full-speed USB device number 5 using at91_ohci
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=1506
usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1.3: Product: HUAWEI Mobile
usb 1-1.3: Manufacturer: HUAWEI
usb-storage 1-1.3:1.4: USB Mass Storage device detected
scsi host1: usb-storage 1-1.3:1.4
usb-storage 1-1.3:1.5: USB Mass Storage device detected
scsi host2: usb-storage 1-1.3:1.5
usbcore: registered new interface driver option
usbserial: USB Serial support registered for GSM modem (1-port)
option 1-1.3:1.0: GSM modem (1-port) converter detected
usbcore: registered new interface driver cdc_ncm
usbcore: registered new interface driver cdc_wdm
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
option 1-1.3:1.2: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
option 1-1.3:1.3: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
huawei_cdc_ncm 1-1.3:1.1: MAC-Address: 00:1e:10:1f:00:00
huawei_cdc_ncm 1-1.3:1.1: cdc-wdm0: USB WDM device
huawei_cdc_ncm 1-1.3:1.1 wwan0: register 'huawei_cdc_ncm' at usb-at91-1.3, Huawei CDC NCM device, 00:1e:10:1f:00:00
usbcore: registered new interface driver huawei_cdc_ncm
scsi 1:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 1:0:0:0: Attached scsi generic sg0 type 5
scsi 2:0:0:0: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
sd 2:0:0:0: Attached scsi generic sg1 type 0
sd 2:0:0:0: [sda] Attached SCSI removable disk
I think these lines taken from the logs above show the difference between the working and the non-working model (working first, non-working second). I mean, the problem, whatever it is, is a consequence of the difference in product ids.
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=14fe
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=1506
usb 1-2: New USB device found, idVendor=12d1, idProduct=15ca
usb 1-2: New USB device found, idVendor=12d1, idProduct=1506
Here is what modemmanager reports as status for the modem that works when it's connected:
/org/freedesktop/ModemManager1/Modem/2 (device id 'b73c90e8e59da46b3739331c98a33d33e109f0c1')
-------------------------
Hardware | manufacturer: 'huawei'
| model: 'E3131'
| revision: '21.157.11.00.264'
| supported: 'gsm-umts'
| current: 'gsm-umts'
| equipment id: '862732015998367'
-------------------------
System | device: '/sys/devices/soc0/ahb/500000.ohci/usb1/1-1/1-1.3'
| drivers: 'huawei_cdc_ncm, option1'
| plugin: 'Huawei'
| primary port: 'ttyUSB6'
| ports: 'cdc-wdm0 (at), ttyUSB3 (at), wwan0 (net), ttyUSB6 (at)'
-------------------------
Numbers | own : 'unknown'
-------------------------
Status | lock: 'none'
| unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)'
| state: 'connected'
| power state: 'on'
| access tech: 'hspa-plus'
| signal quality: '70' (recent)
-------------------------
Modes | supported: 'allowed: 2g, 3g; preferred: none
| allowed: 2g, 3g; preferred: 2g
| allowed: 2g, 3g; preferred: 3g
| allowed: 2g; preferred: none
| allowed: 3g; preferred: none'
| current: 'allowed: 2g, 3g; preferred: 3g'
-------------------------
Bands | supported: 'unknown'
| current: 'unknown'
-------------------------
IP | supported: 'ipv4, ipv6, ipv4v6'
-------------------------
3GPP | imei: '862732015998367'
| enabled locks: 'sim'
| operator id: '24405'
| operator name: 'elisa'
| subscription: 'unknown'
| registration: 'home'
-------------------------
SIM | path: '/org/freedesktop/ModemManager1/SIM/2'
-------------------------
Bearers | paths: '/org/freedesktop/ModemManager1/Bearer/2'
Here is what modemmanager (or mmcli) reports as status for the modem that doesn't work when it's supposed to be connected:
/org/freedesktop/ModemManager1/Modem/1 (device id 'e8157c68e00ab6a13b1b9a67d42acdd180af8d81')
-------------------------
Hardware | manufacturer: 'huawei'
| model: 'E3131'
| revision: '21.521.17.00.865'
| supported: 'gsm-umts'
| current: 'gsm-umts'
| equipment id: '864716020730798'
-------------------------
System | device: '/sys/devices/soc0/ahb/500000.ohci/usb1/1-1/1-1.3'
| drivers: 'huawei_cdc_ncm, option1'
| plugin: 'Huawei'
| primary port: 'ttyUSB4'
| ports: 'ttyUSB1 (at), ttyUSB4 (at), wwan0 (net)'
-------------------------
Numbers | own : 'unknown'
-------------------------
Status | lock: 'none'
| unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)'
| state: 'connected'
| power state: 'on'
| access tech: 'edge'
| signal quality: '100' (recent)
-------------------------
Modes | supported: 'allowed: 2g, 3g; preferred: none
| allowed: 2g, 3g; preferred: 2g
| allowed: 2g, 3g; preferred: 3g
| allowed: 2g; preferred: none
| allowed: 3g; preferred: none'
| current: 'allowed: any; preferred: none'
-------------------------
Bands | supported: 'unknown'
| current: 'unknown'
-------------------------
IP | supported: 'ipv4, ipv6, ipv4v6'
-------------------------
3GPP | imei: '864716020730798'
| enabled locks: 'sim'
| operator id: '24405'
| operator name: 'elisa'
| subscription: 'unknown'
| registration: 'home'
-------------------------
SIM | path: '/org/freedesktop/ModemManager1/SIM/1'
-------------------------
Bearers | paths: '/org/freedesktop/ModemManager1/Bearer/1'
debian usb dhcp modem
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I am trying to use a Huawei E3131 USB 3G modem on a Raspberry Pi system using raspbian (Debian 8) and modemmanager. I have two of those modems, and while they look the same, to the system they seem slightly different. They could be different revision of the same model, perhaps with slightly different firmware. One works and the other doesn't, but I would need them both to work. Kernel version is 4.1.18-v7+ and modemmanager version is 1.4.0-1.
I am connecting with modemmanager, using this command:
mmcli -m 0 --simple-connect="pin=1234,apn=internet"
SIM card shouldn't be causing this problem, because I only have one and it works with one modem.
According to modemmanager, both modems do get connected, but for some reason, the other one never gets a proper IP i.e. is left with 169.254.x.y.
There are differences at least in the modems' USB product ids (before usb_modeswitch is called, I assume) and revisions.
I know that the model that is not working for me has worked in some older Debian system that was using a 2.6 kernel, but that system didn't use modemmanager but something less automatic.
What could be causing this and how to fix it?
Google finds a lot of material about using this modem with Linux, but none of that seems to be specifically about using modemmanager to connect the modem.
The model of the modems as printed on the modem itself is E3131, but lsusb says they both are E398. Also, the one that works has number 0197 printed right after the CE sign on its label and the one doesn't has number 0979.
For the modem that works, the console output contains these lines:
usb 1-1.3: new full-speed USB device number 6 using at91_ohci
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=14fe
usb 1-1.3: New USB device strings: Mfr=2, Product=1, SerialNumber=0
usb 1-1.3: Product: HUAWEI Mobile
usb 1-1.3: Manufacturer: HUAWEI
usb-storage 1-1.3:1.0: USB Mass Storage device detected
scsi host3: usb-storage 1-1.3:1.0
usb-storage 1-1.3:1.1: USB Mass Storage device detected
scsi host4: usb-storage 1-1.3:1.1
scsi 3:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 3:0:0:0: Attached scsi generic sg0 type 5
scsi 4:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
sd 4:0:0:0: Attached scsi generic sg1 type 0
sd 4:0:0:0: [sda] Attached SCSI removable disk
usb 1-1.3: USB disconnect, device number 6
usb 1-1.3: new full-speed USB device number 7 using at91_ohci
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=1506
usb 1-1.3: New USB device strings: Mfr=3, Product=2, SerialNumber=0
usb 1-1.3: Product: HUAWEI Mobile
usb 1-1.3: Manufacturer: HUAWEI
option 1-1.3:1.0: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
huawei_cdc_ncm 1-1.3:1.1: MAC-Address: 58:2c:80:13:92:63
huawei_cdc_ncm 1-1.3:1.1: setting rx_max = 16384
huawei_cdc_ncm 1-1.3:1.1: setting tx_max = 16384
huawei_cdc_ncm 1-1.3:1.1: cdc-wdm0: USB WDM device
huawei_cdc_ncm 1-1.3:1.1 wwan0: register 'huawei_cdc_ncm' at usb-at91-1.3, Huawei CDC NCM device, 58:2c:80:13:92:63
option 1-1.3:1.2: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB3
option 1-1.3:1.3: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB4
usb-storage 1-1.3:1.4: USB Mass Storage device detected
scsi host5: usb-storage 1-1.3:1.4
usb-storage 1-1.3:1.5: USB Mass Storage device detected
scsi host6: usb-storage 1-1.3:1.5
scsi 5:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 5:0:0:0: Attached scsi generic sg0 type 5
scsi 6:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
sd 6:0:0:0: Attached scsi generic sg1 type 0
sd 6:0:0:0: [sda] Attached SCSI removable disk
For the one that doesn't work, the console output contains these lines:
usb 1-1.3: new full-speed USB device number 4 using at91_ohci
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=15ca
usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.3: Product: HUAWEI Mobile
usb 1-1.3: Manufacturer: HUAWEI
usb 1-1.3: SerialNumber: FFFFFFFFFFFFFFFF
usb-storage 1-1.3:1.0: USB Mass Storage device detected
scsi host0: usb-storage 1-1.3:1.0
usbcore: registered new interface driver usb-storage
scsi 0:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 0:0:0:0: Attached scsi generic sg0 type 5
scsi 0:0:0:1: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
sd 0:0:0:1: Attached scsi generic sg1 type 0
sd 0:0:0:1: [sda] Attached SCSI removable disk
usb 1-1.3: USB disconnect, device number 4
usb 1-1.3: new full-speed USB device number 5 using at91_ohci
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=1506
usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1.3: Product: HUAWEI Mobile
usb 1-1.3: Manufacturer: HUAWEI
usb-storage 1-1.3:1.4: USB Mass Storage device detected
scsi host1: usb-storage 1-1.3:1.4
usb-storage 1-1.3:1.5: USB Mass Storage device detected
scsi host2: usb-storage 1-1.3:1.5
usbcore: registered new interface driver option
usbserial: USB Serial support registered for GSM modem (1-port)
option 1-1.3:1.0: GSM modem (1-port) converter detected
usbcore: registered new interface driver cdc_ncm
usbcore: registered new interface driver cdc_wdm
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
option 1-1.3:1.2: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
option 1-1.3:1.3: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
huawei_cdc_ncm 1-1.3:1.1: MAC-Address: 00:1e:10:1f:00:00
huawei_cdc_ncm 1-1.3:1.1: cdc-wdm0: USB WDM device
huawei_cdc_ncm 1-1.3:1.1 wwan0: register 'huawei_cdc_ncm' at usb-at91-1.3, Huawei CDC NCM device, 00:1e:10:1f:00:00
usbcore: registered new interface driver huawei_cdc_ncm
scsi 1:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 1:0:0:0: Attached scsi generic sg0 type 5
scsi 2:0:0:0: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
sd 2:0:0:0: Attached scsi generic sg1 type 0
sd 2:0:0:0: [sda] Attached SCSI removable disk
I think these lines taken from the logs above show the difference between the working and the non-working model (working first, non-working second). I mean, the problem, whatever it is, is a consequence of the difference in product ids.
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=14fe
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=1506
usb 1-2: New USB device found, idVendor=12d1, idProduct=15ca
usb 1-2: New USB device found, idVendor=12d1, idProduct=1506
Here is what modemmanager reports as status for the modem that works when it's connected:
/org/freedesktop/ModemManager1/Modem/2 (device id 'b73c90e8e59da46b3739331c98a33d33e109f0c1')
-------------------------
Hardware | manufacturer: 'huawei'
| model: 'E3131'
| revision: '21.157.11.00.264'
| supported: 'gsm-umts'
| current: 'gsm-umts'
| equipment id: '862732015998367'
-------------------------
System | device: '/sys/devices/soc0/ahb/500000.ohci/usb1/1-1/1-1.3'
| drivers: 'huawei_cdc_ncm, option1'
| plugin: 'Huawei'
| primary port: 'ttyUSB6'
| ports: 'cdc-wdm0 (at), ttyUSB3 (at), wwan0 (net), ttyUSB6 (at)'
-------------------------
Numbers | own : 'unknown'
-------------------------
Status | lock: 'none'
| unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)'
| state: 'connected'
| power state: 'on'
| access tech: 'hspa-plus'
| signal quality: '70' (recent)
-------------------------
Modes | supported: 'allowed: 2g, 3g; preferred: none
| allowed: 2g, 3g; preferred: 2g
| allowed: 2g, 3g; preferred: 3g
| allowed: 2g; preferred: none
| allowed: 3g; preferred: none'
| current: 'allowed: 2g, 3g; preferred: 3g'
-------------------------
Bands | supported: 'unknown'
| current: 'unknown'
-------------------------
IP | supported: 'ipv4, ipv6, ipv4v6'
-------------------------
3GPP | imei: '862732015998367'
| enabled locks: 'sim'
| operator id: '24405'
| operator name: 'elisa'
| subscription: 'unknown'
| registration: 'home'
-------------------------
SIM | path: '/org/freedesktop/ModemManager1/SIM/2'
-------------------------
Bearers | paths: '/org/freedesktop/ModemManager1/Bearer/2'
Here is what modemmanager (or mmcli) reports as status for the modem that doesn't work when it's supposed to be connected:
/org/freedesktop/ModemManager1/Modem/1 (device id 'e8157c68e00ab6a13b1b9a67d42acdd180af8d81')
-------------------------
Hardware | manufacturer: 'huawei'
| model: 'E3131'
| revision: '21.521.17.00.865'
| supported: 'gsm-umts'
| current: 'gsm-umts'
| equipment id: '864716020730798'
-------------------------
System | device: '/sys/devices/soc0/ahb/500000.ohci/usb1/1-1/1-1.3'
| drivers: 'huawei_cdc_ncm, option1'
| plugin: 'Huawei'
| primary port: 'ttyUSB4'
| ports: 'ttyUSB1 (at), ttyUSB4 (at), wwan0 (net)'
-------------------------
Numbers | own : 'unknown'
-------------------------
Status | lock: 'none'
| unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)'
| state: 'connected'
| power state: 'on'
| access tech: 'edge'
| signal quality: '100' (recent)
-------------------------
Modes | supported: 'allowed: 2g, 3g; preferred: none
| allowed: 2g, 3g; preferred: 2g
| allowed: 2g, 3g; preferred: 3g
| allowed: 2g; preferred: none
| allowed: 3g; preferred: none'
| current: 'allowed: any; preferred: none'
-------------------------
Bands | supported: 'unknown'
| current: 'unknown'
-------------------------
IP | supported: 'ipv4, ipv6, ipv4v6'
-------------------------
3GPP | imei: '864716020730798'
| enabled locks: 'sim'
| operator id: '24405'
| operator name: 'elisa'
| subscription: 'unknown'
| registration: 'home'
-------------------------
SIM | path: '/org/freedesktop/ModemManager1/SIM/1'
-------------------------
Bearers | paths: '/org/freedesktop/ModemManager1/Bearer/1'
debian usb dhcp modem
I am trying to use a Huawei E3131 USB 3G modem on a Raspberry Pi system using raspbian (Debian 8) and modemmanager. I have two of those modems, and while they look the same, to the system they seem slightly different. They could be different revision of the same model, perhaps with slightly different firmware. One works and the other doesn't, but I would need them both to work. Kernel version is 4.1.18-v7+ and modemmanager version is 1.4.0-1.
I am connecting with modemmanager, using this command:
mmcli -m 0 --simple-connect="pin=1234,apn=internet"
SIM card shouldn't be causing this problem, because I only have one and it works with one modem.
According to modemmanager, both modems do get connected, but for some reason, the other one never gets a proper IP i.e. is left with 169.254.x.y.
There are differences at least in the modems' USB product ids (before usb_modeswitch is called, I assume) and revisions.
I know that the model that is not working for me has worked in some older Debian system that was using a 2.6 kernel, but that system didn't use modemmanager but something less automatic.
What could be causing this and how to fix it?
Google finds a lot of material about using this modem with Linux, but none of that seems to be specifically about using modemmanager to connect the modem.
The model of the modems as printed on the modem itself is E3131, but lsusb says they both are E398. Also, the one that works has number 0197 printed right after the CE sign on its label and the one doesn't has number 0979.
For the modem that works, the console output contains these lines:
usb 1-1.3: new full-speed USB device number 6 using at91_ohci
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=14fe
usb 1-1.3: New USB device strings: Mfr=2, Product=1, SerialNumber=0
usb 1-1.3: Product: HUAWEI Mobile
usb 1-1.3: Manufacturer: HUAWEI
usb-storage 1-1.3:1.0: USB Mass Storage device detected
scsi host3: usb-storage 1-1.3:1.0
usb-storage 1-1.3:1.1: USB Mass Storage device detected
scsi host4: usb-storage 1-1.3:1.1
scsi 3:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 3:0:0:0: Attached scsi generic sg0 type 5
scsi 4:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
sd 4:0:0:0: Attached scsi generic sg1 type 0
sd 4:0:0:0: [sda] Attached SCSI removable disk
usb 1-1.3: USB disconnect, device number 6
usb 1-1.3: new full-speed USB device number 7 using at91_ohci
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=1506
usb 1-1.3: New USB device strings: Mfr=3, Product=2, SerialNumber=0
usb 1-1.3: Product: HUAWEI Mobile
usb 1-1.3: Manufacturer: HUAWEI
option 1-1.3:1.0: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
huawei_cdc_ncm 1-1.3:1.1: MAC-Address: 58:2c:80:13:92:63
huawei_cdc_ncm 1-1.3:1.1: setting rx_max = 16384
huawei_cdc_ncm 1-1.3:1.1: setting tx_max = 16384
huawei_cdc_ncm 1-1.3:1.1: cdc-wdm0: USB WDM device
huawei_cdc_ncm 1-1.3:1.1 wwan0: register 'huawei_cdc_ncm' at usb-at91-1.3, Huawei CDC NCM device, 58:2c:80:13:92:63
option 1-1.3:1.2: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB3
option 1-1.3:1.3: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB4
usb-storage 1-1.3:1.4: USB Mass Storage device detected
scsi host5: usb-storage 1-1.3:1.4
usb-storage 1-1.3:1.5: USB Mass Storage device detected
scsi host6: usb-storage 1-1.3:1.5
scsi 5:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 5:0:0:0: Attached scsi generic sg0 type 5
scsi 6:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
sd 6:0:0:0: Attached scsi generic sg1 type 0
sd 6:0:0:0: [sda] Attached SCSI removable disk
For the one that doesn't work, the console output contains these lines:
usb 1-1.3: new full-speed USB device number 4 using at91_ohci
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=15ca
usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.3: Product: HUAWEI Mobile
usb 1-1.3: Manufacturer: HUAWEI
usb 1-1.3: SerialNumber: FFFFFFFFFFFFFFFF
usb-storage 1-1.3:1.0: USB Mass Storage device detected
scsi host0: usb-storage 1-1.3:1.0
usbcore: registered new interface driver usb-storage
scsi 0:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 0:0:0:0: Attached scsi generic sg0 type 5
scsi 0:0:0:1: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
sd 0:0:0:1: Attached scsi generic sg1 type 0
sd 0:0:0:1: [sda] Attached SCSI removable disk
usb 1-1.3: USB disconnect, device number 4
usb 1-1.3: new full-speed USB device number 5 using at91_ohci
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=1506
usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1.3: Product: HUAWEI Mobile
usb 1-1.3: Manufacturer: HUAWEI
usb-storage 1-1.3:1.4: USB Mass Storage device detected
scsi host1: usb-storage 1-1.3:1.4
usb-storage 1-1.3:1.5: USB Mass Storage device detected
scsi host2: usb-storage 1-1.3:1.5
usbcore: registered new interface driver option
usbserial: USB Serial support registered for GSM modem (1-port)
option 1-1.3:1.0: GSM modem (1-port) converter detected
usbcore: registered new interface driver cdc_ncm
usbcore: registered new interface driver cdc_wdm
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB0
option 1-1.3:1.2: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB1
option 1-1.3:1.3: GSM modem (1-port) converter detected
usb 1-1.3: GSM modem (1-port) converter now attached to ttyUSB2
huawei_cdc_ncm 1-1.3:1.1: MAC-Address: 00:1e:10:1f:00:00
huawei_cdc_ncm 1-1.3:1.1: cdc-wdm0: USB WDM device
huawei_cdc_ncm 1-1.3:1.1 wwan0: register 'huawei_cdc_ncm' at usb-at91-1.3, Huawei CDC NCM device, 00:1e:10:1f:00:00
usbcore: registered new interface driver huawei_cdc_ncm
scsi 1:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
scsi 1:0:0:0: Attached scsi generic sg0 type 5
scsi 2:0:0:0: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
sd 2:0:0:0: Attached scsi generic sg1 type 0
sd 2:0:0:0: [sda] Attached SCSI removable disk
I think these lines taken from the logs above show the difference between the working and the non-working model (working first, non-working second). I mean, the problem, whatever it is, is a consequence of the difference in product ids.
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=14fe
usb 1-1.3: New USB device found, idVendor=12d1, idProduct=1506
usb 1-2: New USB device found, idVendor=12d1, idProduct=15ca
usb 1-2: New USB device found, idVendor=12d1, idProduct=1506
Here is what modemmanager reports as status for the modem that works when it's connected:
/org/freedesktop/ModemManager1/Modem/2 (device id 'b73c90e8e59da46b3739331c98a33d33e109f0c1')
-------------------------
Hardware | manufacturer: 'huawei'
| model: 'E3131'
| revision: '21.157.11.00.264'
| supported: 'gsm-umts'
| current: 'gsm-umts'
| equipment id: '862732015998367'
-------------------------
System | device: '/sys/devices/soc0/ahb/500000.ohci/usb1/1-1/1-1.3'
| drivers: 'huawei_cdc_ncm, option1'
| plugin: 'Huawei'
| primary port: 'ttyUSB6'
| ports: 'cdc-wdm0 (at), ttyUSB3 (at), wwan0 (net), ttyUSB6 (at)'
-------------------------
Numbers | own : 'unknown'
-------------------------
Status | lock: 'none'
| unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)'
| state: 'connected'
| power state: 'on'
| access tech: 'hspa-plus'
| signal quality: '70' (recent)
-------------------------
Modes | supported: 'allowed: 2g, 3g; preferred: none
| allowed: 2g, 3g; preferred: 2g
| allowed: 2g, 3g; preferred: 3g
| allowed: 2g; preferred: none
| allowed: 3g; preferred: none'
| current: 'allowed: 2g, 3g; preferred: 3g'
-------------------------
Bands | supported: 'unknown'
| current: 'unknown'
-------------------------
IP | supported: 'ipv4, ipv6, ipv4v6'
-------------------------
3GPP | imei: '862732015998367'
| enabled locks: 'sim'
| operator id: '24405'
| operator name: 'elisa'
| subscription: 'unknown'
| registration: 'home'
-------------------------
SIM | path: '/org/freedesktop/ModemManager1/SIM/2'
-------------------------
Bearers | paths: '/org/freedesktop/ModemManager1/Bearer/2'
Here is what modemmanager (or mmcli) reports as status for the modem that doesn't work when it's supposed to be connected:
/org/freedesktop/ModemManager1/Modem/1 (device id 'e8157c68e00ab6a13b1b9a67d42acdd180af8d81')
-------------------------
Hardware | manufacturer: 'huawei'
| model: 'E3131'
| revision: '21.521.17.00.865'
| supported: 'gsm-umts'
| current: 'gsm-umts'
| equipment id: '864716020730798'
-------------------------
System | device: '/sys/devices/soc0/ahb/500000.ohci/usb1/1-1/1-1.3'
| drivers: 'huawei_cdc_ncm, option1'
| plugin: 'Huawei'
| primary port: 'ttyUSB4'
| ports: 'ttyUSB1 (at), ttyUSB4 (at), wwan0 (net)'
-------------------------
Numbers | own : 'unknown'
-------------------------
Status | lock: 'none'
| unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)'
| state: 'connected'
| power state: 'on'
| access tech: 'edge'
| signal quality: '100' (recent)
-------------------------
Modes | supported: 'allowed: 2g, 3g; preferred: none
| allowed: 2g, 3g; preferred: 2g
| allowed: 2g, 3g; preferred: 3g
| allowed: 2g; preferred: none
| allowed: 3g; preferred: none'
| current: 'allowed: any; preferred: none'
-------------------------
Bands | supported: 'unknown'
| current: 'unknown'
-------------------------
IP | supported: 'ipv4, ipv6, ipv4v6'
-------------------------
3GPP | imei: '864716020730798'
| enabled locks: 'sim'
| operator id: '24405'
| operator name: 'elisa'
| subscription: 'unknown'
| registration: 'home'
-------------------------
SIM | path: '/org/freedesktop/ModemManager1/SIM/1'
-------------------------
Bearers | paths: '/org/freedesktop/ModemManager1/Bearer/1'
debian usb dhcp modem
edited Jan 26 at 9:08
asked Jan 23 at 9:08
TheAG
509
509
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f419033%2fno-ip-for-usb-3g-modem-huawei-e3131-using-modemmanager%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password