Serial mouse driver

I have a small computer with vortexdx3 cpu, it has 2 serial ports, some usb (which are not supported by Haiku) no PS/2, audio, lan, etc…
as there’s no ps/2 and USB I need to plug a Serial mouse (still have my logitech in right shape).
As Haiku boots fine from sd, but I cannot do anything with it, as there’s no mouse and keyboard, is it possible to recreate a serial mouse driver?
(as far as I remember, lan doesn’t work, but in some recent linux and some recent bsds it works)

Hey, can you get a system log to try and diagnose the usb?

It should be under /var/log/syslog on the sdcard

I am not sure if we have a rs232 mouse driver or how difficult it would be to implement though. If linux and bsd have one it’s certainly possible.

edit: datasheet sais it should have 4 usb2 ports and 1 usb 1.1 port, it isn’t neccesarily wired but maybe one of the usb ports works

1 Like

I’ve opened some time ago a ticket about usb

Afaik xorg (in xorg.conf) or the console (through a command or gpm) just reads the ttyS* port and uses it for mouse pointer.
It woulf be nice to do it within Preferences - Input

xf86 has the driver then, in haiku these are normally in input_server or the kernel. We don’t use X11/Xorg

1 Like

We have a driver here apparently: serial_mouse\devices\input_server\add-ons\src - haiku - Haiku's main repository

I don’t know if it’s part of the default image, if it even builds, and if it’s complete enough to be usable. Let us know!

1 Like

Oh boy! thank you, but How can I use/try it?
I have a logitech mouse (3 buttons) and (if I find it) a Microsoft mouse switchable to 3 mouse button protocol (actually don’t remember if it is a MM or a Mousesystem)

You have to compile it yourself:

jam -q serial_mouse

Then you can install the file somewhere in /boot/system/non-packaged/add-ons like the other add-ons. Then see what happens.

In the first place, does it even compile, or does it need fixes?

Then, once installed, does it say anything in the syslog? Does the mouse move?

1 Like

You also need to make sure the port is not used for serial debugging.

1 Like

This is what I get (Haiku R1/beta3 x86_gcc2) :

~/Apps/haiku> ./configure
Configured successfully!
~/Apps/haiku> jam -q serial_mouse
Starting build of type regular …
build-feature packages unavailable on x86_gcc2: webkit libdvdread libdvdnav libraw libavif
build-feature packages unavailable on x86: gutenprint qrencode_kdl libdvdread libdvdnav libraw
AddHaikuImagePackages: package icu not available!
Asked for bios_ia32 target boot platform
Unknown path to handle adding to image
Asked for pxe_ia32 target boot platform
Unknown path to handle adding to image
don’t know how to make serial_mouse
…patience…
…found 1 target(s)…
…can’t find 1 target(s)…

Yes, I gave the incorrect target name.

Try this:

jam -q "<input>serial_mouse"
1 Like

Mmmmh
Switching to …/haiku/src/add-ons/input_server/devices/serial_mouse
and executing “jam” It’s compiling a lot of things…

after my last command there’s a new serial_mouse
file in haiku/generated/objects/haiku/x86_gcc2/release/add-ons/input_server/devices/serial_mouse
I placed it in /boot/home/config/non-packaged/add-ons/input_server/devices
but I will try it as soon as I come back to home

1 Like

I’ve plugged a prolific USB to Serial adapter with various mice, It seems that no serial mice will be added to Input preflet and no mouse movements/actions are detected. I will try on mobo serial port in a near future, but I think it will not work.

on the syslog I found this string:

KERN: AddOnManager::_RegisterAddOn(): InitCheck() in “/boot/home/config/non-packaged/add-ons/input_server/devices/serial_mouse” returned General system error

should I open a ticket?

I think it is restricted to on-board ports named pc_serial, so usb ones will not work. This is because it is not so nice to have this driver send or receive data on all your ports and whatever you may have connected there (Windows does exactly this, and ifyou have a device sending random data to a serial port, it will end up moving your mouse…)

So, if you don’t have a need for using it with usb-serial, maybe let’s not add this option?

1 Like

I have a machine with only serial ports (and USBs) it is indeed my need. And several computers with serial ports on board. The problem is that I’ll be on my machines within few days (I’m looking to transfer my computers in my new location). So ,for now, I can’t test on onboard serial ports. But I’ll do it soon. I’ll let you know, for now, a BIG thank you!

Correct me if I’m wrong. To check if a serial port is used for debugging I have to check the boot loader in the debug options, right? Or is there some other magic I should do?

I have tried on 2 different machines. Results: it doesn’t work.
In one machine, after booting, all input devices (serial + ps/2) don’t work and one processors works at 100% (cannot investigate due to impossibility to use keyboard and mice). In the second machine it just don’t detect any serial mice (microsoft nor logitech) but all others input devices works perfectly (USB). Input preflet does not list any serial mice.

It’s possible the input preferences doesn’t know about serial mice.

I have checked the driver and a lot of debug output is commented out (and I am not sure if it would log to syslog in the first place)

The best way to test it would indeed be to try if it moved the mouse, maybe listdev should also show it

isnt there an option for this in the kernel config file?

1 Like