ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have one device having (cypress)FX2LP for usb connectivity. and i have developed one code using cypress's CyUSB utility (which uses libusb wrapper) 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 descriptors 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)
Not sure how you can identify your device from others, but looking at dmesg after plugging it in can give a clue.
dear sir,
Thanks for your rply
i have one .config file and .rule file also so its detecting ma device n showing in dmesg but how can i run ma code whenever device gets connected. i know i am asking very specific ans but please do rply
If you have an /sbin/hotplug program, the kernel might execute it, whenever something is plugged or unplugged (if not: echo /sbin/hotplug > /proc/sys/kernel/hotplug) http://www.mjmwired.net/kernel/Docum...sb/hotplug.txt
If you have an /sbin/hotplug program, the kernel might execute it, whenever something is plugged or unplugged (if not: echo /sbin/hotplug > /proc/sys/kernel/hotplug) http://www.mjmwired.net/kernel/Docum...sb/hotplug.txt
Dear sir,
i have written code using libusb n cyusb so right now i am not really working at kernel level
cant i run ma code(which diplays the device descriptors), using .rule file. taking event from there???
i tried to run that script through lot of ways but it didnt work out. multiple use of RUN+= is very farr away its not even running my simple script shown above do help me about this
plzZZZZ sir anyone who knws this do rply
Thanks & Regards
Rohan
How do you expect experts to solve your problem, when we can't even see what you're trying? What exactly are these udev rules? Post the rule files and use code tags.
How do you expect experts to solve your problem, when we can't even see what you're trying? What exactly are these udev rules? Post the rule files and use code tags.
sry sir i didnt mean only experts should solve my problem. i am learner so for me evryone is expert who shows me the way to try. i never meant it in a wrong way, sry again for my bad english.
i have one cypress USB controller device, and want run ma developed code on the plug of the device.
i want to run this script run_code.sh on every hot plug event
i know we can not run long execution program through this. so program has to detach itself but i am not getting sucuss in this
please consider my request n help me in this
Regards
rohan
Last edited by rohaanembedded; 05-24-2013 at 06:23 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.