Huawei E392u-12 not working
-
Hi Everyone,
Version: pfSense 2.0.1-RELEASE-pfSense
Test Platform: VirtualBOX 4.1.8I'm trying to get my Huawei E392u-12 to work with Pfsense, but the usb modem is not showning up as a device under /dev/cua*. I have tried to switch it over with
modeswitch 1.2.1 but it returns an error.Looking for target devices ... Found devices in target mode or class (1) Looking for default devices ... found matching product ID adding device Found device in default mode, class or configuration (1) Accessing device 002 on bus 000 ... Getting the current device configuration ... OK, got current device configuration (1) Using first interface: 0x00 Using endpoints 0x01 (out) and 0x82 (in) Not a storage device, skipping SCSI inquiry USB description data (for identification) ------------------------- Manufacturer: Huawei Technologies Product: HUAWEI Mobile Serial No.: not provided ------------------------- Sending Huawei control message ... Error: sending Huawei control message failed (error -1). Aborting.
The contents of the config file I'm using is:
# /etc/usb_modeswitch.conf # Huaweia E192u-12 # DefaultVendor= 0x12d1; DefaultProduct= 0x1506 DetachStorageOnly=0 HuaweiMode=1 # End
Output from usbconfig
ugen0.2: <huawei mobile="" huawei="" technologies=""> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON bLength = 0x0012 bDescriptorType = 0x0001 bcdUSB = 0x0110 bDeviceClass = 0x0000 bDeviceSubClass = 0x0000 bDeviceProtocol = 0x0000 bMaxPacketSize0 = 0x0040 idVendor = 0x12d1 idProduct = 0x1506 bcdDevice = 0x0000 iManufacturer = 0x0004 <huawei technologies=""> iProduct = 0x0003 <huawei mobile=""> iSerialNumber = 0x0000 <no string=""> bNumConfigurations = 0x0001</no></huawei></huawei></huawei>
Any help is much appreciated. Is there something else that I should try.
-
Where did you get the conf file from?
The only thing I see is in the refernce file:# T-Mobile NL (Huawei E352) # # Contributor: Alex Hermann DefaultVendor= 0x12d1 DefaultProduct=0x14fe TargetVendor= 0x12d1 TargetProduct= 0x1506 MessageContent="55534243123456780000000000000011062000000100000000000000000000"
In which case your modem is already in target mode.
usb_modeswitch may have trouble sending the control message via a virtualised port.
This looks like a '4g' LTE modem right? It may be appearing as an ethernet device. Check the system log.
Steve
-
Hi - when you remove and replug the modem to your system - do you see ugen or u3g messages ?
-
Hi Thorsten,
I only see ugen messages its like the modem is not switched. I'm preparing a new soekris platform for further testing right now.
Thanks.
-
mmh - im currently wondering about some code in u3g which seems to init the hardware somehow so that my modem gets swiched automagically.
and yes - you are right - modeswitch might use the ugen driver to switch the productid via an usb message, not via a scsi control command so the question about ugen can only say if some modem is unswitched, not that u3g cant support it.may your want to post your system logs / the output appearing when you plug in the modem ?
Edit: Maybe you want to try on a freebsd 8.3 installation too, just to know if you can use it with pfSense 8.1.
-
It might be rash to assume the mode switching will result in cua* devices. (The Sierra Wireless Air Code 320U is a 4G modem capable of 44Mbps but only if it is using the "Direct IP" packet interface rather than the high overhead character interface. The Huawei E353 discussed in another thread seems to switch into a mode providing an Ethernet device and no cua* devices)
What is the output of pfSense shell command```
$ usbconfig show_ifdrv@Cerberus: > Output from usbconfig > ``` > ugen0.2: <huawei mobile="" huawei="" technologies=""> at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON</huawei> > ``` Is this really a USB 1 (12Mbps) device?
-
It might be rash to assume the mode switching will result in cua* devices. (The Sierra Wireless Air Code 320U is a 4G modem capable of 44Mbps but only if it is using the "Direct IP" packet interface rather than the high overhead character interface. The Huawei E353 discussed in another thread seems to switch into a mode providing an Ethernet device and no cua* devices)
Yes indeed. My reading suggests that different message contents sent by usb_modeswitch can determine what gets exposed: old style cua* devices or usb ethernet interface (the cdce* style), at least for some of the newer devices.
I have been playing around with an e398 thanks to a heads up from stephenw10 (thanks!) about a freebsd port of usb_modeswitch. Matters are quite complicated there as the usb ethernet interface requires QMI a Qualcomm proprietary protocol and not AT. In Linux a cdc and an enabling qmi driver are needed and that is in kernel 3.4 or some such (ie. cutting edge).
-
Hi Everybody,
Thank you for helping.
I did get this to work, here is a step by step to get this dongle "working" on a soekris net 5501 board. The dongle is a 4 band 4G modem with a usb 2.0 interface from Telia, but yes there is a max throughput of aproxmately 12Mbps. In the software that Telia shipped with the modem there is an option to switch between NDIS or PPP style connection, so there is a way to use the usb nic of that dongle, but when I replug the dongle there aren't any network apadters detected.
First off there is a problem with the virtualbox installation I used earlier, usb_modeswitch commands are broken when they reach the modem.
0. Mount pfsense system partition as rw
1. Install freebsd port of modeswitch currently version 1.2.1
2. Remove the sim pin, the huawei e392 modem doesn't understand the way pfsense 2.0.1 sends sim AT unlock commands
3. /dev/cuaU0.2 is the right serial port to use when the dongle is switched
4. Copy below lines to a file ex. huawei.confDefaultProduct= 0x1505 TargetVendor= 0x12d1 TargetProduct= 0x14db MessageContent="55534243123456780000000000000a11062000000000000100000000000000" NoDriverLoading=1
5. Run #usb_modeswitch -c huawei.conf
6. Configure 4g connection as described in http://doc.pfsense.org/index.php/Configuring_3G_modemsWoila now the dongle can be used, but not with full speed though.
–---------------------------------------------------------------------------
##When the dongle is just plugged in.
(probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
(probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI status: Check Condition
(probe0:umass-sim0:0:0:0): SCSI sense: NOT READY asc:3a,0 (Medium not present)
cd0 at umass-sim0 bus 0 scbus0 target 0 lun 0
cd0: <huawei mass="" storage="" 2.31="">Removable CD-ROM SCSI-0 device
cd0: 40.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present
done.
[2.0.1-RELEASE][root@pfsense.localdomain]/root(4): usb_modeswitch -c huawei1
Looking for targugen1.2: <huawei technologies="">at usbus1 (disconnected)
umass0: at uhub1, port 1, addr 2 (disconnected)
et devices …
(cd0:umass-sim0:0:0:0): lost device
(cd0:umass-sim0:0:0:0): removing device entry
No devices in target mode or class found
Looking for default devices ...
found matching product ID
adding device
Found device in default mode, class or configuration (1)
Accessing device 003 on bus 000 ...
Getting the current device configuration ...
OK, got current device configuration (1)
Using first interface: 0x00
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Cant't do driver detection and detaching on this platform.SCSI inquiry data (for identification)
-------------------------
Vendor String: HUAWEI
Model String: Mass Storage
Revision String: 2.31
-------------------------USB description data (for identification)
-------------------------
Manufacturer: Huawei Technologies
Product: HUAWEI Mobile
Serial No.: not provided
-------------------------
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
da0ing to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Resetting response endpoint 0x81
Resetting message endpoint 0x01
-> Run lsusb to note any changes. Bye.a bit later
ugen1.2: <huawei technologies="">at usbus1
u3g0: <huawei 0="" 2="" technologies="" huawei="" mobile,="" class="" 0,="" rev="" 2.00="" 0.00,="" addr="">on usbus1
u3g0: Found 3 ports.
umass0: <huawei 0="" 2="" technologies="" huawei="" mobile,="" class="" 0,="" rev="" 2.00="" 0.00,="" addr="">on usbus1
umass1: <huawei 0="" 2="" technologies="" huawei="" mobile,="" class="" 0,="" rev="" 2.00="" 0.00,="" addr="">on usbus1
(probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
(probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI status: Check Condition
(probe0:umass-sim0:0:0:0): SCSI sense: NOT READY asc:3a,0 (Medium not present)
cd0 at umass-sim0 bus 0 scbus0 target 0 lun 0
cd0: <huawei mass="" storage="" 2.31="">Removable CD-ROM SCSI-0 device
cd0: 40.000MB/s transfers
cd0: Attempt to query device size failed: NOT READY, Medium not present
(probe0:umass-sim1:1:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
(probe0:umass-sim1:1:0:0): CAM status: SCSI Status Error
(probe0:umass-sim1:1:0:0): SCSI status: Check Condition
(probe0:umass-sim1:1:0:0): SCSI sense: NOT READY asc:3a,0 (Medium not present)
da0 at umass-sim1 bus 1 scbus1 target 0 lun 0
da0: <huawei sd="" storage="" 2.31="">Removable Direct Access SCSI-2 device[2.0.1-RELEASE][root@pfsense.localdomain]/root(6): usbconfig show_ifdrv
ugen0.1: <ohci root="" hub="" amd="">at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON
ugen0.1.0: uhub0: <amd 1="" 9="" ohci="" root="" hub,="" class="" 0,="" rev="" 1.00="" 1.00,="" addr="">ugen1.1: <ehci root="" hub="" amd="">at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON
ugen1.1.0: uhub1: <amd 1="" 9="" ehci="" root="" hub,="" class="" 0,="" rev="" 2.00="" 1.00,="" addr="">ugen1.2: <huawei mobile="" huawei="" technologies="">at usbus1, cfg=0 md=HOST spd=HIGH N
ugen1.2.0: u3g0: <huawei 0="" technologies="" huawei="" mobile,="" class="" 0,="" rev="" 2.00="" 0.00,="">ugen1.2.5: umass0: <huawei 0="" technologies="" huawei="" mobile,="" class="" 0,="" rev="" 2.00="" 0.00="">ugen1.2.6: umass1: <huawei 0="" technologies="" huawei="" mobile,="" class="" 0,="" rev="" 2.00="" 0.00=""></huawei></huawei></huawei></huawei></amd></ehci></amd></ohci></huawei></huawei></huawei></huawei></huawei></huawei></huawei></huawei> -
This one is pretty informative - nice :)
I had a similar problem with pin authorisation where pfsense was askin at+cpin=? and my modem answered with ok instead of ready.
(which it answers, when asked at+cpin? )Is this the case too with your modem ?- then i might be able to help this :)
-
I find it interesting that your modem is eventually recognised by u3g but only after switching with usb_modeswitch.
Coincidentally ends up with the same vendor and product IDs as previous Huawei modems? :-\It seems to be highlighting a lack of understanding on my part. ::)
Also there seems to be certain amount of wheel re-inventing going on here. There are numerous threads on the board with similar problems and outcomes and people are writing scripts and such. I'm fairly sure almost all of this could be handled by devd, perhaps simply by adding an appropriate conf file to /usr/local/etc/devd.
Time to read up on this.Steve