Chris Duffy
2014-Feb-06 14:33 UTC
[Nut-upsdev] Question on support for Upsonic Commercial UPS CXR 2000 - 2000VA/1200W - Rack/Tower on Freebsd 9.1.
Thx Charles, So since this is a new type of UPSonic UPS, do you think the vendor screwed up or is it just some quirk on Freebsd? Yes, if you can look into this I would appreciate it. I do not see anyone else on the Web attempting to use this new device yet.....but....... Regards chris On 2/6/14, 8:24 AM, Charles Lepple wrote:> On Feb 6, 2014, at 8:41 AM, Chris Duffy wrote: > >> 0.016485 Trying megatec protocol... >> 0.017411 send: Q1 >> 0.252545 read: (244.4 244.4 229.9 028 50.0 2.19 23.1 00000001 >> 0.252589 Status read in 1 tries >> 0.252602 Supported UPS detected with megatec protocol >> 1.288032 send: Unknown error >> 1.288085 Permissions problem: Input/output error >> > Interesting that it gets past the first send/read pair. > >> dmesg output: >> >> >> ugen1.3: <PPC> at usbus1 (disconnected) >> uhid0: at uhub3, port 1, addr 3 (disconnected) >> ugen1.3: <PPC> at usbus1 >> uhid0: <PPC USB UPS, class 0/0, rev 2.00/0.03, addr 3> on usbus1 > > Well, that's frustrating. > > The chain of command is something like this: > > NUT USB-based drivers -> libusb -> ugen kernel driver -> device > > The uhid driver tries to offer access to HID devices, but most USB devices that were designed to work on Windows abuse the HID protocol to avoid requiring a kernel driver. > > There is a "quirks list" that effectively kicks uhid out of the way, and that has been necessary for other UPSes on FreeBSD, such as the following: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=134766 > > I'm not sure of the exact steps to take next, but I can look into it. >-- Chris Duffy Product Support Small Tree Communications www.small-tree.com Direct 651-209-6509 X305 Mobil 651-303-9613 Skype:cjdwoodbury Yahoo:chris_duffy6288 AIM/Google:cjdwoodbury at gmail.com
Charles Lepple
2014-Feb-06 14:46 UTC
[Nut-upsdev] Question on support for Upsonic Commercial UPS CXR 2000 - 2000VA/1200W - Rack/Tower on Freebsd 9.1.
On Feb 6, 2014, at 9:33 AM, Chris Duffy wrote:> So since this is a new type of UPSonic UPS, do you think > the vendor screwed up or is it just some quirk on Freebsd?It's a pretty fundamental design flaw, although it isn't uncommon among USB devices aimed at the Windows market, and to their credit, it does make implementation and deployment simpler on Windows. Neither the FreeBSD nor the Linux USB stack is bug-compatible with Windows, but FreeBSD has been slower to catch up. Some UPSes already have quirks table entries in FreeBSD (APC, Cyberpower, probably MGE/Eaton). I did run across a daemon called 'uhidd' in the ports tree which might help. Try installing it, then run 'uhidd -v -u /dev/ugen1.3', kill it, and re-run the driver with -DDDD (as before). The '-u' flag will try to detach the uhid driver. -- Charles Lepple clepple at gmail
Chris Duffy
2014-Feb-06 21:14 UTC
[Nut-upsdev] Question on support for Upsonic Commercial UPS CXR 2000 - 2000VA/1200W - Rack/Tower on Freebsd 9.1.
Charles, here is the command(s) output using uhidd.... # uhidd -v -u /dev/ugen1.3ugen1.3[0]-> HID interface ugen1.3[0]-> Report descriptor size = 27 ugen1.3[0]-> Kernel driver is active ugen1.3[0]-> kernel driver detached! ugen1.3[0]-> Find IN interrupt ep: 0x81 packet_size=0x8 # /usr/local/libexec/nut/blazer_usb -a UPSonic -u root -DDDD 0.000000 debug level is '4' 0.176793 Checking device (06DA/0005) (/dev/usb//dev/ugen1.3) 0.183672 - VendorID: 06da 0.183696 - ProductID: 0005 0.183699 - Manufacturer: PPC 0.183703 - Product: USB UPS 0.183707 - Serial Number: unknown 0.183710 - Bus: /dev/usb 0.183714 Trying to match device 0.183718 Device matches 0.183746 Trying megatec protocol... 0.184566 send: Q1 0.423946 read: (239.3 239.3 229.9 027 50.0 2.19 22.8 00000001 0.423988 Status read in 1 tries 0.424000 Supported UPS detected with megatec protocol 1.455927 send: Unknown error 1.455973 Permissions problem: Input/output error Network UPS Tools - Megatec/Q1 protocol USB driver 0.09 (2.6.5-Unversioned directory) On 2/6/14, 8:46 AM, Charles Lepple wrote:> On Feb 6, 2014, at 9:33 AM, Chris Duffy wrote: > >> So since this is a new type of UPSonic UPS, do you think >> the vendor screwed up or is it just some quirk on Freebsd? > It's a pretty fundamental design flaw, although it isn't uncommon among USB devices aimed at the Windows market, and to their credit, it does make implementation and deployment simpler on Windows. > > Neither the FreeBSD nor the Linux USB stack is bug-compatible with Windows, but FreeBSD has been slower to catch up. Some UPSes already have quirks table entries in FreeBSD (APC, Cyberpower, probably MGE/Eaton). > > I did run across a daemon called 'uhidd' in the ports tree which might help. Try installing it, then run 'uhidd -v -u /dev/ugen1.3', kill it, and re-run the driver with -DDDD (as before). > > The '-u' flag will try to detach the uhid driver. >-- Chris Duffy Product Support Small Tree Communications www.small-tree.com Direct 651-209-6509 X305 Mobil 651-303-9613 Skype:cjdwoodbury Yahoo:chris_duffy6288 AIM/Google:cjdwoodbury at gmail.com
Reasonably Related Threads
- Question on support for Upsonic Commercial UPS CXR 2000 - 2000VA/1200W - Rack/Tower on Freebsd 9.1.
- Question on support for Upsonic Commercial UPS CXR 2000 - 2000VA/1200W - Rack/Tower on Freebsd 9.1.
- Question on support for Upsonic Commercial UPS CXR 2000 - 2000VA/1200W - Rack/Tower on Freebsd 9.1.
- Question on support for Upsonic Commercial UPS CXR 2000 - 2000VA/1200W - Rack/Tower on Freebsd 9.1.
- Question on support for Upsonic Commercial UPS CXR 2000 - 2000VA/1200W - Rack/Tower on Freebsd 9.1.