Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Include note in the wiki CIDs list regarding the "middle" button that might actually be the gesture button #275

Closed
gyohza opened this issue Nov 3, 2021 · 3 comments

Comments

@gyohza
Copy link

gyohza commented Nov 3, 2021

I own an MX Anywhere 2S and I spent ages trying to figure out what the CID for the gesture button is.

Turns out it was actually the middle button's, but it took me quite a while to think that it might be it and actually try it out.

Maybe I was slow in figuring this out, but can we please update the wiki CIDs list so that nobody else gets stuck in this little gotcha?

@PixlOne
Copy link
Owner

PixlOne commented Nov 3, 2021

Sure, just added that.

@PixlOne PixlOne closed this as completed Nov 3, 2021
@seanmamasde
Copy link

@gyohza Hello, may I ask you how do you figure out the CIDs of your mouse? I own an MX Master 3 and want to see which CIDs each buttons/functions corresponds to.
What I have tried is to run tcpdump -i bluetooth0 -w ble.pcap to capture the packets from the BLE interface, which only connects to my mouse while I was recording. I have also set bluetoothctl scan on in another terminal window before running tcpdump. I moved around a bit and clicked a few left clicks. Then I open up the ble.pcap file with wireshark, but all the packets with ATT protocol are with an unknown handle (0x0033) (screenshot). Do you know why is this happening? Appreciate the help.

@gyohza
Copy link
Author

gyohza commented Feb 22, 2024

Hey, @seanmamasde - to be quite honest, I hadn't found a quick way to list my device's CIDs. It looks like there's an open request here, with a comment from the maintainer:

I'll try to add a debug action and use that to help people discover the right CIDs.

Although can't be sure where we're at for this feature, since we haven't had any updates there since 2020.

As for what I did back then, I think I figured it out by elimination. I no longer have the script, nor do I have logiops working and installed on my machine right now, but if memory serves, what I did was include each and every CID listed in the CID table in my config, e.g.:

    buttons: (
        {
            cid: 0x50;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x51;
            action =
            {
                type: "None";
            };
        },
        # and so on
    );

Then I executed logid from a script. logid throws a warning if a given CID is not mapped for the device:

[WARN] Wireless Mobile Mouse MX Anywhere 2S: CID 0xc3 does not exist

By eliminating the CIDs for which warnings had been thrown, I was then left with a list of valid CIDs. I guess there's a chance that a CID might not be in the table at all, but they all seem to be hexes lying between 0x50 and 0xfe, so you can just loop through the values in between to generate a config with all the buttons. To save you some time:

/etc/logid.cfg
devices: (
{
    name: "MX Master 3";

    buttons: (
        {
            cid: 0x50;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x51;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x52;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x53;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x54;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x55;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x56;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x57;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x58;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x59;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x5a;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x5b;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x5c;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x5d;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x5e;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x5f;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x60;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x61;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x62;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x63;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x64;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x65;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x66;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x67;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x68;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x69;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x6a;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x6b;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x6c;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x6d;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x6e;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x6f;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x70;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x71;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x72;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x73;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x74;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x75;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x76;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x77;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x78;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x79;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x7a;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x7b;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x7c;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x7d;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x7e;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x7f;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x80;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x81;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x82;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x83;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x84;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x85;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x86;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x87;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x88;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x89;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x8a;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x8b;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x8c;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x8d;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x8e;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x8f;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x90;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x91;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x92;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x93;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x94;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x95;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x96;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x97;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x98;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x99;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x9a;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x9b;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x9c;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x9d;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x9e;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0x9f;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xa0;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xa1;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xa2;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xa3;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xa4;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xa5;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xa6;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xa7;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xa8;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xa9;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xaa;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xab;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xac;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xad;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xae;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xaf;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xb0;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xb1;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xb2;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xb3;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xb4;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xb5;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xb6;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xb7;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xb8;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xb9;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xba;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xbb;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xbc;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xbd;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xbe;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xbf;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xc0;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xc1;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xc2;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xc3;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xc4;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xc5;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xc6;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xc7;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xc8;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xc9;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xca;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xcb;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xcc;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xcd;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xce;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xcf;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xd0;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xd1;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xd2;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xd3;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xd4;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xd5;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xd6;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xd7;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xd8;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xd9;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xda;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xdb;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xdc;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xdd;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xde;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xdf;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xe0;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xe1;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xe2;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xe3;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xe4;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xe5;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xe6;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xe7;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xe8;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xe9;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xea;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xeb;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xec;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xed;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xee;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xef;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xf0;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xf1;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xf2;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xf3;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xf4;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xf5;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xf6;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xf7;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xf8;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xf9;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xfa;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xfb;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xfc;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xfd;
            action =
            {
                type: "None";
            };
        },
        {
            cid: 0xfe;
            action =
            {
                type: "None";
            };
        }
    );
}
);

Note: try type: "Keypress"; with keys: ["KEY_F24"]; if "None" doesn't work!

As I said, I can't test it right now, so I'm not even sure this will work, but at least it'll give you a headstart. With it, start logid and check the warnings - all the valid CIDs are the codes in the config that have not thrown warnings.

To be fair, not the most elegant of solutions, but worked for me back then.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants