From: folkert <fo...@va...> - 2013-04-17 13:27:40
|
Hi, I'm working on porting ClewareControl (for usb devices by www.cleware.de) to MacOS X. This clewarecontrol includes a commandline utility to configure/set/read those devices and development libraries for C++, Python and Perl. http://www.vanheusden.com/clewarecontrol/ I don't have acces to a mac myself unfortuantely so I have to ask others to test for me. I ported clewarecontrol to hidapi and all runs fine on linux. On macos x, though, it doesn't show the serial number. This is rather essential as it is needed to distinguish what device to control when you have multiple connected. The hidtest program included in hidapi doesn't show the serial either: >>>>> Device Found >>>>> type: 0d50 0008 >>>>> path: USB_0d50_0008_0x100110a50 >>>>> serial_number: >>>>> Manufacturer: Cleware GmbH >>>>> Product: USB-Ampel >>>>> Release: 1d >>>>> Interface: -1 The serial number ought to be 900705 (decimal) or DBE61 (hex). lsusb -vvv looks like: Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 8 idVendor 0x0d50 Cleware GmbH idProduct 0x0008 bcdDevice 0.19 iManufacturer 1 Cleware GmbH iProduct 2 USB-Ampel iSerial 3 00023D9 <--- note: this is the device I have at home, not the DBE61 one on the mac version bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 34 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0x80 (Bus Powered) MaxPower 440mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 3 Human Interface Device bInterfaceSubClass 0 No Subclass bInterfaceProtocol 0 None iInterface 0 HID Device Descriptor: bLength 9 bDescriptorType 33 bcdHID 1.00 bCountryCode 0 Not supported bNumDescriptors 1 bDescriptorType 34 Report wDescriptorLength 48 Report Descriptors: ** UNAVAILABLE ** Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 3 Transfer Type Interrupt Synch Type None Usage Type Data wMaxPacketSize 0x0008 1x 8 bytes bInterval 50 Device Status: 0x0000 (Bus Powered) Using libusb it does get the serial number but then retrieving measurements doesn't work as it is an HID device. For the test we used https://github.com/downloads/signal11/hidapi/hidapi-0.7.0.zip as well as the git version (March 25, 2013). The output of dtruss (macos version of strace) can be found at: http://vanheusden.com/clewarecontrol/dtruss.txt.gz In case someone wants to see what on earth I'm doing, I've uploaded a test-version at http://vanheusden.com/clewarecontrol/clewarecontrol-3.1.tgz The most interesting part is USBaccessBasic.cpp. Anyone any idea? Folkert van Heusden -- Nagios user? Check out CoffeeSaint - the versatile Nagios status viewer! http://www.vanheusden.com/java/CoffeeSaint/ ---------------------------------------------------------------------- Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com |