njfaria / SolPipLog

Logger for the PIP Inverter series ( USB / RS232 version )
Apache License 2.0
86 stars 32 forks source link

comunication USB HID #2

Closed lzahradil closed 6 years ago

lzahradil commented 7 years ago

Hello, I switched inverter PIP MKS for MSXE. MKS had a variant RS-232 and I had no problem with communication. MSXE variant has a USB HID and the script can not read data as RS-232 variants. I need to ask the inverter to commands QPIRI and save the result to a file. Can you please help communicate how you solved? In your solarpiplog runs fine

njfaria commented 7 years ago

You need to comunicate with the Inverter as a HID device. i am using Libusb as library. You got to read the USB specs. A little complicated.

lzahradil commented 7 years ago

I created a script that communicates via libusb. The data is sent successfully. Answer pull out from buffer. I have a problem when you do not come from the buffer all the data and script sends a new command. Followed by NAK. Is it possible to publish the source code that provides data read? Or how do I know that the data is correctly received and can send a request for further reading?

Many thanks