Data cables SOLVED

I've spent most of the last four days trying to get two new Micros to run the Basic Blink sketch on a desktop and laptop running Linux Mint and an ancient laptop running XP. I keep getting messages that the IDE can't connect to /dev/ttyACM* where * varies each time I boot up but is usually 0 or 3 on the Linux machines and a COM port on XP.

One regular bit of advice on various sites is to try a different cable. My first attempts used a Firefox OS phone cable but then I found a one and a half metre long and one centimetre wide flat cable which I was sold as a data cable about three years ago. I've just been watching an Arduino start-up video and the demonstrator was using a cable which had a choke on it - I think a ferrite bead type. My question is how important is it to use this type of cable. Could not using one be the source of my problem. It is the fact that the Micros won't run on an XP machine that makes me doubt I'm doing (or not) something stupid.

TIA Ken

cbuffer:
I've spent most of the last four days trying to get two new Micros to run the Basic Blink sketch on a desktop and laptop running Linux Mint and an ancient laptop running XP. I keep getting messages that the IDE can't connect to /dev/ttyACM* where * varies each time I boot up but is usually 0 or 3 on the Linux machines and a COM port on XP.

One regular bit of advice on various sites is to try a different cable. My first attempts used a Firefox OS phone cable but then I found a one and a half metre long and one centimetre wide flat cable which I was sold as a data cable about three years ago. I've just been watching an Arduino start-up video and the demonstrator was using a cable which had a choke on it - I think a ferrite bead type. My question is how important is it to use this type of cable. Could not using one be the source of my problem. It is the fact that the Micros won't run on an XP machine that makes me doubt I'm doing (or not) something stupid.

TIA Ken

I first need to ask for clarification of a few points.
What "Micros" are you using?
are you using these? BBC micro:bit

Does "Basic Blink sketch" mean a simple Blink sketch or a sketch written in the BASIC programming language?

Which version of Linux Mint are you using?

I do not do Microsoft Windows so I cannot help you there.

artisticforge:
I first need to ask for clarification of a few points.
What "Micros" are you using?
are you using these? BBC micro:bit

Does "Basic Blink sketch" mean a simple Blink sketch or a sketch written in the BASIC programming language?

Which version of Linux Mint are you using?

I do not do Microsoft Windows so I cannot help you there.

Ah, need to be more precise when posting to this forum - apologies.

The micros are two Arduino Micro models; the first I took back to Maplin UK and they accepted it might be faulty and exchanged it for the second.

Basic Blink means the File>Examples>01.Basics>Blink sketch in Arduino 1.8.5 IDE.

The desktop uses Mint 18.1 Cinnamon. One laptop uses Mint 17.1 Mate. I don't want to use XP I just keep it for running a negative film digitiser. I used in on the first Micro to see if I was doing something wrong on Linux.

The IDE was downloaded from Arduino's website onto both mint machines and extracted directly in the Downloads Directory. The program has created an as yet empty directory in /home/username, for sketches if I recall correctly.

If I wait for the Micro's Tx and Rx leds to stop flashing before uploading Blink the error message is:

avrdude: ser_open(): can't open device "/dev/ttyACM0": Device or resource busy
An error occurred while uploading the sketch

If I reset immediately after pressing Upload the message is:

processing.app.debug.RunnerException
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:160)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
at processing.app.SketchController.upload(SketchController.java:713)
at processing.app.SketchController.exportApplet(SketchController.java:686)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2168)
at java.lang.Thread.run(Thread.java:748)
Caused by: processing.app.SerialException: Error touching serial port '/dev/ttyACM0'.
at processing.app.Serial.touchForCDCReset(Serial.java:107)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:144)
... 5 more
Caused by: jssc.SerialPortException: Port name - /dev/ttyACM0; Method name - openPort(); Exception type - Port busy.
at jssc.SerialPort.openPort(SerialPort.java:164)
at processing.app.Serial.touchForCDCReset(Serial.java:101)
... 6 more

Thank you for responding. Ken

The bead isn't necessary. The vast majority of Arduino users (including me) don't have one.

cbuffer:
Ah, need to be more precise when posting to this forum - apologies.

The micros are two Arduino Micro models; the first I took back to Maplin UK and they accepted it might be faulty and exchanged it for the second.

Basic Blink means the File>Examples>01.Basics>Blink sketch in Arduino 1.8.5 IDE.

The desktop uses Mint 18.1 Cinnamon. One laptop uses Mint 17.1 Mate. I don't want to use XP I just keep it for running a negative film digitiser. I used in on the first Micro to see if I was doing something wrong on Linux.

The IDE was downloaded from Arduino's website onto both mint machines and extracted directly in the Downloads Directory. The program has created an as yet empty directory in /home/username, for sketches if I recall correctly.

If I wait for the Micro's Tx and Rx leds to stop flashing before uploading Blink the error message is:

avrdude: ser_open(): can't open device "/dev/ttyACM0": Device or resource busy
An error occurred while uploading the sketch

If I reset immediately after pressing Upload the message is:

processing.app.debug.RunnerException
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:160)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
at processing.app.SketchController.upload(SketchController.java:713)
at processing.app.SketchController.exportApplet(SketchController.java:686)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2168)
at java.lang.Thread.run(Thread.java:748)
Caused by: processing.app.SerialException: Error touching serial port '/dev/ttyACM0'.
at processing.app.Serial.touchForCDCReset(Serial.java:107)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:144)
... 5 more
Caused by: jssc.SerialPortException: Port name - /dev/ttyACM0; Method name - openPort(); Exception type - Port busy.
at jssc.SerialPort.openPort(SerialPort.java:164)
at processing.app.Serial.touchForCDCReset(Serial.java:101)
... 6 more

Thank you for responding. Ken

The problem may be that you are not a member of the dialout group on Linux Mint.

You need to add yoursself to the group dialout.

I have not used Linux Mint in a year or two.

the easiest way to add yourself is:
"sudo vim /etc/group" search for "dialout".

if dialout group does not exist let me know.

cbuffer:
Ah, need to be more precise when posting to this forum - apologies.

The IDE was downloaded from Arduino's website onto both mint machines and extracted directly in the Downloads Directory. The program has created an as yet empty directory in /home/username, for sketches if I recall correctly.

Thank you for responding. Ken

Normally, there should be /home/username/.arduino /home/username/.arduino15 /home/username/arduino-1.85 /home/username/Arduino

/home/username/Arduino, is where additional libraries and sketches are stored.

In the directory created in Downloads when you extracted the Arduino IDE archive, did you run the shell script;

"install.sh"

?

Have you installed any libraries aside from those which come with Arduino IDE?

I would suggest turning on verbose output during compilation and uploading in Arduino IDE preferences.

When there are errors you can "Copy error messages" to the clipboard.
You can then paste the error messages into a posting.

This article addresses various cannot open port problems on Linux. If the Arduino has a native USB port (Leonardo, Pro Micro, etc.), modemmanager may have to be removed. See the article.

Thank you all for your input. Today I took delivery of a UNO and it works first time on both my Linux machines using the Arduino IDE already installed, much to my relief. I also received some advice from one of the staff on Linux Format magazine's forum including a very early less detailed equivalent of that in gdsports post. The LXF chap gave me a cmd line input to check the modem manager and it is the problem with my Micro. I will read gdsports web ref before removing the MM.

Good to have people to fall back on when in trouble. Thank you again.

Ken