Mounting USB drive on 3G dongle

6,290

Have a good read through the Arch Wiki pages about USB 3G modems and Huawei E220.

Your specific model is discussed in the forums which suggests the following:

Create /usr/share/usb_modeswitch/12d1:14db with the following content

# Huawei E303
DefaultVendor = 0x19d2
DefaultProduct = 0x14db
TargetVendor = 0x19d2
TargetProduct = 0x14db
MessageContent = "55534243123456780000000000000011062000000100000000000000000000"

Edit(or create) /lib/udev/rules.d/40-usb_modeswitch.rules and add the following lines

# Huawei E303
ATTRS {idVendor} == "12d1", ATTRS {idProduct} == "14db", RUN + = "usb_modeswitch '% b /% k'"

Then restart udev, or unplug your dongle and plug it back in.

You may need to also install some packages listed on [the 3G modem wiki page] (https://wiki.archlinux.org/index.php/USB_3G_Modem).

Share:
6,290

Related videos on Youtube

user32421
Author by

user32421

Updated on September 18, 2022

Comments

  • user32421
    user32421 almost 2 years

    I've got an Huawei HiLink E303 USB G3-internet dongle that I'd like to use to connect to the internet. I'm using Arch Linux. According to this page, the Linux drivers are actually on the device and can be installed relatively easy, including on Arch. However, I am not able to actually mount this device, and can therefore not extract the drivers. Basically, the device is being recognized as a USB device, then promptly after that it loads as a 'CDC Ethernet Device'. In the aforementioned tutorial, the trick is in mounting the device and then loading the drivers, but I'm unable to do so. No drive letter is being assigned when checking the journal (remember, Arch is using systemd now, so no more /var/log/messages etc files).

    Here's some output:

    $ journalctl -f
    Feb 15 02:47:57 S1 kernel: usb 1-2: new high-speed USB device number 21 using ehci_hcd
    Feb 15 02:47:58 S1 kernel: scsi12 : usb-storage 1-2:1.0
    Feb 15 02:47:58 S1 kernel: usb 1-2: USB disconnect, device number 21
    Feb 15 02:48:03 S1 kernel: usb 1-2: new high-speed USB device number 22 using ehci_hcd
    Feb 15 02:48:04 S1 kernel: cdc_ether 1-2:1.0 eth0: register 'cdc_ether' at usb-0000:00:1d...2:63
    Feb 15 02:48:04 S1 systemd-udevd[12873]: renamed network interface eth0 to enp0s29f7u2
    
    $ lsusb
    Bus 001 Device 024: ID 12d1:14db Huawei Technologies Co., Ltd.
    ... (other irrelevant devices)
    
    $ ls /dev/disk/by-uuid
    No new devices show up here
    
    $ fdisk -l
    No new devices show up here
    
    $ ls /dev
    No new devices show up here
    

    By not being given a drive letter - or even a cdrom assignation as is shown on the tutorial page, I am unable to mount the device. Anybody any idea?

    Also, I ultimately want to connect to the internet so if someone knows a shortcut to that, that would work as well. I tried to run ifconfig enp0s29f7u2 up, and it is indeed activated, but no real connection is made.

  • user32421
    user32421 over 11 years
    Great, thanks a lot! I'll test this. It appears I need the usb_modeswitch package, so I need to get a connection to internet first and then download this. Will try later and get back to you.
  • user32421
    user32421 over 11 years
    Superb, works as a charm!