Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
11-12-2012, 07:59 PM
|
#1
|
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,487
Rep:
|
Forcing the O.S. to detect the mouse new port.
Hi:
Up to now I had slack 12.0 running with my PS/2 mouse plugged into the PS/2 female connector on the machine rear panel. I now had to use a different mouse, which plugs into one of the COMx (so called under MS-DOS) port connectors. In the rear panel I have only one of these DB9 connectors, and it is directly attached to the motherboard.
First, I guess I should know if the connector is COM1/COM3 or COM2/COM4. In the procedure I followed I assumed it is COM1/COM3. However, previous to any guess work, I thought if I rebooted, the O.S. would automatically rescan the hardware and set things so that I could have the serial mouse up and running. Wrong. This was not the case.
Then I ran pkgtool>Setup and selected Modem-device. It first allows me to choose from ttyS0, ..., ttyS3. I chose ttyS0 to leave room for the serial mouse in ttyS1, however not knowing the mapping between the connectors in the rear panel to the set {ttyS0,...,ttyS3}. But now by pressing Enter, the program does not ask for the mouse (as I know it did when at slack installation time). Instead, it enters a screen with the following options:
(a) Install packages from the current directory.
(b) Install packages from some other directory.
(c) Install packages from floppy disks.
(d) Choose slackware installation scripts to run again.
And this list of options is a new source of perplexity. I could have the slackware disk no. 1 in the CD-ROM drive, already mounted in say, directory /mnt/foo, be already in /mnt/foo when i run pkgtool and use option (a). That is what I did but nothing changed with respect to the mouse: I still had no mouse in the GUI. Another thing: should I use option (d) also?
I must say all this, and specially that list quoted above, is very confusing. But if its I who is introducing confusion here, then I beg you to tell me which is the correct procedure to bring the serial mouse to life after the O.S. got used to the PS/2 mouse.
Also, once and for all, I would like to be proficient in the use of pkgtool>Setup.
kernel 2.6.21.5, slackware 12.0
|
|
|
|
11-12-2012, 08:32 PM
|
#2
|
|
Senior Member
Registered: Jul 2011
Distribution: Slackware64-14.0, LFS-7.3, FreeBSD 9.1
Posts: 1,110
Rep: 
|
The Serial DB9 Port from past experiences I've had has anyways been assigned by the BIOS to COM port 3 as a default, though I was strictly using it as a Modem port.
Check your BIOS and see what the settings are and see if perhaps the GPM tool can setup your mouse correctly. I know usually the default /dev/mouse is preset using GPM which runs through a list of supported mice and should setup the port it's at automatically, usually.
|
|
|
|
11-12-2012, 09:35 PM
|
#3
|
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,487
Original Poster
Rep:
|
Thank you. My BIOS does not have options in connection with the serial ports. I quote from post #1:
Quote:
|
Then I ran pkgtool>Setup and selected Modem-device. It first allows me to choose from ttyS0, ..., ttyS3. I chose ttyS0 to leave room for the serial mouse in ttyS1, however not knowing the mapping between the connectors in the rear panel to the set {ttyS0,...,ttyS3}. But now by pressing Enter, the program does not ask for the mouse (as I know it did when at slack installation time).
|
Even more: the first time I ran pkgtool>Setup, it did enter the window where one can choose among PS/2, Microsoft serial two buttons, on so on. But never more. Why is that?
|
|
|
|
11-12-2012, 09:43 PM
|
#4
|
|
LQ Newbie
Registered: Nov 2012
Posts: 15
Rep:
|
When you run pkgtool and go to setup you should have the "mouse" option, this will let you run the mouse setup script. You could also run it directly from the command
# /var/log/setup/setup.mouse
If you choose one of the serial mice from the list then you will be asked which COM port your mouse is on.
This script only seems to be installed if you have the gpm package installed though, but the symlink it creates may help programs other than gpm find your mouse.
|
|
|
|
11-13-2012, 12:51 AM
|
#5
|
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,487
Original Poster
Rep:
|
Quote:
Originally Posted by af7567
When you run pkgtool and go to setup you should have the "mouse" option, this will let you run the mouse setup script. You could also run it directly from the command
# /var/log/setup/setup.mouse
If you choose one of the serial mice from the list then you will be asked which COM port your mouse is on.
This script only seems to be installed if you have the gpm package installed though, but the symlink it creates may help programs other than gpm find your mouse.
|
I ran setup.mouse and, in the case of the PS/2 mouse, it worked. But not so for the serial one. I may be wrong with the COM number. Is there not, in linux, a program of the following type: I run it with the mouse plugged into the first connector, move the mouse and the program may say: "I see you are moving your mouse through ttyS2". I lack DOS which could help.
Last edited by stf92; 11-13-2012 at 02:01 AM.
|
|
|
|
11-13-2012, 12:58 AM
|
#6
|
|
Senior Member
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,856
|
Couldn't you use dmesg to get more information?
Markus
|
|
|
|
11-13-2012, 02:03 AM
|
#7
|
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,487
Original Poster
Rep:
|
I thought about that. Yes, it's what I will do as a first step.
|
|
|
|
11-13-2012, 03:13 AM
|
#8
|
|
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,592
|
`cat /dev/ttySX` should show noise in the terminal if you then move the mouse and have the right device number (for X). In my experience, ttyS0(COM1) is usually the right one -the COM ports may be labled on the case.
|
|
|
|
11-13-2012, 03:27 AM
|
#9
|
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,487
Original Poster
Rep:
|
Quote:
Originally Posted by gnashley
`cat /dev/ttySX` should show noise in the terminal if you then move the mouse and have the right device number (for X). In my experience, ttyS0(COM1) is usually the right one -the COM ports may be labled on the case.
|
I have the both mice (ps2 and serial) plugged in and the ps2 working. Doing
cat /dev/input/mouse1
I get garbage in the screen when moving the ps2. But
cat /dev/input/mouse0
does nothing. I now remember I never used a serial mouse in this machine. Maybe the hardware is broken.
EDIT: anyway, who programs the UART?
|
|
|
|
11-13-2012, 03:32 AM
|
#10
|
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,487
Original Poster
Rep:
|
Rectification: this machine was perhaps not used with a serial mouse but indeed I made use of the serial port for comunication with certain type of device.
|
|
|
|
11-13-2012, 08:25 AM
|
#11
|
|
LQ Newbie
Registered: Nov 2012
Posts: 15
Rep:
|
Quote:
Originally Posted by stf92
I have the both mice (ps2 and serial) plugged in and the ps2 working. Doing
cat /dev/input/mouse1
I get garbage in the screen when moving the ps2. But
cat /dev/input/mouse0
does nothing. I now remember I never used a serial mouse in this machine. Maybe the hardware is broken.
EDIT: anyway, who programs the UART?
|
The serial mouse would probably not be detected by /dev/input, so the only way to access it would be through the serial port device which would probably be /dev/ttyS0 if it is the serial port built into the motherboard. Try cat /dev/ttyS0 or cat /dev/ttyS1 to see if you get output from either of them.
|
|
|
1 members found this post helpful.
|
11-13-2012, 11:44 AM
|
#12
|
|
Amigo developer
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,592
|
af7567 is right.
|
|
|
1 members found this post helpful.
|
11-13-2012, 05:16 PM
|
#13
|
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,487
Original Poster
Rep:
|
Quote:
Originally Posted by af7567
The serial mouse would probably not be detected by /dev/input, so the only way to access it would be through the serial port device which would probably be /dev/ttyS0 if it is the serial port built into the motherboard. Try cat /dev/ttyS0 or cat /dev/ttyS1 to see if you get output from either of them.
|
I tried with /dev/ttyS0, ttyS1 but I do not get output when moving the mouse. I used the serial port in this machine to communicate with a single board computer, I remember well, and it worked. Maybe its UART was left programed in a way that is wrong for the mouse and the registers are written to disk to program it the same way at boot time.
Last edited by stf92; 11-13-2012 at 05:24 PM.
|
|
|
|
11-13-2012, 05:27 PM
|
#14
|
|
LQ Newbie
Registered: Nov 2012
Posts: 15
Rep:
|
You could also try /dev/ttyS2 and /dev/ttyS3.. or any other /dev/ttyS?? which can be opened.
# cat /proc/tty/driver/serial
This might show you a list of the detected serial ports on your PC, at least it does for me but I am using slackware 14.
|
|
|
1 members found this post helpful.
|
11-13-2012, 10:45 PM
|
#15
|
|
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 2,487
Original Poster
Rep:
|
Code:
semoi@darkstar:~$ sudo cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:16550A port:000003F8 irq:4 tx:9728 rx:6887 fe:1 brk:2841
1: uart:unknown port:000002F8 irq:3
2: uart:unknown port:000003E8 irq:4
3: uart:unknown port:000002E8 irq:3
semoi@darkstar:~$
Somebody, looking towards the outside world, is seeing an UART at 0x3f8, corresponding to /dev/ttyS0, but I'm afraid the UART does not see the mouse. For me, it's a case of the 16550 UART not been properly initialized.
If only I had my old DOS I could write a very short program to help me diagnose, but I can only install it at tiny hard disks, and mine are >= 10G. To do this kind of tests I've always used assembler. And I would be force to revise the little I learn, time ago, about as and other linux assemblers. Plus, it would have to be inline assembler in a high level language program, or an assembler routine call within the high level program. I prefer trying other ways before meddling with assembler routines.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:26 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|