We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexDiscussionGeneral Discussion,  Status › Post Snow Leopard serial not working
Page Index Toggle Pages: 1
Post Snow Leopard serial not working (Read 7779 times)
Post Snow Leopard serial not working
Sep 1st, 2009, 4:07pm
 
I have an arduino running firmata which has stopped responding after the snow leopord update.
I think I've narrowed the problem down to the serial library.

when running this sample code

// Example by Tom Igoe

import processing.serial.*;

// The serial port:
Serial myPort;      

// List all the available serial ports:
println(Serial.list());

/*  I know that the first port in the serial list on my mac
is always my  Keyspan adaptor, so I open Serial.list()[0].
Open whatever port is the one you're using.
*/
myPort = new Serial(this, Serial.list()[0], 9600);
 
// Send a capital A out the serial port:
myPort.write(65);

-----
I get the error


java.lang.UnsatisfiedLinkError: /Applications/Processing.app/Contents/Resources/Java/libraries/serial/library/li
brxtxSerial.jnilib:  no suitable image found.  Did find:  /Applications/Processing.app/Contents/Resources/Java/libraries/serial/library/li
brxtxSerial.jnilib: no matching architecture in universal wrapper thrown while loading gnu.io.RXTXCommDriver
java.lang.UnsatisfiedLinkError:

---

any ideas?
Re: Post Snow Leopard serial not working
Reply #1 - Sep 2nd, 2009, 5:01am
 
Snow Leopard finally gave JAVA SE 6.0 to Mac users
Arduino however is NOT compatible with the JAVA SE 6.0, so you have to go back to JAVA SE 5.0
Hopefully you made a backup of your old system (chompingatbits.com/files/BACK_UP_JAVA_5_ON_LEOPARD.php)

When you restored JAVA SE 5.0, go to the Utilities folder in Applications.
Open the application Java Preferences
Move java 1.5 to the top (in the bottom box)
Restart processing.

Happy coding!

(Hopefully processing updates soon to work with JAVA SE 6.0)
Re: Post Snow Leopard serial not working
Reply #2 - Sep 2nd, 2009, 8:46am
 
My guess is that the problem is that the serial library is not 64-bit compatible. If you run Processing in 32 bit mode (as I understand it, there's a checkbox in the Get Info dialog), you may be able to get serial working.
Re: Post Snow Leopard serial not working
Reply #3 - Sep 2nd, 2009, 11:46am
 
I'm half way there. The checkbox is actually called "open using rosetta" and it seemed to clear up the serial issues (thanks!). Next problem is firmata communication between the latest versions of Arduino and Processing.
The hello world code runs, but no blinking light. I uploaded the latest arduino library for processing and installed it in the libraries folder, and I installed the latest driver from here (opps need to post more before I can put up links - ftdichip.com/)


import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
int servoPin = 10;     // Control pin for servo motor

void setup(){
 size (180, 50);
 println(Arduino.list());
 arduino = new Arduino(this, Arduino.list()[0]);
 arduino.pinMode(servoPin, Arduino.OUTPUT);
}
void draw(){
  arduino.analogWrite(servoPin, mouseX);
}

interestingly the RX light blinks but not the led in pin 13.
this was the case on a Duemilanove and a Dieimila.
yes I tried different LED's  Wink

I'd love any help you can give me
Re: Post Snow Leopard serial not working
Reply #4 - Oct 4th, 2009, 7:41am
 
The serial port is working now with processing 1.0.7 under Snow Leopard ( osx 10.6 )
Re: Post Snow Leopard serial not working
Reply #5 - Dec 20th, 2009, 5:25am
 
I have the same problem:

http://processing.org/discourse/yabb2/num_1251731980.html#2


"If you run Processing in 32 bit mode..."

How do you do that?

Re: Post Snow Leopard serial not working
Reply #6 - Dec 20th, 2009, 5:31am
 
I installed the latest Processing. The serial port problem disappeared however I got a new error message:











Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7

Exception in thread "Animation Thread" java.lang.ClassCastException: com.sun.media.sound.MidiInDeviceProvider$MidiInDeviceInfo cannot be cast to de.humatic.mmj.spi.CoreMidiProvider$JSMDevInfo
     at de.humatic.mmj.spi.CoreMidiProvider.getDevice(CoreMidiProvider.java:122)
     at javax.sound.midi.MidiSystem.getMidiDevice(MidiSystem.java:200)
     at promidi.MidiIO.getAvailablePorts(MidiIO.java:182)
     at promidi.MidiIO.<init>(MidiIO.java:122)
     at promidi.MidiIO.getInstance(MidiIO.java:143)
     at MIDI_arduino3_LDR2.setup(MIDI_arduino3_LDR2.java:44)
     at processing.core.PApplet.handleDraw(PApplet.java:1402)
     at processing.core.PApplet.run(PApplet.java:1327)
     at java.lang.Thread.run(Thread.java:637)

Experimental:  JNI_OnLoad called.


It must be the MIDI/audio driver, will try to update it.

Re: Post Snow Leopard serial not working
Reply #7 - Dec 20th, 2009, 5:42am
 
Please help, I'm totally lost. Should I go back to Java 5?
Re: Post Snow Leopard serial not working
Reply #8 - Dec 20th, 2009, 8:24am
 
Installed the latest mmj for 64 bit and the latest Mandolane. Still get errors:











Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
Mandolane MIDI SPI for OS X 10.5 Version 2.96

Exception in thread "Animation Thread" java.lang.ClassCastException: com.sun.media.sound.MidiInDeviceProvider$MidiInDeviceInfo cannot be cast to de.humatic.mmj.spi.CoreMidiProvider$JSMDevInfo
     at de.humatic.mmj.spi.CoreMidiProvider.getDevice(CoreMidiProvider.java:122)
     at javax.sound.midi.MidiSystem.getMidiDevice(MidiSystem.java:200)
     at promidi.MidiIO.getAvailablePorts(MidiIO.java:182)
     at promidi.MidiIO.<init>(MidiIO.java:122)
     at promidi.MidiIO.getInstance(MidiIO.java:143)
     at MIDI_arduino3_LDR2.setup(MIDI_arduino3_LDR2.java:44)
     at processing.core.PApplet.handleDraw(PApplet.java:1402)
     at processing.core.PApplet.run(PApplet.java:1327)
     at java.lang.Thread.run(Thread.java:637)

Any ideas folks?
Re: Post Snow Leopard serial not working
Reply #9 - Dec 20th, 2009, 8:51am
 
Managed to install Java 1.5 and set Java to 32 bit, java1.5. The get different error this time:

Exception in thread "Animation Thread" java.lang.NullPointerException
     at java.util.TreeMap.fixAfterInsertion(TreeMap.java:1295)
     at java.util.TreeMap.put(TreeMap.java:483)
     at java.util.TreeSet.add(TreeSet.java:210)
     at promidi.MidiOut$NoteBuffer.addNote(MidiOut.java:290)
     at promidi.MidiOut.sendNote(MidiOut.java:143)
     at MIDI_arduino3_LDR2.draw(MIDI_arduino3_LDR2.java:85)
     at processing.core.PApplet.handleDraw(PApplet.java:1425)
     at processing.core.PApplet.run(PApplet.java:1327)
     at java.lang.Thread.run(Thread.java:613)

Please help!
Re: Post Snow Leopard serial not working
Reply #10 - Dec 20th, 2009, 9:04am
 
Solved it! First, I had Processing 1.01. Installed the latest, 1.0.9, got different errors... Then realized I only have java1.6 (go to utilities->Java Preferences). Following this http://wiki.oneswarm.org/index.php/OS_X_10.6_Snow_Leopard procedure which restored Java1.5 (requires password,when you type it cannot be seen...jut type it and hit return), went back to Java Preferences and set things to java1.5 32 bit. Problem solved.
Re: Post Snow Leopard serial not working
Reply #11 - Feb 18th, 2010, 12:22am
 
I swear I just posted this, but it vanished. Anyway...this thread = just what I needed. Thx...
Page Index Toggle Pages: 1