Skip to content

Instantly share code, notes, and snippets.

@salehjg
Forked from smarek/70-huawei-e3.conf
Created July 27, 2021 00:53
Show Gist options
  • Save salehjg/cb0f10832a6a6860464bdb1540bdcba0 to your computer and use it in GitHub Desktop.
Save salehjg/cb0f10832a6a6860464bdb1540bdcba0 to your computer and use it in GitHub Desktop.
Raspberry / Banana Huawei E3372 network interface name
# /etc/udev/rules.d/70-huawei-e3.conf
# Necessary for network interface name
SUBSYSTEM=="net", ACTION=="add", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14dc", NAME="usb0"
# Might be duplicate to usb_modeswitch config, however it's good to have it there
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="1f01", RUN+="/usr/sbin/usb_modeswitch -c /etc/usb_modeswitch.d/huawei_e3.conf"

Huawei E3372s / E3372h in HiLink mode network interface name

Default name for the device (once it's usb_modeswitched from storage mode) network interface is "enx0c5b8f279a64"

Using this config, you can automatically switch the modem from USB-Storage (CD-ROM + SD-CARD) mode to Network Interface (cdc_ether) mode and set some basic network interface name

Tested using ARMBIAN 5.38 stable distribution on Banana Pi M1, having these packages installed

ii  usb-modeswitch                  2.2.5+repack0-1ubuntu1                     armhf        mode switching tool for controlling "flip flop" USB devices
ii  usb-modeswitch-data             20151101-1                                 all          mode switching data for usb-modeswitch
ii  libudev1:armhf                  229-4ubuntu21.1                            armhf        libudev shared library
ii  udev                            229-4ubuntu21.1                            armhf        /dev/ and hotplug management daemon
# /etc/usb_modeswitch.d/huawei_e3.conf
TargetVendor=0x12d1
TargetProductList="14db,14dc"
HuaweiNewMode=1
NoDriverLoading=1
DefaultVendor=0x12d1
DefaultProduct=0x1f01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment