Sunday, 29 September 2013

How to register a bulk device

How to register a bulk device

I'm very new to kernel programming. i created a simple USB driver by
reading greg's code
"http://www.cs.fsu.edu/~baker/devices/lxr/http/source/ldd-examples/usb/usb-skeleton.c"
My code is at http://kgcorner.som/code/simusb.c
As far as i thought, this code can read data and write data from and to
usb device. But when i attached my pendrive i saw dmesg trace i found
everything okay but unable to my my device in output of lsblk. As it's not
there i'm not able to mount it and hence unable to test my driver. Here's
dmesg trace ===========================================
[20073.437683] [SIMUSB]:Module Loaded
[20073.437730] [SIMUSB] USB Detected
[20073.437734] [SIMUSB] USB Vendor ID=1008 and Product ID=22023
[20073.437737] [SIMUSB] endpoint->bEndpointAddress=1
[20073.437740] [SIMUSB] Result of endpoint->bEndpointAddress & USB_DIR_OUT
is 0
[20073.437743] [SIMUSB] ENDPOINT WITH OUT DIRECTION FOUND
[20073.437746] [SIMUSB] Result of endpoint->bmAddress &
USB_ENDPOINT_XFERTYPE_MASK is 2
[20073.437749] [SIMUSB] OUT ENDPOINT adress set
[20073.437752] [SIMUSB] endpoint->bEndpointAddress=130
[20073.437755] [SIMUSB] Result of endpoint->bEndpointAddress & USB_DIR_IN
is 128
[20073.437757] [SIMUSB] ENDPOINT WITH IN DIRECTION FOUND
[20073.437760] [SIMUSB] Result of endpoint->bmAddress &
USB_ENDPOINT_XFERTYPE_MASK is 2
[20073.437763] [SIMUSB] IN ENDPOINT adress set
[20073.437910] [SIMUSB] status=0
[20073.437914] [SIMUSB] USB Registered Successfully
Please help. thanks in advance

No comments:

Post a Comment