Author Message

<  Setup Discussion  ~  Huawei E3372 setup

PostPosted: Thu Dec 14, 2017 11:37 am Reply with quote
Posts: 4Joined: Thu Dec 14, 2017 10:51 am
I'm trying to setup my Huawei E3372 using the following guide:-

https://www.thefanclub.co.za/how-to/how ... and-wvdial

but can't work out how to create a custom usb_modeswitch config file.

lsusb shows the vendor/product as 12d1:1506 but am unable to find such a file.

What should I do?

The modem is branded as a MegaFon M150-2.

I understand that there are different versions of the E3372 which come with different capabilities. I was hoping to set this one up in NDIS mode but don't know if it is capable of running in this mode.

Any guidance would be appreciated.


Offline Profile
PostPosted: Fri Dec 15, 2017 6:01 am Reply with quote
Posts: 1156Location: Koh Samui, THJoined: Wed Jul 11, 2012 3:14 pm
12d1:1506 is the usb id after mode switching has taken place, you can not switch any further.
E3372 with switched id 12d1:1506 has net interfaces driven by linux huawei_cdc_ncm driver.
NDIS is a Microsoft proprietary protocol which you don't need under linux for this dongle.


Offline Profile
PostPosted: Fri Dec 15, 2017 2:42 pm Reply with quote
Posts: 4Joined: Thu Dec 14, 2017 10:51 am
LOM wrote:
12d1:1506 is the usb id after mode switching has taken place, you can not switch any further.
E3372 with switched id 12d1:1506 has net interfaces driven by linux huawei_cdc_ncm driver.
NDIS is a Microsoft proprietary protocol which you don't need under linux for this dongle.


I don't really know anything about mode switching, so how do I know that mode switching has taken place and is there any way to prevent it?

I understand there are two versions of the E3372 which work in either HiLink mode or stick mode. How do I get this modem to access the internet? Is there a particular mode switch I need or should I try flashing the firmware?

As far NDIS is concerned, an NDIS driver turns the modem into a network card, and there are NDIS wrappers to allow it to work on non-Microsoft OSes.


Offline Profile
PostPosted: Fri Dec 15, 2017 5:21 pm Reply with quote
Site AdminPosts: 6362Joined: Sat Nov 03, 2007 12:30 am
It all depends on your Linux system. More up-to-date distributions work just fine with the huawei-ncm mode that you see. They usually include "Network Manager" which does most of the set-up stuff.
BTW, the huawei-ncm mode is also exposed as a network interface if set up correctly.

I suggest you read the documentation of usb_modeswitch as an introduction (see navigation bar at the top). Also see the logging option in "/etc/usb_modeswitch.conf".


Offline Profile
PostPosted: Fri Dec 15, 2017 5:26 pm Reply with quote
Site AdminPosts: 6362Joined: Sat Nov 03, 2007 12:30 am
Addendum:

Please note that the instructions on the page you linked are false and totally outdated.


Offline Profile
PostPosted: Fri Dec 15, 2017 9:01 pm Reply with quote
Posts: 4Joined: Thu Dec 14, 2017 10:51 am
Josh wrote:
Addendum:

Please note that the instructions on the page you linked are false and totally outdated.


Any chance of pointing out any instructions which are correct and uptodate?


Offline Profile
PostPosted: Fri Dec 15, 2017 11:41 pm Reply with quote
Site AdminPosts: 6362Joined: Sat Nov 03, 2007 12:30 am
See the documentation page, read the README file in the program and data source packages.

Also, search for "E3372" in this forum.


Offline Profile
PostPosted: Sat Dec 16, 2017 3:09 am Reply with quote
Posts: 1156Location: Koh Samui, THJoined: Wed Jul 11, 2012 3:14 pm
balanga wrote:
LOM wrote:
12d1:1506 is the usb id after mode switching has taken place, you can not switch any further.
E3372 with switched id 12d1:1506 has net interfaces driven by linux huawei_cdc_ncm driver.
NDIS is a Microsoft proprietary protocol which you don't need under linux for this dongle.


I don't really know anything about mode switching, so how do I know that mode switching has taken place and is there any way to prevent it?


You know it has taken place if your system shows the usb id as 12d1:1506.
For stopping usb_modeswitch see usb_modeswitch.conf


balanga wrote:
As far NDIS is concerned, an NDIS driver turns the modem into a network card, and there are NDIS wrappers to allow it to work on non-Microsoft OSes.


The MS driver included in your dongle is a wrapper, converting the dongles native cdc_ncm protocol into MS NDIS.
You don't need such crap in linux where you have a cdc_ncm driver which directly turns the modem into a network card. NDIS is not an efficient protocol for transfer over usb.


Offline Profile
PostPosted: Sat Jan 27, 2018 7:17 pm Reply with quote
Posts: 3Joined: Sat Jan 27, 2018 6:21 pm
For me the mode switching has taken place - (lsusb <code> Bus 001 Device 013: ID 12d1:1506 Huawei Technologies Co., Ltd. Modem/Networkcard </code> ) but network manager (on archlinux) is still not detecting the modem as a valid ethernet connection even though it is displayed as a modem/networkcard by lsusb. Do I need to switch to some other mode? I have seen other modes such as ethernet through other mode-codes. Or do I need to change the code to 12d1:14dc as I have seen mentioned in some other places. Or is 12d1:1506 the final and 'good' code for the 4G LTE E3372 modem to start working.

Also, I am new to linux, but in windows there is a GUI displayed with a connect button. When I click on it the modem is connected to the internet. What must I do to connect it to the internet here, since I have already mode switched from mass storage to modem/networkcard? I have network manager, but it doesn't detect the modem.

I originally made a post at the archlinux forum (https://bbs.archlinux.org/viewtopic.php?id=233932) and their help led me to this software and this website, so I installed it and it gave me hope by changing mode from mass storage to modem/networkcard, but my network manager (the name of the software is network manager) is still not detecting the modem. Please help.


Offline Profile
PostPosted: Sun Jan 28, 2018 8:53 pm Reply with quote
Site AdminPosts: 6362Joined: Sat Nov 03, 2007 12:30 am
What exactly is "dmesg" saying after the mode switch? See the last 10 (or so) lines of the output.


Offline Profile
PostPosted: Fri Feb 02, 2018 11:48 am Reply with quote
Posts: 3Joined: Sat Jan 27, 2018 6:21 pm
Here is the full dmesg output, please find the last 10 lines. I am posting the full output because I saw huawei listed much earlier than the last 10 lines.

Code:
[   16.340607] usb 1-1.5: USB disconnect, device number 6
[   16.655893] IPv6: ADDRCONF(NETDEV_UP): eno1: link is not ready
[   16.896963] IPv6: ADDRCONF(NETDEV_UP): eno1: link is not ready
[   16.904346] IPv6: ADDRCONF(NETDEV_UP): enp0s26u1u6: link is not ready
[   16.923874] IPv6: ADDRCONF(NETDEV_UP): wlp0s26u1u2: link is not ready
[   16.954504] IPv6: ADDRCONF(NETDEV_UP): wlp0s26u1u2: link is not ready
[   16.983152] IPv6: ADDRCONF(NETDEV_UP): wlp0s26u1u2: link is not ready
[   17.396225] IPv6: ADDRCONF(NETDEV_UP): wlp0s26u1u2: link is not ready
[   17.570020] usb 1-1.5: new high-speed USB device number 8 using ehci-pci
[   17.748431] usb-storage 1-1.5:1.5: USB Mass Storage device detected
[   17.748595] scsi host6: usb-storage 1-1.5:1.5
[   17.752218] usb-storage 1-1.5:1.6: USB Mass Storage device detected
[   17.752422] scsi host7: usb-storage 1-1.5:1.6
[   17.785469] usbcore: registered new interface driver cdc_ncm
[   17.794317] usbcore: registered new interface driver cdc_wdm
[   17.805444] usbcore: registered new interface driver usbserial
[   17.805454] usbcore: registered new interface driver usbserial_generic
[   17.805461] usbserial: USB Serial support registered for generic
[   17.812122] usbcore: registered new interface driver option
[   17.812141] usbserial: USB Serial support registered for GSM modem (1-port)
[   17.921775] huawei_cdc_ncm 1-1.5:1.2: MAC-Address: 00:1e:10:1f:00:00
[   17.921779] huawei_cdc_ncm 1-1.5:1.2: setting rx_max = 16384
[   17.929211] huawei_cdc_ncm 1-1.5:1.2: NDP will be placed at end of frame for this device.
[   17.929320] huawei_cdc_ncm 1-1.5:1.2: cdc-wdm0: USB WDM device
[   17.929796] huawei_cdc_ncm 1-1.5:1.2 wwan0: register 'huawei_cdc_ncm' at usb-0000:00:1a.0-1.5, Huawei CDC NCM device, 00:1e:10:1f:00:00
[   17.929879] usbcore: registered new interface driver huawei_cdc_ncm
[   17.929981] option 1-1.5:1.0: GSM modem (1-port) converter detected
[   17.930139] usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB0
[   17.930228] option 1-1.5:1.1: GSM modem (1-port) converter detected
[   17.930353] usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB1
[   17.930463] option 1-1.5:1.3: GSM modem (1-port) converter detected
[   17.930575] usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB2
[   17.930655] option 1-1.5:1.4: GSM modem (1-port) converter detected
[   17.930766] usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB3
[   17.998610] huawei_cdc_ncm 1-1.5:1.2 wwp0s26u1u5i2: renamed from wwan0
[   18.780681] scsi 7:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[   18.781187] scsi 6:0:0:0: CD-ROM            HUAWEI   Mass Storage     2.31 PQ: 0 ANSI: 2
[   18.785272] sr 6:0:0:0: [sr1] scsi-1 drive
[   18.785594] sr 6:0:0:0: Attached scsi CD-ROM sr1
[   18.788109] sd 7:0:0:0: [sdb] Attached SCSI removable disk
[   18.822499] sr 6:0:0:0: [sr1] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[   18.822506] sr 6:0:0:0: [sr1] tag#0 Sense Key : 0x3 [current]
[   18.822510] sr 6:0:0:0: [sr1] tag#0 ASC=0x11 ASCQ=0x0
[   18.822515] sr 6:0:0:0: [sr1] tag#0 CDB: opcode=0x28 28 00 00 00 8d fc 00 00 02 00
[   18.822518] print_req_error: critical medium error, dev sr1, sector 145392
[   18.823719] attempt to access beyond end of device
[   18.823724] unknown-block(11,1): rw=0, want=145400, limit=145392
[   18.823729] Buffer I/O error on dev sr1, logical block 18174, async page read
[   18.871511] sr 6:0:0:0: [sr1] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[   18.871516] sr 6:0:0:0: [sr1] tag#0 Sense Key : 0x3 [current]
[   18.871521] sr 6:0:0:0: [sr1] tag#0 ASC=0x11 ASCQ=0x0
[   18.871525] sr 6:0:0:0: [sr1] tag#0 CDB: opcode=0x28 28 00 00 00 8c 80 00 00 3c 00
[   18.871528] print_req_error: critical medium error, dev sr1, sector 143872
[   18.879473] sr 6:0:0:0: [sr1] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[   18.879478] sr 6:0:0:0: [sr1] tag#0 Sense Key : 0x3 [current]
[   18.879482] sr 6:0:0:0: [sr1] tag#0 ASC=0x11 ASCQ=0x0
[   18.879487] sr 6:0:0:0: [sr1] tag#0 CDB: opcode=0x28 28 00 00 00 8c 80 00 00 02 00
[   18.879489] print_req_error: critical medium error, dev sr1, sector 143872
[   18.880671] Buffer I/O error on dev sr1, logical block 17984, async page read
[   18.889504] sr 6:0:0:0: [sr1] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[   18.889510] sr 6:0:0:0: [sr1] tag#0 Sense Key : 0x3 [current]
[   18.889514] sr 6:0:0:0: [sr1] tag#0 ASC=0x11 ASCQ=0x0
[   18.889518] sr 6:0:0:0: [sr1] tag#0 CDB: opcode=0x28 28 00 00 00 8d fa 00 00 02 00
[   18.889521] print_req_error: critical medium error, dev sr1, sector 145384
[   18.890719] attempt to access beyond end of device
[   18.890725] unknown-block(11,1): rw=0, want=145392, limit=145384
[   18.890728] Buffer I/O error on dev sr1, logical block 18173, async page read
[   18.930980] sr 6:0:0:0: [sr1] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[   18.930988] sr 6:0:0:0: [sr1] tag#0 Sense Key : 0x3 [current]
[   18.930992] sr 6:0:0:0: [sr1] tag#0 ASC=0x11 ASCQ=0x0
[   18.930997] sr 6:0:0:0: [sr1] tag#0 CDB: opcode=0x28 28 00 00 00 8d f6 00 00 02 00
[   18.931000] print_req_error: critical medium error, dev sr1, sector 145368
[   18.931031] attempt to access beyond end of device
[   18.931036] unknown-block(11,1): rw=0, want=145376, limit=145368
[   18.931039] Buffer I/O error on dev sr1, logical block 18171, async page read
[   18.976971] sr 6:0:0:0: [sr1] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[   18.976975] sr 6:0:0:0: [sr1] tag#0 Sense Key : 0x3 [current]
[   18.976977] sr 6:0:0:0: [sr1] tag#0 ASC=0x11 ASCQ=0x0
[   18.976980] sr 6:0:0:0: [sr1] tag#0 CDB: opcode=0x28 28 00 00 00 8c 80 00 00 3c 00
[   18.976982] print_req_error: critical medium error, dev sr1, sector 143872
[   18.984086] Buffer I/O error on dev sr1, logical block 17984, async page read
[   18.993719] attempt to access beyond end of device
[   18.993722] unknown-block(11,1): rw=0, want=145368, limit=145360
[   18.993724] Buffer I/O error on dev sr1, logical block 18170, async page read
[   47.572643] usb 1-1-port4: disabled by hub (EMI?), re-enabling...
[   47.573770] usb 1-1.4: USB disconnect, device number 5
[   47.833402] usb 1-1.4: new low-speed USB device number 9 using ehci-pci
[   47.937086] input: USB Optical Mouse as /devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/0003:0461:4D81.0003/input/input13
[   47.937505] hid-generic 0003:0461:4D81.0003: input,hidraw1: USB HID v1.11 Mouse [USB Optical Mouse] on usb-0000:00:1a.0-1.4/input0
[   75.468121] NVRM: Your system is not currently configured to drive a VGA console
[   75.468123] NVRM: on the primary VGA device. The NVIDIA Linux graphics driver
[   75.468124] NVRM: requires the use of a text-mode VGA console. Use of other console
[   75.468125] NVRM: drivers including, but not limited to, vesafb, may result in
[   75.468126] NVRM: corruption and stability problems, and is not supported.
[  316.036106] IPv6: ADDRCONF(NETDEV_UP): wlp0s26u1u2: link is not ready
[dds@raf ~]$ lsusb
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 007: ID 05c6:f00e Qualcomm, Inc.
Bus 001 Device 008: ID 12d1:1506 Huawei Technologies Co., Ltd. Modem/Networkcard
Bus 001 Device 009: ID 0461:4d81 Primax Electronics, Ltd Dell N889 Optical Mouse
Bus 001 Device 004: ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter
Bus 001 Device 003: ID 045e:07b9 Microsoft Corp. Wired Keyboard 200
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


After dmesg, I also ran lsusb, but it shows the code of as already modeswitched, 12d1:1506. - Modem/Networkcard.


Offline Profile
PostPosted: Sat Feb 03, 2018 1:00 pm Reply with quote
Site AdminPosts: 6362Joined: Sat Nov 03, 2007 12:30 am
Here are the conclusions in a nutshell:
  1. The mode that is reached is the desired one with Linux - "wwan0: register 'huawei_cdc_ncm' at usb-0000:00:1a.0-1.5, Huawei CDC NCM device"
  2. The pseudo CD-ROM part of the stick is having problems cooperating with the Linux driver, which is however not unusual and should not affect the modem part
  3. Network Manager should know how to work with a CDC-NCM device. Try to get a log from "modemmanager" which is a low-level companion of NM.
Maybe this helps:
https://www.freedesktop.org/wiki/Softwa ... Debugging/


Offline Profile
PostPosted: Sat Feb 03, 2018 8:42 pm Reply with quote
Posts: 3Joined: Sat Jan 27, 2018 6:21 pm
Josh wrote:
Here are the conclusions in a nutshell:
  1. The mode that is reached is the desired one with Linux - "wwan0: register 'huawei_cdc_ncm' at usb-0000:00:1a.0-1.5, Huawei CDC NCM device"
  2. The pseudo CD-ROM part of the stick is having problems cooperating with the Linux driver, which is however not unusual and should not affect the modem part
  3. Network Manager should know how to work with a CDC-NCM device. Try to get a log from "modemmanager" which is a low-level companion of NM.
Maybe this helps:
https://www.freedesktop.org/wiki/Softwa ... Debugging/


The services of NetworkManager and ModemManager are enabled and start on bootup on my computer. So I followed the debugging link and disabled them, stopped them, and then started them manually under debug mode. Then I connected my modem. Suddenly it was discovered by the NetworkManager GUI interface, and was also listed when I did -

Code:
[dds@raf ~]$ sudo mmcli -L

Found 1 modems:
   /org/freedesktop/ModemManager1/Modem/1 [huawei] E3372


Now, even when running the services normally, it is detected. I will now reboot my computer and see if it is automatically detected on startup without having to stop and then restart the services of NetworkManager and ModemManager.

Strangely, doing ip link doesn't show the interface of my modem as having an ipv4 ip address.

Code:
[dds@raf ~]$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eno1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether 38:60:77:b5:7f:e5 brd ff:ff:ff:ff:ff:ff
3: wlp0s26u1u2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
    link/ether 0e:99:c6:be:d9:9c brd ff:ff:ff:ff:ff:ff
8: wwp0s26u1u5i2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 00:1e:10:1f:00:00 brd ff:ff:ff:ff:ff:ff

(here the last one is my modem interface - I think, not sure how to find out which interface belongs to which device, but I have removed my modem and this is the only interface which is not listed on ip link again.)

So my problem is solved, not sure what the error was. I did note that my modem is listed by lsusb much earlier and I have to wait a while before it is picked up by modemmanager. So maybe I just wasn't waiting long enough. Or just restarting the services did the trick. Not sure, will update this thread after rebooting my system. Thanks a lot though, your debugging link was the coincidental solution.

EDIT : So as I said, I have enabled NetworkManager and ModemManager services to start automatically on bootup. I just powered off and switched on my system and at first while the modem was being detected by lsusb (in the correct mode, 12d1:1506), NetworkManager GUI applet (as IND Airtel), and mmcli -L (with same output as above) it was taking very long to connect. I waited a full two minutes but it kept trying to connect without success. Then I physically removed my modem from the usb port and reinserted it. After waiting till NetworkManager GUI discovered it, I clicked on IND Airtel and was able to connect instantly. So the problem seems to be that the device is not able to connect to the internet automatically but can only be connected once it has been removed and reinserted after the system has booted up. I am not sure if this is a problem with NetworkManager, or the usb port and device itself. But usb_modeswitch always shows it in the correct switched desired mode of 12d1:1506, so the problem isn't there. Thanks a lot for helping!

EDIT :


Offline Profile

Display posts from previous:  Sort by:

All times are UTC + 1 hour [ DST ]
Page 1 of 1
13 posts
Users browsing this forum: No registered users and 2 guests
Search for:
Post new topic  Reply to topic
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum