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

Vendor and Product ID are 0 #18

Closed
joshfrench opened this issue Sep 27, 2022 · 5 comments
Closed

Vendor and Product ID are 0 #18

joshfrench opened this issue Sep 27, 2022 · 5 comments

Comments

@joshfrench
Copy link
Contributor

I was trying to configure Karabiner to ignore certain mods that can now be programmed directly on the Advantage, while leaving them enabled on my built-in keyboard. Karabiner does this by checking the vendor and/or product ID of the device.

According to Karabiner these values are missing or zeroed out:

[
    {
        "device_id": 4294970112,
        "is_karabiner_virtual_hid_device": false,
        "is_keyboard": true,
        "is_pointing_device": false,
        "location_id": 2150578859,
        "manufacturer": "Manufacturer",
        "product": "Adv360 Pro",
        "product_id": 0,
        "transport": "Bluetooth Low Energy",
        "vendor_id": 0
    },
    {
        "device_id": 4294968566,
        "is_built_in_keyboard": true,
        "is_karabiner_virtual_hid_device": false,
        "is_keyboard": true,
        "is_pointing_device": false,
        "location_id": 18446744071567310848,
        "manufacturer": "Apple Inc.",
        "product": "Apple Internal Keyboard / Trackpad",
        "product_id": 638,
        "transport": "USB",
        "vendor_id": 1452
    },
    {
        "device_id": 4294968517,
        "is_karabiner_virtual_hid_device": false,
        "is_keyboard": true,
        "is_pointing_device": true,
        "location_id": 3982802855,
        "manufacturer": "Logitech",
        "product": "M720 Triathlon",
        "product_id": 45077,
        "transport": "Bluetooth Low Energy",
        "vendor_id": 1133
    }
] 

The zmk docs indicate the defaults are non-zero, so I'm a little surprised these are just plain missing:

Config Type Description Default
CONFIG_USB_DEVICE_VID int The vendor ID advertised to USB 0x1D50
CONFIG_USB_DEVICE_PID int The product ID advertised to USB 0x615E

There are workarounds so this isn't critical, but it would be nice to have known identifiers to rely on. Thanks!

@ReFil
Copy link
Collaborator

ReFil commented Oct 7, 2022

Not sure why they were set to zero, definitely shouldn't be happening. I've forcibly written them into the config now, so if you sync fork you should be sorted now

@joshfrench
Copy link
Contributor Author

joshfrench commented Oct 10, 2022

Looks like this may also require a fix on the zmk side: pqrs-org/Karabiner-Elements#3236. If I read that correctly, this patch may have fixed the issue for the 360 (USB) but not the Pro over Bluetooth.

Thanks for adding these though, this should make it easier to verify once the upstream fix has been merged. Ultimately you may need to add these fields to the config: zmkfirmware/zmk@main...petejohanson:zmk:ble/gatt-dis-config-improvements

@ReFil
Copy link
Collaborator

ReFil commented Oct 10, 2022

These fixes have been merged into zmk main, I can update the adv360 pro repo to implement them too

@ReFil
Copy link
Collaborator

ReFil commented Oct 10, 2022

Change this line https://github.com/joshfrench/Adv360-Pro-ZMK/blob/9bcf09ffce76f9f754e7e0259be708200842e109/config/west.yml#L10

from adv360-z3 to adv360-z3-beta

and let me know how you get on with the vid and pid reporting :)

@joshfrench
Copy link
Contributor Author

Success! I did have to apply the change from #25, and the manufacturer string still needs updating:

    {
        "device_id": 4294989613,
        "is_karabiner_virtual_hid_device": false,
        "is_keyboard": true,
        "is_pointing_device": false,
        "location_id": 2150578859,
        "manufacturer": "ZMK Project",
        "product": "Adv360 Pro",
        "product_id": 24926,
        "transport": "Bluetooth Low Energy",
        "vendor_id": 7504
    }

But here's a PR for that: #28

Thanks for this change :)

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

2 participants