SOLVED !

New JSSC with the old arcitectures and the new aarc64 incuded here..

 

Hi,

Really feel like i need som help, i have 2 arduino due's loaded with the inmoov sketch, they work perfect in the windows enviroment, but as soons as i try to get a connection on the Jetson (Linux) i get in trubel, there is just no way MyRobotLab will see them.

I have re compiled the kernel with :

USB Modem (CDC ACM)

CONFIG_USB_ACM 

support since it's not enabled by default, when i plug the due's in they show up as ttyACM0 and ACM1, i set the correct names in the service_6_Arduino.config (see under)  but they never show up in the dropdown box for connecting to a device...

leftPort = “/dev/ttyACM0″

rightPort = “/dev/ttyACM1″

I have sudo stty -F /dev/ttyACM0 115200 cs8 -cstopb -parenb, i have tested sudo chmod 666 /dev/ttyACM1,

but nothing seems to work, i also start MyRobotLab with sudo just to be sure i have the correct rights to the ports...

I am starting to wounder if i might have some other problem on the linux install of MyRobotLab, have included my log for a start without sudo, if someone could be so nice to look troug it ? :)

I start MyRobotLab with sudo java -jar myrobotlab.jar -service python Python -invoke python execFile ./InMoov/InMoov.py since the start_inmoov.sh is faulty and throws a unexpeded end of file, expecting "then"

Bretzel_59

6 years 6 months ago

I had the same issue with a Raspberry Pi 3 under raspiban jessie and arduino mega. But for a différent usage. I was using labview on a Host pc and the pi 3 as a target with labview Linx libraires. The only way i’ve found is to use an external usb to serial converter (usb to TTL) and connect it on the serial pins of the arduino. It’s because of a compatibility issue between raspbian (because of labview ?) and the serial chip of the arduino. Maybe it’s the same issue with your TX2

Might be, the Due uses a atmega16u2 as a serial to usb converter on the "programming port", it also has a a clean usb port, but that cant be used as a serial port..

It seems that there are a lot of other linux users that have no problem getting it to work with other apps, so i was hoping someone with the know how could have a look trough my log :)

Was it a Due you where using as well  Bretzel_59 ?

No it was a mega. Think I had the same issue with Nano. But context was not excatly the same. I think you could try the solution i’ve found to check if it work.

Will try to do a "dmesg -wH" later and see if there is any erros thrown when i plug the Due in or when i start MyRobotLab, this should have worked, must be something simple i am overlooking :/

If that dosent help i am considering re writing the inmoov sketch to use serialUSB insted og serial...

And as a last resort i might do the serial to usb converter, but that makes the cabling more messy :/

But, it would be og great help if @GroG or somone else could have a look at the log file i included, might be something else that's stopping it :)

Hi Spawn32,

I don't see any noWorky's sent from you.

A few reminders :

  • Start with Serial, or Arduino service - don't go straight to InMoov - start simple, big accomplishments are done in small steps
  • Make sure Serial is installed
    java -jar myrobotlab.jar -install Serial
    (you only have to do this once per installation)
  • Use root to test 
    $ sudo su -
    # java -jar myrobotlab.jar
    then start a single serial 
    On the run tab - right click serial -> start -> name it serial01
    see if the drop down of ports appears..
  • It may be a filtering problem if you are relying on dropdowns
    Try and experiment with the Serial Python script on the Service page
    http://myrobotlab.org/service/Serial 
    All Most Services have a Serial page - you can right click then click info to go to them or just go to http://myrobotlab.org/service/{Service Name} or use the matrix page
    http://myrobotlab.org/matrix.php?branch=develop (for Nixie)
    http://myrobotlab.org/matrix.php?branch=master (for Manticore)

Hi GroG,

Did a dmesg -wH and my Jetson finds the Arduino Due just fine:

[ +21,958501] usb 1-2.4: USB disconnect, device number 6
[ +34,244540] usb 1-2.4: new full-speed USB device number 7 using xhci-tegra
[  +0,094170] usb 1-2.4: New USB device found, idVendor=2341, idProduct=003d
[  +0,006970] usb 1-2.4: New USB device strings: Mfr=1, Product=2, SerialNumber=220
[  +0,007556] usb 1-2.4: Product: Arduino Due Prog. Port
[  +0,005181] usb 1-2.4: Manufacturer: Arduino (www.arduino.cc)
[  +0,005778] usb 1-2.4: SerialNumber: 5573132373535150A140
[  +0,007006] usb 1-2.4: ep 0x82 - rounding interval to 1024 microframes, ep desc says 2040 microframes
[  +0,015629] cdc_acm 1-2.4:1.0: ttyACM0: USB ACM device
 
followed your steps, and as soon as i start the serial service i get:
22:04:52.245 [runtime] ERROR c.m.f.Service [Service.java:2056] runtime error createAndStart(serialACM0, org.myrobotlab.service.Serial) error
 
 
Have sendt a no-workey...
 
Thanks for your help :)

It can't find or can't load some native binaries ..
JSSC natives 

Question one would be - do you have this jar

┌─[gperry@parrot]─[~/mrl.test/nixie/libraries/jar]
└──╼ $ls *jssc*
jssc-2.8.0.jar
 
On maven there is only a single release - https://mvnrepository.com/artifact/org.scream3r/jssc/2.8.0 

I took a peek at 

 

For linux they have a x86 32 bit, x86 64 bit

and for arm they have hard floating point & soft floating point

What are the specs of your Jetson TX2 
what would you guess it would be ?

MRL see's it as an armv8.64.linux

but we don't control how the library identifies which native library to use ..

My first "guess" would be the 2 arm natives are NOT 64 bit...

Does the Arduino IDE work on this ?
If so .. its highly likely we can look and possibly even use the library they are using to connect ..
(in the past this was JSSC too)

It's a hex-core ARMv8 64-bit so i gues there is no JSSC support for it then ? :/

How can i / we compile one that work on this cpu ?

I found this, seems to be the same problem:

https://github.com/scream3r/java-simple-serial-connector/issues/121

That should be easy, but how do i repack it to a jar ? never done that before :)

Also found this, opend by Nvidia themself, looks like the arduino ide dosent run on it at the moment, havent tested myself since i always use windows for that..

https://github.com/arduino/Arduino/issues/7302

 

Edit:

Have buildt the *.so file, but have no ider how to make the jar file with the classes and meta directorie's.

Have included the *.so file on my OneDrive:

https://1drv.ms/u/s!Asf9doI7WS5dje488cQ07Y_LeLVvkg

Just a bump in the road  if @GroG knows how to recreate the jssc.jar file, it contains a lot more files than just the *.so :)

I jar'ed just the *.so file and that obviously didnt work, lol

We need this working, i personaly know one more user in here that have bought the Jetson TX2 for MyRobotLab / Inmoov, and there are probably more comming, it's perfect for this :)

Hi Spawn32,

You marked your post as solved, and attached a jar.  That's great - can you give us some more background and details ? 

If you tracked down the fixed jar where did it come from ?
Are there any plans for the updated jar to go to maven central ?

I'm glad you got things un-blocked ! 

Hi Grog :)

Several people has commented on the "issue" in the github, but there is no reply from the autor yet on updating it as you probaly seen.

I compiled a new *.so on the TX2 (aarch64), it's easuer than cross compiling it.

Then i decompiled the jar, added the new *.so and recompiled it again, it dident need any changes to the If / then in the java file, it looks for arm* and finds the corresponding filename to use.

Works great, but you probaly need to have it in your repo until it officaly get's updated :)

Thanks for the sharing Spawn32 - 
I've deployed your version to our Artifactory server :
http://repo.myrobotlab.org/artifactory/webapp/#/artifacts/browse/simple/General/myrobotlab/org/scream3r/jssc/2.8.0-1/jssc-2.8.0-1.jar

and appended a version.   I've also updated mrl to use that version - so all this should be worky out of the box on my next checkin, but I want to do testing first .

We can switch back to the "official" maven site, if/when scream3r posts the update.

Well done !

WOOHOO ! o/