0

Ubuntu 13.04 Flora
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Ubuntu 13.04 Flora

by charles.d.burton on Fri Jun 21, 2013 6:57 pm

So, I'm having a bit of trouble getting my Flora to work with the Ubuntu Arduino IDE(From the software repo and I tried the 1.05 official version). I added myself to the dialout group and when I plug the Flora in the
ls -l /dev/ttyACM0
shows
crw-rw---- 1 root dialout 166, 0 Jun 21 16:39 /dev/ttyACM0

The permissions look correct to me. Next I loaded the boards.txt file and the flora directory with the

pins_arduino.h

file into
/usr/share/arduino/hardware/arduino/variants/flora

I then verifed that all the directories and files in /usr/share/arduino have read and execute permissions.

When I start the IDE everything seems to be working fine. I can load the test sketch, modify the timer so I can make sure that it's working. I select "Adafruit Flora" as the board and Serial Port /dev/ttyACM0 as the device. When I click load it then builds the project correctly and the TX/RX lights on the Flora start to flicker, the board appears to reset and then IDE prints this to the console.

processing.app.debug.RunnerException: Couldn’t find a Leonardo on the selected port. Check that you have the correct port selected. If it is correct, try pressing the board's reset button after initiating the upload.
at processing.app.debug.AvrdudeUploader.uploadViaBootloader(AvrdudeUploader.java:152)
at processing.app.debug.AvrdudeUploader.uploadUsingPreferences(AvrdudeUploader.java:67)
at processing.app.Sketch.upload(Sketch.java:1671)
at processing.app.Sketch.exportApplet(Sketch.java:1627)
at processing.app.Sketch.exportApplet(Sketch.java:1599)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2380)
at java.lang.Thread.run(Thread.java:724)


This is where I'm stuck, I've tried resetting the Flora, unplugging it and plugging it back in, restarting everything. Logging in and then back out. I cannot for the life of me figure out what is going on. I know the Sketch isn't getting uploaded as well because I adjust the timer to run every 5 seconds and it still blinks at 1 second intervals.

I've also tried another Flora and it's still not working.
charles.d.burton
 
Posts: 35
Joined: Fri Jun 21, 2013 6:42 pm

Re: Ubuntu 13.04 Flora

by adafruit_support_rick on Sat Jun 22, 2013 6:30 am

As noted in the Flora Getting Started Tutorial, we have a special version of the Arduino IDE for use with Flora:
To start, please download our version of the Arduino IDE that's been updated to include the Flora drivers, libraries & code examples! We have versions for Windows and Mac OS X.

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Ubuntu 13.04 Flora

by charles.d.burton on Sat Jun 22, 2013 8:17 pm

I managed to figure out that the problem was permissions on the device tty. For some reason it wasn't letting them work with dialout and I reassigned them to plugdev and it worked!
charles.d.burton
 
Posts: 35
Joined: Fri Jun 21, 2013 6:42 pm

Re: Ubuntu 13.04 Flora

by galou on Mon Oct 21, 2013 4:37 pm

Hi,

could you please give us a hint how to change the group of /dev/ttyACM0 from dialout to plugdev?

I have the same problem as yours but with a Makey Makey.

I work on Fedora 18 with Arduino 1.0.5 with the following warning at start:
WARNING: RXTX Version mismatch
Jar version = RXTX-2.2
native lib Version = RXTX-2.2pre2

Galou
galou
 
Posts: 3
Joined: Mon Oct 21, 2013 4:34 pm

Re: Ubuntu 13.04 Flora

by adafruit_support_mike on Tue Oct 22, 2013 2:03 am

Code: Select all | TOGGLE FULL SIZE
sudo chown :plugdev /dev/ttyACM0

should do it.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.

adafruit_support_mike
 
Posts: 59172
Joined: Thu Feb 11, 2010 2:51 pm

Re: Ubuntu 13.04 Flora

by galou on Tue Oct 22, 2013 3:31 am

Thank you for your quick reply. This is true, "chown :plugdev /dev/ttyACM0" works but the problem is that it's not permanent and /dev/ttyACM0 will be reset to group dialout when the board is reset or unplugged/plugged.

Cheers,
Galou
galou
 
Posts: 3
Joined: Mon Oct 21, 2013 4:34 pm

Re: Ubuntu 13.04 Flora

by adafruit_support_mike on Tue Oct 22, 2013 5:30 pm

Ah.. to permanently reassign the ports you'll have to go into the kernel module that creates and destroys the device files. I don't know specifically, but would guess that the group name/id is hardcoded, and you'd need to edit the code and recompile.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.

adafruit_support_mike
 
Posts: 59172
Joined: Thu Feb 11, 2010 2:51 pm

Re: Ubuntu 13.04 Flora

by galou on Thu Oct 24, 2013 5:07 pm

I actually found a solution for the problem. When I said that the command works I meant actually that it allowed to change the group but changing the group didn't help.

The problem was actually already solved for other arduino boards. Not yet for the Flora and Makey Makey (based on Leonardo). It's a problem linked with the ModemManager trying to communicate to the board, thus making problems.

To solve the problem, you need to update udev rules to say that ModemManager should ignore all arduino boards. I created the file /etc/udev/rules.d/77-mm-arduino-blacklist.rules, as root, with the content
Code: Select all | TOGGLE FULL SIZE
ATTRS{idVendor}=="1b4f", ENV{ID_MM_DEVICE_IGNORE}="1"


It's not perfect though and I often have to reset the board just after clicking "upload" to get my sketch indeed uploaded.

Hope this helps.
Galou
galou
 
Posts: 3
Joined: Mon Oct 21, 2013 4:34 pm

Re: Ubuntu 13.04 Flora

by ajkatz83 on Mon Nov 09, 2015 9:38 pm

I was reading this thread as well, and I do not know if this is the same problem, but I am not having good communications in uploading any sketch to the Flora or any Flora that I have here. This the feedback I get when I do so with Ubuntu Linux 14.04LTS

Sketch uses 8,084 bytes (28%) of program storage space. Maximum is 28,672 bytes.
Global variables use 261 bytes of dynamic memory.
processing.app.debug.RunnerException
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:130)
at cc.arduino.UploaderUtils.upload(UploaderUtils.java:78)
at processing.app.Sketch.upload(Sketch.java:1178)
at processing.app.Sketch.exportApplet(Sketch.java:1152)
at processing.app.Sketch.exportApplet(Sketch.java:1124)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2452)
at java.lang.Thread.run(Thread.java:745)
Caused by: processing.app.SerialException: Error touching serial port '/dev/ttyACM4'.
at processing.app.Serial.touchForCDCReset(Serial.java:87)
at cc.arduino.packages.uploaders.SerialUploader.uploadUsingPreferences(SerialUploader.java:119)
... 6 more
Caused by: jssc.SerialPortException: Port name - /dev/ttyACM4; Method name - openPort(); Exception type - Permission denied.
at jssc.SerialPort.openPort(SerialPort.java:170)
at processing.app.Serial.touchForCDCReset(Serial.java:81)


I imagine the problem is the USB serial connection /dev/ttyACM4 that has a permission problem. when go to use chmod it appears that command takes but still permission is denied. Overall, I do not know what all this means except that is looks like a serial communications error. Can nay be able to help me here? I tried the two suggestions in this post already, and it didn't clear this up at all.

I recently did used these commands to clear it up, but still I get a new error when I used this:
Code: Select all | TOGGLE FULL SIZE
sudo adduser <username> dialout

Code: Select all | TOGGLE FULL SIZE
ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", MODE="0666", GROUP="plugdev"
I put this in the /etc/udev/rules.d/usbasp.rules and now this is what I get:

Sketch uses 8,084 bytes (28%) of program storage space. Maximum is 28,672 bytes.
Global variables use 261 bytes of dynamic memory.
avrdude: ser_open(): can't open device "/dev/ttyACM4": Device or resource busy
avrdude: ser_send(): write error: Bad file descriptor


It still cannot open the device. I am starting to think this Flora board has been bricked out and no modifying of software for USB communications is going to get this to work at all.

ajkatz83
 
Posts: 18
Joined: Fri Sep 05, 2014 2:13 pm

Re: Ubuntu 13.04 Flora

by adafruit_support_mike on Tue Nov 10, 2015 1:11 am

Try these instructions on setting the port permissions: http://playground.arduino.cc/Linux/All#Permission

adafruit_support_mike
 
Posts: 59172
Joined: Thu Feb 11, 2010 2:51 pm

Re: Ubuntu 13.04 Flora

by ajkatz83 on Tue Nov 10, 2015 1:54 am

I looked at the article on Arduino Playground and I followed what they were saying, so I did this:

Code: Select all | TOGGLE FULL SIZE
usermod -a -G group-name username


I added my user name to both groups--dialout and root--and it didn't make a difference at all; I still get the same message:
Sketch uses 8,084 bytes (28%) of program storage space. Maximum is 28,672 bytes.
Global variables use 261 bytes of dynamic memory.
avrdude: ser_open(): can't open device "/dev/ttyACM4": Device or resource busy
avrdude: ser_send(): write error: Bad file descriptor


I just cannot get this port to open at all, I think something is wrong with the Flora.

ajkatz83
 
Posts: 18
Joined: Fri Sep 05, 2014 2:13 pm

Re: Ubuntu 13.04 Flora

by adafruit_support_mike on Tue Nov 10, 2015 2:26 am

Hard to say.. getting the Arduino IDE to work with Linux can be a challenge.

Do you have a machine running another OS that you can test against?

adafruit_support_mike
 
Posts: 59172
Joined: Thu Feb 11, 2010 2:51 pm

Re: Ubuntu 13.04 Flora

by ajkatz83 on Tue Nov 10, 2015 2:34 am

I had tried it in Windows 7 and it was working, however, that failed on me as well. After a few times uploading to get the firewalker code how I wanted it, the USB suddenly became unrecognized by my computer. Flora was seen at a certain COM and worked fine--the moment it became unrecognized was when, as I understand, the Flora reset itself during the upload process and suddenly became unrecognizable to Windows

I had been through various articles on the web, from Microsoft to other usergroups about that problem, to deleting entries out of my registry, about the Upperlimt and Lower limit of the USB host, which all came to no avail. AT this point, I am simply wiping everything out and starting again--its all I have left to go on at present.

ajkatz83
 
Posts: 18
Joined: Fri Sep 05, 2014 2:13 pm

Re: Ubuntu 13.04 Flora

by ajkatz83 on Tue Nov 10, 2015 1:47 pm

After trying three different machines between Windows 10 and Windows 7, plus the Ubuntu 14.04 LTS box that I had, the Flora fails all as an unrecognized USB device. I have switched numerous cables and have come to the conclusion this board is "bricked" and cannot be worked with any longer. Drivers will not take manually and it prefers to be an "unknown device" according to Windows.

The only thing in Windows 10 that showed interesting was something, next to "unknown device" was "device descriptor request fail." I have gone on YouTube and looked at the various forums to some very strange methods, and none seems to do anything to clear up this problem.

ajkatz83
 
Posts: 18
Joined: Fri Sep 05, 2014 2:13 pm

Re: Ubuntu 13.04 Flora

by adafruit_support_mike on Wed Nov 11, 2015 11:42 pm

It sounds like a hardware failure, yes.

How long have you had the Flora?

adafruit_support_mike
 
Posts: 59172
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.