Then it should get online when you restart the router given that the apn are set correctly.
3. cron (if you get disconnected)
* * * * * [ "`/usr/sbin/nvram get 3gdata`" == "/dev/usb/tts/2" ] && /usr/sbin/nvram set 3gdata=/dev/usb/tts/0
that's it. If somebody can tell me how to integrate it in a init script I would be pleased.
Hi! I can not work this. My huawei E367 is not connected. When i put this modem into usb on ubuntu maschine, it display "Bus 001 Device 007: ID 12d1:14ac Huawei Technologies Co., Ltd." and it work on notebook, but on dd-wrt it is not work.
Can you help me? What settings should I write in a row usb_modeswitch?
Then it should get online when you restart the router given that the apn are set correctly.
3. cron (if you get disconnected)
* * * * * [ "`/usr/sbin/nvram get 3gdata`" == "/dev/usb/tts/2" ] && /usr/sbin/nvram set 3gdata=/dev/usb/tts/0
that's it. If somebody can tell me how to integrate it in a init script I would be pleased.
i have use this as startupo script, but this allow me only to connect via 3G/UMTS but i will use LTE/4g did someone make some changes to get a 4G connection running.
i use the newest revision 18024 with a Huawei e398 Modem
Since there is a lot of discussion about 3g modems, I thought I will post here, sorry if wrong place.
_____________________________________________________
Router ASUS N13U B1.
DD-WRT - BrainSlayer-V24-preSP2/2012/03-19-12-r18777.
CDMA/EVDO Modem: Huawei EC 159.
Unswitched IDs: vid: 12d1 pid: 1505 (CD)
Switched IDs: Vid: 12d1 Pid: 140b (modem)
DD-WRT Interface: Connection Type: 3G/UMTS/4G/LTE
User Name: xxxxxxxxxxx
Password: xxxxxxxxxxx
Dial String: #777 (CDMA/EVDO)
APN: Not req.
PIN: Not Req.
Connection type: Auto 3G/2G.
______________________________________________________
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.1.4 (C) Josua Dietze 2010
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x12d1
DefaultProduct= 0x1505
TargetVendor= 0x12d1
TargetProduct= 0x140b
TargetClass= not set
TargetProductList=""
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent="55534243123456780000000000000011062000000100000000000000000000"
NeedResponse=1
ResponseEndpoint= not set
Interface=0x00
InquireDevice enabled (default)
Success check disabled
System integration mode disabled
Looking for target devices ...
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 12d1:1505
found matching vendor ID
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 12d1:1505
found matching vendor ID
found matching product ID
adding device
Found devices in default mode or class (1)
Accessing device 002 on bus 001 ...
Using endpoints 0x08 (out) and 0x87 (in)
Using endpoints 0x08 (out) and 0x87 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
No driver found. Either detached before or never attached
SCSI inquiry data (for identification)
-------------------------
Vendor String: HUAWEI
Model String: Mass Storage
Revision String: 2.31
-------------------------
USB description data (for identification)
-------------------------
Manufacturer: HUA WEI TECHNOLOGIES
Product: HUAWEI Mobile
Serial No.:
-------------------------
Setting up communication with interface 0 ...
Using endpoint 0x08 for message sending ...
Trying to send message 1 to endpoint 0x08 ...
OK, message successfully sent
Reading the response to the message (CSW) ...
Response reading got error -145, can probably be ignored
Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.
It seems no modeswitch has occured and pid is still 1505. Is the modeswitch string different for this modem? What have I done wrong?? Any help greatly appreciated.
It seems no modeswitch has occured and pid is still 1505. Is the modeswitch string different for this modem? What have I done wrong?? Any help greatly appreciated.
It has been modeswitched (Device is gone, skipping any further commands) but there is something wrong with the rescan of the usb bus in that Ralink build.
There should not had been any need for you to do a manual usb_modeswitch, the stick is supported by ddwrt so the switch should have occurred automatically.
Are you using a hub between the router and the stick?
If so, test without hub! _________________ Kernel panic: Aiee, killing interrupt handler!
Both the commands yield errors but then...
Then it modeswitches to 140b and connects to internet.
Now the problem is to automate the process.
If I put it in startup script it won't work - tried sleep times of more than 120.
Even running commands from the router web interface doesn't work..
(I can post the responses if you need).
Regards
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.1.4 (C) Josua Dietze 2010
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x12d1
DefaultProduct= 0x1505
TargetVendor= 0x12d1
TargetProduct= 0x140b
TargetClass= not set
TargetProductList=""
DetachStorageOnly=1
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent="55534243123456780000000000000011062000000100000000000000000000"
NeedResponse=1
ResponseEndpoint= not set
Interface=0x00
InquireDevice enabled (default)
Success check disabled
System integration mode disabled
Looking for target devices ...
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 12d1:1505
found matching vendor ID
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 12d1:1505
found matching vendor ID
found matching product ID
adding device
Found devices in default mode or class (1)
Accessing device 002 on bus 001 ...
Using endpoints 0x08 (out) and 0x87 (in)
Using endpoints 0x08 (out) and 0x87 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
No driver found. Either detached before or never attached
SCSI inquiry data (for identification)
-------------------------
Vendor String: HUAWEI
Model String: Mass Storage
Revision String: 2.31
-------------------------
USB description data (for identification)
-------------------------
Manufacturer: HUA WEI TECHNOLOGIES
Product: HUAWEI Mobile
Serial No.:
-------------------------
Only detaching storage driver for switching ...
Any driver was already detached for inquiry
Warning: ignoring MessageContent. Can't combine with special mode
-> Run lsusb to note any changes. Bye.
root@DD-WRT:~# usb_modeswitch -v 12d1 -p 1505 -V 12d1 -P 140b -M "55534243123456
780000000000000011062000000100000000000000000000" -n 1 -W -i 0
Taking all parameters from the command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 1.1.4 (C) Josua Dietze 2010
* Based on libusb0 (0.1.12 and above)
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x12d1
DefaultProduct= 0x1505
TargetVendor= 0x12d1
TargetProduct= 0x140b
TargetClass= not set
TargetProductList=""
DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint= not set
MessageContent="55534243123456780000000000000011062000000100000000000000000000"
NeedResponse=1
ResponseEndpoint= not set
Interface=0x00
InquireDevice enabled (default)
Success check disabled
System integration mode disabled
Looking for target devices ...
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 12d1:1505
found matching vendor ID
No devices in target mode or class found
Looking for default devices ...
searching devices, found USB ID 1d6b:0002
searching devices, found USB ID 12d1:1505
found matching vendor ID
found matching product ID
adding device
Found devices in default mode or class (1)
Accessing device 002 on bus 001 ...
Using endpoints 0x08 (out) and 0x87 (in)
Using endpoints 0x08 (out) and 0x87 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
OK, driver found ("dummy")
OK, driver "dummy" detached
SCSI inquiry data (for identification)
-------------------------
Vendor String: HUAWEI
Model String: Mass Storage
Revision String: 2.31
-------------------------
USB description data (for identification)
-------------------------
Manufacturer: HUA WEI TECHNOLOGIES
Product: HUAWEI Mobile
Serial No.:
-------------------------
Setting up communication with interface 0 ...
libusb:error [op_clear_halt] clear_halt failed error -1 errno 16
Using endpoint 0x08 for message sending ...
Trying to send message 1 to endpoint 0x08 ...
OK, message successfully sent
Reading the response to the message (CSW) ...
Response reading got error -4, can probably be ignored
Device is gone, skipping any further commands
-> Run lsusb to note any changes. Bye.
Hi, my E398 modem seems to be failing the usb-modeswitch, and I haven't been able to get it to work. Could it be the power issue mentioned above that's causing issues for me?
roboswitch: Probing device eth0: found a 53115!
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
USB20H mdio control register : 0x8000000c
PCI: Setting latency timer of device 0000:00:04.1 to 64
ehci_hcd 0000:00:04.1: EHCI Host Controller
ehci_hcd 0000:00:04.1: new USB bus registered, assigned bus number 1
ehci_hcd 0000:00:04.1: irq 5, io mem 0x18004000
ehci_hcd 0000:00:04.1: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
USB Universal Host Controller Interface driver v3.0
ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver
USB20H mdio control register : 0x8000000c
PCI: Setting latency timer of device 0000:00:04.0 to 64
ohci_hcd 0000:00:04.0: OHCI Host Controller
ohci_hcd 0000:00:04.0: new USB bus registered, assigned bus number 2
ohci_hcd 0000:00:04.0: irq 5, io mem 0x18009000
usb usb2: configuration #1 chosen from 1 choice
usb 1-1: new high speed USB device using ehci_hcd and address 2
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usb 1-1: configuration #1 chosen from 1 choice
SCSI subsystem initialized
Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
br0: Dropping NETIF_F_UFO since no NETIF_F_HW_CSUM feature.
device vlan1 entered promiscuous mode
device eth0 entered promiscuous mode
device eth1 entered promiscuous mode
br0: port 2(eth1) entering learning state
br0: port 1(vlan1) entering learning state
device vlan2 entered promiscuous mode
usbcore: registered new interface driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial Driver core
drivers/usb/serial/usb-serial.c: USB Serial support registered for GSM modem (1-port)
usbcore: registered new interface driver option
drivers/usb/serial/option.c: USB Driver for GSM modems: v0.7.1
br0: topology change detected, propagating
br0: port 2(eth1) entering forwarding state
br0: topology change detected, propagating
br0: port 1(vlan1) entering forwarding state
scsi 0:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 0
usb-storage: device scan complete
usb 1-1: usbfs: process 1057 (usb_modeswitch) did not claim interface 0 before use
usb 1-1: USB disconnect, address 2
usb 1-1: new high speed USB device using ehci_hcd and address 3
usb 1-1: configuration #1 chosen from 1 choice
scsi1 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
scsi2 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
scsi 1:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 0
usb-storage: device scan complete
scsi 2:0:0:0: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
sd 2:0:0:0: [sda] Attached SCSI removable disk
usb-storage: device scan complete
root@DD-WRT:~#