Date: Fri, 09 May 2008 11:03:12 -0700 From: Halit Canbazoglu <halit@vicor.com> To: freebsd-usb@FreeBSD.org Subject: barcode reader Message-ID: <482491E0.3020902@vicor.com>
next in thread | raw e-mail | index | archive | help
i'm trying to integrate Metrologic Fusion MS3780 USB barcode reader to our system, and trying to make ugen IOCTL reads with USB_DO_REQUEST since i want the timeouts to work. i can read the data with read() calls but it blocks. is there a device does these kind of IOCTL reads so i can setup up the 'struct usb_ctl_request' correctly ?? // ioctl( fd, USB_DO_REQUEST, ( struct usb_ctl_request *) ...); i have been getting errno: 22 which is "EINVAL: Invalid Argument" with my structure setups. here is the dmesg, ugen0: Metrologic Metrologic Scanner, rev 1.10/1.00, addr 2 here is the USB info for the device, /**********************************/ usb device, idVendor: 0x0c2e, idProduct: 0x0720 Only Device Descriptor bLength: 18, bDescriptorType: 1, bcdUSB: 0x0110, bDeviceClass: 0, bDeviceSubClass: 0, bDeviceProtocol: 0, bMaxPacketSize0: 8, idVendor: 0x0c2e, idProduct: 0x0720, bcdDevice: 0x0100, iManufacture: 1, iProduct: 2, iSerialNumber: 0, bNumConfigurations: 1 Configuration(0) Descriptor bLength: 9, bDescriptorType: 2, wTotalLength: 41, bNumInterfaces: 1, bConfigurationValue: 1, iConfiguration: 3, bmAttributes: 0x80, MaxPower: 150, extra: (null), extralen: 0 Bus Powered device configuration Configuration(0)--Interaface(0) Descriptor bLength: 9, bDescriptorType: 4, bInterfaceNumber: 0, bAlternateSetting: 0, bNumEndpoints: 2, bInterfaceClass: 255, bInterfaceSubClass: 0, bInterfaceProtocol: 0, iInterface: 0, extra: !^Q^A, extralen: 9 Configuration(0)--Interaface(0)--End Point(0) Descriptor bLength: 7, bDescriptorType: 5, bEndpointAddress: 0x02, bmAttributes: 0x03, wMaxPacketSize: 8, bInterval: 10, bRefresh: 0, bSynchAddress: 0 Endpoint(2): INTERRUPT-OUT Configuration(0)--Interaface(0)--End Point(1) Descriptor bLength: 7, bDescriptorType: 5, bEndpointAddress: 0x81, bmAttributes: 0x03, wMaxPacketSize: 8, bInterval: 10, bRefresh: 0, bSynchAddress: 0 Endpoint(1): INTERRUPT-IN /**********************************/ thanks .. halit .. -- Halit Canbazoglu | Senior Engineer 510-621-2196(work) | 510-621-2020(fax) halit@vicor.com | VICOR, a Metavante Company This message contains confidential and proprietary information of the sender, and is intended only for the person(s) to whom it is addressed. Any use, distribution, copying or disclosure by any other person is strictly prohibited. If you have received this message in error, please notify the e-mail sender immediately, and delete the original message without making a copy.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?482491E0.3020902>