Huawei E5377 mobile LTE router on Linux

A short note to all the users that try to find any pieces of information about making that mobile router work on Linux - it is possible to make it communicate not only through WiFi (which doesn't seem to make full use of the connection speed) but also by connecting it through USB port. Simply trying to install (even if it fails to build a driver) Huawei's Linux Mobile Partner software seems to trigger something (perhaps a successful mode switch) that is needed to make the modem work. It seems to work almost out of the box on Fedora 21 - the only thing needed is switching the mode every time you connect the device.
usb_modeswitch -v 12d1 -p 1f02 -M 55534243123456780000000000000a11062000000000000100000000000000
Possibly it could be automated (see https://github.com/enyone/Huawei_E5377_OpenWRT for an example on how to add a new modeswitching rule), but I didn't do it correctly I think.

The device seems to even work out of the box on a bare Arch Linux install, with no X, having NetworkManager and ModemManager installed and running beforehand. You simply connect the router and that's it.

lsusb:
Bus 002 Device 011: ID 12d1:14dc Huawei Technologies Co., Ltd.
dmesg:
[ 2046.134043] usbserial: USB Serial deregistering driver GSM modem (1-port)
[ 2046.134093] usbcore: deregistering interface driver option
[ 2046.143353] usbcore: registered new interface driver option
[ 2046.143375] usbserial: USB Serial support registered for GSM modem (1-port)
[ 2071.860522] usb 2-1.1: USB disconnect, device number 8
[ 2072.395484] usb 2-1.1: new high-speed USB device number 9 using ehci-pci
[ 2072.481935] usb 2-1.1: New USB device found, idVendor=12d1, idProduct=14dc
[ 2072.481945] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 2072.481951] usb 2-1.1: Product: HUAWEI_MOBILE
[ 2072.481955] usb 2-1.1: Manufacturer: HUAWEI_MOBILE
[ 2072.562822] usb-storage 2-1.1:1.2: USB Mass Storage device detected
[ 2072.564108] scsi host11: usb-storage 2-1.1:1.2
[ 2072.682187] cdc_ether 2-1.1:1.0 eth0: register 'cdc_ether' at usb-0000:00:1d.0-1.1, CDC Ethernet Device, 0c:5b:8f:27:9a:64
[ 2072.682440] usbcore: registered new interface driver cdc_ether
[ 2072.692927] cdc_ether 2-1.1:1.0 enp0s29u1u1: renamed from eth0
[ 2073.569173] scsi 11:0:0:0: Direct-Access     HUAWEI   TF CARD Storage  2.31 PQ: 0 ANSI: 2
[ 2073.570977] sd 11:0:0:0: Attached scsi generic sg2 type 0
[ 2073.573908] sd 11:0:0:0: [sdb] Attached SCSI removable disk
Post edited after I found out more about it.

Comments


  1. Are you getting any decent speed through the USB connection?
    I am on Debian Jessie and I first tried to run your usb_modeswitch command without attempting to install the linux mobile partner software.
    I saw an eth0 device appear and it was getting an IP address from my huawei E5377, which was very promising. But then I am not getting any data through.

    Then I tried to install the mobile partner software but that didn't even give me an eth0 device, nor did it run usb_modeswitch.

    Here is my dmesg after I ran your usb_modeswitch command:

    [58377.103000] usb 1-2: USB disconnect, device number 43
    [58377.692138] usb 1-2: new high-speed USB device number 44 using xhci_hcd
    [58377.704034] usb 1-2: New USB device found, idVendor=12d1, idProduct=14dc
    [58377.704059] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [58377.704076] usb 1-2: Product: HUAWEI_MOBILE
    [58377.704089] usb 1-2: Manufacturer: HUAWEI_MOBILE
    [58377.782862] scsi18 : usb-storage 1-2:1.2
    [58377.826291] cdc_ether 1-2:1.0 eth0: register 'cdc_ether' at usb-0000:00:14.0-2, CDC Ethernet Device, 0c:5b:8f:27:9a:64
    [58377.826344] usbcore: registered new interface driver cdc_ether
    [58378.789226] scsi 18:0:0:0: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
    [58378.793387] sd 18:0:0:0: [sdc] Attached SCSI removable disk

    any ideas how I could actually get any data through the USB connection?

    ReplyDelete
  2. From what I tested later on, seems like Huawei's software isn't really needed. NetworkManager, ModemManager and this modeswitch line should be enough. Can you see the router's config site at 192.168.8.1?

    ReplyDelete
  3. I can't get a Huawei 5377 to work under Centos 7.
    I run usb_modeswitch and restart ModemManager and NetworkManager.
    I get a new interface, with an IP 192.168.8.100, but I can't connect even to 192.168.8.1.

    This is my lsusb:
    Bus 002 Device 005: ID 12d1:14dc Huawei Technologies Co., Ltd.

    This is my dmesg:
    [37465.398455] usb 2-1.5: New USB device found, idVendor=12d1, idProduct=14dc
    [37465.398460] usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [37465.398462] usb 2-1.5: Product: HUAWEI_MOBILE
    [37465.398464] usb 2-1.5: Manufacturer: HUAWEI_MOBILE
    [37465.476469] usb-storage 2-1.5:1.2: USB Mass Storage device detected
    [37465.476780] scsi host5: usb-storage 2-1.5:1.2
    [37465.528049] cdc_ether 2-1.5:1.0 eth0: register 'cdc_ether' at usb-0000:00:1d.0-1.5, CDC Ethernet Device, 0c:5b:8f:27:9a:64
    [37465.528077] usbcore: registered new interface driver cdc_ether
    [37465.543138] systemd-udevd[17664]: renamed network interface eth0 to enp0s29u1u5
    [37466.482395] scsi 5:0:0:0: Direct-Access HUAWEI TF CARD Storage 2.31 PQ: 0 ANSI: 2
    [37466.485837] sd 5:0:0:0: [sdc] Attached SCSI removable disk
    [38446.109089] usbcore: registered new interface driver option
    [38446.109100] usbserial: USB Serial support registered for GSM modem (1-port)

    Any help will by appreciated.

    Thanks

    Juan Pablo Sales Gonzalez - Montevideo, Uruguay. juanp.sales.gonzalez@gmail.com

    ReplyDelete
  4. And this is the interface:
    enp0s29u1u5: flags=4163 mtu 1500
    inet 192.168.8.100 netmask 255.255.255.0 broadcast 192.168.8.255
    ether 0c:5b:8f:27:9a:64 txqueuelen 1000 (Ethernet)
    RX packets 1661 bytes 741232 (723.8 KiB)
    RX errors 0 dropped 6 overruns 0 frame 0
    TX packets 76 bytes 6247 (6.1 KiB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete

Post a Comment

Popular Posts