Huawei E367 on TL-WR703N - /dev/usb/tts/1

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware
Author Message
Flake
DD-WRT Novice


Joined: 15 Sep 2006
Posts: 27

PostPosted: Wed May 16, 2012 21:19    Post subject: Huawei E367 on TL-WR703N - /dev/usb/tts/1 Reply with quote
I've a brand-new TP-Link TL-WR703N flashed with DD-WRT v18777.

It recognised my Huawei E367 straight away, but would not connect, despite the dial-up number and APN being confirmed correct by my provider. Both dmesg and ls /dev showed two entries of ttyUSB0 and ttyUSB1.

comgt -d /dev/ttyUSB0 returned an error, but comgt -d /dev/ttyUSB1 showed the expected mobile network identifier.

nvram show | grep 3gdata showed /dev/usb/tts/0 which got me thinking...

One simple change - nvram set 3gdata=/dev/usb/tts/1 - and the router connected to the Internet straight away, and I'm using it right now to type this message.

So, what was the cause? Do I have a non-standard E367? Does something need to be changed in DD-WRT?
Sponsor
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7631

PostPosted: Thu May 17, 2012 1:44    Post subject: Re: Huawei E367 on TL-WR703N - /dev/usb/tts/1 Reply with quote
Flake wrote:

So, what was the cause? Do I have a non-standard E367? Does something need to be changed in DD-WRT?


Show me the output from cat /proc/bus/usb/devices with the 3G stick connected.

_________________
Kernel panic: Aiee, killing interrupt handler!
Flake
DD-WRT Novice


Joined: 15 Sep 2006
Posts: 27

PostPosted: Thu May 17, 2012 6:32    Post subject: Reply with quote
Code:
root@tl-wr703n:~# cat /proc/bus/usb/devices

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 3.02
S:  Manufacturer=Linux 3.2.12-rc1-svn18774 ehci_hcd
S:  Product=Atheros AR91xx built-in EHCI controller
S:  SerialNumber=platform
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=12d1 ProdID=1506 Rev= 0.00
S:  Manufacturer=Huawei Technologies
S:  Product=HUAWEI Mobile
C:* #Ifs= 5 Cfg#= 1 Atr=c0 MxPwr=500mA
A:  FirstIf#= 0 IfCount= 2 Cls=02(comm.) Sub=00 Prot=00
I:* If#= 0 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=01 Prot=09 Driver=(none)
E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=08 Driver=(none)
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=03 Driver=option
E:  Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 3 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=02 Driver=option
E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:* If#= 4 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=(none)
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
root@tl-wr703n:~#

The change does not appear to survive a reboot. I had to issue nvram set 3gdata=/dev/usb/tts/1 again this morning to get online to post this reply.
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7631

PostPosted: Thu May 17, 2012 8:27    Post subject: Reply with quote
No, a manual set of 3gdata does not survive a reboot, it is getting set when the stick is detected.

The stick has its modem interface on /dev/usb/tts/0 but your devices list shows that interface 0 has not been claimed by the option driver.

This is a conflict between 2 Huawei modems with the same id 12d1:1506 but they don't have the same interface configuration.
Your devices listing does not look like the list I have for E353 (which also has the id 12d1:1506) and there is no possibility to support 2 sticks with the same id but different interface list.
The option driver adds some special handling to E353 (it based on the sticks id) and your E367 will also get that but shouldn't have it.

You can add a startup script which should sleep for some 10secs until the stick has been recognized after a reboot and then let the script change your 3gdata variable to tts/1 instead of tts/0.

_________________
Kernel panic: Aiee, killing interrupt handler!
Flake
DD-WRT Novice


Joined: 15 Sep 2006
Posts: 27

PostPosted: Fri May 18, 2012 16:03    Post subject: Reply with quote
Thank you for the explanation. It's the manufacturer's fault for not burning a different PCI device ID into the unit. Fair enough. All I can do, then, is try to work around it. I've spent a good chunk of today attempting your suggestion of a startup script, but I'm stumped.

I tried this as a startup script:
Code:
logger Setting 3gdata to /dev/usb/tts/1
sleep 10
nvram set 3gdata=/dev/usb/tts/1

That didn't work. The router failed to connect automatically, and when I issued nvram get 3gdata it had reverted to /dev/usb/tts/0.

I then changed the sleep delay to 20, 30, and 60 seconds, in case 10 seconds wasn't enough. In all cases it didn't work.

The following are two /var/log/messages extracts (sleep 10 and sleep 60).

sleep 10 wrote:
Jan 1 00:00:12 tl-wr703n user.info syslog: dropbear : ssh daemon successfully started
Jan 1 00:00:12 tl-wr703n authpriv.info dropbear[867]: Running in background
Jan 1 00:00:13 tl-wr703n kern.info kernel: [ 19.570000] usbcore: registered new interface driver usbserial
Jan 1 00:00:13 tl-wr703n kern.info kernel: [ 19.570000] USB Serial support registered for generic
Jan 1 00:00:13 tl-wr703n kern.info kernel: [ 19.580000] usbcore: registered new interface driver usbserial_generic
Jan 1 00:00:13 tl-wr703n kern.info kernel: [ 19.580000] usbserial: USB Serial Driver core
Jan 1 00:00:13 tl-wr703n kern.info kernel: [ 20.080000] USB Serial support registered for GSM modem (1-port)
Jan 1 00:00:13 tl-wr703n kern.info kernel: [ 20.090000] option 1-1:1.2: GSM modem (1-port) converter detected
Jan 1 00:00:13 tl-wr703n kern.info kernel: [ 20.090000] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
Jan 1 00:00:13 tl-wr703n kern.info kernel: [ 20.100000] option 1-1:1.3: GSM modem (1-port) converter detected
Jan 1 00:00:13 tl-wr703n kern.info kernel: [ 20.110000] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
Jan 1 00:00:13 tl-wr703n kern.info kernel: [ 20.110000] usbcore: registered new interface driver option
Jan 1 00:00:13 tl-wr703n kern.info kernel: [ 20.120000] option: v0.7.2:USB Driver for GSM modems
Jan 1 00:00:40 tl-wr703n user.info syslog: ppp_redial : redial process successfully started
Jan 1 00:00:40 tl-wr703n daemon.notice pppd[1072]: pppd 2.4.4 started by root, uid 0
Jan 1 00:00:40 tl-wr703n user.info syslog: ttraff : traffic counter daemon successfully started
Jan 1 00:00:41 tl-wr703n user.notice root: Setting 3gdata to /dev/usb/tts/1
Jan 1 00:00:41 tl-wr703n user.info syslog: klogd : kernel log daemon successfully stopped
Jan 1 00:00:41 tl-wr703n kern.notice kernel: klogd: exiting
Jan 1 00:00:41 tl-wr703n user.info syslog: httpd : http daemon successfully stopped
Jan 1 00:00:43 tl-wr703n user.info syslog: klogd : kernel log daemon hanging, send SIGKILL
Jan 1 00:00:43 tl-wr703n user.info syslog: syslogd : syslog daemon successfully stopped
Jan 1 00:00:43 tl-wr703n syslog.info syslogd exiting
Jan 1 00:00:43 tl-wr703n syslog.info syslogd started: BusyBox v1.19.4
Jan 1 00:00:43 tl-wr703n user.info syslog: resetbutton : resetbutton daemon successfully stopped
Jan 1 00:00:43 tl-wr703n user.info syslog: klogd : klog daemon successfully started
Jan 1 00:00:43 tl-wr703n kern.notice kernel: klogd started: BusyBox v1.19.4 (2012-03-19 11:36:35 CET)
Jan 1 00:00:43 tl-wr703n user.info syslog: reset button : resetbutton daemon successfully started
Jan 1 00:00:54 tl-wr703n authpriv.notice dropbear[1188]: Password auth succeeded for 'root' from 192.168.1.134:41451

sleep 60 wrote:
Jan 1 00:00:12 tl-wr703n user.info syslog: dropbear : ssh daemon successfully started
Jan 1 00:00:12 tl-wr703n authpriv.info dropbear[824]: Running in background
Jan 1 00:00:12 tl-wr703n user.info syslog: dnsmasq : dnsmasq daemon successfully started
Jan 1 00:00:12 tl-wr703n kern.info kernel: [ 19.110000] br0: port 2(ath0) entering forwarding state
Jan 1 00:00:13 tl-wr703n kern.info kernel: [ 20.030000] usbcore: registered new interface driver usbserial
Jan 1 00:00:13 tl-wr703n kern.info kernel: [ 20.030000] USB Serial support registered for generic
Jan 1 00:00:13 tl-wr703n kern.info kernel: [ 20.040000] usbcore: registered new interface driver usbserial_generic
Jan 1 00:00:13 tl-wr703n kern.info kernel: [ 20.040000] usbserial: USB Serial Driver core
Jan 1 00:00:13 tl-wr703n kern.info kernel: [ 20.240000] USB Serial support registered for GSM modem (1-port)
Jan 1 00:00:13 tl-wr703n kern.info kernel: [ 20.240000] usbcore: registered new interface driver option
Jan 1 00:00:13 tl-wr703n kern.info kernel: [ 20.250000] option: v0.7.2:USB Driver for GSM modems
Jan 1 00:00:14 tl-wr703n kern.warn kernel: [ 21.020000] usb 1-1: usbfs: process 926 (usb_modeswitch) did not claim interface 0 before use
Jan 1 00:00:14 tl-wr703n kern.info kernel: [ 21.030000] usb 1-1: USB disconnect, device number 2
Jan 1 00:00:17 tl-wr703n user.info syslog: ppp_redial : redial process successfully started
Jan 1 00:00:17 tl-wr703n user.info syslog: ttraff : traffic counter daemon successfully started
Jan 1 00:00:17 tl-wr703n user.notice root: Setting 3gdata to /dev/usb/tts/1
Jan 1 00:00:18 tl-wr703n user.info syslog: klogd : kernel log daemon successfully stopped
Jan 1 00:00:18 tl-wr703n kern.notice kernel: klogd: exiting
Jan 1 00:00:18 tl-wr703n user.info syslog: httpd : http daemon successfully stopped
Jan 1 00:00:20 tl-wr703n user.info syslog: klogd : kernel log daemon hanging, send SIGKILL
Jan 1 00:00:20 tl-wr703n user.info syslog: httpd : http daemon hanging, send SIGKILL
Jan 1 00:00:20 tl-wr703n user.info syslog: syslogd : syslog daemon successfully stopped
Jan 1 00:00:20 tl-wr703n syslog.info syslogd exiting
Jan 1 00:00:20 tl-wr703n syslog.info syslogd started: BusyBox v1.19.4
Jan 1 00:00:20 tl-wr703n user.info syslog: klogd : klog daemon successfully started
Jan 1 00:00:20 tl-wr703n kern.notice kernel: klogd started: BusyBox v1.19.4 (2012-03-19 11:36:35 CET)
Jan 1 00:00:20 tl-wr703n kern.info kernel: [ 25.070000] usb 1-1: new high-speed USB device number 3 using ar71xx-ehci
Jan 1 00:00:20 tl-wr703n kern.info kernel: [ 25.220000] option 1-1:1.2: GSM modem (1-port) converter detected
Jan 1 00:00:20 tl-wr703n kern.info kernel: [ 25.230000] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
Jan 1 00:00:20 tl-wr703n kern.info kernel: [ 25.230000] option 1-1:1.3: GSM modem (1-port) converter detected
Jan 1 00:00:20 tl-wr703n kern.info kernel: [ 25.240000] usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
Jan 1 00:01:09 tl-wr703n daemon.notice pppd[1216]: pppd 2.4.4 started by root, uid 0
Jan 1 00:01:27 tl-wr703n daemon.info pppd[1216]: Exit.
Jan 1 00:02:00 tl-wr703n user.info syslog: process_monitor successfully started
Jan 1 00:02:00 tl-wr703n daemon.err process_monitor[1277]: Last update failed, we need to re-update after 30 seconds
Jan 1 00:02:00 tl-wr703n daemon.debug process_monitor[1277]: We need to re-update after 3600 seconds
Jan 1 00:02:00 tl-wr703n daemon.info process_monitor[1277]: set timer: 3600 seconds, callback: ntp_main()
Jan 1 00:02:02 tl-wr703n daemon.notice pppd[1290]: pppd 2.4.4 started by root, uid 0
Jan 1 00:02:19 tl-wr703n daemon.info pppd[1290]: Exit.
Jan 1 00:02:54 tl-wr703n daemon.notice pppd[1336]: pppd 2.4.4 started by root, uid 0
Jan 1 00:03:12 tl-wr703n daemon.info pppd[1336]: Exit.
Jan 1 00:03:46 tl-wr703n daemon.notice pppd[1379]: pppd 2.4.4 started by root, uid 0
Jan 1 00:04:03 tl-wr703n daemon.info pppd[1379]: Exit.
Jan 1 00:04:38 tl-wr703n daemon.notice pppd[1442]: pppd 2.4.4 started by root, uid 0
Jan 1 00:04:55 tl-wr703n daemon.info pppd[1442]: Exit.
Jan 1 00:05:28 tl-wr703n authpriv.notice dropbear[1512]: Password auth succeeded for 'root' from 192.168.1.134:41863
Jan 1 00:05:29 tl-wr703n daemon.notice pppd[1515]: pppd 2.4.4 started by root, uid 0


In the latter example, the startup script began 3 seconds before /dev/ttyUSB1 was assigned. However, the script contains "sleep 60" before the nvram command, so the nvram command should have executed at boot+77 seconds, or 57 seconds after /dev/ttyUSB1 appeared. Either it didn't run as expected, or it did run but something else reversed the change.

Linux shell scripting isn't my strong suit, so I'm reading http://www.dd-wrt.com/wiki/index.php/Index:Scripting and http://www.dd-wrt.com/wiki/index.php/Startup_Scripts and http://www.dd-wrt.com/wiki/index.php/Script_Execution and http://www.dd-wrt.com/wiki/index.php/CRON in an attempt to try to understand what might be happening and how to get this thing to work.
AZERTY123
DD-WRT User


Joined: 07 Mar 2012
Posts: 57

PostPosted: Sat May 19, 2012 13:47    Post subject: Reply with quote
May be startup script is not working. Try Save as firewall script.
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7631

PostPosted: Sun May 20, 2012 3:11    Post subject: Reply with quote
I may be able to fix this version of 12d1:1506 by patching the option driver but I won't do that until linux 3.4 is released (2nd half of may according to timeline) so I can get the latest version of option.c

There is some peculiarity in the WAN connection check, looks like the usb is being reset which restarts the 3G modem detection and modeswitch when WAN is down or drops.
This also reinits the 3gdata variable to /tts/0 which btw is the std modem interface for all Huawei sticks.
You should somehow be able to script that setting, if it worked when setting the variable from the cmdline then it should also work in a script.
If you do it at the right time (just after the modem is detected) and then get the 3G WAN connection to come up, then it ought to keep your /tts/1 until next WAN disconnect.

Don't power the WR703 from another devices USB port when a 3G stick is connected, the stick draws 500mA (and sometimes peaks even higher) the WR703 takes around 200mA for itself so you need a 1 Amp power suplly to be on the safe side.
Voltage drops due to not enough current available will also reset the 3G stick..

_________________
Kernel panic: Aiee, killing interrupt handler!
Flake
DD-WRT Novice


Joined: 15 Sep 2006
Posts: 27

PostPosted: Sun May 20, 2012 7:05    Post subject: Reply with quote
AZERTY123 wrote:
May be startup script is not working. Try Save as firewall script.

That seems to work more reliably. At least, it seems to behave reasonably consistently (but not every time) across several reboots. Thank you for the suggestion.

LOM wrote:
if it worked when setting the variable from the cmdline then it should also work in a script.

Precisely. I'll keep tinkering.

LOM wrote:
Don't power the WR703 from another devices USB port when a 3G stick is connected, the stick draws 500mA (and sometimes peaks even higher) the WR703 takes around 200mA for itself so you need a 1 Amp power suplly to be on the safe side.
Voltage drops due to not enough current available will also reset the 3G stick.

That hadn't occurred to me, but I've been powering the WR703 from one of these: www.screwfix.com/p/masterplug-surge-protected-usb-adaptor-2-x-1a-usb-polished-black/28341 - it's supposed to have a 1A output, although some reviews on Amazon suggest that it might not be delivering that much. I've got some other USB chargers lying around; I'll experiment with them as well.

Thanks for the help so far.
AZERTY123
DD-WRT User


Joined: 07 Mar 2012
Posts: 57

PostPosted: Sun May 20, 2012 8:05    Post subject: Reply with quote
Flake wrote:

That seems to work more reliably. At least, it seems to behave reasonably consistently (but not every time) across several reboots.

Check two things
1.adequate power supply to router.
2. Reset router. Add all settings. Use "Save" every time and use "Apply" only once in the end. The more you use apply's less is the reliability of the startup and even firewall scripts.
Hope this helps Smile
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7631

PostPosted: Wed May 23, 2012 8:29    Post subject: Reply with quote
LOM wrote:
I may be able to fix this version of 12d1:1506 by patching the option driver but I won't do that until linux 3.4 is released (2nd half of may according to timeline) so I can get the latest version of option.c



I've got the option driver from Linux 3.4 but can't get your E367 supported due to its strange interface list in the devices file.

Which provider and country is the stick intended for?
Have you done anything with the stick before trying it in the WR-703 like disabled the cd-rom mode of the stick manually?
dd-wrt will switch the stick from cd-rom mode into modem mode by sending a modeswitch message to it but then the interface list should not become like yours.

_________________
Kernel panic: Aiee, killing interrupt handler!
Flake
DD-WRT Novice


Joined: 15 Sep 2006
Posts: 27

PostPosted: Sun May 27, 2012 16:46    Post subject: Reply with quote
LOM wrote:
LOM wrote:
I may be able to fix this version of 12d1:1506 by patching the option driver but I won't do that until linux 3.4 is released (2nd half of may according to timeline) so I can get the latest version of option.c



I've got the option driver from Linux 3.4 but can't get your E367 supported due to its strange interface list in the devices file.

Which provider and country is the stick intended for?
Have you done anything with the stick before trying it in the WR-703 like disabled the cd-rom mode of the stick manually?
dd-wrt will switch the stick from cd-rom mode into modem mode by sending a modeswitch message to it but then the interface list should not become like yours.


It's for Orange, in the UK - http://shop.orange.co.uk/mobile-broadband/dongle/Huawei+E367+dongle

I've made no intentional manual changes to the stick, but it's possible that I might have done something accidentally while fiddling with it. How
would I check?
anees.sw
DD-WRT User


Joined: 17 Sep 2010
Posts: 267
Location: India

PostPosted: Tue Oct 23, 2012 3:38    Post subject: Reply with quote
can you post result of "lsmod" ?
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum