Difference between revisions of "USB Host"

From ArmadeusWiki
Jump to: navigation, search
m (Using USB devices)
m (Update according default configuration of armadeus3)
Line 4: Line 4:
 
To use USB devices on your Armadeus board, you will need to have a USB Host controller on your development board.
 
To use USB devices on your Armadeus board, you will need to have a USB Host controller on your development board.
 
*'''With an APF9328, only the [[APF9328DevFull|DevFull]] has this functionnality.''' It is equipped with a USB 2.0 Host controller featuring three USB high speed ports.
 
*'''With an APF9328, only the [[APF9328DevFull|DevFull]] has this functionnality.''' It is equipped with a USB 2.0 Host controller featuring three USB high speed ports.
**[[ISP1761_Linux_driver | To know how to install USB Host Linux driver for the DevFull]]
+
**[[ISP1761_Linux_driver | To know how to install USB Host Linux driver for the DevFull]] <b>(already configured with armadeus svn version 978 or higher)</b>
 
*On APF27 all the development boards will have at least 2 USB hosts (controllers are integrated in the i.MX27 processor).
 
*On APF27 all the development boards will have at least 2 USB hosts (controllers are integrated in the i.MX27 processor).
  
Line 11: Line 11:
 
== USB keyboard/mouse (HID: Human Interface Device) ==  
 
== USB keyboard/mouse (HID: Human Interface Device) ==  
 
=== Driver installation ===
 
=== Driver installation ===
*Add USB keyboard/mouse support in Linux:
+
*Add USB keyboard/mouse support in Linux <b>(already configured with armadeus svn version 978 or higher)</b>:
 
  $ make linux26-menuconfig
 
  $ make linux26-menuconfig
  
Line 17: Line 17:
 
  select Device Drivers ---> [*] HID Devices  ---> <M>  USB Human Interface Device (full HID) support  (module)
 
  select Device Drivers ---> [*] HID Devices  ---> <M>  USB Human Interface Device (full HID) support  (module)
  
=== Starting the driver ===
+
=== Starting the driver===
 +
<b>(already active with armadeus svn version 978 or higher)</b>
 
  # modprobe usbhid
 
  # modprobe usbhid
  
Line 40: Line 41:
 
== USB Flash memory / USB key / USB card reader / USB Hard Drive==  
 
== USB Flash memory / USB key / USB card reader / USB Hard Drive==  
 
=== Driver installation ===
 
=== Driver installation ===
 +
<b>(already configured with armadeus svn version 978 or higher)</b>
 
* Add USB Flash support in Linux:
 
* Add USB Flash support in Linux:
 
  $ make linux26-menuconfig
 
  $ make linux26-menuconfig

Revision as of 13:28, 28 December 2008

How-To use the USB Host functionnality of Armadeus boards under Linux.

Controller

To use USB devices on your Armadeus board, you will need to have a USB Host controller on your development board.

  • With an APF9328, only the DevFull has this functionnality. It is equipped with a USB 2.0 Host controller featuring three USB high speed ports.
  • On APF27 all the development boards will have at least 2 USB hosts (controllers are integrated in the i.MX27 processor).

Using USB devices

USB keyboard/mouse (HID: Human Interface Device)

Driver installation

  • Add USB keyboard/mouse support in Linux (already configured with armadeus svn version 978 or higher):
$ make linux26-menuconfig
select Device Drivers ---> [*] HID Devices  ---> <*>   Generic HID support  (static)
select Device Drivers ---> [*] HID Devices  ---> <M>   USB Human Interface Device (full HID) support  (module)

Starting the driver

(already active with armadeus svn version 978 or higher)

# modprobe usbhid

Plug the keyboard

  • you should see on console (for example):
usb 1-1.1: new low speed USB device using isp1761 and address 3
usb 1-1.1: configuration #1 chosen from 1 choice
input: NOVATEK USB Keyboard as /class/input/input0
input: USB HID v1.10 Keyboard [NOVATEK USB Keyboard] on usb-platform-1.1
input: NOVATEK USB Keyboard as /class/input/input1
input: USB HID v1.10 Mouse [NOVATEK USB Keyboard] on usb-platform-1.1
  • To change keyboard keymap (by default us one):
# loadkmap < /etc/i18n/fr.kmap

Plug the mouse

  • you should see on console (for example):
usb 1-1.2: new low speed USB device using isp1761 and address 6
usb 1-1.2: configuration #1 chosen from 1 choice
input: Logitech USB-PS/2 Optical Mouse as /class/input/input6
input: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-platform-1.2

USB Flash memory / USB key / USB card reader / USB Hard Drive

Driver installation

(already configured with armadeus svn version 978 or higher)

  • Add USB Flash support in Linux:
$ make linux26-menuconfig
select Device Drivers  ---> SCSI device support  ---> <*> SCSI device support         (static)
select Device Drivers  ---> SCSI device support  ---> [*] legacy /proc/scsi/ support  (static)
select Device Drivers  ---> SCSI device support  ---> <*> SCSI disk support           (static)
select Device Drivers  ---> [*] USB support  ---> [*]   USB device filesystem     (static)
select Device Drivers  ---> [*] USB support  ---> <*>   USB Mass Storage support  (static)

Plug the device

  • You should see (for example):
usb 1-1.2: new high speed USB device using isp1761 and address 6
usb 1-1.2: configuration #1 chosen from 1 choice
scsi0 : SCSI emulation for USB Mass Storage devices
usb 1-1.2: reset high speed USB device using isp1761 and address 6
scsi 0:0:0:0: Direct-Access     Hama     Card Reader   CF 1.9C PQ: 0 ANSI: 0 CCS
sd 0:0:0:0: [sda] Attached SCSI removable disk

Additional configuration

  • If /dev/sdaX does not exist, then create it:
# mknod /dev/sda b 8 0
# mknod /dev/sda1 b 8 1
# mknod /dev/sda2 b 8 2
  • Create a mount directory "usbdisk"
# mkdir -m 777 /mnt/usbdisk

Mount the device

  • Mount the USB Mass Storage device
# mount -t vfat /dev/sda1 /mnt/usbdisk
  • Check what is present on the USB Mass Storage device:
# ls -al /mnt/usbdisk
  • And if it is well mounted (for example):
# mount
rootfs on / type rootfs (rw)
/dev/root on / type jffs2 (rw)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw)
tmpfs on /tmp type tmpfs (rw)
sysfs on /sys type sysfs (rw)
/dev/sda1 on /mnt/usbdisk type msdos (rw,fmask=0022,dmask=0022,codepage=cp437)

USB <--> Serial adapters

USB <--> WiFi adapters

Links

  • Any links ?