Firstly, beware that the device can take more power than the Pi's USB port can deliver and so should always be attached via an external powered hub.
When first plugged in, the E3131 presents as a CD drive with USB id 12d1:1f01 and "udev" will typically assign it the first optical disc id: "/dev/sr0". The device can be mounted read-only to inspect the installation software. Use the command "lsusb" to display the USB id.
To make the device useful, it must be switched from CD mode into Network mode. Switching can be achieved by sending the device a USB SCSI command using the utility "sg_raw" which is a part of the "sg3-utils" package. To install it, enter the command "apt-get install sg3-utils".
The command to perform the mode switch is:
Code: Select all
/usr/bin/sg_raw /dev/sr0 11 06 20 00 00 00 00 00 01 00
The E3131 is now available at one end of a point-to-point network having a default IP address of 192.168.1.1/24. To connect to it, we must configure "eth1" to have an address on that same network.
Beware that 192.168.1.* is a very commonly used network which may already be in use on your wired Ethernet. If so, you will need to disconnect the network lead before continuing.
The command to configure the network interface is:
Code: Select all
ifconfig eth1 192.168.123.100
Code: Select all
ping 192.168.1.1
It's possible to automate the whole procedure; we need to automatically switch from storage device to network mode and to automatically assign an IP address. This can be done by editing 2 files:
To automate the mode switch, create a new file "/etc/udev/rules.d/10-HuaweiFlashCard.rules" with the following content:
Code: Select all
SUBSYSTEMS=="usb", ATTRS{modalias}=="usb:v12D1p1F01*", SYMLINK+="hwcdrom", RUN+="/usr/bin/sg_raw /dev/hwcdrom 11 06 20 00 00 00 00 00 01 00"
Code: Select all
allow-hotplug eth1
iface eth1 inet dhcp
Finally, try browsing the Internet. Make sure that you disconnect any existing hard-wired or WiFi interface to ensure you're really connected through the E3131!
Good luck and hope this helps.
Richard White