Freevo

- User Documentation

# GeneralPlugins/USB

## USB

This Plugin to scan for usb devices. You should activate this plugin if you use mainmenu plugins for special usb devices like usbstorage.py.

You can also set USB_HOTPLUG in your local_config.py to call an external program when a device is added. USB_HOTPLUG is a list with actions. Each action is also a list of device, message and program to call. Limitation: this works only when Freevo shows the menu and is not running a video.

Example: call pilot-xfer when a pda with the id 082d:0100 is pluged in:

    plugin.activate('usb')
    USB_HOTPLUG = [ ('082d:0100', 'Synchronizing',
                     '/usr/bin/pilot-xfer -t -u /local/visor/current') ]

Other example, mount usb storage device when it is hotplugged. Limitations :

- It will not unmount when unplugged

- Without using udev your device doesn't has a persistent name and if you us multiple usb device you don't know if it is /dev/sda, /dev/sdb1, ....

    plugin.activate('usb')
    USB_HOTPLUG = [ ('0d7d:0150', 'Mounting USB stick',
                     'mount /dev/sde1 /mnt/usbstick') ]

To find the producktid:vendorid of the USB device, look in the kernel messages or use the command lsusb.

last edited 2005-01-10 18:23:47 by BHeremans
current version: http://freevo.sourceforge.net/cgi-bin/doc/GeneralPlugins/USB