LeoStick install and first time use - Linux, Ubuntu

A shrunk down Leonardo-compatible board, thumb drive sized with native USB support. [Product info]
marc
Freetronics Staff
Freetronics Staff
Posts: 16
Joined: Sat Oct 15, 2011 12:54 pm

LeoStick install and first time use - Linux, Ubuntu

Post by marc » Sat Feb 11, 2012 2:49 pm

LeoStick installation and first time use. Please check this out before plugging in your LeoStick for the first time, we keep known issues and workarounds here.
-------
Installation and setup on Linux, Ubuntu, etc:

LeoStick Getting Started Guide:
http://www.freetronics.com/pages/leosti ... rted-guide


Possible Linux modem-manager bug. There may be a bug in modem-manager that can cause a kernel panic (only sometimes) when the LeoStick is plugged in. To disable modem-manager temporarily, rename its config file:

Code: Select all

sudo mv /usr/share/dbus-1/system-services/org.freedesktop.ModemManager.service \
/usr/share/dbus-1/system-services/org.freedesktop.ModemManager.service-disabled
Then either reboot or "sudo killall modem-manager".

Update: It seems that commit 53b63616b396f49775d4b2c4c3e6eab648a7833b fixes the bug: it's in kernel 3.1.9. Thanks to Matt Evans for the pointer.

gdt
Posts: 1
Joined: Fri Jun 15, 2012 12:17 pm

Re: LeoStick install and first time use - Linux, Ubuntu

Post by gdt » Fri Jun 15, 2012 1:07 pm

You can also tell NetworkManager's ModemManager that this serial device is not a potential modem.
  • Find the USB ID of the device using lsusb.
    $ lsusb
    ...
    Bus 003 Device 014: ID 2341:0034
  • Create a new udev rule configuration file, say /etc/udev/rules.d/99-local.rules, and configure that USB ID to disable ModemManager:
    # Freetronics Leostick Arduino-style single board computer
    ACTION=="add|change", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0034", ENV{ID_MM_DEVICE_IGNORE}="1"
    (Ignore the line wrapping, the text from ACTION onwards is all one line)
  • Reload the udev configuration
    # udevadm control --reload-rules
    and check the system log for failures (typically the syslog destination will be /var/log/daemon.log or /var/log/messages).
Now you can have your Leostick and your 3G dongle plugged in at the same time. ModemManager will control the dongle, but will not attempt to see if the Leostick is a modem by opening it and sending a few "AT" commands.

Tanga
Posts: 1
Joined: Thu Jun 21, 2012 7:16 am

Re: LeoStick install and first time use - Linux, Ubuntu

Post by Tanga » Thu Jun 21, 2012 7:21 am

I had a play with one of the Leosticks that came back from LinuxConf (generous of you to include these for people). They're cool, but didn't play nice with my Linux comp. I'm keen to have another go though. If I use gdt's code then I should be able to plug and play any time without a kernal panic?

Flymo
Posts: 19
Joined: Sun Jan 22, 2012 10:06 am

Re: LeoStick install and first time use - Linux, Ubuntu

Post by Flymo » Tue Nov 13, 2012 6:56 am

Greetings, and many thanks to all at Freetronics for the Leostick given out at Ballarat.

I bought an Eleven, your excellent Practical Arduino and all the bits, learned a lot, and tried out the Leostick on a knowledgeable friends laptop whilst we were there. Blink!

Whilst on the other side of the planet for many months I've been making plans for this Leostick, and now we're back in Vic have been trying to get it going to test them.
No luck so far. It boots and flashes when connected, OK, and it 'breathes' slowly.

Using your Leostick Getting Started Guide here :
http://www.freetronics.com/pages/leosti ... KG7GnaQJhE
I have downloaded and installed both the v1.0.1 and v1.0.2 Arduino IDE onto different machines/partitions running Bodhi Linux (Ubuntu Lucid or Precise based repos) and even tried IDE v1.0 just in case - but there's always a problem.

When the Leostick Board Profile is downloaded and unzipped to the sketchbook/hardware folder we get sketchbook/hardware/LeoStick_v1_0 as suggested. Then I start the IDE.....

But the IDE (v 1.0.1 or v1.0.2) does not recognise this in the Tools > Board menu, no Freetronics item is on offer there. Cannot select the Leostick.

I've tried using the Leonardo Board option, but no luck yet.
I've tried (in desperation) using the 'Programmer' options in most permutations, still no luck.

We do get a new Serial Port offered when the Leostick is connected ~ /dev/tty/ACMx ...where x is 1 or 0 depending on the system ...and this is then selected.

Selecting File > Examples > Digital > BlinkWithoutDelay works
Sketch > Verify/Compile reports success
File > Upload then hangs at about 90% complete.

This is the case regardless of whether I use the Reset on the Leostick as suggested elsewhere.

To be fair, I don't expect it to work...
Since we cannot find Tools > Board > Freetronics LeoStick v1.0 (or v2.0)
...and have substituted Tools > Board > Leonardo
And it don't work. No surprise! ;)

So... I'm probably doing something wrong that is dead basic, and would greatly appreciate help in moving the project forward. The PCs and Arduino IDEs we have are all in good working order when tested with the Eleven or UNO boards. Things blink and beep as expected, no probs.

This project should really suit the Leostick, since all it requires is a small 'keyboard', 8-bit analog capture at moderate sample rates, and USB data out. Small size is a real bonus.
Want to test it so much I can taste it....

Flymo
Posts: 19
Joined: Sun Jan 22, 2012 10:06 am

Re: LeoStick install and first time use - Linux, Ubuntu

Post by Flymo » Tue Nov 13, 2012 9:43 am

[SOLVED] !
Yes, it was basic, it was dumb too.

An hour or two googling the Arduino environment and delving into the Platforms page gave rise to the surmise that extracting the folder from inside LeoStick_board_profile_v1_1.zip into ~/sketchbook/hardware is not precisely right.

What is really needed is the folder that lives inside LeoStick_board_profile_v1_0 that is called LeoStick_v1_0

That's the folder that should be inside ~/sketchbook/hardware !

After that, all is now good....

We get: Tools > Board > Freetronics Leostick V1.0 :D
We get compilation, and the upload completes swiftly... :D :D

And we get blinky lights! :D :D :D

chiefpad
Posts: 2
Joined: Thu Jan 24, 2013 6:00 am

Re: LeoStick install and first time use - Linux, Ubuntu

Post by chiefpad » Thu Jan 24, 2013 6:38 am

Here's a problem and the stupid solution I found.

On linux I followed the instructions and the leostick started up fine, and I got the Blink project working. Hooray! Then I tried to modify it and upload again, and I got this:

Code: Select all

Connecting to programmer: .avrdude: butterfly_recv(): programmer is not responding
"Programmer... MAD :x ! Programmer... SMASH! :x "

A little digging around and I find similar experiences all over the forums, and one single solution.

While your code is running, it appears to lock out the bootloader, preventing it from loading any other programs. Since there is no way to reset the leostick to bootloader-only mode, it looks like you're stuck.

Here's my workaround.
  • Press and hold the reset button (the tiny button between the two rgb leds). Don't let go!
  • Click on upload
  • Let go of the reset button just before the compilation step is complete, but before the upload step begins. This requires careful timing! You have to know about how long it will take your code to compile, and release the button a few seconds before that happens.
  • At this point the bootloader starts its job, and during those few seconds it is listening for incoming programs to load.
I made a short video illustrating the process here : http://youtu.be/6qH7CLtYMgA

DavidTangye
Posts: 1
Joined: Sun Jan 27, 2013 3:14 pm

Re: LeoStick install and first time use - Linux, Ubuntu

Post by DavidTangye » Sun Jan 27, 2013 11:34 pm

If you compile first, the upload will run just after you press the hotkey to do it. This makes it easier to time/synch your releasing of the reset button.

bricabracwizard
Posts: 3
Joined: Fri Apr 26, 2013 8:35 am

Re: LeoStick install and first time use - Linux, Ubuntu

Post by bricabracwizard » Fri Apr 26, 2013 8:57 am

I agree after compiling click on upload and then click on the reset button on the LeoStick. After a number of times I found this wasn't necessary the sketches uploaded normally.

Pogo
Posts: 6
Joined: Thu Dec 19, 2013 6:49 am

Re: LeoStick install and first time use - Linux, Ubuntu

Post by Pogo » Thu Dec 19, 2013 6:56 am

Hi Flymo.

I'm just about to get started (Leostick on Christmas list), using my little Ubuntu netbook. I found your post enlightening, but got confused towards the end. I wonder if you could update your post to explicitly state the path you ended up using.

Pogo.

andrew
Freetronics Staff
Freetronics Staff
Posts: 978
Joined: Sun Jul 14, 2013 7:06 am
Location: Melbourne, Australia
Contact:

Re: LeoStick install and first time use - Linux, Ubuntu

Post by andrew » Thu Dec 19, 2013 8:45 am

Pogo wrote:Hi Flymo.

I'm just about to get started (Leostick on Christmas list), using my little Ubuntu netbook. I found your post enlightening, but got confused towards the end. I wonder if you could update your post to explicitly state the path you ended up using.

Pogo.
If a brand-new LeoStick appears in your Christmas stocking, just follow this:
http://www.freetronics.com/pages/leosti ... rted-guide

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests