enyone
Posts: 2
Joined: Sun Mar 29, 2015 12:25 pm

Huawei E5377 and usb_modeswitch not working

Sun Mar 29, 2015 12:33 pm

:?: Hi,

I'm trying to get my Huawei E5377 working on Raspberry Pi 2 without success.
It works well on Ubuntu 14.04 x86_64 and also OpenWRT Luci 12.06

Code: Select all

usb_modeswitch -v 12d1 -p 1f02 -M 55534243123456780000000000000a11062000000000000100000000000000
After that command it sould change itself to vid=12d1 pid=14dc but still nothing happens.

At ubuntu and openwrt dmesg says after that command:

Code: Select all

usb 1-1: USB disconnect, device number xx
usb 1-1: new high-speed USB device number xx using ehci-platform
cdc_ether 1-1:1.0: eth1: register 'cdc_ether' at usb-ehci-platform-1, CDC Ethernet Device, xx:xx:xx:xx:xx:xx
But on RasPi 2 it does not. I've installed both usb-modeswitch and usb-modeswitch-data. cdc_ether is also available via insmod.
What is that I'm missing here?

jumson
Posts: 2
Joined: Fri Apr 17, 2015 12:35 pm

Re: Huawei E5377 and usb_modeswitch not working

Fri Apr 17, 2015 12:43 pm

It took a few hours of tinkering around.....but I finally have achieved success. So I made an account to respond and hopefully point others in the right direction.

Here is what worked:
create a new config file here:
sudo nano /usr/share/usb_modeswitch/12d1:1f02

put this in it:
# Huawei E5377 (rev.1.02)
DefaultVendor= 0x12d1
DefaultProduct= 0x1f02
TargetVendor= 0x12d1
TargetProduct= 0x14dc

MessageContent="55534243123456780000000000000a11062000000000000100000000000000"
NoDriverLoading=1

run this:
sudo usb_modeswitch -W -I -c /usr/share/usb_modeswitch/12d1:1f02

now lsusb shows this:
Bus 001 Device 006: ID 12d1:14dc Huawei Technologies Co., Ltd.

and dmesg shows this:
[ 7.931276] cdc_ether 1-1.3.2:1.0 eth1: register 'cdc_ether' at usb-bcm2708_u sb-1.3.2, CDC Ethernet Device, 0c:5b:8f:27:9a:64
[ 8.488600] usbcore: registered new interface driver cdc_ether
[ 9.885488] usbcore: registered new interface driver rtl8192cu
[ 12.965564] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[ 13.372103] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)

And this may not be a complete answer you need, but it is a few steps in the right direction.
I am about to test if the eth1 is actually getting internet from the mobile data device.

jumson
Posts: 2
Joined: Fri Apr 17, 2015 12:35 pm

Re: Huawei E5377 and usb_modeswitch not working

Fri Apr 17, 2015 1:08 pm

To add on to my first post:
The internet was accessible through eth1, did ifconfig to figure out the ip address, then removed all other sources and SSH into it, then pulled up a webpage.

after that I unplugged everything and rebooted the RPI. And it was back the way I started, except the "solution" I posted above would not work. I modified this /etc/network/interfaces
to ensure it had a setting eth1. Mine is this:

iface eth1 inet dhcp

After that, I applied the aforementioned solution and it worked.

enyone
Posts: 2
Joined: Sun Mar 29, 2015 12:25 pm

Re: Huawei E5377 and usb_modeswitch not working

Fri Apr 17, 2015 4:30 pm

Neat! Will test it on this weekend. Thanks so far.

sebasfiorent
Posts: 1
Joined: Fri May 20, 2016 10:47 pm

Re: Huawei E5377 and usb_modeswitch not working

Fri May 20, 2016 10:52 pm

Excellent! This worked like a charm!

Return to “Raspberry Pi OS”