@@ -510,12 +510,43 @@ static void hid_internal_get_info(const wchar_t* interface_path, struct hid_devi
510
510
/* Normalize to upper case */
511
511
for (wchar_t * p = compatible_id ; * p ; ++ p ) * p = towupper (* p );
512
512
513
+ /* USB devices
514
+ https://docs.microsoft.com/windows-hardware/drivers/hid/plug-and-play-support
515
+ https://docs.microsoft.com/windows-hardware/drivers/install/standard-usb-identifiers */
516
+ if (wcsstr (compatible_id , L"USB" ) != NULL ) {
517
+ dev -> bus_type = HID_API_BUS_USB ;
518
+ break ;
519
+ }
520
+
521
+ /* Bluetooth devices
522
+ https://docs.microsoft.com/windows-hardware/drivers/bluetooth/installing-a-bluetooth-device */
523
+ if (wcsstr (compatible_id , L"BTHENUM" ) != NULL ) {
524
+ dev -> bus_type = HID_API_BUS_BLUETOOTH ;
525
+ break ;
526
+ }
527
+
513
528
/* Bluetooth LE devices */
514
529
if (wcsstr (compatible_id , L"BTHLEDEVICE" ) != NULL ) {
515
530
/* HidD_GetProductString/HidD_GetManufacturerString/HidD_GetSerialNumberString is not working for BLE HID devices
516
531
Request this info via dev node properties instead.
517
532
https://docs.microsoft.com/answers/questions/401236/hidd-getproductstring-with-ble-hid-device.html */
518
533
hid_internal_get_ble_info (dev , dev_node );
534
+
535
+ dev -> bus_type = HID_API_BUS_BLUETOOTH ;
536
+ break ;
537
+ }
538
+
539
+ /* I2C devices
540
+ https://docs.microsoft.com/windows-hardware/drivers/hid/plug-and-play-support-and-power-management */
541
+ if (wcsstr (compatible_id , L"PNP0C50" ) != NULL ) {
542
+ dev -> bus_type = HID_API_BUS_I2C ;
543
+ break ;
544
+ }
545
+
546
+ /* SPI devices
547
+ https://docs.microsoft.com/windows-hardware/drivers/hid/plug-and-play-for-spi */
548
+ if (wcsstr (compatible_id , L"PNP0C51" ) != NULL ) {
549
+ dev -> bus_type = HID_API_BUS_SPI ;
519
550
break ;
520
551
}
521
552
}
0 commit comments