Cannot Upload to Sparki in Linux

The Easy Robot for Everyone!

Re: Cannot Upload to Sparki in Linux

Postby willebra » Sat Jan 31, 2015 12:22 pm

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 http://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.
willebra
 
Posts: 8
Joined: Thu Feb 13, 2014 9:30 pm

Re: Cannot Upload to Sparki in Linux

Postby bshubert » Sat Jul 11, 2015 11:35 pm

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.
bshubert
 
Posts: 1
Joined: Sat Jul 11, 2015 11:30 pm

Re: Cannot Upload to Sparki in Linux

Postby lb_robotique » Tue Aug 11, 2015 7:58 pm

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 :
http://www.freetronics.com.au/pages/leo ... _uploading

d) Sorry for this bad globish , I'm french :oops: .


Code: Select all
#
# 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"
lb_robotique
 
Posts: 1
Joined: Tue Aug 11, 2015 7:46 pm

Re: Cannot Upload to Sparki in Linux

Postby willebra » Sun Oct 25, 2015 7:10 pm

Thank you lb_robotique. I can confirm this worked with me with Ubuntu 14.04.
willebra
 
Posts: 8
Joined: Thu Feb 13, 2014 9:30 pm

Re: Cannot Upload to Sparki in Linux

Postby willebra » Sun Nov 13, 2016 2:25 pm

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.

lb_robotique wrote: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 :
http://www.freetronics.com.au/pages/leo ... _uploading

d) Sorry for this bad globish , I'm french :oops: .


Code: Select all
#
# 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"



AND

2) "sudo usermod -a -G dialout <username>" for those usernames that use Sparki. This was based on the guide under "Please Read..." at https://www.arduino.cc/en/Guide/Linux#toc6
willebra
 
Posts: 8
Joined: Thu Feb 13, 2014 9:30 pm

Previous

Return to Sparki

Who is online

Users browsing this forum: No registered users and 12 guests