Cannot Upload to Sparki in Linux

I am having some trouble connecting to my Sparki in Linux. I installed Arduino 1.0.5 on my Ubuntu 13.10 laptop, as well as the Sparki library, and set up the virtual COM. Unlike the Mac & Win platforms, there does not appear to be Sparki driver for Linus,so based on what I found on the Reset-Button page, I selected Arduino Leonardo as my Board and the virtual COM as the Serial Port (/dev/tty/ACM2, in case it matters). Arduini appears to find the board and even communicates with the bootloader, but it fails to respond when trying to upload my sketch. I get the following error:

[quote]avrdude: Version 5.11.1, compiled on Apr 28 2013 at 18:46:46
Copyright © 2000-2005 Brian Dean, bdmicro.com/
Copyright © 2007-2009 Joerg Wunsch

     System wide configuration file is "/usr/share/arduino/hardware/tools/avrdude.conf"
     User configuration file is "/home/earlkinsley/.avrduderc"
     User configuration file does not exist or is not a regular file, skipping

     Using Port                    : /dev/ttyACM2
     Using Programmer              : avr109
     Overriding Baud Rate          : 57600
     AVR Part                      : ATmega32U4
     Chip Erase delay              : 9000 us
     PAGEL                         : PD7
     BS2                           : PA0
     RESET disposition             : dedicated
     RETRY pulse                   : SCK
     serial program mode           : yes
     parallel program mode         : yes
     Timeout                       : 200
     StabDelay                     : 100
     CmdexeDelay                   : 25
     SyncLoops                     : 32
     ByteDelay                     : 0
     PollIndex                     : 3
     PollValue                     : 0x53
     Memory Detail                 :

                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       eeprom        65    10     8    0 no       1024    8      0  9000  9000 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       flash         65     6   128    0 yes     32768  128    256  4500  4500 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                              Block Poll               Page                       Polled
       Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
       ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
       signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

     Programmer Type : butterfly
     Description     : Atmel AppNote AVR109 Boot Loader

Connecting to programmer: .avrdude: Send: . [1b]
avrdude: Send: S [53]
avrdude: ser_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
[/quote]
Is anyone else have this problem? I’ve checked out the Arduino boards and tried a few things they recommend (running as root, unplugging USB mouse, switching USB ports), but none seem to help.
BTW, is anyone else programming their Sparki on Linux? Just curious.

I was also attempting to get my Sparki to work with Linux (Ubuntu, specifically). I similarly am unable to get the sketch uploaded. I don’t receive the error you did. I’ve also selected the only serial port available (/dev/ttyACM2 as well). The arduino IDE indicates that it is uploading and I also get a red light in the status indicator on the Sparki, but then the upload finishes and my code doesn’t execute it returns to whatever program was last loaded on the Sparki. I was able to get the Sparki to take a new program using my MacBook Pro (don’t hate me, it’s for work) so I don’t think it is a problem with the hardware at all.

There shouldn’t be any need for drivers under linux, it works driverlessly for us. But then again, who knows, its linux (thus why we don’t support it).

Do you mind me asking what code you’re trying to upload?

Very true about the finickiness of linux.
As far as the code, it is just the Melody.cpp from the Sparki library. I thought I’d go basic for my first upload. I did have to create my own pitches.h, since it was not included in the Sparki library ZIP. It compiles fine, only a few warnings, and the sketch size is only 15K.
I do not believe it is a hardware issue with Sparki, but I wanted to rule out the wrong settings in Arduino or the COM simulator before delving into my USB devices.

Have you tried uploading the RGB example?

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!