Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2016-01-09 Thread Jiri B
On Sun, Dec 06, 2015 at 05:23:22PM +, Stuart Henderson wrote: > The bigger problem is "dual use" devices; e.g. some want UPS to attach > to upd(4), others want ugen(4) for use with NUT/apcupsd. Your code is > partially useful for these, but because it just changes things at attach, > won't surv

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-08 Thread Stuart Henderson
On 2015/12/08 20:55, Xiaofan Chen wrote: > On Mon, Dec 7, 2015 at 10:43 PM, Stuart Henderson wrote: > > On 2015/12/07 22:11, Xiaofan Chen wrote: > >> Not so sure if there is a port of hidapi under OpenBSD. > >> Ref: http://www.signal11.us/oss/hidapi/ > > > > It isn't ported to OpenBSD, and it's on

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-08 Thread Xiaofan Chen
On Mon, Dec 7, 2015 at 10:43 PM, Stuart Henderson wrote: > On 2015/12/07 22:11, Xiaofan Chen wrote: >> Not so sure if there is a port of hidapi under OpenBSD. >> Ref: http://www.signal11.us/oss/hidapi/ > > It isn't ported to OpenBSD, and it's one of those projects where they > don't provide any in

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-07 Thread Kirill Bychkov
On Sun, December 6, 2015 22:10, Ian Darwin wrote: > > > On 2015-12-06 12:23 PM, Stuart Henderson wrote: >> On 2015/12/06 06:02, Mickael Torres wrote: >>> Hello, >>> >>> This is a kernel patch plus a utility called ugenctl I use to allow >>> selected USB devices to attach as ugen(4) instead of their

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-07 Thread Martin Pieuchot
On 07/12/15(Mon) 22:18, Xiaofan Chen wrote: > On Mon, Dec 7, 2015 at 7:42 PM, Martin Pieuchot wrote: > > I'd really prefer a solution that doesn't need any button. In other > > words to always be able to use your device from userland if the kernel > > is not using it. > > > > One way would be to

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-07 Thread Stuart Henderson
On 2015/12/07 22:11, Xiaofan Chen wrote: > Not so sure if there is a port of hidapi under OpenBSD. > Ref: http://www.signal11.us/oss/hidapi/ It isn't ported to OpenBSD, and it's one of those projects where they don't provide any infrastructure to build a library and suggest that people copy it to

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-07 Thread Xiaofan Chen
On Mon, Dec 7, 2015 at 7:42 PM, Martin Pieuchot wrote: > I'd really prefer a solution that doesn't need any button. In other > words to always be able to use your device from userland if the kernel > is not using it. > > One way would be to always attach a ugen(4) driver to every USB device, > I

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-07 Thread Xiaofan Chen
On Mon, Dec 7, 2015 at 8:19 PM, Mickael Torres wrote: > > Actually the device attaches as uhid. I don't know which kind of transfer > is used, I'll have to look into this, but the soft (pk2cmd) uses libusb > and only works when the device is attached as ugen. pk2cmd is only for PICkit 2 which is

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-07 Thread Martin Pieuchot
On 07/12/15(Mon) 13:19, Mickael Torres wrote: > [...] > Actually the device attaches as uhid. I don't know which kind of transfer > is used, I'll have to look into this, but the soft (pk2cmd) uses libusb > and only works when the device is attached as ugen. That's easy because the uhid(4) driver

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-07 Thread Mickael Torres
On 2015-12-07 12:42, Martin Pieuchot wrote: On 07/12/15(Mon) 00:36, Mickael Torres wrote: On 2015-12-06 20:10, Ian Darwin wrote: >On 2015-12-06 12:23 PM, Stuart Henderson wrote: >>On 2015/12/06 06:02, Mickael Torres wrote: >>>Hello, >>> >>>This is a kernel patch plus a utility called ugenctl I u

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-07 Thread Martin Pieuchot
On 07/12/15(Mon) 00:36, Mickael Torres wrote: > On 2015-12-06 20:10, Ian Darwin wrote: > >On 2015-12-06 12:23 PM, Stuart Henderson wrote: > >>On 2015/12/06 06:02, Mickael Torres wrote: > >>>Hello, > >>> > >>>This is a kernel patch plus a utility called ugenctl I use to allow > >>>selected USB devic

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-06 Thread Mickael Torres
On 2015-12-06 20:10, Ian Darwin wrote: On 2015-12-06 12:23 PM, Stuart Henderson wrote: On 2015/12/06 06:02, Mickael Torres wrote: Hello, This is a kernel patch plus a utility called ugenctl I use to allow selected USB devices to attach as ugen(4) instead of their more specific driver. My use

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-06 Thread Mike
On 2015-12-06 20:10, Ian Darwin wrote: On 2015-12-06 12:23 PM, Stuart Henderson wrote: On 2015/12/06 06:02, Mickael Torres wrote: Hello, This is a kernel patch plus a utility called ugenctl I use to allow selected USB devices to attach as ugen(4) instead of their more specific driver. My use

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-06 Thread Mickael Torres
Hello Stuart, On 2015-12-06 18:23, Stuart Henderson wrote: On 2015/12/06 06:02, Mickael Torres wrote: Hello, This is a kernel patch plus a utility called ugenctl I use to allow selected USB devices to attach as ugen(4) instead of their more specific driver. My use case is a Microchip "PICkit

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-06 Thread Ian Darwin
On 2015-12-06 12:23 PM, Stuart Henderson wrote: On 2015/12/06 06:02, Mickael Torres wrote: Hello, This is a kernel patch plus a utility called ugenctl I use to allow selected USB devices to attach as ugen(4) instead of their more specific driver. My use case is a Microchip "PICkit 2 Microcont

Re: ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-06 Thread Stuart Henderson
On 2015/12/06 06:02, Mickael Torres wrote: > Hello, > > This is a kernel patch plus a utility called ugenctl I use to allow > selected USB devices to attach as ugen(4) instead of their more specific > driver. My use case is a Microchip "PICkit 2 Microcontroller Programmer" > that attaches as uhid(

ugenctl for attaching USB devices to ugen instead of their specific driver

2015-12-06 Thread Mickael Torres
Hello, This is a kernel patch plus a utility called ugenctl I use to allow selected USB devices to attach as ugen(4) instead of their more specific driver. My use case is a Microchip "PICkit 2 Microcontroller Programmer" that attaches as uhid(4), but the command line utility pk2cmd wants a ud