From owner-freebsd-usb@FreeBSD.ORG Thu May 31 22:53:47 2012 Return-Path: Delivered-To: freebsd-usb@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E68C1106564A for ; Thu, 31 May 2012 22:53:47 +0000 (UTC) (envelope-from ee@athyriogames.com) Received: from madonna.sslcatacombnetworking.com (madonna.sslcatacombnetworking.com [174.133.19.130]) by mx1.freebsd.org (Postfix) with ESMTP id B049E8FC0A for ; Thu, 31 May 2012 22:53:47 +0000 (UTC) Received: from c-98-206-215-156.hsd1.in.comcast.net ([98.206.215.156] helo=laptopv) by madonna.sslcatacombnetworking.com with esmtpa (Exim 4.69) (envelope-from ) id 1Sa8BZ-0004vb-57 for freebsd-usb@FreeBSD.org; Thu, 31 May 2012 11:25:17 -0500 From: "Engineering" To: References: <201205280640.q4S6e6L0035127@freefall.freebsd.org> In-Reply-To: <201205280640.q4S6e6L0035127@freefall.freebsd.org> Date: Thu, 31 May 2012 11:30:56 -0500 Message-ID: <01e901cd3f4a$c30d4910$4927db30$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac08m+JsqoMn6+HkSByc1gEko+nC5ACrGKhQ Content-Language: en-us X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - madonna.sslcatacombnetworking.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - athyriogames.com Cc: Subject: Recommendations for programming HID in FreeBSD 9 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 May 2012 22:53:48 -0000 Hi all, I hope this is the right place to ask this I am in process of migrating an embedded system from BSD 7.0 to 9.0, as we need upgraded video card drivers which will not compile on the old system. To confuse matters a bit, I believe it was 7.0 with some of HPS updated USB stack worked in. The system has 4 HID devices attached, and I need to read data and set feature reports to talk to them. I had been using read() and ioctl() - with the evolution of BSD, is there a different recommended way to do this? I also need open() and to be able to get the usage page, to tell one device from another. If I recall, at the time the uhid driver had problems with devices that had feature reports of varying sizes - I see I hacked it a bit to allow the application to specify the size of the report. Is this still the case? I of course will be looking into this myself, but initial compile gives me the following errors - does this ring a bell to anyone? Thanks, Sam Compiling usbhid.cpp... usbhid.cpp:35: error: 'usb_ctl_report_desc' does not name a type usbhid.cpp: In function 'int hid_set_feature(int, unsigned char*, int)': usbhid.cpp:157: error: 'usb_ctl_report' was not declared in this scope usbhid.cpp:157: error: expected `;' before 'ucr' usbhid.cpp:161: error: 'ucr' was not declared in this scope usbhid.cpp:169: error: invalid application of 'sizeof' to incomplete type 'usb_ctl_report' usbhid.cpp:174: error: 'USB_SET_REPORT' was not declared in this scope usbhid.cpp: In function 'void usbhid_populate_list()': usbhid.cpp:331: error: 'USB_GET_REPORT_DESC' was not declared in this scope usbhid.cpp:331: error: 'struct hid_t' has no member named 'ucrd' usbhid.cpp:334: error: 'struct hid_t' has no member named 'ucrd' usbhid.cpp:336: error: 'struct hid_t' has no member named 'ucrd' usbhid.cpp:337: error: 'struct hid_t' has no member named 'ucrd' *** Error code 1