Trying to get serial port working

I am trying to test or get a serial port working so that I can interface with some hardware that I use.
To test, I have hooked up an old serial port mouse, but get no reaction. Serial port is enabled in bios. Is there some software that needs to be installed?

First step would be to see if your serial port is recognised:

dmesg | grep ttyS*

When it’s there, check permissions of the device.

Hi voodoo
I get this:

 0.000000] console [tty0] enabled
0.791540] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
0.843609] 00:0c: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
0.869325] 0000:03:02.0: ttyS4 at I/O 0xdc00 (irq = 23) is a 16550A
0.895213] 0000:03:02.0: ttyS5 at I/O 0xd880 (irq = 23) is a 16550A

So it looks like it is working. How do I check permissions for device?

On 2011-09-22 10:16, Alastairo wrote:
>
> I am trying to test or get a serial port working so that I can interface
> with some hardware that I use.
> To test, I have hooked up an old serial port mouse, but get no
> reaction. Serial port is enabled in bios. Is there some software that
> needs to be installed?

What reaction you expect from the mouse? How are you testing that?


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I expect the mouse to move the cursor - or am I expecting too much?

On 09/22/2011 10:16 AM, Alastairo wrote:
>
> Serial port is enabled in bios. Is there some software that
> needs to be installed?

first: don’t attach or detach to the serial port unless the machine is
shut down (only thing ‘safe’ to do that with are the usb ports,
mic/headphones, ethernet and ??)

try: open YaST, go Hardware (on left) > Mouse or Text Console and up
will pop a new windowpane with “Choose your mouse type from list”

click the “Help” button to get some hints and then pick a serial mouse

caution: i have no idea if that will cause the working (ps2 or usb)
mouse to stop working…nor do i know what you will have to do if then
neither mouse works…well, you could Crtl+Alt+Fn, log in as root and do
a “shutdown -h now” then reconnect the normal mouse…


DD
Caveat
openSUSE®, the “German Automobiles” of operating systems

No, getting the mouse to control the cursor is too complicated a test. You’re bringing in variables like cursor config in X or the console (name slips my mind right now), mouse protocol (yes, there is more than one), etc. Just see if you can receive bytes from the port. Install a serial port program like minicom, open the port, set the speed (check, could be 9600, or as low as 1200 for mice), then watch the screen as you move the mouse. You should get garbage characters.

If minicom is not able to open the port, check things like permissions on port, and that handshake lines are enabled. For simple serial devices not able to provide a handshake you may need to loop back the handshake lines. Do a search for the pins to loop back. A port breakout device is handy if you have one. That sort of thing was very useful back in the days of glass TTYs.

On 2011-09-22 11:12, DenverD wrote:

> first: don’t attach or detach to the serial port unless the machine is shut
> down (only thing ‘safe’ to do that with are the usb ports, mic/headphones,
> ethernet and ??)

No, the serial port is also safe by design. The PS/2 mouse port was not.

The design can be defeated if the ground is false. On a site I worked the
ground was false and was really floating at half the AC voltage, ie, 110
volts. I plugged a printer and I saw a little spark… new board with no
printer port. Had to buy a card.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 09/22/2011 11:33 AM, Carlos E. R. wrote:
> Had to buy a card.
>
heh! so, it is ok to plug/unplug serial devices, MAYBE!

actually, i knew that sometimes you get lucky with most any of the
ports…but, still i (personally) will never connect/disconnect
anything but usb, mic/earphones, ethernet and (maybe) firewire (never
had one)…

and, neither will i suggest another do so…

ymmv


DD
openSUSE®, the “German Automobiles” of operating systems

On 2011-09-22 11:16, Alastairo wrote:
>
> I expect the mouse to move the cursor - or am I expecting too much?

Yes! It will not move the cursor unless you use some software to do so :slight_smile:

I suggest you employ minicom, and see if it shows something.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)