Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using a FTDI 2232H chip in synchronous FIFO mode to communicate over USB to an altera Cyclone II FPGA. I've developed a program that will communicate with the device, using libftdi and libusb, running from a TI AM3517 arm processor with Debian installed.

I'm not to sure how to have configure the debian OS to start the my communication process on detection(ie. hotplug) of the FTDI 2232H usb device.

share|improve this question

migrated from stackoverflow.com May 7 '11 at 11:34

This question came from our site for professional and enthusiast programmers.

    
in case anyone was wondering heres the udev rule I used to implement this. I created /etc/udev/rules.d/99-FTDI2232H-usb.rules I here i'm running my program /opt/prog and passing in the serial manufacture and product information as arguments ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="0403", ATTR{idProduct}=="6010", RUN+="/opt/prog %s{serial} %s{manufacturer} %s{product}", ${serial}, $ATTR{manufacturer}, $ATTRS{product} –  richmb Jun 14 '11 at 20:24
add comment

1 Answer

You can use halevt (or its predecessor ivman on earlier kernels) to detect and execute actions on hotplug events.

share|improve this answer
    
Thank you for the quick response. I've been doing to further research and just learned about udev. It seems that both halevt and udev would be able to accomplish this task. Any incite on to which one would be more suitable? –  richmb May 6 '11 at 14:24
    
halevt works for me (detect when audio CD is inserted on a headless media server) but udev appears to be the way forward as HAL is deprecated. You've reached the end of my knowledge on this ;) –  sudocode May 6 '11 at 14:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.