Applying to the group, to find out which COM PORT name to use on OSX... to connect to a Kinect

315 views
Skip to first unread message

Nathan Cornes

unread,
Feb 6, 2012, 10:25:55 PM2/6/12
to dia...@googlegroups.com, jcca...@porto.ucp.pt
Hi, olá,

I just discovered the existance of your software, apparetly the best solution to "talk" with a lego NXT.
But after I downloaded the LegOSC and paired the computer and brick... I never get after the "Starting server... Opening NXT-DevB port"

By the way, I'm running Mac OSX Snow Leopard 10.6.8

I tried all possible combinations of names for the NXT Brick COM PORT, taken from the Terminal (ls -l /dev/tty.*)

Starting server...
Opening /dev/tty.NXT-DevB port.
Starting server...
Opening dev/tty.NXT-DevB port.
Starting server...
Opening /tty.NXT-DevB port.
Starting server...
Opening tty.NXT-DevB port.
Starting server...
Opening .NXT-DevB port.
Starting server...
Opening NXT-DevB port.

And I have tried attaching all possible sensors, and listed them on "Sensor configuration", always with "Automatically send sensor readings"
Nothing happens, as you can see on the log.

What am I doing wrong? What shall I do?

I'm sorry for disturbing you regarding a past project, but I intend to use it in connection with a Kinect, which also uses OSC as a communication protocol, so the possibilities are enormous.

Please, could you hint me?

Se você não se importar com um espanhol escrevendo em português/portunhol brasileiro, também podemos tentar assim :)

Thanks a lot!

PS: I also tried sending OSC messages to LegOSC from OSCulator (/getBatteryLevel) and there was no reaction in the log... Am I missing something?

Thanks again,

  Nathan Cornes
(+55.11) 8302.1164

Jorge Cardoso

unread,
Feb 7, 2012, 1:13:35 PM2/7/12
to dia...@googlegroups.com
Hi,

I'm not sure I'll be able to help much because that project was developed on Windows and I never did a thorough test on Mac. 
And I don't have the NXT at hand now.

However, to really understand what is happening you should launch LegOSC via the command line:
- Open up Terminal
- cd to the folder where LegOSC.jar is and
- java -jar LegOSC.jar

That will print all the log messages on the terminal. Most probably it is some kind of problem with the RXTX communication library... (if that is the case, you may want
to download a recent version for Mac OS and replace the RXTXComm.jar in the lib folder)

jorge

Nathan Cornes

unread,
Feb 7, 2012, 1:58:15 PM2/7/12
to dia...@googlegroups.com
PS:
sorry, I tried it with a different name (full path) for the Com Port, and the error message is exactly the same (when I click START) but starting differently:
Starting server...
Opening /dev/tty.NXT-DevB port.
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Could not initialize class gnu.io.CommPortIdentifier
at pt.citar.diablu.nxt.protocol.NXTCommBluetoothSerialChannel.openPort(NXTCommBluetoothSerialChannel.java:82)
(...from here on is the same as before)

Thanks in advance :)

  Nathan Cornes
(+55.11) 8302.1164


On Tue, Feb 7, 2012 at 16:39, Nathan Cornes <wag...@gmail.com> wrote:
Hi, Jorge,

thanks for the reply.

I've started legoOSC.jar from the Terminal as you said (but this is LegoOSC and not LegOSC...) and it automatically threw an error, WHILE opening the window "pt.citar.diablu.legosc.LegOSCWindow", even before I do anyithing on it:
 
ns-MacBook-Pro:DiABluLegOSC-0.5 wagedu$ java -jar legoOSC.jar

java.io.FileNotFoundException: legosc.ini (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at pt.citar.diablu.legosc.LegOSCProperties.<init>(LegOSCProperties.java:60)
at pt.citar.diablu.legosc.LegOSCWindow.<init>(LegOSCWindow.java:54)
at pt.citar.diablu.legosc.LegOSCWindow$15.run(LegOSCWindow.java:663)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Well, I must agree there's no legosc.ini file anywhere to be found. Did I miss something?
I just downloaded "DiABluLegOSC-0.5.zip" from http://code.google.com/p/diablu/downloads/list, the unzipped and double clicked the legoOSC.jar file, following the instructions on the README.txt
Is there anything else I must download to have that missing legosc.ini file?
===


Anyhow, I did then try to use the window.
I entered "NXT-DevB" as my NXT Brick Com Port.
Chose 12345 as Your Application Port.
Chose "SOUND" in Sensor Configuration for Port 1.

The new errors are:
Starting server...
Opening NXT-DevB port.
java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1792)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1045)
at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
at pt.citar.diablu.nxt.protocol.NXTCommBluetoothSerialChannel.openPort(NXTCommBluetoothSerialChannel.java:82)
at pt.citar.diablu.nxt.protocol.NXTCommBluetoothSerialChannel.<init>(NXTCommBluetoothSerialChannel.java:54)
at pt.citar.diablu.legosc.LegOSCServer.start(LegOSCServer.java:165)
at pt.citar.diablu.legosc.LegOSCServer.legOSCWindowStartButtonPressed(LegOSCServer.java:540)
at pt.citar.diablu.legosc.LegOSCWindow.notifyStart(LegOSCWindow.java:674)
at pt.citar.diablu.legosc.LegOSCWindow.btnStartStopMousePressed(LegOSCWindow.java:630)
at pt.citar.diablu.legosc.LegOSCWindow.access$200(LegOSCWindow.java:41)
at pt.citar.diablu.legosc.LegOSCWindow$2.mousePressed(LegOSCWindow.java:163)
at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:263)
at java.awt.Component.processMouseEvent(Component.java:6345)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3255)
at java.awt.Component.processEvent(Component.java:6113)
at java.awt.Container.processEvent(Container.java:2085)
at java.awt.Component.dispatchEventImpl(Component.java:4714)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4279)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
at java.awt.Container.dispatchEventImpl(Container.java:2129)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

===

What should I do, please?

Thanks in advance :)

  Nathan Cornes
(+55.11) 8302.1164




jorge

--
You received this message because you are subscribed to the Google Groups "DiABlu Project" group.
To view this discussion on the web visit https://groups.google.com/d/msg/diablu/-/CQCdt4fZQEAJ.
To post to this group, send email to dia...@googlegroups.com.
To unsubscribe from this group, send email to diablu+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/diablu?hl=en.


Nathan Cornes

unread,
Feb 7, 2012, 1:39:59 PM2/7/12
to dia...@googlegroups.com
Starting server...
Opening NXT-DevB port.

jorge

Jorge Cardoso

unread,
Feb 7, 2012, 2:44:04 PM2/7/12
to dia...@googlegroups.com
This means that there is something missing (that's my bad, I should have mentioned this in the Readme):
java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver

You have to download the RXTX binary for your platform http://rxtx.qbang.org/ToyBox/2.1-7-build1/Mac_OS_X/
And you should also replace the existing RXTXComm.jar with the one from here http://rxtx.qbang.org/ToyBox/2.1-7-build1/ to make sure the versions match.

I'm not sure where you should put the file in Mac OS. I guess that it should work if you put it next to RXTXComm.jar.

(you can ignore the legosc.ini exception, it only happens the first time. That file is created automatically and is not very important).

jorge

Nathan Cornes

unread,
Feb 7, 2012, 3:35:26 PM2/7/12
to dia...@googlegroups.com
No luck.
I downloaded the file librxtxSerial.jnilib for Mac intel (http://rxtx.qbang.org/ToyBox/2.1-7-build1/Mac_OS_X/i686-apple-darwin8/)
put it in the folder "lib" under the folder "DiABluLegOSC-0.5"
I also downloaded the RXTXcomm.jar from  http://rxtx.qbang.org/ToyBox/2.1-7-build1/   as you said, and replaced the existing one (in the folder "lib" under the folder "DiABluLegOSC-0.5")

I still get the same error:
java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1792)

Also, no "legosc.ini" file is ever created)

Just in case, my files are arranged as follows:
(folder) "DiABluLegOSC-0.5":
Changes.txt
LegoOSC.jar
>>lib
Readme.txt

Then, in folder "lib":
AbsoluteLayout.jar
librxtxSerial.jnilib
NetUtil.jar
NXTComm.jar
OldRXTXcomm.jar (the one that came in your zip, I simply renamed it)
RXTXcomm.jar
swing-layout-1.0.jar
==
I also tried putting the file librxtxSerial.jnlib in the "main" folder (next to legOSC.jar) but it gave a new error message:
java.lang.UnsatisfiedLinkError: /Users/wagedu/Downloads/DiABluLegOSC-0.5/librxtxSerial.jnilib:  no suitable image found.  Did find:  /Users/wagedu/Downloads/DiABluLegOSC-0.5/librxtxSerial.jnilib: no matching architecture in universal wrapper thrown while loading gnu.io.RXTXCommDriver
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: /Users/wagedu/Downloads/DiABluLegOSC-0.5/librxtxSerial.jnilib:  no suitable image found.  Did find:  /Users/wagedu/Downloads/DiABluLegOSC-0.5/librxtxSerial.jnilib: no matching architecture in universal wrapper
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1861)
(etc)
==

There's something missing or misplaced but I can't figure out what :(

Any help is really welcome. Please,

  Nathan Cornes
(+55.11) 8302.1164



jorge

--
You received this message because you are subscribed to the Google Groups "DiABlu Project" group.
To view this discussion on the web visit https://groups.google.com/d/msg/diablu/-/sP33ClBVmDsJ.

Nathan Cornes

unread,
Feb 7, 2012, 4:06:12 PM2/7/12
to dia...@googlegroups.com
Ok, solved.

Now, I'll try to be as specific as possible so it can be included in your Readme. Sorry if I'm too "to the point" :)

Download the binaries: "rxtx-2.2pre2-bins.zip"
Unzip.

In the unzipped "rxtx-2.2pre2-bins" folder, find the files:
- librxtxSerial.jnilib (from the folder "mac-10.5")
- RXTXcomm.jar (from the main folder)

Copy them to: 
/Library/Java/Extensions - to make available to all users
~/Library/Java/Extensions - to make available to only your user

Now go to your DiaBlu folder.
Run legOSC.jar
You'll get a warning "java.io.FileNotFoundException: legosc.ini ... etc". It will happen every time. Ignore it.

Once the UI opens, go to the COM Port, write the address of the serial port created when pairing the computer with your brick. MUST have the format /dev/tty.NXT-DevB (or anything that appears in your BT serial info. But DON't forget the /dev/tty. part or it won't start)

Once you start the server you'll get a warning "RXTX version mismatch". Ignore it.

It works :)
(at least, so far, for listening to the sensors. I haven't yet tried to send commands TO the brick)
==

My humble opinion is that the link you pointed me to is for the 2.1.7 version. And after seeing that it didn't work... I went to their FAQ.
There, regarding OSX they say "make sure that you have version 2.1-8 or higher". 
Since I couldn't find other than 2.1.7 or 2.2pre, I then tried the 2.2pre ;)
==

Hope it helps someone else. Your software don't seem to have an audience lately but they MUST come. It's a terrific tool.

Thanks,

  Nathan Cornes
(+55.11) 8302.1164

Jorge Cardoso

unread,
Feb 9, 2012, 4:34:03 AM2/9/12
to dia...@googlegroups.com
Great, thanks.

>   Nathan Cornes
> (+55.11) 8302.1164
>
>
>


> On Tue, Feb 7, 2012 at 18:35, Nathan Cornes <wag...@gmail.com> wrote:
>>

--
Jorge C. S. Cardoso
School of Arts - Portuguese Catholic University
Rua Diogo Botelho 1327, 4169-005 Porto-Portugal

http://jorgecardoso.eu

Reply all
Reply to author
Forward
0 new messages