Hang when plugging in a USB connection


4 posts
by kitenski » Fri Jul 06, 2012 9:57 pm
hi there,

I have an issue when plugging in the USB cable to my solar invertor.

I am running Arch Linux, with the software and drivers from this page http://chastre.org/123aurora/guide.php

I seem to have a weird situation which is very hard to troubleshoot!! Within minutes of connecting the USB, my system appears to hang up. I can open a new terminal session and get a username and password prompt, but I never login to shell.

I did a test and had top running in one window, and a shell open in a 2nd window, then plugged in the USB. Top carries on running,but the shell window appears unresponsive. I get a 504 error from the website, and basically have no way of finding out what is going on!

Top is showing:

top - 21:10:31 up 21 min, 2 users, load average: 10.93, 8.06, 4.22
Tasks: 66 total, 1 running, 65 sleeping, 0 stopped, 0 zombie
%Cpu(s): 0.7 us, 0.3 sy, 0.0 ni, 98.7 id, 0.0 wa, 0.0 hi, 0.3 si, 0.0 st
KiB Mem: 123580 total, 57244 used, 66336 free, 7772 buffers
KiB Swap: 0 total, 0 used, 0 free, 28508 cached

I'm at a loss as to what to do next in order to trouble shoot this, any bright ideas please?

thanks,

Greg
Posts: 3
Joined: Fri Jul 06, 2012 9:52 pm
by kitenski » Fri Jul 06, 2012 10:14 pm
I am connecting to the solar via a a USB/RS485 adaptor plugged into the USB port of the Raspberry PI. It's the only device plugged in and the USB cable is used to measure it's output.

The Raspberry PI is connected by a good quality power cable (I've tried two different ones)

Are there any logs I can look at to try and work out what is going on, or anything I can run whilst plugging it in and see what happens??
Posts: 3
Joined: Fri Jul 06, 2012 9:52 pm
by kitenski » Sat Jul 07, 2012 7:24 am
I see this in kernel.log


Jul 6 21:35:42 localhost kernel: usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB0
Jul 6 21:35:42 localhost kernel: usbcore: registered new interface driver ftdi_sio
Jul 6 21:35:42 localhost kernel: ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
Jul 6 21:35:46 localhost kernel: ERROR::dwc_otg_hcd_urb_dequeue:529: **** DWC OTG HCD URB Dequeue with NULL QTD
Jul 6 21:35:46 localhost kernel:
Jul 6 21:35:46 localhost kernel: BUG: scheduling while atomic: aurora/3079/0x00000002
Jul 6 21:35:46 localhost kernel: Modules linked in: ftdi_sio usbserial ipv6
Jul 6 21:35:46 localhost kernel: Backtrace:
Jul 6 21:35:46 localhost kernel: Function entered at [<c0011870>] from [<c0478188>]
Jul 6 21:35:46 localhost kernel: r6:c7818040 r5:c684814c r4:00000000 r3:40000093
Jul 6 21:35:46 localhost kernel: Function entered at [<c0478170>] from [<c047825c>]
Jul 6 21:35:46 localhost kernel: Function entered at [<c0478208>] from [<c0480988>]
Jul 6 21:35:46 localhost kernel: r4:00000000 r3:00000000
Jul 6 21:35:46 localhost kernel: Function entered at [<c04804e8>] from [<c0480ec4>]
Jul 6 21:35:46 localhost kernel: Function entered at [<c0480e74>] from [<c0342620>]
Jul 6 21:35:46 localhost kernel: Function entered at [<c034258c>] from [<bf03d784>]
Jul 6 21:35:46 localhost kernel: r5:60000013 r4:c7a3f600
Jul 6 21:35:46 localhost kernel: Function entered at [<bf03d734>] from [<bf03d8ac>]
Jul 6 21:35:46 localhost kernel: r5:c684af20 r4:c7a3f600
Jul 6 21:35:46 localhost kernel: Function entered at [<bf03d884>] from [<bf044eec>]
Jul 6 21:35:46 localhost kernel: r4:c7a3f600 r3:00000000
Jul 6 21:35:46 localhost kernel: Function entered at [<bf044eb8>] from [<bf03b034>]
Jul 6 21:35:46 localhost kernel: r5:c7a3f634 r4:c7a3f604
Jul 6 21:35:46 localhost kernel: Function entered at [<bf03b000>] from [<c02e67e4>]
Jul 6 21:35:46 localhost kernel: Function entered at [<c02e6770>] from [<c02e72b4>]
Jul 6 21:35:46 localhost kernel: r5:c7ab3800 r4:c7a3f604
Jul 6 21:35:46 localhost kernel: Function entered at [<c02e728c>] from [<bf03b714>]
Jul 6 21:35:46 localhost kernel: r5:c7a3f600 r4:c7ab3800
Jul 6 21:35:46 localhost kernel: Function entered at [<bf03b6dc>] from [<c02df160>]
Jul 6 21:35:46 localhost kernel: r6:c693fda0 r5:00000000 r4:c7ab3800 r3:bf03b6dc
Jul 6 21:35:46 localhost kernel: Function entered at [<c02df050>] from [<c00a8514>]
Jul 6 21:35:46 localhost kernel: Function entered at [<c00a845c>] from [<c00a4b38>]
Jul 6 21:35:46 localhost kernel: Function entered at [<c00a4acc>] from [<c00a4c0c>]
Jul 6 21:35:46 localhost kernel: r6:c697a000 r5:c7bfe9a0 r4:00000003 r3:00000000
Jul 6 21:35:46 localhost kernel: Function entered at [<c00a4b58>] from [<c000e2a0>]
Jul 6 21:35:46 localhost kernel: r7:00000006 r6:00000003 r5:00020b40 r4:00020b40
Posts: 3
Joined: Fri Jul 06, 2012 9:52 pm
by mahjongg » Sat Jul 07, 2012 2:17 pm
kitenski wrote:I am connecting to the solar via a a USB/RS485 adaptor plugged into the USB port of the Raspberry PI. It's the only device plugged in and the USB cable is used to measure it's output.

The Raspberry PI is connected by a good quality power cable (I've tried two different ones)

Are there any logs I can look at to try and work out what is going on, or anything I can run whilst plugging it in and see what happens??

OK, I understand that you are not powering the PI with your solar panel, but controlling it.

Is the USB device itself getting enough power? Due to the USB polyfuses USB devices do not get the full 5V from the PI, but half a volt or so less (depending on the current draw).

This is fine for most "low power devices" like keyboards and mice, but it might not be for USB devices with a specialised function, even when they actually do not draw more than 100mA.

The PI's USB ports are only suitable for official low power devices, like keyboards and mice!

The simple solution is to bypass the polyfuse. F1 is for the upport port, and F2 is for the lower port.
You could use an aligator clip shorting the fuse for a temporarily test to see if low voltage is the culprit.
User avatar
Forum Moderator
Forum Moderator
Posts: 5708
Joined: Sun Mar 11, 2012 12:19 am