Active Topics

 


Reply
Thread Tools
Posts: 2 | Thanked: 2 times | Joined on Jul 2011
#1
Hi all,

I recently had a problem with the USB host mode not working on my N800 and just wanted to share the solution in case it may help out someone having the same problem.

The problem: Having followed the simple steps to set the usb to host mode manually, it would not recognize any devices and there were minimal activity on dmesg.

Troubleshooting:

1. Clearing dmesg and checking the status of the USB port.

Nokia-N800-36-5:~# dmesg -c
Nokia-N800-36-5:~# more /sys/devices/platform/musb_hdrc/mode
b_idle
2. Changing to host mode and checking status.

Nokia-N800-36-5:~# echo host > /sys/devices/platform/musb_hdrc/mode
Nokia-N800-36-5:~# more /sys/devices/platform/musb_hdrc/mode
a_wait_bcon
Nokia-N800-36-5:~# dmesg
[10311.734375] tusb_source_power 633: VBUS a_wait_vrise, devctl 81 otg 184 conf c0010001 prcm 00000500
Looks good..

3. Plug in keyboard, mouse, memory stick, but..

Nokia-N800-36-5:~# dmesg
[10311.734375] tusb_source_power 633: VBUS a_wait_vrise, devctl 81 otg 184 conf c0010001 prcm 00000500
No activity, completely dead.

4. Trying some more...

/usr/sbin/osso-usb-mass-storage-enable.sh
* nothing...

/etc/init.d/ke-recv
OK, got something...

[12886.257812] menelaus 1-0072: Setting voltage 'VMMC' to 3000 mV (reg 0x0a, val 0xb8)
[12886.890625] menelaus 1-0072: Setting voltage 'VDCDC3' to 2800 mV (reg 0x07, val 0x29)
[12892.070312] menelaus 1-0072: Setting voltage 'VDCDC3' to 2800 mV (reg 0x07, val 0x29)
[12892.875000] menelaus 1-0072: Setting voltage 'VMMC' to 3000 mV (reg 0x0a, val 0xb8)
but still no reaction when plugging in devices.

5. Setting the mode back to peripheral and doing it all over:

Nokia-N800-36-5:~# echo peripheral > /sys/devices/platform/musb_hdrc/mode
....

6. Having switched back and forward several times between modes "peripheral" and "host" I decided to try setting it to "host" and restart the device.

Nokia-N800-36-5:~# more /sys/devices/platform/musb_hdrc/mode
a_wait_bcon
Nokia-N800-36-5:~# dmesg
[10311.734375] tusb_source_power 633: VBUS a_wait_vrise, devctl 81 otg 184 conf c0010001 prcm 00000500
* It did keep its mode trough the boot, but to no avail.

7. I then realized there is a third mode "otg" which supposedly is the default... Tried the whole process up and down between the modes without success.


The solution: At this point I decided I will reset it back to the original, do more research, and come back later. As I understood "otg" was the default mode for the device I chose to set it to that and restart.

Nokia-N800-36-5:~# echo otg > /sys/devices/platform/musb_hdrc/mode
Nokia-N800-36-5:~# init 6
Having booted it up I checked the dmesg and got a positive surprise. Lots of messages like these had appeared:

[ 19.281250] usb usb1: new device strings: Mfr=3, Product=2, SerialNumber=1
[ 19.406250] /home/bifh4/diablo-uarm-prereleased.gcc34qemu/work/kernel-diablo-2.6.21/kernel-source-diablo/drivers/usb/core/inode.c: creating file '001'
Decided to give it a attempt:

Nokia-N800-36-5:~# dmesg -c
Nokia-N800-36-5:~# echo host > /sys/devices/platform/musb_hdrc/mode
Nokia-N800-36-5:~# more /sys/devices/platform/musb_hdrc/mode
a_wait_bcon
Nokia-N800-36-5:~# dmesg
[ 239.500000] tusb_source_power 633: VBUS a_wait_vrise, devctl 81 otg 184 conf c0010001 prcm 00a80500
Pretty much the same as last, just with a minuscule difference. The prcm, whatever that means, had changed from reading 00000500 to 00a80500.

But two second after I got a message on the screen: "USB device not supported." (but I expected that and it actually means it works )

So restarting the device with USB in OTG mode obviously did the trick. I'm not gonna theorize too much because Linux is not my cup of tea... but seems some extra devices was found under boot for which the device links/files had not been created before.

OK, hope that may help anyone.

Cheers
 
Reply

Tags
host mode, otg mode, usb mode


 
Forum Jump


All times are GMT. The time now is 07:59.