Admin: I will move this post to a more suitable thread in 'Setup Discussion' later today.
Thanks for the links, things are becoming more understood.
I have struggled for a long time to get the E585 working with OpenWRT 10.03.1, r29592 (Linux 2.6.32.27), and I guess it's only fair if I post what I have learned discovered so far. If I am lucky, someone will provide the final pieces of the puzzle here...
My goal is to get the Huawei E585 working on my OpenWRT router. I am trying to attach cdc_ether to it via the new_id feature, but am struggling to do so. Maybe someone could take a look and give me an idea?
As background, I was able to get the E367 working easy enough (using comgt), but have failed with the E585 (should be using cdc_ether?).
Step 1 - install USB support (and lsusb command):
Code:
opkg update
opkg install kmod-usb-core
opkg install usbutils # this is the lsusb command
# the command to confirm (you've plugged-in your E367/E585?):
lsusb | grep 12d1
If everything worked so far, you should see '
Huawei Technologies' (ie.e the E367/E585 USB device). Please take a note of the 4-digit PID after 12d1 (it should be 1446).
Step 2 - install USB storage - the E367/E585 both have a micro-SD slot (
Note that I had to change the loading order of the modules):
Code:
opkg install kmod-usb-storage
opkg install block-hotplug block-mount # ?optional: for hot-plug support
opkg install kmod-fs-ext3 e2fsprogs tune2fs # the EXT FS & core utilities
opkg install kmod-fs-msdos dosfsck # the FAT FS & core utilities
opkg install kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1 # needed for FAT32/VFAT LFNs
# NB: I needed to change from 60-xxx to 59-xxx so that 60-usb-storage load BEFORE 60-usb-serial
mv /etc/modules.d/60-usb-storage /etc/modules.d/59-usb-storage
# If you don't do this, then usb-serial/usb-serial-option (see later) will 'steal' the storage interfaces
# the command to confirm what's been done so far...
cat /proc/bus/usb/devices | grep Driver
ls /dev/sd*
If everything worked so far, you should see '
usb-storage' and you should see the sd* devices (and you can fstab, etc).
Step 3 - install USB-Modeswitch (yay!)
Code:
opkg install usb-modeswitch usb-modeswitch-data
# the following should automatically execute, but you can run it manually if required...
# usb_modeswitch -c /etc/usb_modeswitch.d/12d1:1446
# the command to confirm what's been done so far...
cat /proc/bus/usb/devices | grep Driver
If everything worked so far, you should see the
switched 4-digit PID after 12d1. Write this number down, you'll need it later -
for the E367 it's 1506.
Tip: I believe the command to do the equivalent of the script is:
usb_modeswitch -v 12d1 -p 1446 -P 1432 -V "1408,1432,1506" -M "55534243000000000000000000000011060000000100000000000000000000".
WHAT FOLLOWS IS SPECIFIC TO THE E367 - VID:PID 12D1:1506 (and works for me).Step 4a (E367 only) - install the driver for the 3G modem (part 1/2)
Code:
opkg install kmod-usb-serial kmod-usb-serial-option # option module is not required?
# This step is required to force the serial module to attach to the interface
echo usbserial vendor=0x12d1 product=0x1506 maxSize=4096 > /etc/modules.d/60-usb-serial
# to save rebooting, do the following:
rmmod usbserial
insmod usbserial vendor=0x12d1 product=0x1506 maxSize=4096
# the command to confirm what's been done so far...
lsusb | grep 12d1
ls /dev/ttyUSB*
If everything worked so far, you should see '
usbserial_generic', where before it said '(none)' and you should see the ttyUSB* devices.
Step 4a (E367 only) - install the driver for the 3G modem (part 2/2)
Code:
opkg install comgt chat
# the command to confirm what's been done so far (you may need to use a different ttyUSB*)...
gcom -d /dev/ttyUSB0 info
If everything worked so far, you should see '
OK', etc (and I'll leave the rest up to the reader).
WHAT FOLLOWS IS SPECIFIC TO THE E585 - VID:PID 12D1:1432 (and isn't working).Step 4b (part 1/2) - At this stage, it is worth considering the output of
cat /proc/bus/usb/devices, which should include the following output (if all is OK so far) - note that I have added newlines for readability:
Code:
T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 15 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=12d1 ProdID=1432 Rev= 1.00
S: Manufacturer=Huawei Incorporated
S: Product=HUAWEI Mobile Connect
S: SerialNumber=1234567890ABCDEF
C:* #Ifs= 4 Cfg#= 1 Atr=80 MxPwr=500mA
A: FirstIf#= 2 IfCount= 2 Cls=02(comm.) Sub=06 Prot=00
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=82(I) Atr=03(Int.) MxPS= 64 Ivl=1ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=06 Prot=ff Driver=(none)
E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=1ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=(none)
E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
The four interfaces, in order are
vend. (vendor-specific),
stor. (storage),
comm. (communications channel) and
data (data channel).
In my case, the option driver attached to the vendor-specific interface (although I guess I could have made serial do so, see step 4a, part ) - I am not sure if the vendor-specific interface can be used with comgt/ppp or not (I certainly couldn't get it to work). The storage driver is for the interface so that the micro-SD card can be accessed.
Now my assumption is that The cdc-ether module should attach to the communications / data interfaces...
Step 4b (E585 only) - install the driver for the CDC network device (part 2/2, version 1)
Code:
opkg install kmod-usb-net-cdc-ether
# get the module to 'attach' to the device interfaces using new_id feature (this doesn't seem to work)
echo "12d1 1432" > /sys/bus/usb/drivers/cdc_ether/new_id
# the command to confirm what's been done so far...
cat /proc/bus/usb/devices | grep Driver
If everything worked so far, you should see '
cdc_ether', but I don't. Note that there doesn't appear to be any
modprobe command for OpenWRT.
Step 4b (E585 only) - install the driver for the CDC network device (part 2/2, version 2). If you execute
grep 12D1 /sys/bus/usb/devices/*/modalias | grep 1432, you'll get the following (Warning: this stuff appears to be very specific to different implementations of Linux)
Code:
/sys/bus/usb/devices/1-1.1:1.0/modalias:usb:v12D1p1432d0100dcEFdsc02dp01icFFiscFFipFF
/sys/bus/usb/devices/1-1.1:1.1/modalias:usb:v12D1p1432d0100dcEFdsc02dp01ic08isc06ip50
/sys/bus/usb/devices/1-1.1:1.2/modalias:usb:v12D1p1432d0100dcEFdsc02dp01ic02isc06ipFF
/sys/bus/usb/devices/1-1.1:1.3/modalias:usb:v12D1p1432d0100dcEFdsc02dp01ic0Aisc00ip00
You can compare that to the output of step 4b, step1, and then try:
Code:
echo "usb:v12D1p1432d0100dcEFdsc02dp01ic02isc06ipFF" > /sys/bus/usb/drivers/cdc_ether/new_id
But it don't work either!
References:
http://www.ha19.no/usb/
http://irclogs.ubuntu.com/2009/04/04/%23ubuntu-kernel.txt
http://ubuntuforums.org/showpost.php?p=11443633&postcount=59