LUFA and Raspberry Pi

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello. I searched and couldnt find any projects using LUFA on an 8-bit AVR attached to a Raspberry Pi. I have several atmega32u4 using LUFA HID and would like to connect them to a Raspberry Pi, run a host program on the RPi and log data from the multiple devices. Anyone been there, done that?

I do not have a RPi at the moment.

Thanks for any tips, guidance, oberservations, etc.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

http://sullerton.com/2012/11/ras...

It would seem if you implement a cdc-acm ( serial port) on the avr, then there should be no issues. I've not tried it myself, but i use the same technique on just about everything apart from a raspberry pi.

You send send simple strings or use a protocol like modbus depending on your requirements - you have the tools under linux to cope with just about anything known to man.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the reply. I assumed it was possible, I just haven't messed with linux since the pre-usb days. And then was suprised to not find any LUFA generic HID projects with the RPi. So wanted to ask. I would like to maintain HID but it looks like I can fall back on CDC if there's an issue.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There should not be any issues. The Raspberry Pi runs different versions of Linux including, Arch Linux, Fedora, and Debian based distributions which are full-featured ( if lite ) versions of Linux. All of the USB components will be available.

Now, having not done this myself, it may be the case that not all the drivers for HID are installed, but that should not be a major hassle. USB on Linux is pretty solid these days when you are talking about standard classes.

Martin Jay McKee

As with most things in engineering, the answer is an unabashed, "It depends."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

HID shouldn't be an issue as it is well supported under Linux and there are python bindings for libusb.
Unfortunately, the USB on the RPi has a couple of issues, so be mindful - it is well documented, so do a search.
My preference would be a BeagleBone Black or a hacked wifi router - its all Linux.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

for libusb.

As Kartman says libusb is the key to this. It's the application level code you use in Linux to talk through to something like a HID device. For examples of how it is used see, for example, the source code of avrdude.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh yeh, I have a openwrt'd wifi router with usb. Thanks for the guidance to focus on libusb.