A Question of understanding

From: Jack (jack_at_yankeeboysoftware.com)
Date: 03/09/04

  • Next message: Robin Imrie: "Unresolved symbol __io_virt_debug when loading module"
    Date: 9 Mar 2004 04:17:03 -0800
    
    

    I have been reading up on kernel modules, device drivers, and USB
    programing, and as usual now have a foggy notion of how these three
    all hang together. I would like to clarify a few things, though, and
    any knowledgable comments are very welcome.

    Question: Assume I want to communicate with a USB device in a 'linux
    standard' way. There is currently no device driver for this
    particular device, so I will need to write one.

    Since this is a kernel module, I can't use libusb - a user space
    library.
    Is this correct ?

    When I do write my device driver I should use a set of functionality
    known as the 'The USB Core', which provides functions like:
    int usb_register(struct usb_driver *drv);
    int usb_submit_urb(purb_t purb);, etc...
    Is this correct ?

    Since my device driver is to be a kernel module, I do not link to any
    libraries, the functions that I call from within my module will be
    available to me as a result of insmod doing the fixups.
    Is this correct ?

    The device I want to communicate with is a block device, so I will be
    using the 'proc' file system, rather than the making a character
    device via mknod.
    Is this correct ?

    When I write my application to take advantage of my newly created
    block device driver, I will 'open()' the device file registered by by
    driver and communicate with it via 'ioctl()'.
    Is this corect ?

    Anything else you may wish to add ?


  • Next message: Robin Imrie: "Unresolved symbol __io_virt_debug when loading module"

    Relevant Pages

    • Re: USB ?
      ... device driver for the USB device. ... device driver, or the USB protocol specification for the device so that you ... functions createfile, writefile, readfile and deviceiocontrol to communicate ... I saw System.IO.Ports can now communicate with COM ports. ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: USB support.
      ... What work/study path you recommend to become a good device driver ... The fact that the communication to the device takes place over USB is ... completely irrelevant to you, the application programmer. ... How do I communicate with USB? ...
      (microsoft.public.vc.mfc)
    • Re: USB support.
      ... You have not actually said what you mean by "USB interface". ... have to write a Device Driver tha communicates to this device. ... How do I communicate with USB? ...
      (microsoft.public.vc.mfc)
    • Problem: How Can I dump kernel memory never BSOD ?
      ... I have this problem with my device driver. ... my device driver crash with BSOD when try to dump the kernel module ... PUCHAR pAddress, pDstDddress; ...
      (microsoft.public.development.device.drivers)
    • Re: why cant I use fopen
      ... or write a little mini device driver that sets up a ... by a userland program writing to a pseudofile (implemented in the /proc ... namespace, or sometimes in the /dev namespace), or ... It is bad news to have a kernel module attempt to read it's parameters from ...
      (comp.os.linux.development.system)