On 19 September 2013, Gregory Edigarov <ediga...@qarea.com> wrote: > On 09/19/2013 12:20 PM, Gregory Edigarov wrote: > >Hello, everybody. > > > >A few days ago I've bought a new ups, as a replacement for my old > >one, which got it's last way to junkyard. The old one had RS232 > >????????, and the new one is an USB ups. Trying different ways to > >connect it to OpenBSD, but everything I've tried fails. The UPS > >reports itself as: > > > >uhidev2 at uhub3 port 2 configuration 1 interface 0 "ATCL FOR UPS ATCL FOR > >UPS" rev 2.00/0.00 addr 4 > >uhidev2: iclass 3/0 > >uhid2 at uhidev2: input=8, output=8, feature=0 > > > >I've connected it to Windows via USB, and installed software which > >came with it, snooped the protocol, and I am dead sure it is an old > >and frayed Megatec/Q1, which should work with blazer_usb driver from > >nut. But it isn't. Seems I've tried nearly every option and allowed > >option combinations with no result. I cannot get you the usbdevs && > >usbhidctl right now, because I left it connected to windows, and it > >is at home. > > > >So, my question is: could it the differences in usb stack between > >various OSes, that are giving the trouble? Will try connect it to > >linux and NetBSD later, but I am willing to solve the puzzle with > >OpenBSD.
> Oh, and another question: is there a way to quickly change usb device > attachment? I.e. having a device that is attached as UHID, is there a > way to reattach it as UGEN? For nut on OpenBSD you need ugen(4). The quick and dirty way to achieve that is to disablei uhidev* in the kernel. The cleaner way is to patch usb_quirks.c, as pointed out by somebody else. You also need r/w permissions for group _ups to /dev/usb* and /dev/ugen0*, and possibly other things (use ktrace to find out). Regards, Liviu Daia