Ticket #1109 (investigate bug)

Opened 2 years ago

Last modified 14 months ago

3G not reconnect after reboot

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

Description

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

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

Change History

Changed 2 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....

Changed 2 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 2 years ago by mihaly.reg@…

good case

Changed 2 years ago by mihaly.reg@…

bad case

Changed 2 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)?

Changed 2 years ago by mihaly.reg@…

Matthijs, how I do that ? Thanks

Changed 2 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.

Changed 2 years ago by mihaly.reg@…

where is modprobe I cant find it

Changed 2 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/2.6.21.7/dwc_otg.ko 

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.

Changed 2 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 2 years ago by mihaly.reg@…

Changed 2 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.

Changed 2 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.

Changed 2 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 2 years ago by mihaly.reg@…

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

Changed 2 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/Change #1109 (3G not reconnect after reboot)

Author


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


Action
as investigate
 
Note: See TracTickets for help on using tickets.