Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, all. I'm working on developing my first usb device driver. Linux (or hidev) seems to think that the device is a HID, when actually its a special controller i'm ...
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    13

    Major Minor numbers USB dev problem.

    Hi, all.

    I'm working on developing my first usb device driver. Linux (or hidev) seems to think that the device is a HID, when actually its a special controller i'm working on. There isn't much information about the device, other than I know how the URB's are sent to the device (I sniffed them within Windows, as the device has a driver for Win ).

    Anyways, I'm having a problem with dealing with Major and Minor numbers. As It's me who's using the device can I just pick a random Major number, and a minor?

    Currently I've got "100 as a Major number" and "1 as a Minor", but when I insert the module and run "mknod /dev/lisdev c 100 1" and within my "open" callback-function I find the device for the given Major & Minor It fails to find the device.

    I'm opening my device using "cat". I haven't got my code ATM (currently at work), but later on I'll post it online.

  2. #2
    Just Joined!
    Join Date
    Jan 2008
    Posts
    13
    Just a thought.

    Because I'm registering my device as a USB class driver, would every device start with the MAJOR number 180? From there I pick my minor from the usb_class_driver struct.

    Then I can use "mknod /dev/lisdev 180 0 (or 1, 2, 3, etc)"

    Can someone please help me if they've came across this problem before.

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...