Go Down

Topic: Mac Downloading : Error inside Serial.<init>() (Read 2134 times) previous topic - next topic

mischl

hi all

on the download from a mac os x (10.3.8) with some different files i got an error.
i set speed to 19200 and port to dev/cu.usbserial-1913. also i see "USB <-> Serial" with name FTDI in the system profil

the green leds "RX" and "TX" on the board are flashing and i get back a "Done uploading.
but in the window this message appears and is ever written new when i try to start serial monitor :

-------------------
[font=Courier]
Error inside Serial.<init>()
gnu.io.PortInUseException: Unknown Application
     at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:354)
     at processing.app.Serial.<init>(Serial.java:127)
     at processing.app.Serial.<init>(Serial.java:72)
     at processing.app.Uploader.downloadJava(Uploader.java:130)
     at processing.app.Sketch.upload(Sketch.java:1570)
     at processing.app.Sketch.exportApplet(Sketch.java:1629)
     at processing.app.Editor.handleExport(Editor.java:1724)
     at processing.app.EditorButtons.mouseReleased(EditorButtons.java:343)
     at java.awt.Component.processMouseEvent(Component.java:5093)
     at java.awt.Component.processEvent(Component.java:4890)
     at java.awt.Container.processEvent(Container.java:1566)
     at java.awt.Component.dispatchEventImpl(Component.java:3598)
     at java.awt.Container.dispatchEventImpl(Container.java:1623)
     at java.awt.Component.dispatchEvent(Component.java:3439)
     at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
     at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
     at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
     at java.awt.Container.dispatchEventImpl(Container.java:1609)
     at java.awt.Window.dispatchEventImpl(Window.java:1585)
     at java.awt.Component.dispatchEvent(Component.java:3439)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:230)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:183)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
Atmel AVR ATmega8 is found.
Uploading: flash
Firmware Version: 1.18
Firmware Version: 1.18

[/font]

-------------------

any hints what i can do / i'm doing wrong?

thanks a lot
i know it's only microcontrolling, but i like it!

mellis

You need to run the macosx_setup.command in the Arduino/ directory, and then shutdown your machine.

The program was uploaded correctly.  The error means that an attempt to clean out the serial buffer before uploading failed.  This means that you'll have problems uploading to the board if the board is sending out serial data.  Also, the serial monitor won't work.


mischl

thanks for the fast and good reply! it work's now :-)

i have done the macosx_setup.command allready before as ordered in the "how to" section.
so i've do it once again right now and that fixed the problem

have fun
i know it's only microcontrolling, but i like it!

stevecooley

#3
Apr 13, 2006, 08:19 pm Last Edit: Apr 13, 2006, 08:20 pm by stevecooley Reason: 1
I have the same problem on mac os x 10.4.5... oh.  I see the rest of this thread now. I'll go try that too.

stevecooley

#4
Apr 20, 2006, 12:22 am Last Edit: Apr 20, 2006, 12:23 am by stevecooley Reason: 1
of course that totally worked.  Also, there's an accompanying .command script to run if you're trying to get arduino to send data to Processing.  Look for it in the processing folders... took me a while to find the answer for that one.

Nilloc

I'm still having the error listed above, and can't figure out what it is, I've run (and re-run and re-run) the setup.command file.

I thought 0007 might help, because it didn't need the setup.command file, but still no luck.

The exact output is:

Error inside Serial.<init>()
gnu.io.PortInUseException: Unknown Application
     at gnu.io.CommPortIdentifier.open(CommPortIdentifier.java:344)
     at processing.app.Serial.<init>(Serial.java:127)
     at processing.app.Serial.<init>(Serial.java:72)
     at processing.app.Uploader.uisp(Uploader.java:156)
     at processing.app.Uploader.uploadUsingPreferences(Uploader.java:78)
     at processing.app.Sketch.upload(Sketch.java:1693)
     at processing.app.Sketch.exportApplet(Sketch.java:1755)
     at processing.app.Editor$40.run(Editor.java:1892)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
     at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:269)
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:184)
     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:176)
     at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)


I'm on OS 10.4.8 and have firmware version 1.18 of the USB arduino. I've gotten the same errors in both 0006 and 0007 versions of the software, both before and after running the setup.command. Also I had attempted to run serporoxy to connect with Flash, but never had any luck.

I'm assuming that the port is in use by something else (possibly with serproxy if it's something that doesn't quit after logging out), but I don't know what, or how to clear it.
Any ideas would be great. Or instructions on a full uninstall would also be nice, so that i can start from scratch.

mellis

#6
Dec 28, 2006, 07:15 pm Last Edit: Dec 28, 2006, 07:15 pm by mellis Reason: 1
This happens when you try to upload a sketch?

Try shutting down (not restarting) and then turning the computer on.  Run Arduino and try it again.  

Do you have other microcontroller/physical computing software installed (e.g. for Lego Mindstorms or Crickets)?  Any extra firewall or virus software?  

When you run the macosx_setup.command, do you get any error messages?  (On some computers, it seems to not work properly.)

Nilloc

#7
Dec 29, 2006, 08:14 am Last Edit: Dec 29, 2006, 08:20 am by Nilloc Reason: 1
I've shut my computer down a couple of times since installing and still not had any luck, uploading sketches works fine, although i receive the error i mentioned above, the simple loops i've made are working fine, i even got it to play feliz navidad for xmas. It just won't print any serial data back to the monitor.

This is my first micro controller, although I have connected and run another arduino with the same result.  

The first time I got the software working, this error was not happening, but i hadn't tried out the serial monitor yet, so i'm not sure it ever worked. I did attempt to connect flash to the controller with serproxy 1.3.3 and the arduino class from http://www.progetto25zero1.com/b/tools/Arduino/

No luck there either. This is getting frustrating.

Also I have processing installed, but I was getting the error prior to it's installation. And when i initially installed adruino 0006 the setup command gave me a problem and didn't run properly, then after re-running it, it installed fine and set i was all set.

Now i've installed arduino 0007 and running the setup.command since then has given the same all set type message. Also no virus software or firewall is running during any of my attempts.

mellis

If you can upload programs but still get that error message, it's a problem with RXTX (which is the Java library Arduino uses for serial communication).  It may have something to do with the fact that the macosx_setup.command didn't run properly the first time.  If you open a Terminal and type "groups", does the resulting output include "uucp"?  You might need to delete the contents of "/var/lock" (which you can get to from the Finder: "Go > Go To Folder...").  

Nilloc

My groups are staff, uucp and admin.

and in locks (with ls -la) we have:

drwxrwxr-x    2 root  uucp     68 Dec 14 00:18 .
drwxr-xr-x   31 root  wheel  1054 Dec 31 16:44 ..


I know it's off topic but if you know what "wheel" is I wouldn't mind knowing...

Also should i be deleting the lock folder, since it's empty?

kg4wsv

Quote
I know it's off topic but if you know what "wheel" is I wouldn't mind knowing...

wheel (as in "big wheel", aka "big shot", etc) is for trusted users.  Various systems use it in different ways, but it's an elevated level of privs for trusted users, sort of a coarse grained "sudoers" method that was created before sudo came to be.

Quote
Also should i be deleting the lock folder, since it's empty?

no, because then it wouldn't exist for apps to create lock files in anymore...

-j

Nilloc

So if the failed setup.command is to blame, how would one go about removing (or undoing) the setup, and uninstalling the arduino software?

Our new iMac will be here soon, so this computer could be reformatted (and is a bit over due for a proper cleaning), but it might help other users to know how to uninstall on os x.

kg4wsv

Quote
So if the failed setup.command is to blame, how would one go about removing (or undoing) the setup

There's no real need to undo the setup, as it's just creating a single directory that other traditional unix applications (e.g. kermit, IIRC) may conceivably use.  If you're trying to "remove and reinstall", don't bother - just run the stup again.

Quote
Our new iMac will be here soon, so this computer could be reformatted (and is a bit over due for a proper cleaning), but it might help other users to know how to uninstall on os x.

Like most OS X apps, just delete the application from /Applications and that's good enough.

-j

Nilloc

Quote
Quote
So if the failed setup.command is to blame, how would one go about removing (or undoing) the setup

There's no real need to undo the setup, as it's just creating a single directory that other traditional unix applications (e.g. kermit, IIRC) may conceivably use.  If you're trying to "remove and reinstall", don't bother - just run the stup again.


That didn't work, I've tried that a few times already, and restart and shut down after 2 or 3 of the attempts.

Quote

Like most OS X apps, just delete the application from /Applications and that's good enough.

-j


That's not really true either, there are at least pref files in ~/Library/Arduino... I was asking if there are any more things like that which may be responsible for the conflict. For instance, version 0006 required me changing the min version of Java, to 1.5 from 1.4 (in the info.plist inside the app bundle) in order for it to run.

Nilloc

Quote
If you open a Terminal and type "groups", does the resulting output include "uucp"?  You might need to delete the contents of "/var/lock" (which you can get to from the Finder: "Go > Go To Folder...").  


I've just resovled the problem, and it turns out there was a missing directory in /var/spools
The directory for uucp was missing, creating this and and chmodding it to 775 fixed the serial communication. Just thought others might give this a try if the other fixes don't work.

Go Up