Opened 7 years ago

Last modified 6 years ago

#1109 investigate bug

3G not reconnect after reboot

Reported by: mihaly.reg@… Owned by:
Priority: normal Milestone:
Component: fon-network-3g Version: beta2
Severity: unknown
Cc: Hardware: 2.0g (FON2202)


F2G with powered usb hub and huawei e160x dongle. Internet working fine. Reboot fonera from terminal. Error: after reboot 3G cannot reconnect. Umtsd state shows empty at provider and zero value for signal. 3G can be reconnected only by plugging out the usb cable from fonera, power down the usb hub then reconnect and power up. Tested only on F2G.

Attachments (4)

puttywf-after-powercycle.log (19.3 KB) - added by mihaly.reg@… 7 years ago.
good case
puttywf-after-reboot.log (50.1 KB) - added by mihaly.reg@… 7 years ago.
bad case
putty.dwcotg.log (4.9 KB) - added by mihaly.reg@… 7 years ago.
putty.usb.find.echo.0..log (13.6 KB) - added by mihaly.reg@… 7 years ago.
ls of directory /sys/bus/usb/devices/

Download all attachments as: .zip

Change History (16)

comment:1 Changed 7 years ago by mihaly.reg@…

update: if I use an unpowered usb hub and reboot f2g while 3g is connected then its reconnecting to 3g. Observed the behavior of usb hub during reboot, it's restarting also, the led's go off and on. When using powered hub it's not restarting. Need to investigate more, but my first guess is that when the hub is powered the 3G will not be disconnected at reboot of fonera and it will try to reconnect but the device is busy.... ...more tests will come....

comment:2 Changed 7 years ago by mihaly.reg@…

it's not the powered hub fault. Got the error again and done a logread, attached. Attached also a powercycle logread that connects 3G. Reboot does not reconnect 3G

Changed 7 years ago by mihaly.reg@…

good case

Changed 7 years ago by mihaly.reg@…

bad case

comment:3 Changed 7 years ago by matthijs

  • Status changed from new to investigate

It seems the 3G dongle just doesn't respond to commands. The "chat" program sends it a reset command (ATZ), but it gets nothing in response (the "alarm" a bit further on, indicating a timeout). This is not an USB reset, but a modem reset, though.

We could try forcing a reset of the USB device, but I couldn't find how to do that exactly in the Ralink driver (it's not a default *hci driver from the kernel, which has a reset option, it seems).

Perhaps you could try unloading and reloading the dwc_otg module (the usb driver)?

comment:4 Changed 7 years ago by mihaly.reg@…

Matthijs, how I do that ? Thanks

comment:5 Changed 7 years ago by matthijs

In the SSH prompt, you should be able to run:

root@Fonera:~# modprobe -r dwc_otg
root@Fonera:~# modprobe dwc_otg

The first command unloads the module, the second one loads it again. It might be that you get a device busy error or something, I haven't been able to test this just now.

comment:6 Changed 7 years ago by mihaly.reg@…

where is modprobe I cant find it

comment:7 Changed 7 years ago by matthijs

Hmm, my bad. The Fonera doesn't ship modprobe, only insmod and rmmod. Try:

root@Fonera:~# rmmod dwc_otg
root@Fonera:~# insmod /lib/modules/ 

This time I actually had a Fonera at hand to try this, and it worked for me with a 3G dongle plugged in (that is, it reloaded the module, not sure it actually resets the device).

Sorry for the confusion, hopefully this command will help debugging the issue.

comment:8 Changed 7 years ago by mihaly.reg@…

On which fonera/release you tried? On my f2g I found rmmod and insmod, but the commands still return no such file or directory for dwc_otg. I have the latest beta2.

Changed 7 years ago by mihaly.reg@…

comment:9 Changed 7 years ago by mihaly.reg@…

Ok, just checked that on F2N there is dwc_otg module loaded, but on F2G is not. I'm using F2G.

comment:10 Changed 7 years ago by matthijs

Bah, seems I wasn't paying enough attention there... The module is named differently on 2.0g, I think it's the "normal" uhci_hcd (and/or ehci_hcd or ohci_hcd). Perhaps you could try reloading those ones?

I found some message on the internet before that suggested that there is some way to reset an USB device by echo'ing "reset" into some sysfs file, but I can't find it again just now (I had disregarded it because it doesn't work on 2.0n, but it might work on 2.0g).

I did find another option, perhaps you could try this:

root@Fonera:~# echo 0 > /sys/bus/usb/devices/1-4.6/authorized

You'll have to replace the 1-4.6 with the actual device, you should probably look around /sys a bit to find the right one (you can use "cat" to look at files there).

In any case, it seems that it's also possible to reset USB devices using some ioctl, there are two example programs here:

I'll have a closer look next week, but I don't have more time right now. Let me know if you do any more testing using the above info.

comment:11 Changed 7 years ago by mihaly.reg@…

I have a lot of devices in /sys/bus/usb/devices/ probably because I use a 4 port powered usb hub, on port 1 I have a huawei usb dongle e160x. Could you look in the attached ls's on which one should I execute echo 0 ? Thanks!

Changed 7 years ago by mihaly.reg@…

ls of directory /sys/bus/usb/devices/

comment:12 Changed 7 years ago by matthijs

I suspect it's "1-1.1" (since that one has a bunch of subdevices). Not sure however. Perhaps you can also attach the output of "cat /proc/bus/usb/devices" ?

Add Comment

Modify Ticket

as investigate The ticket will remain with no owner.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.