Cannot Upload to Sparki in Linux

The Easy Robot for Everyone!

Cannot Upload to Sparki in Linux

Postby earlkinsley » Tue Feb 11, 2014 9:58 pm

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:
avrdude: Version 5.11.1, compiled on Apr 28 2013 at 18:46:46
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 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

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.
earlkinsley
 
Posts: 3
Joined: Tue Feb 11, 2014 9:39 pm

Re: Cannot Upload to Sparki in Linux

Postby jasonofearth » Wed Feb 12, 2014 8:54 am

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.
jasonofearth
 
Posts: 1
Joined: Wed Feb 12, 2014 8:14 am

Re: Cannot Upload to Sparki in Linux

Postby roboalchemist » Wed Feb 12, 2014 4:39 pm

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?
---
Joseph Schlesinger - ArcBotics Co-Founder/CTO
roboalchemist
Site Admin
 
Posts: 673
Joined: Mon Jul 16, 2012 3:02 am

Re: Cannot Upload to Sparki in Linux

Postby earlkinsley » Wed Feb 12, 2014 10:38 pm

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.
earlkinsley
 
Posts: 3
Joined: Tue Feb 11, 2014 9:39 pm

Re: Cannot Upload to Sparki in Linux

Postby roboalchemist » Thu Feb 13, 2014 3:04 am

Have you tried uploading the RGB example?
---
Joseph Schlesinger - ArcBotics Co-Founder/CTO
roboalchemist
Site Admin
 
Posts: 673
Joined: Mon Jul 16, 2012 3:02 am

Re: Cannot Upload to Sparki in Linux

Postby earlkinsley » Thu Feb 13, 2014 6:03 am

I tried the RGB example, but same issue.
earlkinsley
 
Posts: 3
Joined: Tue Feb 11, 2014 9:39 pm

Re: Cannot Upload to Sparki in Linux

Postby Charlie Foxtrot » Fri Feb 14, 2014 10:46 pm

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
Charlie Foxtrot
 
Posts: 6
Joined: Sun Sep 08, 2013 2:53 pm

Re: Cannot Upload to Sparki in Linux

Postby mathew » Sat Feb 15, 2014 1:55 pm

I'm having a similar problem. This is what is appearing in the terminal window I started Arduino IDE from.
Code: Select all
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?
Sparki connected to Linux Mint OS
mathew
 
Posts: 11
Joined: Sat Feb 15, 2014 10:25 am

Re: Cannot Upload to Sparki in Linux

Postby willebra » Sun Feb 23, 2014 10:43 am

mathew wrote:I'm having a similar problem. This is what is appearing in the terminal window I started Arduino IDE from.
Code: Select all
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?


I got the same problem while trying to upload the wall avoidance program.
willebra
 
Posts: 8
Joined: Thu Feb 13, 2014 9:30 pm

Re: Cannot Upload to Sparki in Linux

Postby morrta » Sun Feb 23, 2014 6:45 pm

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:
Code: Select all
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: http://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:
Code: Select all
- = 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: http://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 http://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:
http://code.google.com/p/arduino/wiki/BuildingArduino
Built both the main branch and the latest commit but uploading just does not work.
morrta
 
Posts: 1
Joined: Sun Feb 23, 2014 5:46 pm

Next

Return to Sparki

Who is online

Users browsing this forum: No registered users and 5 guests