Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Device change button does not affect other connected devices #28

Open
metrailer opened this issue Oct 3, 2019 · 78 comments
Open

Device change button does not affect other connected devices #28

metrailer opened this issue Oct 3, 2019 · 78 comments

Comments

@metrailer
Copy link

When using the device switch button on the MX Keys the MX Master 3 does not also switch devices or vice versa. Providing this option allows better swapping between devices.

@davidschreiber
Copy link

Agreed, this feature would be great. Needing to lift the MX Masters 2s is a tedious process.

@bfoster27
Copy link

Also agree! I hate picking up my mouse and pushing the button every time I want to switch.

One sort-of workaround is using "Flow" to switch devices, but my experience is it still has a lot of bugs. I use the "ctrl+screen edge" option so I don't switch devices on accident by moving the mouse too far. Sometimes it will switch anyway when my mouse moves to the edge of the screen (seems to be an issue mostly when computer(s) is/are waking up). Other times it will only switch one device - mouse or keyboard - but not both. I'd say it works the way it should (move mouse to edge of screen while pressing "ctrl" key, switch mouse and keyboard to other device) about 60% of the time, which is why I usually just hit the "1", "2", or "3" button (using 3 computers) on the keyboard and would prefer to be able to just hit this key to switch my keyboard and mouse!!

@davidschreiber
Copy link

davidschreiber commented Apr 14, 2020

The sad truth is, that it's just a neglected driver for the MX Masters 2s and the Craft keyboard. The fact that Flow allows switching of both devices to a different computer (and indeed it does this as one would expect) shows that it is possible, and that syncing mouse and keyboard switching is just not implemented in the computer's driver.

@bfoster27
Copy link

Right. All of the functionality is already there - it just needs to be utilized in the user interface. I can't imagine it would be too difficult to have a checkbox or something in the "Options" software to switch both mouse and keyboard when the 1, 2, or 3 toggle buttons are used to switch devices.

Any idea if this is a custom option that could be implemented fairly easily?

@davidschreiber
Copy link

davidschreiber commented Apr 15, 2020

I have been doing some raw command line sniffing of the USB commands sent by the Logitech software to the unifying receiver, and could switch both Craft keyboard and MX Masters 2S mouse (which are connected using the same unifying receiver) to any other channel(1, 2, or 3).

For sniffing I used busdog: https://github.com/djpnewton/busdog
For sending raw USB commands I used USB-HID-Tool: https://github.com/OpenAcousticDevices/USB-HID-Tool

I never did USB development, or protocol decoding, so my skills are fairly low on that end, but I'm still documenting what I found out so far.

The logitech driver uses simple commands to the unifying receiver, that encode the index of the device connected to the unifying receiver (in my case 1 being the keyboard, and 2 being the mouse), as well as some commands.

For example, this is one example for a command sent to the device:

0x10 0x01 0x09 0x3a 0x00 0x00 0x00

As far as I have seen, all commands start with 0x10 as the first byte. This is followed by one byte marking the device index (in case of the example 0x01). I would have expected the index to be 0-based, but in my case it was 1-based instead. I haven't checked it for other unifying receivers or computers yet, so it might be my specific setup (connected and disconnected quite often since I have the receiver).

The next 2 bytes are different for each command. I assume that these two bytes encode the actual command, and I have been able to identify at least some commands:

Channel switching

0x0810 through 0x081f cause the receiving device to switch channel (1,2,3). The command is followed by 1 byte parameter, which encodes the channel to select using a 0-based number:

10 [device index] 08 10 [channel index] 00 00 00

I haven't figured out why Logitech uses a range of commands for switching, as I could spot no difference in behavior between any of the commands.

For example, my computer sending this command, will make my keyboard (index 2) switch to the first channel:

.\usbhidtool.exe 0x046D 0xC52B 0x10 0x02 0x08 0x10 0x00 0x00 0x00

And this command switches my keyboard to the second channel instead:

.\usbhidtool.exe 0x046D 0xC52B 0x10 0x02 0x08 0x10 0x01 0x00 0x00

(The first two arguments to the tool are the VID and PID of the USB interface or endpoint, and not part of the protocol itself.)

Here's another example, switching my mouse (index 1) to the first channel (channel index 0):

.\usbhidtool.exe 0x046D 0xC52B 0x10 0x01 0x08 0x10 0x00 0x00 0x00

When Flow switches my mouse and keyboard, among other things, it sends two commands to the unifying receiver:

10 01 08 1f 01 00 00
10 02 08 1e 01 00 00

The first one switches my mouse to channel 2 (my other computer), the second command switches my keyboard.

From everything I learned today, it should indeed be possible to write a small "driver extension" that switches devices at the same time.

@davidschreiber
Copy link

Just for the sake of completeness, another command I deciphered is some kind of channel description. When sending this, the selected device will return a description of the device that is connected to the given channel:

10 02 09 3e 00 00 00

In this case, my keyboard (02) is asked to return description of channel 00 (the first byte after the 2-byte command identifier. The command identifier for this is 0x093e. In my case, the keyboard answers with this (among other stuff that follows):

Hex                                                          	Ascii	
11 02 09 3e 00 00 44 45 53 4b 54 4f 50 2d 46 53 4b 49 33 45	...>..DESKTOP-FSKI3E

That's the name of my desktop machine, which is mapped to channel 2. The first byte of the message is 11 and is always the same when any device responds to a command (seems like 10 means in and 11 means out, or such).

@TobiasAbbenseth
Copy link

Did anyone solve this issue? I do have a MX Keys and a MX Vertical and i would like to switch my devices with a single touch on the mx keys button.

@davidschreiber
Copy link

I haven't followed up on this after my initial experiments. While this is definitely just a driver issue (or at least can be easily fixed via the driver) it doesn't seem Logitech has scheduled any work on fixing this for the higher end product lineup right now.

@dnlw07
Copy link

dnlw07 commented Jan 20, 2021

@davidschreiber
I followed your instruction and in my case keyboard switch to second channel has following hex number:

10 02 41 04 71 61 40

unfortunately while I am trying to send the command using USB-HID-Tool:

usbhidtool 0x046D 0xC52B 0x10 0x02 0x41 0x04 0x71 0x61 0x40

I receive following errors:

ERROR: device not connected

and on my second laptop:

ERROR: incorrect response from the device

Could you please tell me what I am doing wrong?

Have you complied USB-HID-Tool using Microsoft Visual C++ Build Tools or just used pre-compiled usbhidtool.exe files downloaded from Github repository?

@vladubogdan
Copy link

@davidschreiber
I followed your instruction and in my case keyboard switch to second channel has following hex number:

10 02 41 04 71 61 40

unfortunately while I am trying to send the command using USB-HID-Tool:

usbhidtool 0x046D 0xC52B 0x10 0x02 0x41 0x04 0x71 0x61 0x40

I receive following errors:

ERROR: device not connected

and on my second laptop:

ERROR: incorrect response from the device

Could you please tell me what I am doing wrong?

Have you complied USB-HID-Tool using Microsoft Visual C++ Build Tools or just used pre-compiled usbhidtool.exe files downloaded from Github repository?

Have the same issue, on both mac and windows. Would be nice to know how to make it work. Thx!

@9000h
Copy link

9000h commented Mar 1, 2021

Hi,
nice research but Logitech should give the community a hand and should soon add at least Linux support as they advertise it but there is nothing like options or flow.
I was under the impression there is proper support for Linux and now I found out the mx keys/craft do not really fit my needs.
CU

@Devod-co-uk
Copy link

@dnlw07 and @vladubogdan

usbhidtool 0x046D 0xC52B 0x10 0x02 0x41 0x04 0x71 0x61 0x40
The second and third part: 0x046D 0xC52B relate to your devices VID and PID.
You will need to work these out on your computer and change them.
I know it's not a full explanation of finding your VID PID:
https://interworks.com/blog/ijahanshahi/2014/07/18/identify-vid-pid-usb-device/#:~:text=Identify%20the%20PID%20VID%20of%20a%20USB%20Device&text=Under%20the%20Property%20drop%2Ddown,be%20displayed%20on%20the%20screen.

Thank you @davidschreiber

@dnlw07
Copy link

dnlw07 commented Apr 18, 2021

@Devod-co-uk

thanks for the tip. I have checked PID and VID and actually are the same values in my case.

I used different tool called hidapitester (instead of USB-HID-Tool proposed by @davidschreiber).
Now I am able to connect the MX keyboard and send the output, however the command does not switch the channel.

command I send:

hidapitester --vidpid 046D:C52B --open --length 7 --send-output 0x10,0x03,0x09,0x1c,0x01,0x00,0x00

output I receive:

Opening device, vid/pid: 0x046D/0xC52B
Writing output report of 7-bytes...wrote -1 bytes:
 10 03 41 04 71 8A 40
Closing device

I also wrote a python script, but also without result:

import hid
import time


# try opening a device, then perform write and read
try:
    # print("\nOpening the device:")

    h = hid.device()
    h.open(0x046D, 0xC52B) # VendorID/ProductID

    print("Manufacturer: %s" % h.get_manufacturer_string())
    print("Product: %s" % h.get_product_string())
    # print("Serial No: %s" % h.get_serial_number_string())

    # enable non-blocking mode
    h.set_nonblocking(1)

    # write some data to the device
    print("\nWrite the data")

    code = [10, 3, 41, 4, 71, 61, 40]

    h.write(code)

    # wait
    time.sleep(0.05)

    # read back the answer
    print("\nRead the data:")
    while True:
        d = h.read(64)
        # d = h.read(20)
        if d:
            print(d)
        else:
            break

    print("Closing the device")
    h.close()

except IOError as ex:
    print(ex)


Is anyone who also tried to play with that?

@altvnv
Copy link

altvnv commented Apr 23, 2021

@dnlw07 have played with it for a couple of hours. Finally got a script that switches between two devices using a Logitech Unifying adapter (I think it can be done via bluetooth connection as well).

It was done by sending the hex data I've got from Solaar change-host execution for each host-device combinations (e.g. switch keyboard from first to second device and vice versa).

@dnlw07
Copy link

dnlw07 commented Apr 24, 2021

@altvnv
contrgratulations!

Unfortunately I am still struggling with it.
Would you mind to share your script here, please?

Did you write a python script or used a command line tool?

@altvnv
Copy link

altvnv commented Apr 24, 2021

@dnlw07 I don't think it can be done with the same hex values, but let's give it a try.

import hid

def change_device(hidapi_device):
    switch_keyboard_from_1_to_2 = b"\x11\x02\x09\x1C\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
    switch_mouse_from_1_to_2 =    b"\x11\x01\x0A\x1B\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"

    hidapi_device.write(switch_keyboard_from_1_to_2)
    hidapi_device.write(switch_mouse_from_1_to_2)

    # that's for another host
    # switch_keyboard_from_2_to_1 = b"\x11\x02\x0A\x1B\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
    # switch_mouse_from_2_to_1 =    b"\x11\x01\x09\x1C\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"

    # hidapi_device.write(switch_keyboard_from_2_to_1)
    # hidapi_device.write(switch_mouse_from_2_to_1)

# As sometimes I've got 'no device found' errors
# let's just try to execute it 9 times and exit on first success
for i in range(1, 10):
    try:
        h = hid.Device(0x046D, 0xC52B)
        print("Manufacturer: %s" % h.manufacturer) # Just to ensure that it's using proper device
        h.nonblocking = 1
        change_device(h)
    except Exception:
        continue
    break

Hope it helps you

@dnlw07
Copy link

dnlw07 commented Apr 24, 2021

Thanks a lot for the snippet!

Could you tell me which lirbary are you using?

pip install hidapi
pip install hid

Both of them are very simillar and its a bit confusing.

@altvnv
Copy link

altvnv commented Apr 24, 2021

@dnlw07 hid

pip install hid

Let me know if this snippet will do a trick for you as for the next iteration I want to try to customize the driver part.

And note that it was done with two transmitters. I have no idea whether it works using the regular bluetooth connection.

@dnlw07
Copy link

dnlw07 commented Apr 24, 2021

@altvnv

I am also using the same library as you.

I am able to open the device:

import hid
h = hid.Device(0x046D, 0xC52B)
h.nonblocking = 1

however I receive an error while using write method:

hex_code = b"\x10\x03\x41\x04\x71\x8a\x40"
h.write(hex_code)

the error message:

hid.HIDException: Access is denied.

Did you face similar error before?

I am pretty sure it also works via Bluetooth. The codes will be different.

P.S. Are you using Linux or you were able to install Solaar on WSL2?

@altvnv
Copy link

altvnv commented Apr 24, 2021

@dnlw07 I'm used Linux only to obtain the proper commands for host changing feature.

According to the issue - haven't faced it but try to remove hiadpi library from your machine and download hiadpi library from official reference and import it directly from python.

import ctypes

ctypes.cdll.LoadLibrary("path\\to\\the\\dll")

....

Btw, I've done it in following way:

  1. Connected first transmitter to Linux machine
  2. Obtained commands for switching from first device to second
  3. Did it for the second transmitter

P.S. I've tried this script on Linux, Mac and Windows - everything works fine for me.

@arjunchhabra
Copy link

arjunchhabra commented Apr 25, 2021

Hey folks, been trying to get this working as well. Thanks to the awesome information shared above and a bit of trial and error, I have two commands that switch my mouse and keyboard from the receiver in my laptop to the receiver in my desktop, and vice versa. They are:

Mouse 1 -> 2

./hidapitester --vidpid 046D:C52B --open --length 7 --send-output 0x10,0x04,0x09,0x11,0x01,0x00,0x00

Keyboard 1 -> 2

./hidapitester --vidpid 046D:C52B --open --length 7 --send-output 0x10,0x03,0x09,0x11,0x01,0x00,0x00

Mouse 2 -> 1

./hidapitester --vidpid 046D:C52B --open --length 7 --send-output "0x10,0x02,0x09,0x11,0x00,0x00,0x00"

Keyboard 2 -> 1

./hidapitester --vidpid 046D:C52B --open --length 7 --send-output "0x10,0x01,0x09,0x11,0x00,0x00,0x00"

This makes sense to me because the only difference is the device index. However, I have another mouse that's also synced to both of these receivers, and it seems no value in the device index updates that mouse. It is an MX Anywhere 3. Has anyone encountered any similar behavior?

Thanks!

@dnlw07
Copy link

dnlw07 commented Apr 25, 2021

@arjunchhabra
Hello,
regarding your question, here is the hex code for MX 3 mouse via bluetooth (source: pwr-Solaar/Solaar#1154 (comment)):
11 01 0A 1E 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

@altvnv used Solaar linux driver to get exact codes for his Logitech devices. Maybe you can try do the same if you have linux distro installed on your machine.

Here is also the documentation to HID++ 2.0 protocol:
https://github.com/Logitech/cpg-docs/tree/master/hidpp20

It may help you to figure out the hex codes. However the documentation is not easy to understand, because of missing examples.

P.S. Could you please add information to your post what keyboard and mouse are you using?
Could also you please post an output received of the commands you are using?

@arjunchhabra
Copy link

arjunchhabra commented Apr 25, 2021

Figured it out! I realized the values I was capturing the values from busdog incorrectly.

What I was doing:

  • Running Busdog and capturing values received while a connected device (mouse or keyboard) pressed their device switched key

What I should have been doing (and what worked):

  • Running Busdog and capturing the values emitted while a connected device is told by Flow to switch devices

Capturing the output from my computer in the second scenario and then running that with the hidapitest executable provided the desired results and makes sense from a conceptual standpoint. For reference, I have tested this across my MX Keys, MX Anywhere (3) and M585. I will share the commands used for posterity, though the hex values seem to differ for all.

MX Anywhere 1 -> 2

./hidapitester --vidpid 046D:C52B --open --length 7 --send-output 0x10,0x01,0x0a,0x1a,0x01

MX Keys 1 -> 2

./hidapitester --vidpid 046D:C52B --open --length 7 --send-output 0x10,0x03,0x09,0x11,0x01,0x00,0x00

M585 1 -> 2

./hidapitester --vidpid 046D:C52B --open --length 7 --send-output 0x10,0x04,0x09,0x11,0x01,0x00,0x00

MX Anywhere 1 -> 3

./hidapitester --vidpid 046D:C52B --open --length 7 --send-output 0x10,0x01,0x0a,0x1a,0x02

MX Keys 1 -> 3

./hidapitester --vidpid 046D:C52B --open --length 7 --send-output 0x10,0x03,0x09,0x11,0x02,0x00,0x00


MX Anywhere 2 -> 1

./hidapitester --vidpid 046D:C52B --open --length 7 --send-output 0x10,0x03,0x0a,0x1a

MX Keys 2 -> 1

./hidapitester --vidpid 046D:C52B --open --length 7 --send-output "0x10,0x01,0x09,0x11,0x00,0x00,0x00"

M585 2 -> 1

./hidapitester --vidpid 046D:C52B --open --length 7 --send-output "0x10,0x02,0x09,0x11,0x00,0x00,0x00"

MX Anywhere 2 -> 1

./hidapitester --vidpid 046D:C52B --open --length 7 --send-output 0x10,0x03,0x0a,0x1a,0x02

MX Keys 2 -> 3

~Scripts/hidapitester --vidpid 046D:C52B --open --length 7 --send-output "0x10,0x01,0x09,0x11,0x02,0x00,0x00"

@dnlw07
Copy link

dnlw07 commented Apr 25, 2021

@arjunchhabra thank you for your commands!

I also faced simillar issue with BusDog showing different hex codes for changing channel by using flow vs pressing physical button.

I also have MX Keys keyboard . BusDog is showing the same hex codes while using flow switch channel method.
However in my case the command is not working :(

Command I am using for MX Keys keyboard to change channel from 1 -> 2:

hidapitester --vidpid 046D:C52B --open --length 7 --send-output 0x10,0x03,0x09,0x11,0x01,0x00,0x00

Output I receive:

Opening device, vid/pid: 0x046D/0xC52B
Writing output report of 7-bytes...wrote -1 bytes:
 10 01 09 11 02 00 00
Closing device

Could you tell mi if you have the same output as me or different?

@arjunchhabra
Copy link

Hey @dnlw07, I see the same output, though sometimes it says "wrote -1 bytes" and sometimes where it writes "wrote 7 bytes". I believe only the one where it says "wrote 7 bytes" are successful writes. In any case, I keep it in a loop and within a few executions it successfully switches devices. I would recommend giving that a shot!

@twau
Copy link

twau commented Apr 26, 2021

Thanks everyone, I can finally switch seamlessly between my Linux machine/Windows laptop. I cant understand why Logitech have not implemented this in their own software, makes everything so much better.

Linux machine is using solaar rule to switch both mouse and keyboard at the same time.
Solaar sends:
MX Keys from 1 to 2: 11 01 091E 01000000000000000000000000000000
MX Master 3 from 1 to 2: 11 02 0A1C 01000000000000000000000000000000

Windows machine, a .bat file executing:
MX Keys from 2 to 1:
hidapitester.exe --vidpid 046D:C52B --open --length 7 --send-output "0x10,0x02,0x09,0x11,0x00,0x00,0x00"
MX Master 3 from 2 to 1:
hidapitester.exe --vidpid 046D:C52B --open --length 7 --send-output "0x10,0x01,0x0a,0x11,0x00,0x00,0x00"

MX Keys from 1 to 2:
hidapitester.exe --vidpid 046D:C52B --open --length 7 --send-output "0x10,0x01,0x09,0x11,0x01,0x00,0x00"
MX Master 3 from 1 to 2:
hidapitester.exe --vidpid 046D:C52B --open --length 7 --send-output "0x10,0x02,0x0a,0x11,0x01,0x00,0x00"

@dnlw07
Copy link

dnlw07 commented Apr 26, 2021

Hmm I am struggling with that for two months now and still not sure if I am doing sth wrong.

  1. First I downloaded BusDog: http://daniel.net.nz/d/busdog_0.2.2/busdog_x64.exe and used it to sniff hex codes using Logitech Flow fucntionality
  2. Then downloaded prebuild library for hidapi from: https://github.com/libusb/hidapi/releases/download/hidapi-0.10.1/hidapi-win.zip and prebuild package for hidapitester from: https://github.com/todbot/hidapitester/releases/download/0.2/hidapitester-windows-x86_64.zip
  3. I put everything to the same directory, opened the command line and typed
cd %userprofile%\Desktop\hidapitester

# Flow Master 2S mouse switch 1 --> 2
hidapitester --vidpid 046D:C52B --open --length 7 --send-output 0x10,0x01,0x09,0x1c,0x01,0x00,0x00

# Flow MX Keys keyboard switch 1 --> 2
hidapitester --vidpid 046D:C52B --open --length 7 --send-output 0x10,0x03,0x09,0x1c,0x01,0x00,0x00

Nothing is working. I repeated with my second laptop with the same result.
Any idea what could go wrong here?

@altvnv
Copy link

altvnv commented Apr 28, 2021

Did someone succeed with keyboard keys (1,2,3 device) rebinding? Is it possible without any driver customisation?

@tslater
Copy link

tslater commented May 14, 2021

So I'm using linux as well...but oddly my gui for Solaar isn't giving me the change host options. I'm trying to figure out the command line, but not quite sure how the command should go. Incidentally, I think that has help me understood what the hex code actually represents...or at least why hex codes are not transferring well from one user to another, it looks like they might include the computer name in them (in the output of the solar CLI here under CHANGE HOST you see my computer name which is "tincan"):

 2: MX Master 3 Wireless Mouse
     Device path  : /dev/hidraw2
     WPID         : 4082
     Codename     : MX Master 3
     Kind         : mouse
     Protocol     : HID++ 4.5
     Polling rate : 8 ms (125Hz)
     Serial number: C60AEF9C
     Model ID:      B02340820000
     Unit ID:       C60AEF9C
        Bootloader: BOT 95.01.B0015
          Firmware: MPM 19.01.B0015
             Other: 
     The power switch is located on the base.
     Supports 35 HID++ 2.0 features:
         0: ROOT                   {0000}   
         1: FEATURE SET            {0001}   
       ....
         9: REPROG CONTROLS V4     {1B04}   
            Key/Button Actions (saved): {'195': 195, '196': 196, '80': 80, '81': 81, '82': 82, '83': 83, '86': 86}
            Key/Button Actions        : {'80': 80, '81': 81, '82': 82, '83': 83, '86': 86, '195': 195, '196': 196}
        10: CHANGE HOST            {1814}   
            Change Host        : 2:tincan
        11: XY STATS               {2250}   
       ...

Did any of you linux people use the CLI to swtich? I'm having trouble figuring out how to use the config command.

@arblackman
Copy link

arblackman commented Nov 1, 2021 via email

@Seyphaton
Copy link

Awesome detectives here :)
I would love to see Logitechs helping hand here...

@tsplat
Copy link

tsplat commented Jan 9, 2022

I have a slightly different setup, using a Logitech M720 mouse and a K850 keyboard (sold as the MK850 mouse/keyboard set). They're both connected to System 1 using a single Logitech unifying receiver and System 2 using Bluetooth. Both systems are running Windows 10. The Bluetooth side requires long HID++ commands to initiate switching, which I figured out using this article: pwr-Solaar/Solaar#1154. So, my commands turned out to be these:

Switch keyboard from System 1 to System 2:
.\hidapitester.exe --vidpid 046D:C52B --usage 1 --usagePage 0xFF00 --open --length 7 --send-output 0x10,0x01,0x08,0x11,0x01,0x00,0x00

Switch mouse from System 1 to System 2:
.\hidapitester.exe --vidpid 046D:C52B --usage 1 --usagePage 0xFF00 --open --length 7 --send-output 0x10,0x02,0x09,0x11,0x01,0x00,0x00

Switch keyboard from System 2 to System 1:
.\hidapitester.exe --vidpid 046D:B34D --usage 0x0202 --usagePage 0xFF43 --open --length 19 --send-output 0x11,0x00,0x08,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

Switch mouse from System 2 to System 1:
.\hidapitester.exe --vidpid 046D:B015 --usage 0x0202 --usagePage 0xFF43 --open --length 19 --send-output 0x11,0x00,0x09,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

The above mouse commands always work fine, and the command for switching the keyboard to System 2 always works fine too, but I'm having some problems with the keyboard when switching from System 2 to System 1 only. It works with no issues most of the time. However, every once it a while, after running hidapitester.exe to switch the keyboard back to System 1, the keyboard will immediately "bounce" back to System 2. This is visible by observing the white "Easy Switch" buttons on the keyboard. I'll see the "1" key solidly illuminate briefly followed by "2" flashing once and then solidly illuminating again. A few successive retries typically yield the same "bouncing" behavior, and then the normal switching behavior will resume and things will be fine again for a while.

That's a bit irritating and I never have this problem with the mouse, or when the keyboard switches to System 2. An easy workaround is just to send many of the same hidapitester.exe commands to switch the keyboard. Unfortunately, an even bigger problem is that the keyboard will eventually get "broken" if the "bouncing" behavior happens over the course of many system switches. The "shift" key will get stuck on System 2 only. This is not visible on the Windows 10 On-Screen Keyboard and the caps-lock key can't be used to fix it. The only fix that I've found is to reboot System 2.

I used Wireshark to try to figure out what is going on during a normal "Logitech Flow" keyboard switch on the Bluetooth-connected System 2, just to see if there is more involved than just sending the above control commands. The only thing I noticed is there there are 3 USB URB_INTERRUPT packets sent to the keyboard right before the system switch control command gets sent. Each one has a Packet Data Length of 0. I'm thinking that these may prep the keyboard for the switch to System 1 by telling it to flush any remaining input (or something like that) but I'm not sure. Also, I don't know how to send those URB_INTERRUPT packets with hidapitester.exe.

Has anyone else experienced this keyboard "bouncing" and "shift-key-stuck" behavior? Have you had any luck with sending URB_INTERRUPT packets to fix it? I thought that maybe the keyboard has trouble switching when it is in use (for Bluetooth only), so I bound the switching script to a mouse button to ensure the keyboard remained idle before and during the switch. However, I still observe the same issues after a while. I also thought that this may be a driver issue on System 2. However, using the keyboard switching buttons never causes the bad behavior and the mouse always switches fine with hidapitester.exe, so I'm hoping that there is a way to fix the problem by sending additional USB flush/quiesce/interrupt commands before/during the keyboard switch to System 1.

If anyone has any ideas, please let me know. Also, thanks for all the work put into this so far and all the detailed posts. I would not have gotten this far without them.

@dnlw07
Copy link

dnlw07 commented Jan 10, 2022

@tsplat
unfortunately, I also face similar issue. I don't know better way than sending switch command multiple times.

@tsplat
Copy link

tsplat commented Jan 10, 2022

@dnlw07 - Thanks for your reply. Have you also run into the "shift-key-stuck" problem?

@dnlw07
Copy link

dnlw07 commented Jan 10, 2022

@tsplat
No, I don't.
Only issue I face is that during the mouse/keyboards switch there is 20% chance that the channel will bounce back.
I can live with that but its annoying.

@KonradFoit
Copy link

KonradFoit commented May 24, 2022

Hello all,
So a little backstory: I've got Logitech MX Ergo for a few years now, and I recently bought MX Keys with switching hosts in mind, to have a nice setup with 3 monitors, mouse and keyboard which I would be able to switch with one click between my private PC and company issued laptop for work. Oh boy, was I disappointed that this is impossible with stock Logitech software. There is Flow, but I am constantly connected via VPN on my laptop and with that, Flow simply doesn't work. Not to mention that there isn't even an option to launch a batch file upon switch or basically perform any additional action, so switching monitors was never an option.
So I started searching and got here. With quite a bit of inspiration from you guys, I was able to put together a neat little python script that achieves everything I wanted.
Well, almost, because firstly I found out that two of my old monitors are damaged, and don't react to control signals (even hardware buttons), and later that I am only able to use MX Keys easy switch keys, not the MX Ergo switch button on top (explained in my repo). However, I'm still considering this as a win, and I'm totally happy with it. I even find it useful to be able to just switch the mouse for a moment, to switch music on the PC or whatever.
And here it goes, here's my script: https://github.com/KonradFoit/logi-kvm
Feel free to ask questions, use it anyway you want. If you'll find some other cool features of some other Logitech devices, feel free to reach me or even make a pull request.
Cheers!

@JLeikam
Copy link

JLeikam commented May 27, 2022

Great thread! Thanks everyone for posting. I managed to get this working for my setup and wanted to post my findings in case it helps someone else with a similar setup:

Keyboard: Logitech Ergo K860 
Mouse: Logitech MX Vertical

My use case is switching both my keyboard and mouse between two systems using a script. Both systems have a logitech unifying receiver which I seemed to have better luck with instead of bluetooth.


Here are the commands I used:

On my secondary system, I have a script to switch to my first system. The script runs the following commands:
Swap to Channel 1 of Logitech Ergo K860 Keyboard:
./hidapitester --vidpid 046D:C52B --usage 0x0001 --usagePage 0xFF00 --open --length 7 --send-output "0x10,0x01,0x09,0x1c,0x00,0x00,0x00"

Swap to Channel 1 of MX Vertical Mouse:
./hidapitester --vidpid 046D:C52B --usage 0x0001 --usagePage 0xFF00 --open --length 7 --send-output "0x10,0x02,0x0c,0x1c,0x00,0x00,0x00"

Then on my first system, I have a script to switch to the secondary one:
Swap to Channel 2 of Logitech Ergo K860 Keyboard:
./hidapitester --vidpid 046D:C52B --usage 0x0001 --usagePage 0xFF00 --open --length 7 --send-output "0x10,0x01,0x09,0x1c,0x01,0x00,0x00"

Swap to Channel 2 of MX Vertical Mouse:
./hidapitester --vidpid 046D:C52B --usage 0x0001 --usagePage 0xFF00 --open --length 7 --send-output "0x10,0x02,0x0c,0x1c,0x01,0x00,0x00"


Here's a rough breakdown of the anatomy of the --send-output part of the command (note the examples below are switching to channel 1):

Logitech Ergo K860

Header Receiver Slot ID Const/Magic Number Target Channel Padding Padding
0x10 0x01 0x09 0x1c 0x00 0x00 0x00

MX Vertical

Header Receiver Slot ID Const/Magic Number Target Channel Padding Padding
0x10 0x02 0x0c 0x1c 0x00 0x00 0x00

Some notes:

  • Receiver Slot: 1-based index that corresponds to the devices paired to the logitech unifying receiver. This will vary depending on your setup. Downloading logitech's unifying software might help if you need to check this. Or you could try brute forcing it since there are only a max of 6 devices that can be paired to a unifying reciever.
  • ID: Finding this was the time-consuming part for me. I think this varies depending on the model/type of the logitech device. I found this through trial and error by monitoring usb traffic. Note that the ID for the keyboard and mouse were different in my case.
  • Target Channel: 0-based index that corresponds to the channel you want the logitech device to be swapped to.
  • Const/Magic Number: Disclaimer: I'm not entirely sure what decides this part of the message, but for my case it was 0x1c.

Hope that helps!

@KonradFoit
Copy link

@JLeikam if you'll look at readme in me repo, you'll find that what you refer to as "ID" in this message is the number of the CHANGE HOST feature of the device. You can find that easily, e.g. with Solaar by running solaar show and look for CHANGE HOST.

@JLeikam
Copy link

JLeikam commented May 28, 2022

@KonradFoit Nice! That's good to know. In my case, I was switching between windows and mac, so wasn't able to use Solaar.

@vp777
Copy link

vp777 commented Dec 8, 2022

Adding to what @JLeikam said, the id for MX Master 3 is: 0x0a

@GaMartinelli
Copy link

GaMartinelli commented Dec 10, 2022

Perhaps I misunderstood how this is supposed to work.

Running hidapitester from RECEIVER_2, I can switch MX Anywhere 3 TO RECEIVER_1 or RECEIVER_3, but I can't switch FROM RECEIVER_1 or RECEIVER_3.

What I'm trying to do, if I have MX Keys and MX Mouse set to RECEIVER_2, once I switch the keyboard using the easy keys, I want to bind a command to some other key to take control of the mouse as well, is that possible?

Also, seems like the values for my MX Anywhere 3 is different from the one posted before, so if anyone needs, it's 0x10,0x02,0x0a,0x1e,0x00,0x00,0x00
0x10,0x02,0x0a,0x1e,0x01,0x00,0x00
0x10,0x02,0x0a,0x1e,0x02,0x00,0x00

@OliverPearmain
Copy link

Amazing insights here, thank you to all that have contributed.

Question, does this method work when your Logitech device(s) are connected via bluetooth or does it only work when using the a Bolt or Unifying receiver?

@bthamburg
Copy link

...I'm having some problems with the keyboard when switching from System 2 to System 1 only. It works with no issues most of the time. However, every once it a while, after running hidapitester.exe to switch the keyboard back to System 1, the keyboard will immediately "bounce" back to System 2.
...
If anyone has any ideas, please let me know.

I've the same. "busdog" tells me to send the command twice, if I press easy switch. So I send all command double time like:

Switch mouse from 2->1 (one line):
hidapitester --vidpid 046D:C52B --usage 1 --usagePage 0xFF00 --open --length 7 --send-output 0x10,0x02,0x09,0x11,0x00,0x00,0x00 --length 7 --send-output 0x10,0x02,0x09,0x11,0x00,0x00,0x00

@Z-bit-Code
Copy link

Hi, I'm new here and have literally no experience in what You are doing,
Did anybody manage to create a working solution for both Win11 and Linux?
I would love to switch both devices back and forth with only one keystroke on the MX keys.

@meliksah
Copy link

meliksah commented Mar 17, 2023

Hi community.

I created cross platform application for linux macos and windows to change source whenever go to edge of screen. It is creating system tray icon and you can activate or do the settings from there. You can emulate mouse movement for not sleeping even you can sync your clipboard from your local network as well. I hope it helps everyone

https://github.com/meliksah/lcs

happy coding :)

executables are in here: https://github.com/meliksah/lcs/releases/tag/v0.0.2

@Q3X8
Copy link

Q3X8 commented Jul 6, 2023

TIP FOR PEOPLE REPLACING DEVICES

My MX Vertical had a failing button so I replaced it with another one. Getting InputSwitcher working again was quite a pain but I finally figured it out.
Even though I unpaired the old device and everything, it was still getting weird. I finally figured something out in BusDog:
This was for the old mouse
--send-output 0x10,0x01,0x0c,0x1e,0x01,0x00,0x00

I was having a hell of a time figuring stuff out. Big tip: When using BusDog, the only button you care about pushing is the easy switch button(s) I got the info not when I left my device but when I pushed the button to come back to it

Anyways, long story short, for whatever reason I had to change the second byte/chunk whatever from 0x01 to 0x03

and I changed the 4th byte but I'm not 100% sure I had to, but I'm over testing it. Hopefully this saves someone else a couple hours
old --send-output 0x10,0x01,0x0c,0x1e,0x01,0x00,0x00
new --send-output 0x10,0x03,0x0c,0x1a,0x01,0x00,0x00

Someone should be a champ and get the IDs of all the Logitech products. ..maybe they should get paid for doing that. Seems like a perfect task for an employee of Logitech. Not like they have access to any of the devices or anything right? Maybe wrap all this in a nice little program for their paying customers. smh

@nefricore
Copy link

nefricore commented Nov 3, 2023

Massive thanks to everyone involved in this!

Complete newbie in this area, so after struggling a bit with figuring it out, I thought of leaving my setup here in case anyone finds it useful:

PC 1: desktop, Win 10, regular Logi Options+, via Logi Bolt
PC 2: laptop behind VPN + proxy, Win 10, the offline version of Logi Options+ with Flow (which can't connect because of the VPN I'm guessing), via Bluetooth
Peripherals: MX Master 3S + MX Keys S

marcelhoffs has left some very useful directions about Bluetooth connections at the end of his readme at: https://github.com/marcelhoffs/input-switcher . I took the id for the mouse from there and it worked right away via the dongle. However I couldn't find any info about the id of the keyboard (the id for the MX Keys didn't do the trick). Since I don't have a Linux machine, I setup Flow with a third PC and traced it using Wireshark and USBPcap. You can filter by usb.data_fragment to get what's being sent. One of the first entries contained the id for the MX Keys S which for added confusion turned out to be the same as the id for the mouse O.o.

So PC1 to PC2 turned out to be:
rem Switch MX Master 3S, Logi Bolt, slot 2, to channel 1
.\hidapitester.exe --vidpid 046D:C548 --usage 0x0001 --usagePage 0xFF00 --open --length 7 --send-output 0x10,0x01,0x0a,0x1e,0x00,0x00,0x00

rem Switch MX Keys S, Logi Bolt, slot 3, to channel 1
.\hidapitester.exe --vidpid 046D:C548 --usage 0x0001 --usagePage 0xFF00 --open --length 7 --send-output 0x10,0x02,0x0a,0x1a,0x00,0x00,0x00

The first index in the Logi Bolt wasn't in use probably as a result of all the switching, reconnecting and testing. The 4th byte seems to have several valid values so literally the only meaningful difference was the position in the Logi Bolt (the 2nd byte).

The reverse direction was trickier. I followed the same logic however instead of slots there are different Bluetooth pseudo devices. The slot byte seems irrelevant. I used hidapitester.exe --list-detail to get the ids for the Bluetooth devices so the result came out as:

rem Switch MX Master 3S, via Bluetooth, slot N/A, to channel 2
.\hidapitester.exe --vidpid 046D:B034 --usage 0x0202 --usagePage 0xff43 --open --length 11 --send-output 0x11,0x00,0x0a,0x1e,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

rem Switch MX Keys S, via Bluetooth, slot N/A, to channel 2
.\hidapitester.exe --vidpid 046D:B378 --usage 0x0202 --usagePage 0xff43 --open --length 11 --send-output 0x11,0x00,0x0a,0x1a,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

@pleshakovalexander
Copy link

I have same issue with MX ergo mouse and Ergo K860 keyboard

@davide-stefanini
Copy link

davide-stefanini commented Apr 29, 2024

Hey @nefricore, I managed to switch the keyboard (MX Keys S) following your message, but I'm having trouble finding the id for the mouse (I have a MX Anywhere 3S).
Looking at your commands it seems the device id is the third value of the string, but how did you find it?
My keyboard value is 0x0a, I tried every value from 0x00 to 0x1e and still nothing... Is there a way to find out that value?

@nefricore
Copy link

Hey @davide-stefanini ,
I came across three different methods to get the ID:

  • People use Solaar in a Linux box to get the ID. I haven't tested it myself.
  • Install Logi Options+ with Flow on two Windows PCs on the same network. Then you can trace the communication between them using Wireshark and USBPcap by switching the mouse via Flow. It's a bit tricky if you've never dabbled in Wireshark but you can filter by usb.data_fragment which makes it much more manageable. One of the first entries had the correct ID in my case.
  • I also came across this script to iterate over all hex values: Logitech K780 and script to find the right command for your device marcelhoffs/input-switcher#15 (comment). I remember that I tried it as well and it works as long as you adjust the other bytes in the loop correctly.

I hope that helps.

@shanekm1
Copy link

is there a way to do it without the USB receiver, using bluetooth instead?

would i be using hidapitester.exe for this?

ex: .\hidapitester.exe --vidpid d2ca4b92c94f --usage 1 --usagePage 0xFF00 --open --length 7 --send-output 0x10,0x02,0x0c,0x1c,0x02,0x00,0x00

where vidpid: is an address of the bluetooth device?

@davidschreiber
Copy link

It's been some time, but I used bluetooth too. I think you use the address of the bluetooth HID device 👍

@shanekm1
Copy link

shanekm1 commented Feb 1, 2025

this works for me when using the USB receiver, how would I modify it to use Bluetooth?

.\hidapitester.exe --vidpid 046D:C52B --usage 1 --usagePage 0xFF00 --open --length 7 --send-output 0x10,0x02,0x0c,0x1c,0x00,0x00,0x00

@shanekm1
Copy link

shanekm1 commented Feb 1, 2025

Finally got it to work - with MX Vertical 3 Mouse:

There are several version of this (USB receiver to Bluetooth, Bluetooth to Bluetooth etc)

1 - Bluetooth channel 2 to Bluetooth channel 1:
@echo off

:: DEVICE_ID = device identifier (mouse/keyboard etc)
set DVC_ID=0x0C

:: Index of device in a list (typically this maps to the order of mouse devices you see in the unifying software app in Advanced settings)
:: USB receiver -> Example: 0x01 -> mouse, 0x02 -> keyboard etc
:: Bluetooth -> always 0x00
set DVC_INDEX=0x00

:: DST_CH = destination channel 0x00 for 1, 0x01 for 2, 0x02 for 3
set DST_CH=0x00

:: Use hidapitester --list-detail to obtain both the vendorID and productID
:: USB receiver - called from
::set RCVR_VID=046D
::set RCVR_PID=C52B

:: Bluetooth
set RCVR_VID=046D
set RCVR_PID=B020

.\hidapitester.exe -v --vidpid %RCVR_VID%:%RCVR_PID% --usagePage 0xFF43 --usage 0x0202 --open --length 7 --send-output 0x11,%DVC_INDEX%,%DVC_ID%,0x1C,%DST_CH%,0x00,0x00

exit 0


2 - USB channel 1 to Bluetooth channel 2:
@echo off

:: DEVICE_ID = device identifier (mouse/keyboard etc)
set DVC_ID=0x0C

:: Index of device in a list (typically this maps to the order of mouse devices you see in the unifying software app in Advanced settings)
:: USB receiver -> Example: 0x01 -> mouse, 0x02 -> keyboard etc
:: Bluetooth -> always 0x00
set DVC_INDEX=0x01

:: DST_CH = destination channel 0x00 for 1, 0x01 for 2, 0x02 for 3
set DST_CH=0x01

:: Use hidapitester --list-detail to obtain both the vendorID and productID
:: USB receiver - called from
set RCVR_VID=046D
set RCVR_PID=C52B

:: Bluetooth
::set RCVR_VID=046D
::set RCVR_PID=B020

.\hidapitester.exe -v --vidpid %RCVR_VID%:%RCVR_PID% --usagePage 0xFF00 --usage 1 --open --length 7 --send-output 0x10,%DVC_INDEX%,%DVC_ID%,0x1C,%DST_CH%,0x00,0x00

exit 0


3 - Bluetooth channel 3 to Bluetooth channel 2

@echo off

:: MSE_ID = mouse identifier
set MSE_ID=0x0C

:: DST_CH = destination channel 0x00 for 1, 0x01 for 2, 0x02 for 3
set DST_CH=0x01

:: Use hidapitester --list-detail to obtain both the vendorID and productID
set RCVR_VID=046D
set MSE_PID=B020

.\hidapitester.exe -v --vidpid %RCVR_VID%:%MSE_PID% --usagePage 0xFF43 --usage 0x0202 --open --length 7 --send-output 0x11,0x00,%MSE_ID%,0x1C,%DST_CH%,0x00,0x00

exit 0


MACOS - for some reason on my MAC you have to send length 20 instead of 7
Switch from Bluetooth channel 2 (MAC) to USB channel 1 (PC)

#!/bin/bash

/hidapitester --vidpid 046D:B020 --usagePage 0xFF43 --usage 0x0202 --open --length 20 --send-output 0x11,0x00,0x0C,0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

exit 0


is it possible to use hipapitester.exe with a Keychron keyboard to change Bluetooth channel?

@Biyss
Copy link

Biyss commented Feb 4, 2025

Hi guys, this topic has been here for years, it helps me so much (cannot understand why Logitech still doesn't have such function....). Thanks to everyone involved in this!

I notice most of the comments are with USB receiver. I'm working with both Windows PC using Bluetooth, so I thought of leaving my setup here in case anyone finds it useful:

PC 1: laptop , Win 11, regular Logi Options+, via Bluetooth
PC 2: laptop , Win 11, regular Logi Options+, via Bluetooth
Peripherals: MX Master 2S + MX Mechanical

I followed marcelhoffs useful directions about Bluetooth connections at the end of his readme at: https://github.com/marcelhoffs/input-switcher.

PC1 to PC2 turned out to be:
rem Switch MX Mechanical to channel 2
.\hidapitester.exe --vidpid 046D:B366 --usage 0x0202 --usagePage 0xFF43 --open --length 11 --send-output 0x11,0x00,0x09,0x1E,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

rem Switch MX Master 2S to channel 2
.\hidapitester.exe --vidpid 046D:B019 --usage 0x0202 --usagePage 0xFF43 --open --length 11 --send-output 0x11,0x00,0x09,0x1e,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

PC2 to PC1 turned out to be:
rem Switch MX Mechanical to channel 1
.\hidapitester.exe --vidpid 046D:B366 --usage 0x0202 --usagePage 0xFF43 --open --length 11 --send-output 0x11,0x00,0x09,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

rem Switch MX Master 2S to channel 1
.\hidapitester.exe --vidpid 046D:B019 --usage 0x0202 --usagePage 0xFF43 --open --length 11 --send-output 0x11,0x00,0x09,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

@phatmike128
Copy link

Thankyou everyone so much, now I can switch my 2x monitors, kb and mouse at tap of a single button! Again I will share my setup for others, in similar format as @Biyss (thanks!)

PC 1: Home PC , Win 11, regular Logi Options+, MX Master 3 via Unifying Receiver, MX Keys S via Logi Bolt
PC 2: Work laptop, Win 10, regular Logi Options+, MX Master 3 via Bluetooth, MX Keys S via Bluetooth

I had to also download a newer version of hidapitester from the official github, as the version saved in marcelhoffs repo didn't work on my Work laptop for some reason (seemed blocked).

PC1 to PC2:
rem Switch MX Master 3 to channel 2
.\hidapitester.exe --vidpid 046D:C52B --usage 0x0001 --usagePage 0xFF00 --open --length 7 --send-output 0x10,0x01,0x0a,0x11,0x01,0x00,0x00

rem Switch MX Keys S to channel 2
.\hidapitester.exe --vidpid 046D:C548 --usage 0x0001 --usagePage 0xFF00 --open --length 7 --send-output 0x10,0x01,0x0a,0x11,0x01,0x00,0x00

PC2 to PC1:
rem Switch MX Master 3 to channel 1
.\hidapitester.exe --vidpid 046D:B023 --usage 0x0202 --usagePage 0xFF43 --open --length 19 --send-output 0x11,0x01,0x0A,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

rem Switch MX Keys S to channel 1
.\hidapitester.exe --vidpid 046D:B378 --usage 0x0202 --usagePage 0xFF43 --open --length 19 --send-output 0x11,0x01,0x0A,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00

Unrelated, but may be helpful to someone: I am also switching my monitors using the method described in this reddit thread.

@zrtchp
Copy link

zrtchp commented Feb 25, 2025

Great thread! Thanks everyone for posting. @pleshakovalexander I successfully switched my K860, maybe you can get some useful information from here.

Thank u @JLeikam, I successfully switched my K860 from Computer A, which was connected via a logitech unifying receiver, to Computer B, which was connected via Bluetooth. However, I have been unable to connect it from Computer B to Computer A.
And then, after many attempts, I used busdog to capture packets and finally managed to connect from Computer B to Computer A.

Here are the commands I used:
**A to B(logitech unifying receiver to bluetooth):
hidapitester.exe --vidpid 046D/C52B --open --length 7 --send-output 0x11,0x03,0x09,0x1C,0x01,0x00,0x00

**B to A(bluetooth to logitech unifying receiver):
hidapitester.exe --vidpid 046D/B359 --usage 0x0202 --usagePage 0xFF43 --open --length 7 --send-output 0x11,0xFF,0x08,0x1B,0x00,0x00,0x00

It is worth noting that, first of all, I activated the channel switching through the flow function and simultaneously used busdog to capture the Hex during the switching process. However, when I tried to switch from Computer B to Computer A using the same HEX, I couldn't succeed without specifying the "--usage" and "--usagePage". Later, I used the command "hidapitester --list-detail" to list all the information and specified the "--usage" and "--usagePage" to try one by one. Eventually, I found the command that could be executed successfully.

I hope the above information is helpful to you. The above content is translated by AI, and there may be some language errors.

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

No branches or pull requests