Skip to content

Instantly share code, notes, and snippets.

@hanafiah
Created August 11, 2016 23:33
Show Gist options
  • Save hanafiah/675ad3df056b5a447fa4b0f83b189170 to your computer and use it in GitHub Desktop.
Save hanafiah/675ad3df056b5a447fa4b0f83b189170 to your computer and use it in GitHub Desktop.
Setting up internet over usb on Raspberry Pi
pi@raspberrypi:~ $ lsusb
Bus 001 Device 004: ID 046d:c534 Logitech, Inc.
Bus 001 Device 006: ID 12d1:14dc Huawei Technologies Co., Ltd.
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pi@raspberrypi:~ $ sudo nano /etc/usb_modeswitch.conf
#--------------------------
#HUAWEI DIGI CONF
#12d1:1f01
DefaultVendor=0x12d1
DefaultProduct=0x1f01
TargetVendor=0x12d1
TargetProduct=0x1f01
MessageContent="55534243123456780000000000000011062000000101000100000000000000"
#--------------------------
pi@raspberrypi:~ $ reboot
pi@raspberrypi:~ $ sudo usb_modeswitch -c /etc/usb_modeswitch.conf
pi@raspberrypi:~ $ ifconfig -a
eth0 Link encap:Ethernet HWaddr b8:27:eb:29:47:c2
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:36 errors:0 dropped:0 overruns:0 frame:0
TX packets:56 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6721 (6.5 KiB) TX bytes:7666 (7.4 KiB)
eth1 Link encap:Ethernet HWaddr 0c:5b:8f:27:9a:64
inet addr:192.168.8.104 Bcast:192.168.8.255 Mask:255.255.255.0
inet6 addr: fe80::584f:751f:bb3e:e26b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:93 errors:0 dropped:15 overruns:0 frame:0
TX packets:69 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:22300 (21.7 KiB) TX bytes:11404 (11.1 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1 errors:0 dropped:0 overruns:0 frame:0
TX packets:1 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:68 (68.0 B) TX bytes:68 (68.0 B)
wlan0 Link encap:Ethernet HWaddr b8:27:eb:7c:12:97
inet6 addr: fe80::a0c5:d600:1f3f:d0ac/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:5 errors:0 dropped:5 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:696 (696.0 B) TX bytes:0 (0.0 B)
@hamargyuri
Copy link

just used this for setting up my Raspberry Pi to connect to the internet via usb with my e5577s. perfect :) 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment