I am trying to communicate with a machine connected to a usb port using the cp210x driver of the RPi. I have a java method which open a FileOutputStream and a FileInputStream for each /dev/ttyUSBX file. It then demands the machine to return an ID and if this ID is correct, the connection is set.
This is not working properly so far, except if I install a small software. This small software asks me to "register" the device I'm trying to connect. Once I've done this step, the communication is set properly. If I uninstall this software, or un-register the device, it is not working anymore.
My problem is that I have no idea what this little software does and how I can communicate without. So here's my question :
- Is there a way to know what exactly a software do while running ?
- How do I "register" a usb device on RPi (if that's something common) ?
- Is there a better way to set up the usb-serial connection (through java code, if possible, sorry if that's not the right place to ask) ?
Through "lsusb" command, I know that the device uses the cp210x driver, but I'm still new to linux environment and don't fully understand how drivers and ports work.
I've managed to make the serial usb work : I just tried to spy on the port when communicating with it, through the command stty raw -echo < /dev/ttyUSB0; cat -vte /dev/ttyUSB0. Now I need to now exactly what this does on the port (some kind of "clear" or "dump" I guess), and do it before accessing this port.
Thank you for any help you could provide.