LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-07-2010, 02:33 AM   #1
Laodiceans
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 188

Rep: Reputation: 18
Mustek PowerMust 1060 UPS in Slackware


Hello,

I'm trying to install a Mustek PowerMust 1060 UPS in Slackware without success. It have a USB port to control it but I don't what port it is.
Until now I did this:

Code:
$lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 005: ID 1058:1010 Western Digital Technologies, Inc. 
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 005: ID 0665:5161 Cypress Semiconductor USB to Serial
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 008 Device 002: ID 046d:c061 Logitech, Inc. RX1500 Laser Mouse
Code:
$dmesg | grep usb 
usb 7-1: new low speed USB device using uhci_hcd and address 5
usb 7-1: New USB device found, idVendor=0665, idProduct=5161
usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 7-1: Product: USB to Serial
usb 7-1: Manufacturer: Cypress Semiconductor
generic-usb 0003:0665:5161.0005: hiddev96,hidraw1: USB HID v1.00 Device [Cypress Semiconductor USB to Serial] on usb-0000:00:1d.1-1/input0
I'm trying configure NUT without success because I don't know the port and the driver too.
I already tried the UPS software to linux. It is a .bin file and give me error on install. I think it is because don't support Slackware or it is a 32 bits software.

I need really some help on this.

Thanks guys.
 
Old 12-09-2010, 02:20 PM   #2
granth
Member
 
Registered: Jul 2004
Location: USA
Distribution: Slackware64
Posts: 212

Rep: Reputation: 55
Looks like the UPS uses a USB->Serial chip. The device name will probably be /dev/ttyUSB0.

I don't have much experience configuring NUT, but try the megatec driver. If you need more information, take a look at the NUT website. There seems to be a lot of information there. http://www.networkupstools.org/doc/
 
Old 12-10-2010, 03:27 AM   #3
Laodiceans
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 188

Original Poster
Rep: Reputation: 18
When I try to start nut I have this output:
Code:
sh /etc/rc.d/rc.ups start
Network UPS Tools - UPS driver controller 2.4.3
Network UPS Tools - Megatec protocol driver 1.6 (2.4.3)
Megatec protocol UPS not detected.
Driver failed to start (exit status=1)
My /etc/nut/ups.conf is:
Code:
[Mustek]
        driver = megatec
        port = /dev/ttyS0
And I have created this file /etc/udev/rules.d/99_nut_serialups.rules
Code:
SUBSYSTEMS=="usb", ATTRS{product}=="UPS MUSTEK 1040 USB",    ATTRS{idProduct}=="5161", ATTRS{idVendor}=="0665", SYMLINK+="ups_mustek_$attr{serial}"
KERNEL=="ttyS0", GROUP="nut" OWNER="root"
 
Old 12-10-2010, 05:22 AM   #4
Laodiceans
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 188

Original Poster
Rep: Reputation: 18
I talk to a person that configured a UPS like main in CentOS and he did this:

Create a file in /etc/udev/rules.d with this

Code:
BUS=="usb", SYSFS{idVendor}=="0665", SYSFS{idProduct}=="5161", OWNER="nut", GROUP="nut"

and his /etc/nut/ups.conf is like this

Code:
[mustek]
driver = blazer_usb
port = auto
desc = "Mustek Yukai Power Plus 1060"

I did the same on my /etc/nut/ups.conf but I dont't know I to put that rules on slackware. It is equal or not?

Last edited by Laodiceans; 12-10-2010 at 11:56 AM.
 
Old 12-10-2010, 11:59 AM   #5
Laodiceans
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 188

Original Poster
Rep: Reputation: 18
Now I have this in /etc/udev/rules.d/99-usb-ups.rules

Code:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0665", TTRS{idProduct}=="5161", OWNER="nut", GROUP="nut"
And in /etc/nut/ups.conf
Code:
[mustek]
        driver = blazer_usb
        port = auto
        desc  = "Mustek Yukai Power Plus 1060"
The result is

Code:
$sh /etc/rc.d/rc.ups start
Network UPS Tools - UPS driver controller 2.4.3
Network UPS Tools - Megatec/Q1 protocol USB driver 0.03 (2.4.3)
libusb couldn't open USB device /dev/bus/usb/001/001: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/002/001: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/002/002: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/003/001: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/004/001: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/005/001: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/006/001: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/007/001: Permission denied.
libusb requires write access to USB device nodes.
Supported UPS detected with mustek protocol
Vendor information unavailable
Battery runtime will not be calculated (runtimecal not set)
Network UPS Tools upsd 2.4.3
stat /etc/nut/upsd.conf: No such file or directory
 
Old 12-11-2010, 02:22 AM   #6
Laodiceans
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 188

Original Poster
Rep: Reputation: 18
After reading lots of howtos and README of NUT...etc.. I have this in /etc/udev/rules.d/99-usb-ups.rules

Code:
# This file is generated and installed by the Network UPS Tools package.

ACTION!="add", GOTO="nut-usbups_rules_end"
SUBSYSTEM=="usb_device", GOTO="nut-usbups_rules_real"
SUBSYSTEM=="usb", GOTO="nut-usbups_rules_real"
BUS!="usb", GOTO="nut-usbups_rules_end"

LABEL="nut-usbups_rules_real"

#  Mustek Powermust  - blazer_usb
ATTR{idVendor}=="0665", ATTR{idProduct}=="5161", MODE="664", GROUP="@RUN_AS_GROUP@"

LABEL="nut-usbups_rules_end"
And this on /etc/nut/ups.conf
Code:
[mustek]
        driver = blazer_usb
        port = auto
        desc  = "Mustek Yukai Power Plus 1060"
Finally I get this

Code:
# sh /etc/rc.d/rc.ups start
Network UPS Tools - UPS driver controller 2.4.3
Network UPS Tools - Megatec/Q1 protocol USB driver 0.03 (2.4.3)
libusb couldn't open USB device /dev/bus/usb/001/001: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/002/001: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/002/002: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/003/001: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/004/001: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/005/001: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/006/001: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/007/001: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/007/002: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/008/001: Permission denied.
libusb requires write access to USB device nodes.
libusb couldn't open USB device /dev/bus/usb/008/002: Permission denied.
libusb requires write access to USB device nodes.
No supported devices found. Please check your device availability with 'lsusb'
and make sure you have an up-to-date version of NUT. If this does not help,
try running the driver with at least 'subdriver', 'vendorid' and 'productid'
options specified. Please refer to the man page for details about these options
(man 8 blazer).

Driver failed to start (exit status=1)
Now I don't know what do get this thing working...
 
Old 12-11-2010, 08:59 PM   #7
granth
Member
 
Registered: Jul 2004
Location: USA
Distribution: Slackware64
Posts: 212

Rep: Reputation: 55
Whoa cowboy.

If you have NUT running as root, you shouldn't need any udev rules for the usb device. You just need to make sure that it exists. From your first post, it looks like the USB device is a USB-to-serial. I recommend that you remove any custom udev rules, reboot, connect the UPS, and run "ls -al /dev/ttyUSB*". This will confirm that the UPS device shows up as a usb-to-serial device, and named ttyUSB0 or ttyUSB1.

Once you have confirmed the device is /dev/ttyUSB0, try using this as your ups.conf:

Code:
[Mustek]
        driver = megatec
        port = /dev/ttyUSB0
You can also try the megatec_usb or blazer_usb drivers, but the majority of Mustek devices fall under the megatec driver.

Last edited by granth; 12-11-2010 at 09:00 PM. Reason: typo
 
Old 12-12-2010, 09:21 AM   #8
Laodiceans
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 188

Original Poster
Rep: Reputation: 18
I did that with the blazer_usb driver and it already works. The rules in udev was as stupid idea...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
UPS under SLACKWARE - how to? petarsabev Linux - Software 1 07-17-2007 12:54 PM
BT voyager 1060 under linux marcusshirley Linux - Laptop and Netbook 3 08-10-2006 05:44 PM
UPS Mustek PowerMust USB grayswander Linux - Hardware 1 06-27-2005 05:33 PM
Slackware hang ups little_ball Slackware 9 06-03-2005 11:54 AM
BT 2100 and 1060 SteveT Linux - Wireless Networking 2 02-02-2005 10:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration