Howdy,

Im having a little problem with MRL on a Hardkernel odroid U2 running Linaro ubuntu- In MRL I cant get it to connect to the arduino that is in Tools>serial no port is seen. Here's my steps:

I have uploaded MRLComm.ino onto the Arduino Diecimilia with the arduino IDE- The IDE sees and connects OK to the arduino

I have tested the MRL connection with a different computer- linux mint and the MRL arduino >serial>port is seen ok (/dev/ttyUSB) and everything works as it should

So that leaves the odroid and linaro. My question is have I given enough information to get advice, and if not what other info should I give? I have sent a Noworky.

this is a link to the OS combo Ive used:

MRL 1978 with

Linaro 12.11, Kernel 3.0.75 (I updated this to 3.8.13.18)

Mali enabled (checked with glmark2-es2)

Lubuntu Desktop (stripped down)

OpenCV 2.4.6.1 with TBB

ROS Groovy (Bare Bones)

thanks peeps!

GroG

10 years 2 months ago

Hi Spen..

Ya, I know the problem...  

Noone has the evil RXTXLib so's for armv7.sfp.32.linux !

Also your odroid is being identified by MRL as a raspi (another not as big issue)

Is there an Arduino IDE you can load on it which will see the serial ports? 
We need these binaries
rxtxSerial.so .. sometimes it comes with bonus
rxtxParallel.so .. 

Welcome to JNI / SO HELL... and of course RXTXLib is always glad to deliver you right at the gates !

In MRL - we have rxtx Java version 2.1-7r2 .. and native binaries correspond with that version..  They all (except the raspi) were built by CloudLabs ... which is one of the most rigourous best builds of the crazy library I have seen.  But they no longer do it .. so we either got to build it ourselves or get it from somewhere else..

The problem with "getting it from somewhere else" .. is you never know what your getting...

And the Odroid - with the current OS your working with is armv7 soft floating point .. not the most popular deviation..

You seem rather competent software guy .. care to try compiling rxtx 2.1-7r2 - then we could push those native binaries into the MRL repo, and we'd be a step closer to "CLICKY --> WORKY" (makes GroG a happy monkey)
 

Thanks for the responses guys-  raver-the Arduino IDE is working ok on the odroid, just not MRL so I think the permissions are agreeable.

GroG- would a different OS be better? I only chose this one because it had open CV already installed and was slim. My software skills are basic- I'm off to look up most of the acronyms..

Each project is like Alice following a rabbit!

Best thing would be to compile it for the OS you currently have ...  DJ & DWR both confirmed that we have binaries which work in MRL (although I have not loaded them in the repo)

 

ok so I have downloaded rxtx2.1-7r2 from here

place it in a fresh folder on the odroid and follow these instructions ( all seems familiar)

extract with tar, cd to the folder

- theres also instructions on the file -

$ less INSTALL to reveal them.

They are first to install automake && a few other things and then

$ ./configure

and

$ make install (the onboard instructions missed out a make )

aaannndddd...reboot...MRL start arduino......serial....nope! not seen. Hmmmm. Well I'm off to bed but the solution is close..

next thing is to find what all you have...

do this command

sudo find / -name librxtx*

this should find all the locations of librxtx and spew them to the console - copy and paste them back, then we get to sort things out ! (1 step closer)

SpenMarsden

10 years 2 months ago

thanks for your help- here's the result:

linaro@linaro-ubuntu-desktop:~$ sudo find / -name librxtx*

/usr/share/lintian/overrides/librxtx-java
/usr/share/doc-base/librxtx-java
/usr/share/doc-base/librxtx-rmisecuritymanager
/usr/share/doc/librxtx-java
/usr/lib/jni/librxtxParallel-2.2pre1.so
/usr/lib/jni/librxtxParallel.so ##this one?###########
/usr/lib/jni/librxtxRS485-2.2pre1.so
/usr/lib/jni/librxtxRaw-2.2pre1.so
/usr/lib/jni/librxtxI2C.so
/usr/lib/jni/librxtxSerial.so. ##and this one too?#####
/usr/lib/jni/librxtxI2C-2.2pre1.so
/usr/lib/jni/librxtxRS485.so
/usr/lib/jni/librxtxRaw.so
/usr/lib/jni/librxtxSerial-2.2pre1.so
/home/linaro/rxtx_build/rxtx-2.1.7r2/MACOSX_IDE/ForPackageMaker/Install/Library/Java/Extensions/librxtxSerial.jnilib
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/librxtxRaw.la
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/librxtxParallel.la
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/librxtxSerial.la
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/librxtxI2C.la
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/librxtxRS485.la
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxRaw.la
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxParallel.la
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxRS485.lai
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxSerial.la
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxParallel.so
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxI2C.la
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxRS485.la
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxRaw.lai
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxRaw-2.1-7.so
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxI2C.lai
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxParallel.lai
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxI2C.so
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxI2C-2.1-7.so
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxRS485-2.1-7.so
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxSerial.so
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxParallel-2.1-7.so
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxRS485.so
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxRaw.so
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxSerial-2.1-7.so
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxSerial.lai
/home/linaro/MYROBOTLAB/myrobotlab.1978/arduino/lib/librxtxSerial.so
/home/linaro/MYROBOTLAB/myrobotlab.1978/arduino/lib/librxtxSerial64.so
/home/linaro/MYROBOTLAB/myrobotlab.1978/libraries/native/armv6.hfp.32.linux/librxtxSerial.so
/home/linaro/MYROBOTLAB/myrobotlab.1978/libraries/native/armv6.hfp.32.linux/librxtxSerial-2.2pre1.so
/home/linaro/MYROBOTLAB/myrobotlab.1978/.ivy/gnu.io.rxtx/rxtx/natives/armv6.hfp.32.linux/librxtxSerial-2.2pre1-2.1-7r2.so
/home/linaro/MYROBOTLAB/myrobotlab.1978/.ivy/gnu.io.rxtx/rxtx/natives/armv6.hfp.32.linux/librxtxSerial-2.1-7r2.so
/var/lib/dpkg/info/librxtx-java.shlibs
/var/lib/dpkg/info/librxtx-java.postinst
/var/lib/dpkg/info/librxtx-java.list
/var/lib/dpkg/info/librxtx-java.md5sums
/var/lib/dpkg/info/librxtx-java.postrm
/var/cache/apt/archives/librxtx-java_2.2pre2-10_armhf.deb
 
sorry I couldnt find a way to make this text scrollable

I wrote a reply to this, but accidently manuevered off the page before posting :P

Your build is under /home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs

/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxSerial-2.1-7.so
/home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxParallel-2.1-7.so

make sure these are "real" files and not symbolic links, you can do so with the command

ls -al

symbolic links will have arrows -> pointing to other files, "real" files will not have the arrow
now to clean up - the following should be removed
# these are dropped by the arduino package and are not arm at all (x86 probably)
/home/linaro/MYROBOTLAB/myrobotlab.1978/arduino/lib/librxtxSerial.so

/home/linaro/MYROBOTLAB/myrobotlab.1978/arduino/lib/librxtxSerial64.so

# these are the ones which are attempted to be used by MRL, but were build for the raspi
/home/linaro/MYROBOTLAB/myrobotlab.1978/libraries/native/armv6.hfp.32.linux/librxtxSerial.so
/home/linaro/MYROBOTLAB/myrobotlab.1978/libraries/native/armv6.hfp.32.linux/librxtxSerial-2.2pre1.so

# don't know where the stuff in /usr/lib/jni/ came from, but mv the whole jni folder to your home directory
# too many variables

/usr/lib/jni

 
# the ones under .ivy are raspi - but they are not in any classpath so you can leave them at the moment
copy /home/linaro/rxtx_build/rxtx-2.1.7r2/armv7l-unknown-linux-gnu/.libs/librxtxSerial-2.1-7.so
to /home/linaro/MYROBOTLAB/myrobotlab.1978/libraries/native/armv6.hfp.32.linux

make sure its a real file - if so rename it to librxtxSerial.so

 
try now...

SpenMarsden

10 years 2 months ago

here's the first output of terminal when MRLattempts to fire up the arduino:

java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver
 

I've just tried pasting into MRL new versions of rxtxSerial.so from the new sources revealed in the terminal find script- i.e. wherever there is an rxtxSerial.so file in MRL I have replaced it with a new one but with no luck. 

bit lost in here! Thanks:)

Hi try following my previous post...

The evil "java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path" happens when either the library is not found... or the library is the wrong version... or the library itself is missing dependencies...

Unfortunately Java never gives us the detailed information about which.

If we have to fall back 20 yards and punt... we'll make a very small program to test the librxtxSerial library to make  sure it works without Java

SpenMarsden

10 years 2 months ago

oops thats not worked (after reboot).. and also borked arduino IDE too giving the familiar java.lang unsatisfied error as well as

xlib: missing extension"RANDR"  (which I think  is a tightvncserver based thing)

should I reflash the OS, install arduino and MRL, recompile the rxtx drivers and follow your instructions again?

thanks man

 

move this folder back

/usr/lib/jni

And see if the Arduino IDE works..

No, don't re-image .. we're figuring out where the dark gnomes live in these parts

SpenMarsden

10 years 2 months ago

moved it back and arduino is back..

MRL no serial found...........

........yet

 

also for any elven identification:

linaro@linaro-ubuntu-desktop:~/MYROBOTLAB/myrobotlab.1978/.ivy/gnu.io.rxtx/rxtx/natives/armv6.hfp.32.linux$ ls -al
total 148
drwxrwxr-x 2 linaro linaro  4096 Feb 27 10:23 .
drwxrwxr-x 3 linaro linaro  4096 Feb 25 11:53 ..
-rw-rw-r-- 1 linaro linaro 45548 Oct  4  2012 librxtxSerial-2.1-7r2.so
-rwxr-xr-x 1 linaro linaro 42451 Feb 25 22:54 librxtxSerial-2.1-7.so
-rw-rw-r-- 1 linaro linaro 45548 Oct  4  2012 librxtxSerial-2.2pre1-2.1-7r2.so
lrwxrwxrwx 1 linaro linaro    22 Feb 27 10:23 librxtxSerial.so -> librxtxSerial-2.1-

Ok.. so 

under /usr/lib/jni   - someone has put a good elf ..  it worky with Odroid Yay !  But the twist is ..
This elf is a 2.2pre1 so breed ...

You created a 2.1-7r2 so breed ..  it doesnt work with  (elvish home) RXTXcomm.jar - dunno why .. but it whithers and dies and does'nt show you the magical serial ports

Since Arduino worked, you should delete (your home spun breed) 2.1-7r2 from the mrl native directory..
copy in the healthy 2.2pre1 stuff from the /usr/lib/jni ... 

Now you got to get its corresponding home... first search for elvish homes...

sudo find / -name "RXTXcomm.jar"

if you find one under an Arduino reference use it by copying over and replacing the  MRL/libraries/jar/RXTXcomm.jar .. 

cross fingers, sacrifice goat .. and maybe your spell will work !

 

 

SpenMarsden

10 years 2 months ago

yes that all makes sense, but no dice!

I used usr/share/arduino/libRXTXcomm.jar as my donor to go to MRL/libraries

also replaced the rxtx.so files- also tried putting the symbolic links in and checkining they are linking to the correct files. And checked permissions. The error keeps coming up without changing is

java.lang.linkerror: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver

its the last bit- gnu.io.RXTXCommDriver---maybe the the bad elf has left a spanner here?

 

What Madness is This ?!??

One nuance .. just to make sure.. your path above says "usr/share/arduino/libRXTXcomm.jar"

was that libRXTXcomm.jar or lib/RXTXcomm.jar ? - these elves can be rather terse.

RXTXCommDriver is in RXTXcomm.jar - you can unzip it and find it there..  However, my spidey senses are starting to tingle ... and I'm wondering if Arduino decided to say adios to qbang's RXTX and fork their own....

SpenMarsden

10 years 2 months ago

sorry it was

linaro@linaro-ubuntu-desktop:/usr/share/arduino/lib/RXTXcomm.jar

It couldnt be anything to do with the PATH could it? I havent added anything to do with MRL to the PATH..?

GroG

10 years 2 months ago

In reply to by SpenMarsden

the scripts myrobotlab.sh & webgui.sh have pathing exports - but they should be the directories which we discussed

SpenMarsden

10 years 1 month ago

Hi! I deleted my version of MRL'78 and extracted it again- when I installed arduino service it threw up theses words:
 
checking for latest version of log4j
attempting to retrieve log4j info
ERROR - [unresolved dependency: org.apache.log4j#log4j;latest.integration: configuration not found in org.apache.log4j#log4j;1.2.14: 'armv6.hfp.32.linux'. It was required from org.apache.log4j#log4j-caller;working default]
checking for latest version of xml
attempting to retrieve xml info
xml - new artifacts downloaded
xml is installed
checking for latest version of rxtx
attempting to retrieve rxtx info
rxtx - new artifacts downloaded
rxtx is installed
checking for latest version of arduino
attempting to retrieve arduino info
arduino - new artifacts downloaded
arduino is installed
finished processing updates 
 
any elvish chicanery there?
ALSO! I looked in the path in myrobotlab.sh:
# Mac's don't use LD_LIBRARY_PATH yet its 
# required to load shared objects on Linux systems
LD_LIBRARY_PATH=`pwd`/libraries/native/arm.32.linux:`pwd`/libraries/native/x86.32.linux:`pwd`/libraries/native/x86.64.linux:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
 
and yet the path is  /libraries/native/armv6.hfp.32.linux

so could that be a mis-direct?

SpenMarsden

10 years 1 month ago

ok so I renamed libraries/native/armv6.hpf.32.linux to the one closest in the path i.e. libraries/arm.32.linux

and then started MRL and system>update>install latest in order to re-load the arduino hopefully so it could find the bits it needed, and when MRL started again and I started arduino then it gave 2found 1 serial ports /dev/ttyUSB0"..... :)

so far things looking a bit worky- and thats without transplanting usr/lib/arduino rxtxSerial.so..

 

 

edit> motors moving!

Ya... 90% nasty bugs are pathing problems...

So - LD_LIBRARY_PATH=`pwd`/libraries/native/arm.32.

needs to line up with the file system ..   The LD_LIBRARY_PATH is an environment variable which allows Java to execute native code in the paths provided.   

Hope there is smoother sailing ahead !