2011-10-03 4 views
1

Mac OS X에서 HID USB 응용 프로그램을 구현하려고합니다. 응용 프로그램이 HID USB 장치에서 데이터를 읽어야합니다. HID USB 장치에서 읽는 것에 대한 정보를 발견했습니다.이 장치는 HID 관리자 kext 생성을 언급했습니다. 내 질문은 어떻게 HID 관리자 kext를 만들 수 있으며 어떻게이 kext를 내 코코아 응용 프로그램에 구현합니까? 누군가가 알고Cocoa 응용 프로그램에서 HID USB 장치의 데이터를 읽으려면 어떻게해야합니까?

Low Speed device @ 2 (0x5D200000): ............................................. Composite device: "SportBrain USB\000\000\000\000\000\000\000\000\000\000\000\000" 
    Device Descriptor 
     Descriptor Version Number: 0x0110 
     Device Class: 0 (Composite) 
     Device Subclass: 0 
     Device Protocol: 0 
     Device MaxPacketSize: 8 
     Device VendorID/ProductID: 0x1125/0x2000 (unknown vendor) 
     Device Version Number: 0x0106 
     Number of Configurations: 1 
     Manufacturer String: 1 "SportBrain In" 
     Product String: 2 "SportBrain USB\000\000\000\000\000\000\000\000\000\000\000\000" 
     Serial Number String: 0 (none) 
    Configuration Descriptor: ....................................... "SportBrain USB\000\000\000\000\000\000\000\000\000\000\000\000" 
     Length (and contents): 34 
      Raw Descriptor (hex) 0000: 09 02 22 00 01 01 02 80 0D 09 04 00 00 01 03 00 
      Raw Descriptor (hex) 0010: 00 02 09 21 00 01 00 01 22 1C 00 07 05 81 03 08 
      Raw Descriptor (hex) 0020: 00 0A 
     Number of Interfaces: 1 
     Configuration Value: 1 
     Attributes: 0x80 (bus-powered) 
     MaxPower: 26 ma 
     Interface #0 - HID 
      Alternate Setting 0 
      Number of Endpoints 1 
      Interface Class: 3 (HID) 
      Interface Subclass; 0 
      Interface Protocol: 0 
      HID Descriptor 
       Descriptor Version Number: 0x0100 
       Country Code: 0 
       Descriptor Count: 1 
       Descriptor 1 
        Type: 0x22 (Report Descriptor) 
        Length (and contents): 28 
         Raw Descriptor (hex) 0000: 06 A0 FF 09 01 A1 01 09 01 15 00 25 FF 75 08 95 
         Raw Descriptor (hex) 0010: 08 81 02 09 03 75 08 95 08 B1 02 C0 
        Parsed Report Descriptor: 
          Usage Page (65440) 
          Usage 1 (0x1)  
           Collection (Application)  
           Usage 1 (0x1)  
           Logical Minimum......... (0) 
           Logical Maximum......... (-1) 
           Report Size............. (8) 
           Report Count............ (8) 
           Input................... (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield) 
           Usage 3 (0x3)  
           Report Size............. (8) 
           Report Count............ (8) 
           Feature................. (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Nonvolatile, Bitfield) 
           End Collection  
      Endpoint 0x81 - Interrupt Input 
       Address: 0x81 (IN) 
       Attributes: 0x03 (Interrupt no synchronization data endpoint) 
       Max Packet Size: 8 
       Polling Interval: 10 ms 

경우이 저를 도와주세요 :

이 USB 프로 버에서 내 장치의 정보입니다.

답변

1

kext을 구현할 필요가 없습니다. , 특히 IOHid 인터페이스를 사용하면됩니다.

+0

애플 문서 @Yann Ramin 이외의 다른 방법을 보여주는 웹에서 좋은 예를 알고 계십니까? –

+0

https://developer.apple.com/library/mac/technotes/tn2187/_index.html – geowar

관련 문제