[SOLVED] Can not open Putty with USB to serial adapter
-
- Posts: 26
- Joined: 2010/05/03 16:11:08
[SOLVED] Can not open Putty with USB to serial adapter
Im a very basic Linux/ Centos user.
I have Putty installed and a USB to serial adapter.
All settings seem to be right as far as speed, etc, but I'm not sure how to list the device to open for the program.
The default location it gives is "/dev/ttyS0"
Trying to find where the USB is located using the
"/sbin/lsusb" command gives me-
Bus 001 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 004 Device 002: ID 0557:2008 ATEN International Co., Ltd UC-232A Serial Port [pl2303]
Bus 004 Device 001: ID 0000:0000
So I think this means that it is on bus 4 correct?
So how do I list this for putty to open the device.
Thanks for any help I can get.
I have Putty installed and a USB to serial adapter.
All settings seem to be right as far as speed, etc, but I'm not sure how to list the device to open for the program.
The default location it gives is "/dev/ttyS0"
Trying to find where the USB is located using the
"/sbin/lsusb" command gives me-
Bus 001 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 004 Device 002: ID 0557:2008 ATEN International Co., Ltd UC-232A Serial Port [pl2303]
Bus 004 Device 001: ID 0000:0000
So I think this means that it is on bus 4 correct?
So how do I list this for putty to open the device.
Thanks for any help I can get.
Re: Can not open Putty with USB to serial adapter
PuTTY is a SSH/Telnet client program, not a serial communication program. You need minicom instead.
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: Can not open Putty with USB to serial adapter
... and as far as USB serial port devices, my best guess would be /dev/ttyUSB0.
-
- Posts: 44
- Joined: 2009/01/06 02:06:50
Re: Can not open Putty with USB to serial adapter
[quote]PuTTY is a SSH/Telnet client program, not a serial communication program.[/quote]
not true. at least not for a while anyway. from the release notes at [url=http://www.chiark.greenend.org.uk/~sgtatham/putty/changes.html]the putty site[/url]
[quote]These features were new in beta 0.59 (released 2007-01-24):
* PuTTY can now connect to local serial ports as well as making network connections. [/quote]
not true. at least not for a while anyway. from the release notes at [url=http://www.chiark.greenend.org.uk/~sgtatham/putty/changes.html]the putty site[/url]
[quote]These features were new in beta 0.59 (released 2007-01-24):
* PuTTY can now connect to local serial ports as well as making network connections. [/quote]
- AlanBartlett
- Forum Moderator
- Posts: 9345
- Joined: 2007/10/22 11:30:09
- Location: ~/Earth/UK/England/Suffolk
- Contact:
Re: Can not open Putty with USB to serial adapter
It may well help to have some clarification from the OP.
As I understand it, you have a [i]CentOS[/i] system upon which you have installed (a [i]Linux[/i] executable version of) [i]Putty[/i]. You also have an "[i]ATEN International Co., Ltd UC-232A Serial Port [pl2303][/i]" device, which is a USB to serial port adaptor returning the [i]Vendor:Device ID Pairing[/i] of [b]0557:2008[/b]. That adaptor is plugged into a USB port to provide you with one (or more) serial port(s). You wish to use [i]Putty[/i] to make a connection through the adaptor and, thus, from the serial port.
Is the above paragraph a true statement of the facts?
Assuming yes, I now use the "[i]double-grep[/i]" technique (as shown, for example, towards the bottom of [url=http://elrepo.org/tiki/FAQ]FAQ #4[/url] at the [url=http://elrepo.org]ELRepo Project[/url]'s web-site) --
[code]
[ajb@Duo1 ~]$ grep 0557 /lib/modules/*/modules.alias | grep 2008
/lib/modules/2.6.18-194.8.1.el5/modules.alias:alias usb:v0557p2008d*dc*dsc*dp*ic*isc*ip* pl2303
/lib/modules/2.6.18-194.el5/modules.alias:alias usb:v0557p2008d*dc*dsc*dp*ic*isc*ip* pl2303
/lib/modules/2.6.35-0.bcat/modules.alias:alias usb:v0557p2008d*dc*dsc*dp*ic*isc*ip* pl2303
[ajb@Duo1 ~]$
[/code]
From that, it can be seen that the [b]pl2303[/b] kernel module should be loaded to drive the adaptor device.
[code]
[ajb@Duo1 ~]$ /sbin/modinfo /lib/modules/2.6.18-194.8.1.el5/kernel/drivers/usb/serial/pl2303.ko
filename: /lib/modules/2.6.18-194.8.1.el5/kernel/drivers/usb/serial/pl2303.ko
license: GPL
description: Prolific PL2303 USB to serial adaptor driver
srcversion: 5B712A8624000F06490D62C
[i]<snip>[/i]
alias: usb:v0557p2008d*dc*dsc*dp*ic*isc*ip*
[i]<snip>[/i]
depends: usbserial
vermagic: 2.6.18-194.8.1.el5 SMP mod_unload gcc-4.1
parm: debug:Debug enabled or not (bool)
module_sig: 883f3504c2d25c971959a475b93578112de950a0b630dce3288e5e1752e55f9eb581ed4ddddfd4b30a0a9b5a4ee55ad28fec80ed6581d72346d332442e
[/code]
So is the requisite module loaded?
[code]
[b]/sbin/lsmod | grep pl2303[/b]
[/code]
Returns? :-o
If null, then load the module --
[code]
[b]/sbin/modprobe pl2303[/b]
[/code]
-- and then study the [i]Putty[/i] documentation.
As I understand it, you have a [i]CentOS[/i] system upon which you have installed (a [i]Linux[/i] executable version of) [i]Putty[/i]. You also have an "[i]ATEN International Co., Ltd UC-232A Serial Port [pl2303][/i]" device, which is a USB to serial port adaptor returning the [i]Vendor:Device ID Pairing[/i] of [b]0557:2008[/b]. That adaptor is plugged into a USB port to provide you with one (or more) serial port(s). You wish to use [i]Putty[/i] to make a connection through the adaptor and, thus, from the serial port.
Is the above paragraph a true statement of the facts?
Assuming yes, I now use the "[i]double-grep[/i]" technique (as shown, for example, towards the bottom of [url=http://elrepo.org/tiki/FAQ]FAQ #4[/url] at the [url=http://elrepo.org]ELRepo Project[/url]'s web-site) --
[code]
[ajb@Duo1 ~]$ grep 0557 /lib/modules/*/modules.alias | grep 2008
/lib/modules/2.6.18-194.8.1.el5/modules.alias:alias usb:v0557p2008d*dc*dsc*dp*ic*isc*ip* pl2303
/lib/modules/2.6.18-194.el5/modules.alias:alias usb:v0557p2008d*dc*dsc*dp*ic*isc*ip* pl2303
/lib/modules/2.6.35-0.bcat/modules.alias:alias usb:v0557p2008d*dc*dsc*dp*ic*isc*ip* pl2303
[ajb@Duo1 ~]$
[/code]
From that, it can be seen that the [b]pl2303[/b] kernel module should be loaded to drive the adaptor device.
[code]
[ajb@Duo1 ~]$ /sbin/modinfo /lib/modules/2.6.18-194.8.1.el5/kernel/drivers/usb/serial/pl2303.ko
filename: /lib/modules/2.6.18-194.8.1.el5/kernel/drivers/usb/serial/pl2303.ko
license: GPL
description: Prolific PL2303 USB to serial adaptor driver
srcversion: 5B712A8624000F06490D62C
[i]<snip>[/i]
alias: usb:v0557p2008d*dc*dsc*dp*ic*isc*ip*
[i]<snip>[/i]
depends: usbserial
vermagic: 2.6.18-194.8.1.el5 SMP mod_unload gcc-4.1
parm: debug:Debug enabled or not (bool)
module_sig: 883f3504c2d25c971959a475b93578112de950a0b630dce3288e5e1752e55f9eb581ed4ddddfd4b30a0a9b5a4ee55ad28fec80ed6581d72346d332442e
[/code]
So is the requisite module loaded?
[code]
[b]/sbin/lsmod | grep pl2303[/b]
[/code]
Returns? :-o
If null, then load the module --
[code]
[b]/sbin/modprobe pl2303[/b]
[/code]
-- and then study the [i]Putty[/i] documentation.
- WhatsHisName
- Posts: 1549
- Joined: 2005/12/19 20:21:43
- Location: /earth/usa/nj
[SOLVED] Can not open Putty with USB to serial adapter
...and let's not forget about our good friend screen.
[code]# lsusb|grep -i serial
Bus 006 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
# ls /dev/tty*|grep -i usb
/dev/ttyUSB0
# yum install screen
# screen /dev/ttyUSB0[/code]
Screen is what I routinely use for serial consoles.
[code]# lsusb|grep -i serial
Bus 006 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
# ls /dev/tty*|grep -i usb
/dev/ttyUSB0
# yum install screen
# screen /dev/ttyUSB0[/code]
Screen is what I routinely use for serial consoles.
-
- Posts: 26
- Joined: 2010/05/03 16:11:08
Re: Can not open Putty with USB to serial adapter
[quote]
pschaff wrote:
... and as far as USB serial port devices, my best guess would be /dev/ttyUSB0.[/quote]
This was it, but only works when I am logged in as root.
I'll study the putty and CentOS docs, but does anyone know a reason that this would only work from root.
Thx for all your replies, Alan and Whatshisname.
the drivers were installed, but it was cool to see how to run a check for that
and the info on screen etc...
pschaff wrote:
... and as far as USB serial port devices, my best guess would be /dev/ttyUSB0.[/quote]
This was it, but only works when I am logged in as root.
I'll study the putty and CentOS docs, but does anyone know a reason that this would only work from root.
Thx for all your replies, Alan and Whatshisname.
the drivers were installed, but it was cool to see how to run a check for that
and the info on screen etc...
- AlanBartlett
- Forum Moderator
- Posts: 9345
- Joined: 2007/10/22 11:30:09
- Location: ~/Earth/UK/England/Suffolk
- Contact:
Re: Can not open Putty with USB to serial adapter
[quote]
. . . does anyone know a reason that this would only work from root.
[/quote]
Device permissions. ;-)
Please check --
[code]
[b]ll /dev/ttyUSB0[/b]
[/code]
If it shows a mode anything other that [i]crw-rw-rw-[/i], just execute (with [i]root[/i]'s powers) --
[code]
[b]chmod a+rw /dev/ttyUSB0[/b]
[/code]
You will then be able to access the serial port as an ordinary user.
. . . does anyone know a reason that this would only work from root.
[/quote]
Device permissions. ;-)
Please check --
[code]
[b]ll /dev/ttyUSB0[/b]
[/code]
If it shows a mode anything other that [i]crw-rw-rw-[/i], just execute (with [i]root[/i]'s powers) --
[code]
[b]chmod a+rw /dev/ttyUSB0[/b]
[/code]
You will then be able to access the serial port as an ordinary user.
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
Re: Can not open Putty with USB to serial adapter
... however, if you want to avoid doing that on every reboot, either make/modify a udev rule to set ownership appropriately or make the user[s] a member of the group owning the device, perhaps uucp. [code]
# grep ttyUSB /etc/udev/rules.d/*
/etc/udev/rules.d/50-udev.rules:KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660"
/etc/udev/rules.d/50-udev.rules:KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660"
/etc/udev/rules.d/50-udev.rules:KERNEL=="ttyUSB*", SYSFS{product}=="Handspring Visor*", SYMLINK+="pilot", GROUP="uucp", MODE="0660"
[/code]
# grep ttyUSB /etc/udev/rules.d/*
/etc/udev/rules.d/50-udev.rules:KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660"
/etc/udev/rules.d/50-udev.rules:KERNEL=="ttyUSB*", SYSFS{product}=="palmOne Handheld*", SYMLINK+="pilot", GROUP="uucp", MODE="0660"
/etc/udev/rules.d/50-udev.rules:KERNEL=="ttyUSB*", SYSFS{product}=="Handspring Visor*", SYMLINK+="pilot", GROUP="uucp", MODE="0660"
[/code]
- AlanBartlett
- Forum Moderator
- Posts: 9345
- Joined: 2007/10/22 11:30:09
- Location: ~/Earth/UK/England/Suffolk
- Contact:
Re: Can not open Putty with USB to serial adapter
. . . or, even simpler, use the "[i]cheap & cheerful[/i]" method and just append the [i]chmod[/i] line to your [b]/etc/rc.d/rc.local[/b] file --
[code]
[b]echo "chmod a+rw /dev/ttyUSB0" >> /etc/rc.d/rc.local[/b]
[/code]
(There are many ways to skin a donkey . . . ;-) )
[code]
[b]echo "chmod a+rw /dev/ttyUSB0" >> /etc/rc.d/rc.local[/b]
[/code]
(There are many ways to skin a donkey . . . ;-) )