RXTX mismatch on chromebook /dev/ttyusb0

I seem to get dumber with each new error I encounter. I’m using a chromebook running linux in a container and then I run the processing-3.5.3 IDE on that. For some time now, I have been trying to connect an Arduino running multiwii2.3 . I can connect it to apps I have written for my android tablet using processing, but connecting this Arduino to processing on chromebook has been frustration.

I can see a serial device on /dev/ttyusb0 and chromebook connects it to linux, but when I run MultiWiiConf it won’t receive any data. It says there is a mismatch between jar version and native version of RXTX.
When I try to run the MultiWiiConf using the processing IDE and the source code, I get tons of errors. What I was thinking is that I should get it to run using the source and then export it to linux64. I probably need an older version of processing to get the source to run?

I guess what I’m asking is how do I get the jar and native of RXTX to match?

I just did a search for librxtxSerial.so and it is found in the MultiWiiConf source directory and in my /usr/lib/jni directory. In the /usr/lib/jni directory, it is version librxtxSerial-2.2pre1.so. The error message I get says the jar version is “RXTX-2.2pre1” and the lib version is RXTX-2.2pre2 . I don’t know where it is seeing the mismatch when the only version in my filesystem other than the sketch folder is the same as the jar version.

Edit: I looked in the /lib directory for the processing application I am trying to use(MultiWiiConf) and there is a jar file called RXTXcomm.jar . What I did was search my system for RXTXcomm.jar and found a few versions. I copied one of these versions and put it into the /lib directory. I ran ./MulitWiiConf and the Mismatch is gone, but it still won’t read any data from the Arduino board. I know it is connecting because the port shows up in the gui and I can click the button to connect and the board restarts but nothing comes in. If I run the same application on the windows10 machine, it works.

I don’t know what to try next.

I think I found the problem. The MultiWiiConf keeps trying to connect at 115200 and my board is programmed for 57600 to support GPS. I can get the windows10 version to connect at 57600 but its tricky and I have to keep editing the serialport.txt file because it will save it at 115200. I can’t get the source code to work on Chromebook so why edit where it defaults to 115200 when I can reprogram the Arduino to run at 115200.

I got it to work! I didn’t reprogram the board, which would have been an opportunity to introduce more problems if I didn’t get it right so I tried again. What I did was figure out exactly what I did to get it to work on windows10 and then repeated that on the Chromebook and it Worked!

Here is a screenshot. Now I can use the Multiwii serial protocol in my own processing app and on the Chromebook.

So much for that. I turn the chromebook on and now it doesn’t work. I do ls -al in the /dev directory where it is supposed to show the ttyUSB# and all it shows is tty. When I use some other serial program, it shows I have a device on ttyUSB0 but the MultiWiiConf program doesn’t see it. I don’t know how but the /dev directory needs to show /dev/ttyUSB# or I have no chance of connecting.

I give up.

Apparently I don’t give up that easily. Since I am using a chromebook, I used the chromebook help forum and got an answer. I did a hardware reset and now it works again. All my unplugging and plugging of the Arduino maybe messed it up? I don’t know.

My original question was about RXTXcomm.jar mismatch between the MultiWiiConf version and my linux version. Now that I know my original problem was actually baud rate, I tested if it will work even with the RXTXcomm.jar mismatch and it does. Strange what I thought was the problem actually wasnt.

Hopefully I won’t need another hardware reset and can proceed messing with Arduino/Processing on a chromebook.

1 Like

It’s broken again. Chromebook updated and now the USB port works for the Arduino Mega but not the 328 based board. I checked dmesg and when things worked, I had 3 ttyUSB devices. The /dev directory would show ttyUSB0, ttyUSB1, ttyUSB2 and now it is just ttyUSB0 no matter what I try. This would be fine except it fails to connect to the processing sketch. It will stutter and stop, stutter and stop, then it seems to connect and move without interruption but it is all error messages that just repeat.

Edit: I just read some paper on USB on linux and I believe it isn’t going to work the way it did a few days ago. When I type dmesg and see 3 ttyUSB devices, the paper had a note that emphasized that USB devices must only show up once! And the note emphasized with a giant ! So, the chromebook update apparently “fixed” it.