Catching the hot plug event with Cyusb utility in Linux

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

hie everyOne,

   

I have one device having FX2LP for usb connectivity. and i have developed one code using CyUSB utility in Linux which displays the device descripotor of the device and logs it in log file.

   

but for this i have run the code. to get this. Actually i wanted to do like whenever i plug my device the code i have written should run automatically n logs the descriport in file.

   

i know this can be done with kind of daemon process i am trying  but i am not able to understand the things how to do this

   

 

   

please do rply i want to make it happen (i am working in linux)

   

 

   

Thanks & Regards

   

Rohan

0 Likes
5 Replies
Anonymous
Not applicable
        Dear sir, please help me in this i have tried to run the script also in the .rule file but it didnt worked like, KERNEL=="*", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="add", ATTR{idVendor}=="04b4", MODE="666", TAG="cyusb_dev", RUN+="/usr/bin/run_code.sh A" KERNEL=="*", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ACTION=="remove", TAG=="cyusb_dev", RUN+="/usr/bin/run_code.sh R" thanks & regards rohan   
0 Likes
Anonymous
Not applicable

hieee

   

now i am able to run the .sh through udev .rule file using RUN+=

   

how can i run (or invoke to run) bigger codes through the .rule in udev. in cyusb utility

because the script we are running through udev rule has to get detach itself, we can not run long execution

how to over cum this thing in cyusb

please do rply me, Need ur help

   

 

   

regards

   

rohan

0 Likes
Anonymous
Not applicable

hieee sir,

   

anyone please help me in this & daemon process in cyusb linux sdk

   

 

   

Thanks & regards

   

Rohan

0 Likes
Anonymous
Not applicable

Hi Rohan! 

   

I have same problem. I need to write deamon which will be download firmware to FX2 RAM after connection to USB port.

   

Did your solve this? Could you, please, share your solution?

   

Thank you!

   

Best regards,

   

Alexander

0 Likes
Anonymous
Not applicable

 Hi 

   

Did you check out FX3 SDK for Linux?

   

The host app Control Center detects the plugging and unplugging of cypress devices and displays in the host app accordingly.

   

Please check the related code.

   

 

   

thanks

   

Nikhil

0 Likes