Antique, 9 pin, serial trackball - thru' Plugable USB to RS-232 DB9 Serial Adapter

"I have an old trackball, purchased in the late '80s/early '90s when I upgraded to a a 486. It (the trackball) was quite expensive at the time (about £18.00 - or maybe even £30.00 - if I remember aright). It was unbranded and ran on a fairly basic DOS driver BUT it was the BEST, easiest & most reliable pointing device I ever used - and I used it for about 12 years or more (DOS, Desqview, OS/2 & Linux) until serial became old hat.

Now I use a laptop running Linux. I have read good reviews about the Plugable USB to RS-232 DB9 Serial Adapter (Prolific PL2303HX Chipset). I have bought one, plugged it into my Linux (i5) Laptop and attached the old Trackball. The system recognizes it - the Bus 002 Device 006: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port - BUT it doesn’t recognize any signal from the Trackball.

Now, I realise that, by today’s standards my old trackball is ‘spadelike’ in its simplicity - it may be broken, but like a spade, there’s not much to break.

I am out of my depth. I would dearly love my old Trackball back. Does anyone have any ideas?"

NOW

I posted this on LinuxQuestions.org and got the following reply:

My guess is the adapter and the mouse are both working fine, the problem is your OS doesn’t know that what you just attached there is a mouse. The device is probably popping up at /dev/ttyUSB0 (typical for USB/serial adapters), which means you just need to tell your OS to use that device as the mouse. I’m not sure how to do that, but I imagine it should be easy enough to figure out. When you get it working, you may consider putting in a udev rule for it to make sure that hot-plug name changes don’t mess you up.

This may help:
SerialMouseHowto - Community Help Wiki

What distro are you using? [HR][/HR] * Last edited by suicidaleggroll; Yesterday at 23:36. *

and THAT was useful BUT - it refers to Ubuntu (not SuSE).

Type the following exactly:

  1. sudo nano -B /etc/X11/xorg.conf
  2. If you have one, you will be asked for your user password.
  3. The editor will open, displaying the xorg.conf file.
  4. Navigate (using the arrow and/or Page Up/Down keys) to the following section: (all lines may not be present)

Section “InputDevice”
Identifier “Configured Mouse”
Driver “mouse”
Option “CorePointer”
Option “Device” “/dev/input/mice”
Option “Protocol” “ExplorerPS/2”
Option “ZAxisMapping” “4 5”
Option “Emulate3Buttons” “true”
EndSection

  1. Change the “Option Device” and “Option Protocol” lines as follows:

Section “InputDevice”
Identifier “Configured Mouse”
Driver “mouse”
Option “CorePointer”
Option “Device” “/dev/ttyS0”
Option “Protocol” “auto”
Option “ZAxisMapping” “4 5”
EndSection

SuSE has no /etc/X11/xorg.conf but it DOES have /etc/X11/xorg.conf.d which is populated by:

05-glamor.conf 11-evdev.conf 50-screen.conf 50-wacom.conf
10-evdev.conf 50-device.conf 50-synaptics.conf 90-keytable.conf
10-libvnc.conf 50-monitor.conf 50-vmmouse.conf

I would guess that I have to edit (or create) a file like this. What I desperately need to do is get rid of all this flighty trackpad nonsense and get back to the old “Shire Horse” of my trackball.

All insights/help/advice gratefully received

dmk

You can still create and use the legacy xorg.conf file if you so wish. Otherwise you just create a .conf file in /etc/X11/xorg.conf.d/, and add the required configuration there.

Refer to

man xorg.conf.d

for more info.

BTW, I have a pl2303 device (usb-serial adaptor), and use it to access serial consoles with various network equipment from time to time. (I use minicom for this, and it is necessary to set the baud rate and related communication parameters first.) You will likely need to to the same before being able to get any useful data from the mouse.

On 2014-07-24 23:56, thebigming wrote:

> I posted this on LinuxQuestions.org and got the following reply:
>
>> My guess is the adapter and the mouse are both working fine, the
>> problem is your OS doesn’t know that what you just attached there is a
>> mouse. The device is probably popping up at /dev/ttyUSB0 (typical for
>> USB/serial adapters), which means you just need to tell your OS to use
>> that device as the mouse.

Try creating symlink /dev/mouse to /dev/ttyUSB0, prior to starting the
graphical sesion; I think it could then be picked up automatically.

However, /dev is volatile, so if the trick works you need some way to
create the link again on every boot.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Thanks to you both for your help here’s an update on my progress so far:

To begin with, it is probably worth saying that the Quick Introduction Guide to this product says that

 Quote:
 |                              "Linux opensource drivers are included in Linux kernels 2.6.11 &  later.  They support the Prolific 2303 & recognize the Plugable  adapter"                      |

|—|

First, I had been asked by Plugable for the manufacturer of my trackball (mouse). It is wholly unbranded but, by the magic of never throwing anything away, I was able to find the original manual which tells me that the Model. No: is 3000 & that it can be run in either 2 button “Microsoft” or 3 button “PC Mouse” mode.

  1. went into YaST, searched on ‘mouse’ & found I had:

    Quote:
    | xf86-input-mouse Mouse input driver for the Xorg X server | |
    |—|—|

installed which is described thus:

 Quote:
 |                              mouse is an Xorg input driver for mice. The driver supports most  available mouse types and interfaces, though the level of support for  types of mice depends on the OS.                      |

|—|

  1. Hunting for something on my system the only xf86-input-mouse files I could find were in /usr/share/doc/packages/ and the only useful one was xf86-input-mouse/README and this has a whole section (Ln 403 to the end) covering the Serial mouse. Both the Microsoft & the PC Mouse are supported:

    Quote:
    | 3. 3-button serial mice may work with the “Mousesystems”
    |
    protocol. If it doesn’t, it may work instead with the
    “Microsoft” protocol although the third (middle) button won’t
    function. 3-button serial mice may also work with the
    “Mouseman” protocol under which the third button may function
    as expected.

  1. 3-button serial mice may have a small switch at the bottom of
    the mouse to choose between MS'' and PC’’, or 2'' and 3’’. MS'' or 2’’ usually mean the “Microsoft”
    protocol. PC'' or 3’’ will choose the “MouseSystems”
    protocol. |
  1. A Global Moderator from SuSE (Deano_ferrari) suggested that I could create a .conf file in /etc/X11/xorg.conf.d/, and add the required configuration there. He pointed me to man xorg.conf.d.

Finally, I ran ls /dev > dev-out.txt with the extension not plugged in & ls /dev > dev-in.txt with it plugged in. I then ran:

 Quote:
 |                              Bash - 4.2.45   : diff dev-out.txt dev-in.txt

|
> serial/
> ttyUSB0at |

and here is the file ‘TrackBall.conf’ up with which I came:

 Quote:
 |                              Section "InputDevice"

|
Identifier “TrackBall”
Driver “Microsoft”
Option “Floating” “true”
Option “Device” “/dev/ttyUSB0”
#Bus 002 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
Option “Protocol” “auto”
Option “ZAxisMapping” “4 5”
EndSection
|

However, this doesnt work.

I may be wrong but there are 3 .conf files which I suspect are causing the problem:

/etc/X11/xorg.conf.d/10-evdev.conf
Quote:
| 7 Section “InputClass”
|
8 Identifier “evdev pointer catchall”
9 MatchIsPointer “on”
10 MatchDevicePath “/dev/input/event*”
11 Driver “evdev”
12 EndSection

21 Section “InputClass”
22 Identifier “evdev touchpad catchall”
23 MatchIsTouchpad “on”
24 MatchDevicePath “/dev/input/event*”
25 Driver “evdev”
26 EndSection |

and (particularly):

/etc/X11/xorg.conf.d/11-evdev.conf
Quote:
| Section “InputClass”
|
# Novell Bugs #597214, #780626, #843333
Identifier “IBM TPPS/2 TrackPoint|ThinkPad USB Keyboard with
TrackPoint”
MatchProduct “TPPS/2 IBM TrackPoint”
MatchIsPointer “on”
Driver “evdev”
Option “EmulateWheel” “on”
Option “EmulateWheelButton” “2”
EndSection |

but also:

/etc/X11/xorg.conf.d/50-synaptics.conf

I’m sure the answer is (relatively) simple but I’m completely stuck. Am I nowhere but somewhere - or, in the words of Jeff Beck - “Everywhere but nowhere”? (although I would never have worn a hippy hat; I always prided myself on being the last of the Beat Generation) ________________

I think you’re getting ahead of yourself. First things first. In order for the serial mouse to communicate, it may be necessary to set the serial parameters first.

You can get the current parameters from the serial adapter via

stty -a < /dev/ttyUSB0

Then set to the desired eg to set 9600,N,8,1 one would use

stty -F /dev/ttyUSB0 9600 cs8 -parenb -cstopb

For more info

man stty

Once you have the communication parameters correctly set, then you could check the data using minicom (or similar)

BTW, while searching for legacy information concerning serial mouse devices, I stumbled across this old Serial-mouse-via-inputattach thread.

I’m not sure what protocol your trackball uses - you may have to experiment first.

/usr/sbin/inputattach --help

You could try testing with something like

/usr/sbin/inputattach --microsoft /dev/ttyUSB0

Good luck.

@ deano_ferrari

Is the “serial parameter” the same as the “cursor speed”?

I see from the manual that the the default cursor speed is set @ 200 DPI. The highest speed is 1200 (the lowest 50) and there are 2 speeds (50–400, 100–1200) which I don’t fully understand. (these were originally set by the program **setup.com **which was part of the original 3.5" disk)

Here’s the output you requested:

Bash - 4.2.45 : stty -a < /dev/ttyUSB0
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc -ixany -imaxbel -iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt,
echoctl echoke

Baud - good heavens! I had a 9600 baud modem back in the late 80’s & people were pretty sneery about it even then. I haven’t even heard the word for years.

But, I think, I am slowly beginning to understand & am, slowly, moving in the right direction.

Thanks, as ever, for the help

dmk

No, I’m talking about serial communication parameters (primarily the baud rate, parity, stops bits).

Once you have the USB-serial adapter properly configured, it should be possible to use the ‘inputattach’ command (as shown last post) to get the device working. If you can get the mouse working this way , we can then move on to getting it configured permanently. Serial devices are not in common use, so the OS is not generally equipped to deal with them at boot any longer, and many of us have long forgotten about the steps required… :slight_smile:

Baud - good heavens! I had a 9600 baud modem back in the late 80’s & people were pretty sneery about it even then. I haven’t even heard the word for years.

But, I think, I am slowly beginning to understand & am, slowly, moving in the right direction.

Thanks, as ever, for the help

dmk

Yes, well it will be essential to get the baud rate correct in order to be able get usable data from the device. Mouse/trackball hardware devices only generate small data streams, so typically the baud rate is not high. (1200 baud was a typical speed AFAIR). My only recent experience with using serial interfaces, is for accessing serial consoles built in to many network appliances, and even then it is last resort for me.

Got your note on Linux Questions. Thanks, but don’t worry, every morning I wake up & open both threads. They stay up throughout the day. I fumble around with this problem intermittently and refer to both of them as I try to fathom out what the H*ll I’m doing.

I think you’re getting ahead of yourself.

If only you knew. I have been trying to think of an analogy for my situation. There is, on the Island of Lanzarotte, a huge cave complex. Tour guides take you down into it and, at the depths, they kill all illumination. It is totally black & totally silent - but no, this is worse. I then remembered Col. William Rankin.

In 1959 he was flying his fighter @ 48,000ft (about 10 miles up) over a huge cummulonimbus storm cloud when (@ Mach 0.9) the plane suffered a catastrophic failure & simply stopped working. The Col bailed out and, after a couple, of minutes fell into the cloud. A parachute descent from that hieght should take about 10 minutes. The Col. took 40 minutes during which time he didn’t know whether he was falling or rising. Apart from the lightening it was pitch black, he was pelted by hailstones & he ‘felt’ rather than heard the thunderclaps. At one point he thought that he was probably dead. His is the only, first-hand, eye witness account of the internal workings of a thunderstorm we have.

OK this is not that bad but, in the sense that neither the Col. nor I have a clue as to what’s happening it’s much the same.

I am profoundly grateful for your help & advice.

dmk

duncan mk wrote:

> In 1959 he was flying his fighter @ 48,000ft (about 10 miles up) over a
> huge cummulonimbus storm cloud when (@ Mach 0.9) the plane suffered a
> catastrophic failure & simply stopped working. The Col bailed out and,
> after a couple, of minutes fell into the cloud. A parachute descent
> from that hieght should take about 10 minutes. The Col. took 40 minutes
> during which time he didn’t know whether he was falling or rising.
> Apart from the lightening it was pitch black, he was pelted by
> hailstones & he ‘felt’ rather than heard the thunderclaps. At one point
> he thought that he was probably dead. His is the only, first-hand, eye
> witness account of the internal workings of a thunderstorm we have.
>

Slightly off topic, but I’m pretty sure this was one of the tales from a
unit stationed in Oklahoma with the express mission of flying into
thunderstorms. Known as “The Roughriders”, this unit told some wonderful
tales around the bar. I went through pilot training just north of there in
1964 and the standing rule for flight near thunderstorms was “turn around”.
That became very clear when I tried to take a formation over one that was
building between us and the home field. At the time, the T-38 trainers we
were in held the record for time-to-climb rate but we still couldn’t out
climb that building cloud and wound doing a 180 to land at an alternate
field several hundred miles from home. When the cloud topped 60,000 feet in
just a few minutes, I had to admit defeat.


Will Honea

Well, I gave you a command to set the baud rate, and another that should work to get the mouse attached as an input device for the X-server. Did you try those yet?

I’ll reiterate…

If your trackball manual stipulates the baud rate (or other parameters) it should be relatively easy to set eg for 9600 nothing needs to be changed (as the adapter uses that by default). If you need to change to 1200 baud (for example), then you could do

stty -F /dev/ttyUSB0 1200

When you read back the parameters, you should get output confirming the change

stty -a < /dev/ttyUSB0
speed 1200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;

If you don’t know what your trackball is using, then you may have to try changing the baud rate to few times (eg 1200, 2400,4800,9600,…)

Then you type

/usr/sbin/inputattach --microsoft /dev/ttyUSB

Check if your trackball is now working.

Well, I gave you a command to set the baud rate, and another that should work to get the mouse attached as an input device for the X-server. Did you try those yet?

I have thrown just about everything at it for the last 3/4 days without any result until this morning when:

Whoopee - we have movement! I have no idea how this happened, couldn’t get anything out of it yesterday (despite several reboots), opened it this morning,
loaded Firefox using the trackpad & opened Konsole (ditto).

Ran:

[QUOTE]Bash - 4.2.45 : stty -a < /dev/ttyUSB0
bash: /dev/ttyUSB0: No such file or directory

Plugged USB in:

Bash - 4.2.45 : stty -a < /dev/ttyUSB0
speed 9600 baud; rows 0; columns 0; line = 0;

Then:

Bash - 4.2.45 : sudo inputattach --microsoft /dev/ttyUSB0
root’s password:

And off we go. OK, the trackball, at the moment, is only moving the cursor
horizontally (not vertically) but it is moving & both the L & R buttons seem to
be working - I can cut & paste (I can cut & paste) using them.

Chuffed as nuts. Obviously the trackball, unused for 12 Yrs. or more, is OK.
Now, all I have to do is sort out the vertical side of things and disable the
trackpad - at the moment, however, the two are co-existing.

dmk
[/QUOTE]

Wim of “Serial mouse via inputattach” seems to have had similar problems:

To my surprise: my computer suddenly did not start-up in the right way and the mouse did not work. I removed the msmouse autorun script that I got from James (jdmcdaniel3) and now my old inputattach line does the work:

In /etc/sysconfig/inputattach: INPUTATTACH_DRIVERS=“/dev/ttyS0:microsoft”

So: PROBLEM SOLVED - I don’t understand it; maybe a software update from SUSE caused the miracle…?

and:

Oh, wrong!!
It was not my old inputattach line that did the work: I also removed it and my mouse worked OK. I made a script /etc/init.d/rc.local and a symbolic link /etc/init.d/rc5.d/@S98rc.local:
:
:
First it did not work, so I forgot it. Now it suddenly works!
And when I remove the symbolic link: no mouse. And when I put the symbolic link back: tara! there is the mouse!
So, I am surprised again, and happy: PROBLEM SOLVED :slight_smile:

Greetings, Wim

What I don’t understand is why none of this has worked for the last couple of days despite reboots & setting the the baud to 1200 but, this morning, kicks of at get-go with the speed still set @ 9600.

22.15 here, I’m off to bed. Look forward to seeing what you’ve got to say tomorrow.

Thanks as ever

dmk

@Will Honea

Slightly off topic, but I’m pretty sure this was one of the tales from a
unit stationed in Oklahoma with the express mission of flying into
thunderstorms.

Will Honea

Actually he was on a routine, 70 minute navigational flight from Weymouth Naval Air Station in MA to his squadrons HQ @ Beaufort, NC. He became quite a celeb & wrote a book called “The Man Who Rode Thunder” - but he may well have been the inspiration for “The Roughriders”

I’m afraid that, far from picking up the tale in an OK bar, I found it in a book called “The Cloudspotter’s Guide” - which is a guide to clouds: Stratonimbus, Cirrocumulus & the like.

Good off-piste addendum to a slightly (did I say slightly? No, totally) overblown analogy though.

dmk

Well, clearly the trackball communicates at 9600 baud. This happens to be the default for the USB-serial adapter too ie no changes required (with the stty command).

Anyway, it sounds like you’ve made progress :slight_smile:

Then:

                                                     Bash - 4.2.45   : sudo inputattach --microsoft /dev/ttyUSB0

root’s password:

And off we go. OK, the trackball, at the moment, is only moving the cursor
horizontally (not vertically) but it is moving & both the L & R buttons seem to
be working - I can cut & paste (I can cut & paste) using them.

Chuffed as nuts. Obviously the trackball, unused for 12 Yrs. or more, is OK.
Now, all I have to do is sort out the vertical side of things and disable the
trackpad - at the moment, however, the two are co-existing.

I guess you may find the lack of vertical movement is due to the hardware itself (eg faulty optical encoder), or it could be the protocol (you used --microsoft). I don’t know without the hardware in front of me to play with. You could try experimenting with other mouse protocols as listed by ‘/usr/sbin/inputattach’

~> /usr/sbin/inputattach --help

Usage: inputttach <mode> <device>

Modes:
  --sunkbd        -skb   Sun Type 4 and Type 5 keyboards
  --lkkbd         -lk    DEC LK201 / LK401 keyboards
  --vsxxx-aa      -vs    DEC VSXXX-AA / VSXXX-GA mouse and VSXXX-AB tablet
  --spaceorb      -orb   SpaceOrb 360 / SpaceBall Avenger
  --spaceball     -sbl   SpaceBall 2003 / 3003 / 4000 FLX
  --magellan      -mag   Magellan / SpaceMouse
  --warrior       -war   WingMan Warrior
  --stinger       -stng  Gravis Stinger
  --mousesystems  -msc   3-button Mouse Systems mice
  --sunmouse      -sun   3-button Sun mice
  --microsoft     -bare  2-button Microsoft mice
  --mshack        -ms    3-button mice in Microsoft mode
  --mouseman      -mman  3-button Logitech and Genius mice
  --intellimouse  -ms3   Microsoft IntelliMouse
  --mmwheel       -mmw   Logitech mice with 4-5 buttons or wheel
  --iforce        -ifor  I-Force joysticks and wheels
  --h3600ts       -ipaq  Ipaq h3600 touchscreen
  --stowawaykbd   -ipaqkbd  Stowaway keyboard
  --ps2serkbd     -ps2ser PS/2 via serial keyboard
  --twiddler      -twid   Handykey Twiddler chording keyboard
  --twiddler-joy  -twidjoy  Handykey Twiddler used as a joystick

The next step will be to automate the inputattach process, so that the trackball works as soon as you have a graphical session. You’ll need to add a custom systemd service eg /etc/systemd/system/trackball.service

Create the .service file with an editor (as root). It will contain the same command that you used to get the mouse working (temporarily)

[Unit]
Description=inputattach for trackball serial device

[Service]
Type=simple
ExecStart=/usr/bin/inputattach --microsoft /dev/ttyUSB0

[Install]
WantedBy=multi-user.target

Then enable the service and start it…

systemctl enable trackball
systemctl start trackball

Now you should be good to go. :slight_smile: