Using a microcontroller to read data from the Classic USB port

Started by lilcheez, December 03, 2021, 03:08:30 PM

Previous topic - Next topic

lilcheez

I would like to connect a microcontroller to the Classic's USB port in order to collect the data being printed out.

When I connect the Classic's USB port to my PC and open a serial terminal (e.g. PuTTY), I get a stream of data printing out. But when I connect the Classic's USB port to my Arduino Due USB port, I get nothing. I know the Arduino Due is capable of acting as a USB host, but I don't know what sort of handshake is necessary to get the data to start streaming. How can get the data to start so that I can capture it?

ClassicCrazy

I don't know the answer to your question.
I think there are different settings for usb port that are configured in Comms menu. Details available somewhere but I don't know them.
There are also other ways to get data from the Classic via modbus.  Those methods are documented in the opensource software sections of the forums here.
You can  use a raspberry pi or Esp32 to get the data via modbus and convert it to mqtt form. 
Some of that depends on which model Classic you have.

Larry
system 1
Classic 150 , 5s3p  Kyocera 135watt , 12s Soneil 2v 540amp lead crystal for 24v pack , Outback 3524 inverter
system 2
 5s 135w Kyocero , 3s3p 270w Kyocera  to Classic 150 ,   8s Kyocera 225w to Hawkes Bay Jakiper 48v 15kwh LiFePO4 , Outback VFX 3648 inverter
system 3
KID / Brat portable

boB

Hey lilcheez....

The CDC serial port emulation is what you want I think.  At least that is what is used on the PC.

I found this using Google which may help.

The key words are CDC serial port emulation.

https://forum.arduino.cc/t/using-serial-monitor-with-native-port/318753/7

You probably already know about the USB mode that is selectable in the MNGP under MISC, COMM ?

The default spits out some basic voltages and current as I remember at a rate of a few times per second.

The baud rate may be 19.200 K but using USB I do not think it matters much what you set it for.  I cannot remember much about that and don't know anything about  Arduino usage.

Let us know how it goes if you think of it.

boB



K7IQ 🌛  He/She/Me