Arduino serial communication Error!

Hey! I’m trying to establish serial communication from the Arduino Yun to Labview… But I’m unable to upload, the error shows:

processing.app.debug.RunnerException
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:131)
at processing.app.debug.Compiler.upload(Compiler.java:165)
at processing.app.Sketch.upload(Sketch.java:1167)
at processing.app.Sketch.exportApplet(Sketch.java:1141)
at processing.app.Sketch.exportApplet(Sketch.java:1113)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
at java.lang.Thread.run(Thread.java:745)
Caused by: processing.app.SerialException: Error touching serial port ‘COM14’.
at processing.app.Serial.touchForCDCReset(Serial.java:92)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:120)
… 6 more
Caused by: jssc.SerialPortException: Port name - COM14; Method name - openPort(); Exception type - Port not found.
at jssc.SerialPort.openPort(SerialPort.java:167)
at processing.app.Serial.touchForCDCReset(Serial.java:86)
… 7 more

The code I’m using is just a simple code:

void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}

void loop() {
// put your main code here, to run repeatedly:
Serial.print(analogRead(A0));
}

Really need some help here! Thank you!

sketch_jul14f.ino (178 Bytes)

Caused by: jssc.SerialPortException: Port name - COM14; Method name - openPort(); Exception type - Port not found.

This is not a problem with your code.

It is trying to upload to the wrong COM port.

…R

I've checked that my arduino is connected to Serial port COM 14 and I did choose the correct port.. but it said port not found?

Use "COM1" through "COM9" at Windows box, clean all the unused COM Ports.

http://forum.arduino.cc/index.php?topic=289341.msg2024983#msg2024983

Use Arduino IDE to confirm which port number Yun has ( should be less than 10).

Yeap. I tried it but it showed the same error :( I'm very certain I chose the correct port and the port is working..

Test with an other windows box, reinstall Java, OS...

Seeing Yun in IDE Port menu

http://forum.arduino.cc/index.php?topic=188101.msg2089851#msg2089851

Try uploading the sketch over the network. (Choose the network port off of the IDE port menu, or use the upload sketch button on the main page of the Yun's configuration web pages.)

It's possible that the bootloader is corrupt on the 32U4 processor. Loading any sketch over the network will cause a fresh copy of the bootloader to be installed.

Hey, so how do I upload the sketch over the network anyhow?

goosegoose: Hey, so how do I upload the sketch over the network anyhow?

From the post right above yours:

ShapeShifter: Choose the network port off of the IDE port menu, or use the upload sketch button on the main page of the Yun's configuration web pages.

Did you have a specific question about one of those two methods?

  • In the Arduino IDE, on the port menu where you normally select your serial port, select your Yun's network address. Then upload the sketch like you normally would.
  • Or, log into your Yun's configuration web page, and the first page contains an "Upload Sketch" section. Click the Browse button and select the .HEX file from the sketch's compilation directory.

hi

I have a similar problem:

processing.app.debug.RunnerException at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:152) at cc.arduino.UploaderUtils.upload(UploaderUtils.java:77) at processing.app.SketchController.upload(SketchController.java:732) at processing.app.SketchController.exportApplet(SketchController.java:703) at processing.app.Editor$UploadHandler.run(Editor.java:2055) at java.lang.Thread.run(Thread.java:748) Caused by: processing.app.SerialException: Error touching serial port 'COM7'. at processing.app.Serial.touchForCDCReset(Serial.java:107) at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:136) ... 5 more Caused by: jssc.SerialPortException: Port name - COM7; Method name - openPort(); Exception type - Port busy. at jssc.SerialPort.openPort(SerialPort.java:164) at processing.app.Serial.touchForCDCReset(Serial.java:101) ... 6 more

[quote=“Code_Goblin, post:11, topic:323807, full:true”]Port name - COM7; Method name - openPort(); Exception type - Port busy
[/quote]

This is slightly different than the original problem. Here, it’s saying that the port has been found, but it’s busy. It sounds like the port is already open by another application.

Do you have a serial terminal window open so you can see the output from the Yun? Are you sending the serial output to another application (like Labview as in the original question)? If so, make sure you close these before trying to upload the sketch - the IDE needs to be able to open the port to upload the code, and a port can’t be open by two things at a time.