Hello to everybody and in particular to the Antix guys. I think this linux distro is amongst the best distro I've ever used and been using. And indeed apart from my poor, old Pentium 166 MHz running Tiny Core, in all the other Antix is a must-be-there.
Anyway, my knowledge of Linux is limited even if I strive to learn as much as possible.
I have two questions here which are intertwined.
1) I resumed an UPS, changed its dead battery with a new one. I read in the accompanying CD that it is possible to interact with the UPS and retrieve useful pieces of information from it. So, I started searching for some documentation about UPS management.
I downloaded apcupsd and gapcmon (though I haven't compiled it yet) but I was not able to establish any communication with the unit
What I found is that the UPS unit, connected to the PC by means of a standard USB cable, is recognized (I found it in the list of USB devices) but it doesn't use any driver. Indeed, in the driver section it is written:"none" while the others feature"hub_controller","usb_storage","usb_keyboard" and the like.
Browsing the net I found:
a) that the usb_linux file system is not mounted;
b) that there should be a"hid" or better a"usbhid" module loaded in the kernel.
So, I found something explaining the usb_linux file system and I am started studying it.
However, before spending time in something coming out to be useless (which would actually result in a waste of time), I would like to know the opinion of the other antix people.
2) the second question is related again to the USB management. If I run the Hardinfo (main menu Antix -> applications -> System Tools -> System Profiler and Benchmark) in the USB section, there is no USB devices listed. But in the"Storage" section, the USB external hard-disks are all there; in the"Input devices", the mouse, the keyboard and the web-cam are present. (There is something more missing as the fact that Conky correctly shows the battery status while Hardinfo states that there is no battery in my laptop ...).
So, I wonder if the fact that no USB devices is listed in Hardinfo is a consequence of the fact that the UPS is not detected.
Thank to whoever will provide useful clues.
topic title: UPS failed detection and a USB-related issue
7 posts
• Page 1 of 1
-
Posts: 9
- Joined: 03 Sep 2012
-
Posts: 850
- Joined: 26 Jul 2012
The H(uman)I(nterface)D(river) is up & running, to find out what the system names your usb UPS, detach it, then reattach it & run that should show the device name, then try to list it if that doesn't show anything try mounting it first
Hope that helps.
Code: Select all
dmesg | tail
Code: Select all
ls /dev/<device>
Code: Select all
sudo mount /dev/<device>
-
Posts: 9
- Joined: 03 Sep 2012
#3
Hello and thank for your quick reply. Unfortunately I did not have any chance to try what you wrote in the week-end. Anyway, this morning I did it.
Also, I beg your pardon if there is written slash at any occurrence of the corresponding sign ...
First, I want to show what is normally detected, i.e. without unplugging and plugging the USB cable of the UPS.
As you can see in the last line there is no driver loaded: Driver=(none)
while, for instance, in case of a small USB stick which is completely operational, the output is:
Then, I unplug and plug (changing the USB port in the process ...) and dmsg |tail resulted in:
For the sake of completeness, this UPS sports also 3 USB ports. They are all correctly recognized and working: if I connect a USB stick, I can access the data written inside it. However, no USB stick was plugged during this test.
Since the output of dmsg |tail shows 2 USB devices (number 12 and number 13), is it correct to assume that both the USB hub and the UPS were detected?
I also typed ls slash dev without specifying the device as I did not understand the relation between dmsg's output and ls slash dev. Indeed, it seems that the UPS is located in
slash dev slash bus slash usb slash 004 slash 013 because I found that T: Bus=04 Lev=02 Prnt=12 Port=02 Cnt=01 Dev#= 13 Spd=1.5 MxCh= 0
I typed:
but the output was:
Therefore, I wonder if:
a) it is necessary to mount that linux_usb file so that typing:
results in something useful (at present in the /proc slash bus folder there are only two sub-folders:"input" and"pci") instead of:"/proc /bus /usb /drivers: No such file or directory".
b) there is something wrong with the UPS. Anyway, I have some doubts because as I wrote earlier, Hardinfo doesn't show any USB devices connected to my PC even if there a keyboard, a mouse, a webcam, an external HD, ... all perfectly running.
Thank you in advance.
##########################################################################################
Threads and posts cleaned up by Rok. One only needs to worry about / etc in this forum layout when getting the forum forbidden message.
/proc, /usb,/dev,/mtab, / anything other than / etc does not stop you from posting. So no need for the"slash" wording though it is nice
you took the effort. When in doubt. Just use the space bar between / and etc to give you"/ etc" and we will know what the deal is.
Happy Trails, Rok
Also, I beg your pardon if there is written slash at any occurrence of the corresponding sign ...
First, I want to show what is normally detected, i.e. without unplugging and plugging the USB cable of the UPS.
Code: Select all
T: Bus=05 Lev=02 Prnt=02 Port=02 Cnt=02 Dev#= 4 Spd=1.5 MxCh= 0
D: Ver= 1.00 Cls=ff(vend.) Sub=ff Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=075d ProdID=0001 Rev=02.00
S: Manufacturer=Microdowell
S: Product=MicroDowell BBox Interactive UPS
C: #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=00 Driver=(none)
while, for instance, in case of a small USB stick which is completely operational, the output is:
Code: Select all
T: Bus=05 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#= 3 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=08ec ProdID=0008 Rev=01.00
S: Manufacturer=Kingston
S: Product=DataTraveler 2.0
S: SerialNumber=0C21285162E329F6
C: #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=200mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
Code: Select all
[ 1495.964026] usb 4-1: new full-speed USB device number 12 using uhci_hcd
[ 1496.114655] usb 4-1: New USB device found, idVendor=0451, idProduct=1446
[ 1496.114663] usb 4-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 1496.117786] hub 4-1:1.0: USB hub found
[ 1496.119687] hub 4-1:1.0: 4 ports detected
[ 1496.401605] usb 4-1.3: new low-speed USB device number 13 using uhci_hcd
[ 1496.544582] usb 4-1.3: New USB device found, idVendor=075d, idProduct=0001
[ 1496.544590] usb 4-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1496.544595] usb 4-1.3: Product: MicroDowell BBox Interactive UPS
[ 1496.544599] usb 4-1.3: Manufacturer: Microdowell
Since the output of dmsg |tail shows 2 USB devices (number 12 and number 13), is it correct to assume that both the USB hub and the UPS were detected?
I also typed ls slash dev without specifying the device as I did not understand the relation between dmsg's output and ls slash dev. Indeed, it seems that the UPS is located in
slash dev slash bus slash usb slash 004 slash 013 because I found that T: Bus=04 Lev=02 Prnt=12 Port=02 Cnt=01 Dev#= 13 Spd=1.5 MxCh= 0
I typed:
Code: Select all
sudo mount slash dev slash bus slash usb slash 004 slash 013
Code: Select all
mount: can't find slash dev slash bus slash usb slash 004 slash 013 in slash etc slash fstab or slash etc slash mtab
a) it is necessary to mount that linux_usb file so that typing:
Code: Select all
more /proc /bus /usb /devices
b) there is something wrong with the UPS. Anyway, I have some doubts because as I wrote earlier, Hardinfo doesn't show any USB devices connected to my PC even if there a keyboard, a mouse, a webcam, an external HD, ... all perfectly running.
Thank you in advance.
##########################################################################################
Threads and posts cleaned up by Rok. One only needs to worry about / etc in this forum layout when getting the forum forbidden message.
/proc, /usb,/dev,/mtab, / anything other than / etc does not stop you from posting. So no need for the"slash" wording though it is nice
you took the effort. When in doubt. Just use the space bar between / and etc to give you"/ etc" and we will know what the deal is.
Happy Trails, Rok
-
Posts: 9
- Joined: 03 Sep 2012
#4
I want to thank you Rok very much for cleaning my threads.
I am ashamed I haven't read the rules governing the forum layout yet.
I hope to bridge the gap as soon as possible.
I am ashamed I haven't read the rules governing the forum layout yet.
I hope to bridge the gap as soon as possible.
-
Posts: 850
- Joined: 26 Jul 2012
#5
Only other thing I can think of is to check /dev before & after connecting it.
-
Posts: 9
- Joined: 03 Sep 2012
#6
Then I wonder:
a) which command should I type to know which USB drivers are actually running?
b) there is a way to force a device to use a given driver? That is, if my UPS keeps on showing 'driver=none', can I type something so to force it to use the usbhid driver, for instance?
Thank you.
a) which command should I type to know which USB drivers are actually running?
b) there is a way to force a device to use a given driver? That is, if my UPS keeps on showing 'driver=none', can I type something so to force it to use the usbhid driver, for instance?
Thank you.
-
Posts: 9
- Joined: 03 Sep 2012
#7
It seems that when a USB device is connected to the system, the kernel reacts to it by searching the proper driver to be associated with it. The search should more or less be performed in the following way:
Does the device meet the requirements for the storage media?
Yes? Then let's assign to it the usb_storage driver.
No? Does it meet the requirements for the keyboard, then?
Yes? Then let's assign to it the usb_keyboard.
No? Does it meet the requirements for the hub, then?
...
If the search ends and no driver is assigned to the device, then no driver is selected and the"driver=none" appears after typing the usb-devices command.
At this point, I wonder if there is actually a way to force the kernel to assign a given driver to a given device. Apparently, there is not.
Moreover, I think that the UPS had always had some faults/bug/... Even when the UPS was working connected to a Windows XP PC, there was no way to have it communicate whether with the driver provided with the installation CD or with updated version downloaded from the manufacturer site.
Maybe when I will have studied enough to write my own Linux driver code, I will try again ...
Does the device meet the requirements for the storage media?
Yes? Then let's assign to it the usb_storage driver.
No? Does it meet the requirements for the keyboard, then?
Yes? Then let's assign to it the usb_keyboard.
No? Does it meet the requirements for the hub, then?
...
If the search ends and no driver is assigned to the device, then no driver is selected and the"driver=none" appears after typing the usb-devices command.
At this point, I wonder if there is actually a way to force the kernel to assign a given driver to a given device. Apparently, there is not.
Moreover, I think that the UPS had always had some faults/bug/... Even when the UPS was working connected to a Windows XP PC, there was no way to have it communicate whether with the driver provided with the installation CD or with updated version downloaded from the manufacturer site.
Maybe when I will have studied enough to write my own Linux driver code, I will try again ...