How to register user space call back function with USB driver in Linux?
Hi,
Can anybody tell me how to register user space call back function with USB driver? In call back function i would like to do some checks from user space. Regards, Murthy |
I have no idea how to do what you want but in order for others to help you please post the output of the following commands:
lsusb --which gives information about your usb devices, lsmod --which gives a list of all loaded drivers. When the pertinent loaded drivers are found running: modinfo driver The last command should tell you what options for the driver are available. Maybe someone else can help you from there. Good luck. |
using netlink socket to get uevents on usb insert/remove in Linux
Hi .. I did little research and came to know we can get uevents from linux kernek on device insert/remove over netlink sockets.My question is now,How to get uevents to my user space task on USB insert/remove using netlink sockets.
I got piece of code in web. I modified it little bit and ran. But it is not working.Here is the code. Code:
#include <sys/socket.h> 1.Start the above program 2.Insert an USB disk. expected behavior: messages should come on to console actual behavior: i didn't see any messages and program blocked at "recvmsg" as it is not receiving any messages from kernel. Appreciate your help Regards, Ramji |
Welcome to LQ. Hope your time here helps you as much as mine has helped me.
Please put code, command line output, config files, etc. inside [CODE] tags, aka "Code:" blocks. There are 2 ways to generate "Code:" tags:
They will make your posts easier to read, & that will get you more, faster, better answers. -- Help us help you. BTW, You can edit your post(s) to do this retroactively. Please do so soon. Thank you, & again, welcome. ---------- Post added 09-04-11 at 10:56 AM ---------- Moved: This thread is more suitable in Kernel and has been moved accordingly to help your thread/question get the exposure it deserves. |
All times are GMT -5. The time now is 01:48 PM. |