[Nut-upsdev] support for newer mustek powermust model 06da:0003

Timo Lindfors timo.lindfors at iki.fi
Sun Nov 25 12:33:22 UTC 2007


Hi,

"Arjen de Korte" <nut+devel at de-korte.org> writes:
>     <path>/megatec_usb -DDDDD -x vendorid=06da -x productid=0003 -x
> subdriver=agiler -a <upsname>

$ sudo /lib/nut/megatec_usb -a myups -DDDDD -x vendorid=06da -x productid=0003 -x subdriver=agiler
Network UPS Tools 2.3.0-1156M - Megatec protocol driver 1.5.8 [megatec_usb]
Carlos Rodrigues (c) 2003-2007

Serial-over-USB transport layer for Megatec protocol driver [megatec_usb]
Andrey Lelikov (c) 2006, Alexander Gordeev (c) 2006-2007, Jon Gough (c) 2007

debug level is '5'
Checking device (0000/0000) (005/001)
- VendorID: 0000
- ProductID: 0000
- Manufacturer: unknown
- Product: unknown
- Serial Number: unknown
- Bus: 005
Trying to match device
Device does not match - skipping
Checking device (06DA/0003) (004/002)
- VendorID: 06da
- ProductID: 0003
- Manufacturer: OMRON
- Product: 87XXUPS
- Serial Number: unknown
- Bus: 004
Trying to match device
Device matches
Starting UPS detection process...
Asking for UPS status [Q1]...
Q1 => FAILED [timeout]
Asking for UPS status [Q1]...
Q1 => FAILED [timeout]
Asking for UPS status [Q1]...
Q1 => FAILED [timeout]
Asking for UPS status [Q1]...
Q1 => FAILED [timeout]
Asking for UPS status [Q1]...
Q1 => FAILED [timeout]
0 out of 6 detection attempts succeeded (minimum required 3)
Megatec protocol UPS not detected.


(Patched) strace shows that now nut does

31282 ioctl(4, USBDEVFS_CONTROL, {requesttype=33, request=9, value=768, index=0, length=3, timeout=4000, data="Q1\r"}) = 3

instead of 

16867 ioctl(4, USBDEVFS_CONTROL, {requesttype=33, request=9, value=768, index=0, length=8, timeout=4000, data="Q1\r\0\0\0\0\0"}) = 8

Mustek probably insists on 8-byte reads padded with zeroes? Strace
outputs are online available at

http://iki.fi/lindi/usb/mustek2-snoops/nut-svn-agiler.strace
http://iki.fi/lindi/usb/mustek2-snoops/agiler2-mustek2.strace

in case you want to look. Patch to produce these with strace is at

http://iki.fi/lindi/strace-4.5.8-usbdevfs.diff


best regards,
Timo Lindfors




More information about the Nut-upsdev mailing list