Re: SMARTCARD USB Reader

2011-05-17 Thread Hans Petter Selasky
On Tuesday 17 May 2011 14:45:35 Luca Pizzamiglio wrote: > Hi, > > It was my mistake, I didn't understand that libusb20_tr_open() wants the > bEndpointAddress provided by the end point descriptor as ep_no parameter. > Man pages are not extremely detailed and I used usbconfig sources as > documentat

Re: SMARTCARD USB Reader

2011-05-17 Thread Luca Pizzamiglio
Hi, It was my mistake, I didn't understand that libusb20_tr_open() wants the bEndpointAddress provided by the end point descriptor as ep_no parameter. Man pages are not extremely detailed and I used usbconfig sources as documentation, but I didn't found examples on transfer functions usage, th

Re: SMARTCARD USB Reader

2011-05-17 Thread Luca Pizzamiglio
On 05/17/11 11:22, Hans Petter Selasky wrote: On Monday 16 May 2011 16:28:55 Luca Pizzamiglio wrote: libusb20_dev_open( pdev, 32 ) libusb20_dev_set_config_index( pdev, 0) bin_ep = libusb20_tr_get_pointer( pdev, 0 ); libusb20_tr_open( bin_ep, 4096, 1, bin_ep_num ); bout_ep = libusb20_tr_get_point

Re: SMARTCARD USB Reader

2011-05-17 Thread Hans Petter Selasky
On Monday 16 May 2011 16:28:55 Luca Pizzamiglio wrote: > libusb20_dev_open( pdev, 32 ) > libusb20_dev_set_config_index( pdev, 0) > bin_ep = libusb20_tr_get_pointer( pdev, 0 ); > libusb20_tr_open( bin_ep, 4096, 1, bin_ep_num ); > bout_ep = libusb20_tr_get_pointer( pdev, 1 ); > libusb20_tr_open( bout

SMARTCARD USB Reader

2011-05-16 Thread Luca Pizzamiglio
Hi List! I'm Luca and I'm trying to write a kind of driver for USB SMARTCARD Reader on FreeBSD 8.2-STABLE. The approach adopted is to use libusb20, but I've some problem using interrupt end point... I successfully implemented a find_device() routine scanning all device and it works well. T