Charles Lepple
2015-Feb-09 13:56 UTC
[Nut-upsuser] About your driver NUTDRV_ATCL_USB(8) for install
On Feb 9, 2015, at 6:48 AM, PERE (yahoo.es) <pererivers at yahoo.es> wrote:> 0.028188 Can't set USB configuration: could not set config 1: Device or resource busy > 0.029246 detached kernel driver from USB device... > 0.030559 USB device [0001:0000] opened > 0.866216 read: (8 bytes) => 03 00 00 00 00 00 00 00 > 0.866413 reply[0] = 0x03 -> OL > 0.867461 dstate_init: sock /var/state/ups/nutdrv_atcl_usb-ups open on fd 5 > 1.914346 read: (8 bytes) => 03 00 00 00 00 00 00 00 > 1.915850 reply[0] = 0x03 -> OL > 5.872047 status interrupt read: error submitting URB: Device or resource busy"Device or resource busy" usually means that another kernel driver or userspace program is accessing the same device. Check for another copy of nutdrv_atcl_usb. Which Raspberry Pi distribution are you using, and what is the kernel version? -- Charles Lepple clepple at gmail
pererivers at yahoo.es
2015-Feb-09 19:07 UTC
[Nut-upsuser] About your driver NUTDRV_ATCL_USB(8) for install
Dear Chales, Thanks for your quick reply. I have Raspberry with last Kernel [Linux pi1 3.18.6+ #753 PREEMPT Sun Feb 8 14:47:22 GMT 2015 armv6l GNU/Linux] If <upsdrvctl>, <upsd> and <upsmon> are stopped <nutdrv_atcl_usb> Works well without any error as "Device or resource busy". If I run <upsc> command never receive any value from my ups <upsc ups at localhost> then I can't test shutdown ups. When I run <upsd> with debugin level I view change of my UPS VALUES (OL) to (OB) when I cut its power. When I run <upsmon> each 5 minuts I received "NOTIFYFLAG NOCOMM" in monitor and by email but never receive other notify. Broadcast Message from root at pi1 (somewhere) at 19:58 ... UPS myups at 192.168.1.7 is unavailable My <Upsmon.conf> is: NOTIFYCMD /usr/local/ups/bin/nut-notify <---- script file to send me email. MINSUPPLIES 1 SHUTDOWNCMD "/sbin/shutdown -h +0" NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC NOTIFYFLAG COMMOK SYSLOG+WALL+EXEC NOTIFYFLAG COMMBAD SYSLOG+WALL+EXEC NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC NOTIFYFLAG REPLBATT SYSLOG+WALL+EXEC NOTIFYFLAG NOCOMM SYSLOG+WALL+EXEC NOTIFYFLAG FSD SYSLOG+WALL+EXEC MONITOR myups at 192.168.1.7 1 monuser root master ---------------------------------------------------------------------------- Upsd.users [monuser] password = root upsmon master upsd.conf LISTEN 192.168.1.7 3493 <--- if i put LISTEN 127.0.0.1 don't work/ and with localhost don't work. Are nutdrv_atcl_usb driver experimental driver with limitations about send ONBATT,ONLINE, etc...? Best regards, Pere -----Mensaje original----- De: Charles Lepple [mailto:clepple at gmail.com] Enviado el: lunes, 9 de febrero de 2015 14:57 Para: PERE (yahoo.es) CC: NUT List Asunto: Re: [Nut-upsuser] About your driver NUTDRV_ATCL_USB(8) for install On Feb 9, 2015, at 6:48 AM, PERE (yahoo.es) <pererivers at yahoo.es> wrote:> 0.028188 Can't set USB configuration: could not set config 1: Deviceor resource busy> 0.029246 detached kernel driver from USB device... > 0.030559 USB device [0001:0000] opened > 0.866216 read: (8 bytes) => 03 00 00 00 00 00 00 00 > 0.866413 reply[0] = 0x03 -> OL > 0.867461 dstate_init: sock /var/state/ups/nutdrv_atcl_usb-ups openon fd 5> 1.914346 read: (8 bytes) => 03 00 00 00 00 00 00 00 > 1.915850 reply[0] = 0x03 -> OL > 5.872047 status interrupt read: error submitting URB: Device orresource busy "Device or resource busy" usually means that another kernel driver or userspace program is accessing the same device. Check for another copy of nutdrv_atcl_usb. Which Raspberry Pi distribution are you using, and what is the kernel version? -- Charles Lepple clepple at gmail --- Aquest correu electr?nic s'ha verificat mitjan?ant l'Avast antivirus. http://www.avast.com
Charles Lepple
2015-Feb-10 03:18 UTC
[Nut-upsuser] About your driver NUTDRV_ATCL_USB(8) for install
On Feb 9, 2015, at 2:07 PM, pererivers at yahoo.es wrote:> Dear Chales, > > Thanks for your quick reply. > I have Raspberry with last Kernel [Linux pi1 3.18.6+ #753 PREEMPT Sun Feb 8 > 14:47:22 GMT 2015 armv6l GNU/Linux] > If <upsdrvctl>, <upsd> and <upsmon> are stopped <nutdrv_atcl_usb> Works well > without any error as "Device or resource busy". > If I run <upsc> command never receive any value from my ups <upsc > ups at localhost> then I can't test shutdown ups.I am not sure what you mean. There should be one copy of upsd, one copy of nutdrv_atcl_usb, and if you are using upsmon, two copies of that (one running as root, and an unprivileged one talking to upsd). The "Device or resource busy" error can occur if you have more than one copy of nutdrv_atcl_usb, or if another program besides NUT is trying to control the UPS. upsc requires upsd and the driver (nutdrv_atcl_usb) to be running. If upsd is not running, upsc will get "Connection refused".> When I run <upsd> with debugin level I view change of my UPS VALUES (OL) to > (OB) when I cut its power. > When I run <upsmon> each 5 minuts I received "NOTIFYFLAG NOCOMM" in monitor > and by email but never receive other notify.upsmon also requires upsd and the driver. NOCOMM means no communication between upsmon and the UPS (via upsd). This is expected.> Broadcast Message from root at pi1 > > (somewhere) at 19:58 ... > UPS myups at 192.168.1.7 is unavailable > > > My <Upsmon.conf> is: > > NOTIFYCMD /usr/local/ups/bin/nut-notify <---- script file to send me email. > MINSUPPLIES 1 > SHUTDOWNCMD "/sbin/shutdown -h +0" > NOTIFYFLAG ONLINE SYSLOG+WALL+EXEC > NOTIFYFLAG ONBATT SYSLOG+WALL+EXEC > NOTIFYFLAG LOWBATT SYSLOG+WALL+EXEC > NOTIFYFLAG COMMOK SYSLOG+WALL+EXEC > NOTIFYFLAG COMMBAD SYSLOG+WALL+EXEC > NOTIFYFLAG SHUTDOWN SYSLOG+WALL+EXEC > NOTIFYFLAG REPLBATT SYSLOG+WALL+EXEC > NOTIFYFLAG NOCOMM SYSLOG+WALL+EXEC > NOTIFYFLAG FSD SYSLOG+WALL+EXEC > MONITOR myups at 192.168.1.7 1 monuser root master > ---------------------------------------------------------------------------- > > Upsd.users > [monuser] > password = root > upsmon master > > upsd.conf > LISTEN 192.168.1.7 3493 <--- if i put LISTEN 127.0.0.1 don't work/ and > with localhost don't work. > > > Are nutdrv_atcl_usb driver experimental driver with limitations about send > ONBATT,ONLINE, etc...?Yes, as mentioned in the startup banner: "Warning: This is an experimental driver. Some features may not function correctly." It worked for Ariel, who provided the initial protocol traces: http://news.gmane.org/find-root.php?message_id=52B4C54E.1050106 at ariwainer.com.ar but there is certainly the possibility that other UPSes with that ID string are different. Dan also wrote a driver which talks to "ATCL FOR USB" devices, but with a different protocol: http://thread.gmane.org/gmane.comp.monitoring.nut.user/8808/focus=8839 -- Charles Lepple clepple at gmail