LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 06-25-2009, 05:23 PM   #1
coondog52
LQ Newbie
 
Registered: Jun 2009
Posts: 6

Rep: Reputation: 0
How to determine USB port tty value


I am setting up an UPS System on a server running redhat.
I want to connect it through the serial port. I need to determine which tty* value corresponds do which usb port on the machine.

Thanks in advance
 
Old 06-26-2009, 12:59 PM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,034

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Quote:
I want to connect it through the serial port. I need to determine which tty* value corresponds do which usb port on the machine.
Serial ports are quite different from USB ports: Different connector, different protocols.

I think we need more information.

Welcome to LQ!
 
Old 06-26-2009, 03:34 PM   #3
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,568
Blog Entries: 13

Rep: Reputation: 181Reputation: 181
Something like lsusb and or lspci might help shed some light.
 
Old 06-26-2009, 10:17 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,063

Rep: Reputation: 761Reputation: 761Reputation: 761Reputation: 761Reputation: 761Reputation: 761Reputation: 761
Indeed please post the make/model of your UPS.
 
Old 06-29-2009, 12:09 PM   #5
coondog52
LQ Newbie
 
Registered: Jun 2009
Posts: 6

Original Poster
Rep: Reputation: 0
The UPS system I am using is an APC Smart UPS 1000.
I want to be able to connect it via USB to my server. When I set up the Same UPS system on a Windows machine. The software searches for the UPS connection on all of the ports and detects it if it is on a USB port. In linux, it does not have to detection service so you have to enter in which port you want to use. The software says serial port but I'm hoping to use USB the same as on the Windows machine. I was going to try trail and error to see if it would work but I need to know how to determine which port I am using (for USB).
 
Old 06-29-2009, 12:25 PM   #6
coondog52
LQ Newbie
 
Registered: Jun 2009
Posts: 6

Original Poster
Rep: Reputation: 0
I tried lsusb and got this output
Unknown line at line 5959
Unknown line at line 5960
Unknown line at line 5961
Unknown line at line 5962
Unknown line at line 5963
Unknown line at line 5964
Unknown line at line 5965
Unknown line at line 5966
Unknown line at line 5967
Unknown line at line 5968
Unknown line at line 5969
Unknown line at line 5970
Bus 002 Device 006: ID 0b38:0003
Bus 002 Device 005: ID 051d:0002 American Power Conversion Back-UPS Pro 500/1000/1500
So I can see the UPS system.
when I am configureing the system. I get this prompt
Select the serial port
[1]: /dev/ttyS0
[2]: /dev/ttyS1
[3]: Other
This is where I get stuck.
 
Old 06-29-2009, 12:56 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,063

Rep: Reputation: 761Reputation: 761Reputation: 761Reputation: 761Reputation: 761Reputation: 761Reputation: 761
What are you using to configure the system? APCs software? Select option 3 since you are using USB. As stated USB ports are not assigned a device id and UPS will be recognized as a USB HID.
 
Old 06-29-2009, 03:14 PM   #8
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,568
Blog Entries: 13

Rep: Reputation: 181Reputation: 181
If you're using APC's software and you want to try something else you might look at
genpowerd, which supports apc-ups or perhaps http://www.apcupsd.org/
 
Old 06-29-2009, 03:41 PM   #9
coondog52
LQ Newbie
 
Registered: Jun 2009
Posts: 6

Original Poster
Rep: Reputation: 0
I am using APC's PowerChute Business Edition 8.0.1 for linux
I am using the configure.sh file when I get this option
Select the serial port
[1]: /dev/ttyS0
[2]: /dev/ttyS1
[3]: Other
> 3

Please type in the serial port
*Case-sensitive (ex: /dev/ttyS0)
I then must manually enter in the serial port.
 
Old 06-29-2009, 04:19 PM   #10
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,568
Blog Entries: 13

Rep: Reputation: 181Reputation: 181
If you want to try to use Powerchute, I suppose you could try ttyUSB0 or ttyUSB1, assuming either device exists and is linked to your APC. Can't hurt, I suppose.
 
Old 06-29-2009, 04:47 PM   #11
coondog52
LQ Newbie
 
Registered: Jun 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mostlyharmless View Post
If you're using APC's software and you want to try something else you might look at
genpowerd, which supports apc-ups or perhaps http://www.apcupsd.org/
Does apcupsd have a web interface? The PowerChute software has a web interface that is nice to use. Just from looking at the acupsd, looks more confusing. I tried putting in ttyUSB0, ttyUSB1, no luck.

It helps to read through the documentation. apcupsd does have a interface (CGI).

Last edited by coondog52; 06-29-2009 at 05:06 PM.
 
Old 06-29-2009, 05:00 PM   #12
mostlyharmless
Senior Member
 
Registered: Jan 2008
Distribution: Slackware -current (multilib) with kernel 3.16.2
Posts: 1,568
Blog Entries: 13

Rep: Reputation: 181Reputation: 181
Web interface? Well, there are some cgi programs with it; but you are right, it IS a little more do it yourself.

http://www.apcupsd.org/manual/manual...g-cgi-programs

You might try some of the instructions at http://www.apcupsd.org/manual/manual...-configuration in the apc-ups manual to interrogate your USB setup.

[Edit] I see from threads back in 2006 that Powerchute for Linux only does serial ports, not USB. I don't see any evidence that that has changed. So unless I'm wrong, you need to use a serial connection with a serial port and cable or you need to use something other than Powerchute.

Last edited by mostlyharmless; 06-29-2009 at 05:08 PM. Reason: added info
 
Old 06-29-2009, 05:13 PM   #13
coondog52
LQ Newbie
 
Registered: Jun 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks mostlyHarmless. That seems to be true with the linux version not supporting USB. I'll keep playing with apcupsd. Thanks for your help
 
Old 06-29-2009, 05:41 PM   #14
micxz
Senior Member
 
Registered: Oct 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
Try to watch demesg when you plug it in and you will see the dev name. But I have not been able to get mine to work without using a serial connection as mentioned. But I have not tried lately, things may have changed.
 
Old 06-29-2009, 06:18 PM   #15
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,063

Rep: Reputation: 761Reputation: 761Reputation: 761Reputation: 761Reputation: 761Reputation: 761Reputation: 761
I have always used apcupsd and never tried the powerchute software. The linux version might only use serial ports.

The apcupsd website instructions are decent. You must include USB when you compile the source and configure the setup file for USB cable type.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Porting Linux, the Serial Port, and TTY Interloper Linux - Software 2 06-25-2009 04:53 AM
installing Sierra 881 USB wireless, cannot find /usb/tty/USB0 becausei'mstubborn Linux - Hardware 7 01-04-2009 01:49 PM
TTy driver how to use underlying serial port vicky_driver Linux - Hardware 0 12-26-2008 06:48 AM
How do you determine usb port speed? Chronothread Linux - Hardware 1 09-03-2008 10:17 PM
determine which port telnet is using cj4331 Linux - Newbie 3 09-03-2008 02:20 PM


All times are GMT -5. The time now is 05:18 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration