:: Re: [DNG] mouse driver question
Top Page
Delete this message
Reply to this message
Author: karl
Date:  
To: dng
Subject: Re: [DNG] mouse driver question
Fred:
> On 4/23/22 12:53, karl@??? wrote:

...
> > If so, press Ctl-Alt-F2 buttons simultaineusly to get to a console.
> > There log in as root
> > and then try one of
> >    gpm -b 1200 -m /dev/ttyUSB0 -t msc
> >    gpm -b 1200 -m /dev/ttyUSB0 -t sun
> >    gpm -b 1200 -m /dev/ttyUSB0 -t mman
> > and move the mouse to test.

> >
> This works. The msc protocol works best, the mman protocol doesn't work
> at all. All three buttons show some effect.


Very good.

...
> > B, try inputattach to make the mouse appear as a /dev/input/* device
> >     and be automatically included by X11, I haven't tested this. See

> >
> >     https://wiki.archlinux.org/title/Serial_input_device_to_kernel_input
> >     https://sourceforge.net/projects/linuxconsole/files/
> >     https://help.ubuntu.com/community/SerialMouseHowto
> >     https://wiki.alpinelinux.org/wiki/Serial_Mouse

...
> There is some progress. The inputattach package in Devuan apparently
> doesn't have a config file. Specifying the baud on the command line
> results in an invalid baud message. inputattach does work with the Sun
> mouse but the middle button doesn't work. I tried msc and sun protocol
> and both work the same. I may try some other protocols but I suspect a
> bug in inputattach. Maybe I should contact the maintainer?


I have no experience with inputattach, but looking at
utils/inputattach.c from
https://sourceforge.net/projects/linuxconsole/files/latest/download
around line 1163:

        switch(baud[i]) {
        case -1: break;
        case 2400: type[i]->speed = B2400; break;
        case 4800: type[i]->speed = B4800; break;
        case 9600: type[i]->speed = B9600; break;
        case 19200: type[i]->speed = B19200; break;
        case 38400: type[i]->speed = B38400; break;
        case 115200: type[i]->speed = B115200; break;
        default:
            fprintf(stderr, "inputattach: invalid baud rate '%d'\n",
                    baud[i]);
            return EXIT_FAILURE;
        }


and

$ grep -A2 msc inputattach.c 
{ "--mousesystems",     "-msc",         "3-button Mouse Systems mouse",
        B1200, CS8,
        SERIO_MSC,              0x00,   0x01,   1,      NULL },


So, yes, you found a bug.

Add this before the "case 2400" line:

        case 1200: type[i]->speed = B1200; break;


compile and test.

Regards,
/Karl Hammar