Hardware Reference
In-Depth Information
Figure 6-2. A powered USB hub
USB API Support
USB devices are normally supported by device drivers and appear as generic peripherals
like keyboards, mice, or storage. The USB Boarduino is a little different, using the FTDI
chipset, and supported by a driver.
Once the Boarduino is plugged in, the lsusb command lists it, thanks to the FTDI
chipset driver:
$ lsusb
...
Bus 001 Device 008: ID 0403:6001 Future Technology Devices \
International, Ltd FT232 USB-Serial (UART) IC
The supporting driver makes the Boarduino available as a serial device:
$ ls -l /dev/ttyUSB0
Crw-rw——T 1 root dialout 188, 0 Dec 31 1969 /dev/ttyUSB0
The serial device support allows the AVR device to be programmed by avrdude .
A Raspberry Pi application can also communicate with the AVR device's application. If
you want to use network-like packets, the SLIP serial protocol, for example, can be used
to communicate over that link. The “Serial API” section of Chapter 9 covers the Linux API
for serial communications.
libusb
Although USB devices are supported by drivers and appear as generic devices, in some
situations a user space program needs to communicate with specialized hardware. While
Raspbian Linux has libusb installed, the developer will want to install the developer
package for it:
# apt-get install libusb-dev
 
Search WWH ::




Custom Search