Cannot Upload to Sparki in Linux

I tried the RGB example, but same issue.

Same here. RGB sketch compiles and appears to upload but nothing happens. Well, almost nothing: the LED glows green briefly and if Sparki is turned on it rolls forward about 1/4 turn of the wheels. Same thing happens with the Melody sketch, haven’t tried any of the others. Running Ubuntu 13.10, Arduino 1.0.5. Board type “Arduino Leonardo;” serial port /dev/ttyACM0

I’m having a similar problem. This is what is appearing in the terminal window I started Arduino IDE from.

[code]xperimental: JNI_OnLoad called.
Stable Library

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

Binary sketch size: 14,658 bytes (of a 28,672 byte maximum)
Found programmer: Id = “-4
926”; type = K
Software Version = S.P; Hardware Version = A.R
avrdude: error: buffered memory access not supported. Maybe it isn’t
a butterfly/AVR109 but a AVR910 device?
[/code]

[quote=“mathew”]I’m having a similar problem. This is what is appearing in the terminal window I started Arduino IDE from.

[code]xperimental: JNI_OnLoad called.
Stable Library

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

Binary sketch size: 14,658 bytes (of a 28,672 byte maximum)
Found programmer: Id = “-4
926”; type = K
Software Version = S.P; Hardware Version = A.R
avrdude: error: buffered memory access not supported. Maybe it isn’t
a butterfly/AVR109 but a AVR910 device?
[/code][/quote]

I got the same problem while trying to upload the wall avoidance program.

Hi,

I have done some testing and I can make the upload work on Linux… but not in a satisfactory way.
I need the Sparki IDE to work on LinuxMint16 (or higher).

In general I have the same issue as others where the upload stops with:

Connecting to programmer: .avrdude: Send: . [1b] 
avrdude: Send: S [53] 
avrdude: ser_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding

I have downloaded 32 and 64 bit versions of the arduino 1.0.5 IDE for Linux from here: arduino.cc/en/Main/Software
Untared them and set things up as it should (e.g. modified the boards.txt file, imported the Sparki lib etc).

After that I have done testing on three different computers (A, B and C) where I have booted different versions of LinuxMint from a USB stick (and mounted my HDD so I could use the IDE versions I had already installed).
This is what I got:

- = Not tested
W = Works
N = Not working

                          A    B    C
Windows 8                 -    W    - 
LinuxMint 12 LXDE 32bit   W    -    W
LinuxMint 12 KDE  32bit   W    -    -
LinuxMint 12 KDE  64bit   W    -    -
LinuxMint 13 KDE  64bit   W    -    -
LinuxMint 14 KDE  32bit   N    -    -
LinuxMint 14 KDE  64bit   N    -    -
LinuxMint 16 KDE  64bit   N    N    -

To me it looks like it is not a 64bit issue and it is not a hardware issue… it looks like the IDE just does not work on a modern Linux version.

After that I tried to rebuild avrdude and RXTX (and doing the ‘-Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0’) as it says here: playground.arduino.cc/learning/linux

  • Rebuilding RXTX and copying it to the arduino directory did not help.
  • I could not figure out how to build avrdude. If anyone can point me to some instructions on how to build the arduino version of avrdude on a LinuxMint16 machine then I can try that… I just get a ton of errors whatever I try.

I have tried a lot of other stuff too… like using the ‘reset button voodoo’, using the repository versions of avrdude and rxtx etc, running the IDE as root, using other versions of java etc etc.

Anyone have any other ideas on what to try in order to make it possible to work with Sparki on LinuxMint16?

I looked at inotool.org/ but it does seem to use avrdude too so I think it will have the same problems.

Edit:
I have now also tried to build according to this:

code.google.com/p/arduino/wiki/BuildingArduino
Built both the main branch and the latest commit but uploading just does not work.

I have similar problems with my Sparki. On my Asus ZenBook running Ubuntu 13.10, I get one of three errors when trying to upload code:

  • The “…Maybe it isn’t a butterfly/AVR109 but a AVR910 device?” error.
  • The “… avrdude: butterfly_recv(): programmer is not responding” error.
  • The Arduino IDE will indicate “Upload completed”, but the Sparki doesn’t run the new code.

I can try uploading the code multiple times in a row with now hardware or configuration changes and get different errors each time.

After a lot of troubleshooting, I decided to try the Sparki on my netbook running Linux Mint 12 and everything worked perfectly. No errors, code uploaded immediately and ran as expected.

I did a lot of googling and found that the ATMega 32u4 used in the Sparki and the Arduino Leonardo doesn’t work well with USB 3.0 ports. This seems to be true regardless of the OS (Linux or Windows on the same machine) based on posts I’ve read. My Asus ZenBook only has USB 3.0 ports while my netbook has USB 2.0 ports, so that’s the reason I assumed was the culprit.

morrta, I’m very interested in your finding that you got Arduino IDE to upload to the Sparki when using Windows 8 on the same machine where Linux Mint did not work. Likewise, that different versions of Linux Mint changed the outcome on the same computer. I hope you’ll follow-up if and when you discover a solution.

Likewise here. I’ve been able to upload reliably from an old Asus eeePC netbook running Ubuntu 12.04, but never from either of two newer machines running Ubuntu 13.10. I can’t confirm whether it’s USB 3.0 or Ubuntu 13.10 (and the newer kernels). I’ve got identical setups on all machines: Arduino 1.0.5, the updated boards.txt mentioned in the OSX thread, and plenty of hope.

Please, oh please, ArcBotics, any love for your Linux users? I am literally scp-ing sketches from my “good” machines to my crappy netbook just to upload to my Sparki! My kids and I love this little guy so much ever since we brought him to his forever home (dropbox.com/sc/a3ocqya1d3jow2c/OdADhPm6yC); sadly, the poor 'uns are utterly confused as to how to do this upload dance when I’m not home.

I’m not sure what logs or debug switches might be relevant, but I’m happy to run any tests if I could get a little guidance here.

@theguidry your video is completely adorable.

Not much help, but a couple of data points:

  • we can’t upload to Sparki’s Leonardo board from either of the Ubuntu 13.10 machines in this house
  • we also can’t upload to Uno boards or Freeduino (Uno-like board)
  • the 12.04 machine that used to work with the Uno boards no longer does–something updated and broke it!
  • we can upload to a Nano (ATMega328) board
    (all of the above work on the Windows 8 laptop, so we know the boards are OK)

Many, many hours spent googling have led to a few possible fixes, none of which work.

The post is old, but it seems there is no solution yet. Anyway a workaround is to disable the network-manager with

Thought I’d throw my data point onto the curve to see if it helps anyone with their configurations (this seems to be working just fine):
[ul][li]Xubuntu 12.04 LTS (Ubuntu with XFCE desktop environment)[/li]
[li]Asus EeePC 1000H[/li]
[li]Arduino 1.0.5[/li]
[li]Writing as: Arduino Leonardo on /dev/ttyACMx[/li][/ul]
Had imported the Sparki library as described on the Arcbotics website.

[quote=“sparkifish”]The post is old, but it seems there is no solution yet. Anyway a workaround is to disable the network-manager with

@sparkifish, do you know why there’s a relationship between network-manager and Sparki?

[quote=“sparkifish”]The post is old, but it seems there is no solution yet. Anyway a workaround is to disable the network-manager with

Sparkifish’s workaround works for me! Thank you Sparkifish!

Thank you Sparkifish! I was about to give up but this work around is workable :smiley:

Hello,

i came across this solution whiel looking for Problems with the Arduino Leonardo and Linux. In fact u can also apply an udev-rule, but i tried this without success.

Good luck!

Hopefully the people on this post got their issues resolved, but for the others finding there way here from Google, I’d like to point them to how I fixed my issues on Fedora 19. Basically I just followed the “Installing Arduino on Linux” on the Arduino Playground for “All, the hard way” ( http://playground.arduino.cc/Linux/All ). The part about chmodding /run/lock was the magic piece for me. Before I made this change, everything looked like it was working. The device was created, the Sparki light flashed like it was uploading, but it would eventually timeout without the upload actually being performed.

Hopefully, this will save someone some headache!

Hi everybody using Sparki with Linux

I thought to post how I solved my issues. I solved all compiliing issues by downloading the latest Arduino IDE (1.6.0) from arduino.cc/en/Main/Software. I have chosen Arduino Leonardo as my Board; and the Serial port is /dev/ttyACM0

And then using the above workaround “sudo service network-manager stop” the upload works. (After doing the upload, just give “sudo service network-manager start” to restart the network manager).

I’m using Ubuntu 14.04.

Tried everything listed in this thread, can’t get it to work. Sometimes it seems to be uploading properly, but I suspect that it is actually just rebooting the AVR. I figured I should be able to get it working, in my previous job I did AVR programming from Linux and am comfortable running avrdude etc., but I cannot get uploads to sparki working right.

I’m running Uburtu 15.04 and have tried both arduino 1.0.5 (Ubuntu’s version) and 1.6.5 (downloaded from the arduino web site). The 1.0.5 compiled properly once I set the font array to be const, and when I upload it claims to succeed, but sparki’s behavior stays at the default application. I’d love to get the sparki working, it was a gift for my daughter who wanted to learn how to program a robot, but it seems not.

Solution for USB Leonardo (Sparki) on Linux (Ubuntu, …)

The problem is due to new linux, that try to scan tty port to found a modem and if not found it disable serial port.
You can see that by a tail -f /var/log/syslog and plug your sparki.
First is the booloader tty, 6 seconds after it is disconnected and board start in user code, the tty serial is plugged.
without patch, udev start modem detection and modem detection unplug tty.

a) Copy the file under, in root on directory :
/etc/udev/rules/
Filename :
77-modem-managers-arduino-leonardo.rules

b) do in root or make sudo
/etc/init.d/udev restart

c) was made by information found on this great Australian site :
freetronics.com.au/pages/leo … _uploading

d) Sorry for this bad globish , I’m french :blush: .

[code]#

adapted from freetronics by laurent mardi 11/08/2015

from : http://www.freetronics.com.au/pages/leostick-getting-started-guide#linux_uploading

#-----------------------------------------------

disable modem manager for usb arduino leonardo

#-----------------------------------------------

new linux version check for modem after plug an usb cdc device

this take time and after disable the cdc serial port.

----------- install ------

in root

copy this file in /etc/udev/rules/77-modem-managers-arduino-leonardo.rules

do : /etc/init.d/udev restart

Sparki ArcBotics : idVendor=27c2, idProduct=0003

ATTRS{idVendor}==“27c2”, ENV{ID_MM_DEVICE_IGNORE}=“1”

leonardo :idVendor=2341, idProduct=8036

ATTRS{idVendor}==“2341”, ENV{ID_MM_DEVICE_IGNORE}=“1”

Freetronics LeoStick :

ATTRS{idVendor}==“26ba”, ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}==“20a0”, ENV{ID_MM_DEVICE_IGNORE}=“1”
[/code]

Thank you lb_robotique. I can confirm this worked with me with Ubuntu 14.04.

I upgraded to Ubuntu 16.04 a while ago, and the solution in this thread stopped working. After some testing I got uploading to Sparki to work with the following, and at least for me both were needed:

  1. I did the solution in this thread (by lb_robotique). Under Ubuntu 16.04 the rules directory is called “rules.d”, but otherwise it works all the same.

[quote=“lb_robotique”]Solution for USB Leonardo (Sparki) on Linux (Ubuntu, …)

The problem is due to new linux, that try to scan tty port to found a modem and if not found it disable serial port.
You can see that by a tail -f /var/log/syslog and plug your sparki.
First is the booloader tty, 6 seconds after it is disconnected and board start in user code, the tty serial is plugged.
without patch, udev start modem detection and modem detection unplug tty.

a) Copy the file under, in root on directory :
/etc/udev/rules/
Filename :
77-modem-managers-arduino-leonardo.rules

b) do in root or make sudo
/etc/init.d/udev restart

c) was made by information found on this great Australian site :
freetronics.com.au/pages/leo … _uploading

d) Sorry for this bad globish , I’m french :blush: .

[code]#

adapted from freetronics by laurent mardi 11/08/2015

from : http://www.freetronics.com.au/pages/leostick-getting-started-guide#linux_uploading

#-----------------------------------------------

disable modem manager for usb arduino leonardo

#-----------------------------------------------

new linux version check for modem after plug an usb cdc device

this take time and after disable the cdc serial port.

----------- install ------

in root

copy this file in /etc/udev/rules/77-modem-managers-arduino-leonardo.rules

do : /etc/init.d/udev restart

Sparki ArcBotics : idVendor=27c2, idProduct=0003

ATTRS{idVendor}==“27c2”, ENV{ID_MM_DEVICE_IGNORE}=“1”

leonardo :idVendor=2341, idProduct=8036

ATTRS{idVendor}==“2341”, ENV{ID_MM_DEVICE_IGNORE}=“1”

Freetronics LeoStick :

ATTRS{idVendor}==“26ba”, ENV{ID_MM_DEVICE_IGNORE}="1"
ATTRS{idVendor}==“20a0”, ENV{ID_MM_DEVICE_IGNORE}=“1”
[/code][/quote]

AND

  1. "sudo usermod -a -G dialout " for those usernames that use Sparki. This was based on the guide under “Please Read…” at arduino.cc/en/Guide/Linux#toc6