Saturday, August 27, 2011

New toy: Arduino (packages fixed)

So I finally got an arduino or more precisely, a nice starter kit from fritzing.org.

Unboxing pictures are here.

I followed the instructions on installing the software from OBS, but checked the repositories first and found that there were some problems with FACTORY builds in Klaus' repo.
Additionally, the packages are, even if made to build, not working with the arduino uno thats in the starterkit.

The reasons are

  • arduino uno has a different USB controller and appears as ACM device, not usbserial

  • apparently, the avrdude included in CrossToolchain:avr is newer than what the arduino software expects and thus does need another protocol specification

  • the arduino package sports its own avrdude.conf which does not work with the uno



Of course I fixed all those problems (and submitrequested the fixes back to the "upstream" projects) in the temporary project home:seife:arduino :-)
So now all you should need to do to get the first program uploaded to the uno is:

  • add the home:seife:arduino repository

  • add the CrossToolchain:avr repository

  • zypper install arduino

  • add your user to the dialout group (we could create some special udev rule case that discovers the arduino and makes the device accessible for group "users", but that would not help for the other arduinos that come with FT232 usb-serial interfaces)

  • relogin to activate your dialout group membership

  • start "arduino" from a terminal (the package is missing a desktop file, I will try to fix that later)



You can also install the fritzing package, but probably better use the package from the Education project than that from Contrib since Education seems to contain a much more recent package.
But for now, everything I did was done using arduino.

Now looking at what is needed to get this to work, I'm wondering if the arduino related packages should just be put into CrossToolchain:avr, or if we should create some project for this Arduino stuff, containing the arduino and fritzing packages and everything needed to support them.
An argument against the "stand alone Arduino project" would be that it duplicates significant build efforts (the cross-avr packages are probably pretty expensive to build).
The pro agument is, that interested users need to add only one repository. If even fritzing is there, they need not add the "Education" repo. This would be good, because adding such big repos which also contain lots of updated "standard" packages (there's SDL etc. in Education) is certainly not recommended for novice users because of the unpredictable side effects. Note that the CrossToolchain:avr repo is pretty small and does not contain anything that updates system tools or similar, so adding this one should be "mostly harmless".

I'll need to think about this and maybe talk with other involved parties at the openSUSE conference in two weeks...

3 comments:

  1. If i put my user only in the group "dialout" using your packages I got the error "No permission to create lock file.". After adding my user to the group "lock" everything is working fine. (I'm using openSUSE Tumbleweed.)

    ReplyDelete
  2. Is this only with the "fritzing" program or also with the "arduino" tool? The fritzing tool complained about lock files etc IIRC, I'm not exactly sure anymore what I did to fix that. Maybe I just did "chgrp dialout /var/lock" or something stupid like that ;-)
    Until now I only really used the "arduino" tool.

    ReplyDelete
  3. I used the arduino tool. Without group lock this is the error. You only need to be in group lock if you want to upload compiled code to the controller.

    ---snip---
    check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file.
    please see: How can I use Lock Files with rxtx? in INSTALL
    ---snap---

    ReplyDelete