Unable to access inverter

Hi,

I have set up a server on a Beaglebone Green running Debian. Client is on Win10Homex64. The connection works using a couple of USB sticks.

The purpose of the exercise is to monitor a solar inverter in another building, which has proven to be temperamental (or buggy...). It's an Easun iGrid SV II, which is a rebadged Voltronics unit. When I plug the inverter in, in the client a device shows for half a second, then disappears again, repeating every few seconds.

On the server the log shows:

May 21 09:48:54 beaglebone vhusbdarm[4284]: Found Low speed device [0665:5161] "0x0665, 0x5161" at address 11
May 21 09:48:54 beaglebone vhusbdarm[4284]: Error -1 resetting device 0x0665/0x5161 for capture
May 21 09:48:54 beaglebone vhusbdarm[4284]: Unmanaging device 11 [0665:5161]
May 21 09:48:54 beaglebone vhusbdarm[4284]: Error binding device 11 [0665:5161] to connection 1, BIND_ERROR
May 21 09:48:55 beaglebone vhusbdarm[4284]: Warning, could not open device product file /sys//devices/platform/ocp/47400000.usb/47401c00.usb/musb-hdrc.1.auto/usb1/1-1/product, error 2 (No such file or directory)

After reading through the forum I added ClaimPorts=1 to the end of the config. This suppressed two errors, but did nothing to help:

May 21 09:55:31 beaglebone vhusbdarm[5913]: Found Low speed device [0665:5161] "0x0665, 0x5161" at address 11
May 21 09:55:31 beaglebone vhusbdarm[5913]: Unmanaging device 11 [0665:5161]
May 21 09:55:50 beaglebone vhusbdarm[5913]: Warning, could not open device product file /sys//devices/platform/ocp/47400000.usb/47401c00.usb/musb-hdrc.1.auto/usb1/1-1/product, error 2 (No such file or directory)

Is there anything else I can try, before writing it off as incompatible?

Thanks,
Peter.

PS: clicking Preview threw a whole lot of errors in a scary looking red box at the top of the screen:

Notice: Undefined property: stdClass::$comment_count in comment_node_page_additions() (line 728 of /var/www/modules/comment/comment.module).
Notice: Trying to get property of non-object in comment_form() (line 1880 of /var/www/modules/comment/comment.module).
Notice: Trying to get property of non-object in comment_form() (line 1882 of /var/www/modules/comment/comment.module).
Notice: Trying to get property of non-object in comment_form() (line 2013 of /var/www/modules/comment/comment.module).
Notice: Trying to get property of non-object in comment_form() (line 2027 of /var/www/modules/comment/comment.module).
Notice: Trying to get property of non-object in comment_form() (line 2035 of /var/www/modules/comment/comment.module).
Notice: Trying to get property of non-object in comment_form() (line 2041 of /var/www/modules/comment/comment.module).
Notice: Trying to get property of non-object in comment_form() (line 2047 of /var/www/modules/comment/comment.module).
Notice: Trying to get property of non-object in ajax_comments_form_comment_form_alter() (line 136 of /var/www/sites/all/modules/ajax_comments/ajax_comments.module).
Notice: Undefined property: stdClass::$comment_count in comment_node_page_additions() (line 728 of /var/www/modules/comment/comment.module).
Notice: Trying to get property of non-object in comment_form() (line 1880 of /var/www/modules/comment/comment.module).
Notice: Trying to get property of non-object in comment_form() (line 1882 of /var/www/modules/comment/comment.module).
Notice: Trying to get property of non-object in comment_form() (line 2013 of /var/www/modules/comment/comment.module).
Notice: Trying to get property of non-object in comment_form() (line 2027 of /var/www/modules/comment/comment.module).
Notice: Trying to get property of non-object in comment_form() (line 2035 of /var/www/modules/comment/comment.module).
Notice: Trying to get property of non-object in comment_form() (line 2041 of /var/www/modules/comment/comment.module).
Notice: Trying to get property of non-object in comment_form() (line 2047 of /var/www/modules/comment/comment.module).
Notice: Trying to get property of non-object in ajax_comments_form_comment_form_alter() (line 136 of /var/www/sites/all/modules/ajax_comments/ajax_comments.module).

#2

Have a look a dmesg when you plug the device in. Is there any errors in there?

P.S Thanks for the info about a bug in the preview of this forum

#3

Hi Michael,

Here you are, it's not pretty:


[69521.564869] musb-hdrc musb-hdrc.1.auto: Babble
[69521.569427] musb-hdrc musb-hdrc.1.auto: Babble
[69521.573920] musb-hdrc: setup fifo_mode 4
[69521.573941] musb-hdrc: 28/31 max ep, 16384/16384 memory
[69521.577801] usb 1-1: USB disconnect, device number 112
[69521.965007] musb-hdrc musb-hdrc.1.auto: Babble
[69521.969572] musb-hdrc musb-hdrc.1.auto: Babble
[69521.974065] musb-hdrc: setup fifo_mode 4
[69521.974086] musb-hdrc: 28/31 max ep, 16384/16384 memory
[69521.978953] usb 1-1: new low-speed USB device number 113 using musb-hdrc
[69522.438917] usb 1-1: new low-speed USB device number 114 using musb-hdrc
[69522.546011] musb-hdrc musb-hdrc.1.auto: Babble
[69522.550576] musb-hdrc musb-hdrc.1.auto: Babble
[69522.555068] musb-hdrc: setup fifo_mode 4
[69522.555089] musb-hdrc: 28/31 max ep, 16384/16384 memory
[69527.979282] usb 1-1: device not accepting address 114, error -110
[69528.329304] usb 1-1: new low-speed USB device number 116 using musb-hdrc
[69528.502269] usb 1-1: New USB device found, idVendor=0665, idProduct=5161
[69528.502299] usb 1-1: New USB device strings: Mfr=3, Product=1, SerialNumber=0
[69528.520223] hid-generic 0003:0665:5161.1BF3: hiddev0,hidraw0: USB HID v1.11 Device [HID 0665:5161] on usb-musb-hdrc.1.auto-1/input0
[69528.520978] bone-pinmux-helper ocp:P8_10_pinmux: could not find pctldev for node /ocp/l4_wkup@44c00000/prcm@200000/clocks/tclkin_ck, deferring probe
[69528.521942] bone-pinmux-helper ocp:P8_10_pinmux: could not find pctldev for node /ocp/l4_wkup@44c00000/prcm@200000/clocks/tclkin_ck, deferring probe
[69528.526072] bone-pinmux-helper ocp:P8_10_pinmux: could not find pctldev for node /ocp/l4_wkup@44c00000/prcm@200000/clocks/tclkin_ck, deferring probe

PS: you are welcome.

Regards,
Peter.

#4

This is odd: when I finished writing the above msg I tabbed to the Save button and pressed Enter. The msg then disappeared completely. I sat there, looking at it with surprise for a minute. Only when I reloaded the page did it re-appear. Is this normal behaviour for this forum?

#5

Yes thats strange about the browser, i tried to reproduce the issue yesterday but couldnt and i havent heard from other users with this issue. Im just using firefox, what browser are you using?

Anyway regarding that device. Its not being recognized in the beaglebone first so it cannot be passed properly to virtualhere. Do you have any other board like a pi or something like that, you could try? It might be a bug in the beaglebone kernel. A "low speed" usb device is very rare now days so it might be related to some kernel bug in the low speed controller in linux.

#6

Firefox latest. I suspect it's a plugin, then.

I have no other SBC, but a Linux PC or two in storage that I could try. I think I'll flash the BBG with the latest image first and if that doesn't work I'll try a PC. When connected to a laptop the software talks to it OK, so we know it works.

I had a look at the program and it does not seem to include any USB drivers.

#8

Ok, I booted the latest Debian distro:

`[ 313.129463] musb-hdrc musb-hdrc.1: Babble
[ 313.231501] usb usb1-port1: attempt power cycle
[ 314.779614] usb 1-1: new low-speed USB device number 31 using musb-hdrc
[ 315.003650] musb-hdrc musb-hdrc.1: Babble
[ 315.007743] musb-hdrc musb-hdrc.1: Babble
[ 315.902757] musb-hdrc musb-hdrc.1: Babble
[ 315.906865] musb-hdrc musb-hdrc.1: Babble
[ 316.222830] musb-hdrc musb-hdrc.1: Babble
[ 316.226935] musb-hdrc musb-hdrc.1: Babble
[ 316.721876] musb-hdrc musb-hdrc.1: Babble
[ 316.725984] musb-hdrc musb-hdrc.1: Babble
[ 317.204063] usb usb1-port1: Cannot enable. Maybe the USB cable is bad?
[ 317.281971] musb-hdrc musb-hdrc.1: Babble
[ 317.286073] musb-hdrc musb-hdrc.1: Babble
[ 317.335959] usb 1-1: new low-speed USB device number 32 using musb-hdrc
[ 318.381080] musb-hdrc musb-hdrc.1: Babble
[ 318.385180] musb-hdrc musb-hdrc.1: Babble
[ 318.440119] usb 1-1: new low-speed USB device number 33 using musb-hdrc
[ 319.360203] musb-hdrc musb-hdrc.1: Babble
[ 319.364307] musb-hdrc musb-hdrc.1: Babble
[ 319.820257] musb-hdrc musb-hdrc.1: Babble
[ 319.824411] musb-hdrc musb-hdrc.1: Babble
[ 320.807024] usb 1-1: New USB device found, idVendor=0665, idProduct=5161, bcdDevice= 0.02
[ 320.807045] usb 1-1: New USB device strings: Mfr=3, Product=1, SerialNumber=0
[ 320.825392] hid-generic 0003:0665:5161.0034: hiddev0,hidraw0: USB HID v1.11 Device [HID 0665:5161] on usb-musb-hdrc.1-1/input0
[ 320.879391] musb-hdrc musb-hdrc.1: Babble
[ 320.883603] musb-hdrc musb-hdrc.1: Babble
[ 320.897304] usb 1-1: USB disconnect, device number 33
[ 322.232576] usb 1-1: new low-speed USB device number 34 using musb-hdrc`

It doesn't look good, does it? There is Linux s/w for the inverter, but it requires a GUI...

#9

No there is something wrong with that inverter i think. I think its damaged somehow and the USB part is not working anymore

#10

I don't think so:

`[ 52.422323] usb 2-4: new low-speed USB device number 2 using ohci-pci
[ 52.743386] usb 2-4: New USB device found, idVendor=0665, idProduct=5161, bcdDevice= 0.02
[ 52.743389] usb 2-4: New USB device strings: Mfr=3, Product=1, SerialNumber=0
[ 54.244930] hidraw: raw HID events driver (C) Jiri Kosina
[ 54.535652] usbcore: registered new interface driver usbhid
[ 54.535654] usbhid: USB HID core driver
[ 54.688050] hid-generic 0003:0665:5161.0001: hiddev0,hidraw0: USB HID v1.11 Device [HID 0665:5161] on usb-0000:00:02.0-4/input0`

This is an AMD PC running Linux Mint 19.3. I'm now going to install the driver and I'm hopeful this time it's going to work. Only, it can't stay there. It's way over 40C in that container and I need it for other things.

#11

OK so if you run the virtualhere server on that it all works now with the win10 as the client?

Maybe its a power issue. Desktop pcs have much better more stable usb VBUS.

Could you put a powered usb hub between the e.g beaglebone and the inverter?

#12

:-D https://www.dropbox.com/s/kknbh1z9cvjtsdz/Inverter.jpg?dl=0

I don't think I have a powered hub. I could try a beefier PSU for the BBG. But it has enough umph to power a USB stick. I don't see that the inverter would be drawing power from USB. Then again, it has other bugs... Chinese bugs...

You mentioned that a device has to be recognised by the host device. As soon as I had connected to the remote port Windows told me it was setting up a new device. I think the BBG kernel is just lacking some piece of info. But then again, I know almost nothing about USB and kernels. I think I'll ask in the appropriate Beaglebone forum.

Thank you very much for all your time and suggestions.

Kind regards,
Peter.

#13

So I asked in the BBG support forum and got a somewhat cryptic reply, which I interpreted to mean "try another distro image". So I loaded the latest Ubuntu (instead of Debian). Result:

https://www.dropbox.com/s/edy6j92fajnukwl/Inverter%20monitoring.png?dl=0

It worked at the first attempt.

I want to thank you for writing this excellent piece of software and for the great support you provide here. If I keep this setup I shall buy a licence.

Kind regards,
Peter.

#14

Ok thats great, im still surprised it didnt work with the TI SDK kernel