Greetings Greg, I can see that you have been heavily involved in the USB device driver code for Linux.
I am very grateful for all the work you have done on this so far. I have been trying to learn as much as I can about USB device drivers for a personal project and your documentation is by far the best on the internet. I have been working my way through problems little by little, but have come to a major hurdle which I am starting to recognise as a lack of understanding., and since you are clearly the subject matter expert, I hope you don't mind if I ask a few questions. My project is to write a character device drive for a "1-wire" network attached to a USB hub via a "1-wire" USB adapter. In case you are not familiar "1-wire" was developed by Dallas Semiconductor (I think) for easily communicating with sensors and switches over very long distances (thousands of meters I believe). I want to communicate with the "1-wire" devices in the classical UNIX fashion - as a file. To me this implies a character device driver needs to be written to communicate with the "1-wire" usb adapter. What I am thinking is that I will have the device driver handle ioctl() calls for the various types of message which "1-wire" devices understand. I haven't quite worked out what 'read' and 'write' will do, if anything. I started with usb-skeleton.c modified it so that it does not use devfs_register() - since there is no devfs support in my kernel - but instead uses register_chrdev(), as well as change the devMajor and devMinor so that I am communicating with my device. I might add here that just discovering the reason why devfs_register() was failing took me a long time to figure out. The current status of my driver is little more than that, I can load and unload it, and I am registering/deregistering with usb correctly. I can open the associated character special file, and call ioctl on it. All of this has been verified by peppering the system message log with diagnostic output from the driver. Now, comes the hard part. I have the "1-wire" protocol documentation, but am confused about how to send the data to the usb adapter. Reading the usb core documents leads me to believe that I should be calling usb_alloc_urb() filling in the urb , then usb_submit_urb() the message for the "1-wire" device should be put in the transfer_buffer member of the urb. Is that correct ? I don't understand the usage of the pipe member of this structure. The documentation says "The pipe element is used to encode the endpoint number and properties" - great ! what is an endpoint number ? and what properties are they talking about ? As you may conclude, I may be missing pieces of the usb picture, even though I have read, and tried to understand as much about USB device drivers as I could. Any help is, of course, greatly appreciated. Regards, Jack ------------------------------------------------------- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
