RFC: Bluetooth LE device info on Windows #309
No reviewers
Labels
No labels
3rdparty
Android
API
Author does not respond
bsd
bug
build system/CI
ci-virtual-device
CMake
Contributions Welcome
Core
dependencies
device-specific
documentation
don't_merge
duplicate
enhancement
Example
Haiku
hidraw
hotplug
info required
invalid
libusb
macOS
Misc
Not an issue
question
Release
Test
Test GUI
Windows
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libusb/hidapi!309
Loading…
Reference in a new issue
No description provided.
Delete branch "ble_device_info"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This PR fixes issue with empty
manufacturer_string/product_string/serial_numberinhid_device_infostruct with Bluetooth LE devices on Windows systems.Fixes: #282
BLE Controllers example: Amazon Luna and Xbox One Model Model 1914.
Before:
After:
This seems to work.
Before (mainline git)
#309 output
Yes the latest git is good.
@DJm00n could you make a BLE fix only?
With that part only I'd like to finally release a 0.11.0 version.
BUS_TYPE isn't finished for all platforms, and even when it is done - let's have it in master for some time, before releaseing it.
@Youw I rebased this PR without #308 changes.
@DJm00n You may want to disable the following warning for VS.
maybe the warning is valid after all
added
string[maxlen] = L'\0';afterwcsncpycallsI don't have a BLE device, so I can't really try this myself, but I've reviewed the implementation and it looks good, with regards to my last comments.
As soon as those are referred, I'll merge this.
let's use
mbsrtowcs, to be safejust a code-style consistency
@ -307,0 +372,4 @@ULONG len;CONFIGRET cr;DEVPROPTYPE property_type;elseinitialize functions withNULL, as you have code that checks for itdone. I have to add s new tmp var because
mbsrtowcschangessrcpointer.@ -307,0 +372,4 @@ULONG len;CONFIGRET cr;DEVPROPTYPE property_type;I initialized those function pointers as
NULLinstead.done
that's fine
@ -307,0 +372,4 @@ULONG len;CONFIGRET cr;DEVPROPTYPE property_type;strictly speaking, that's not enough:
There is a possible/impossible scenario where it can fail:
CM_...pointers are dangling from last hid_init@ -20,6 +20,12 @@https://github.com/libusb/hidapi .otherwise a "macro redefinition" warning may occure
@ -20,6 +20,12 @@https://github.com/libusb/hidapi .done
@ -307,0 +372,4 @@ULONG len;CONFIGRET cr;DEVPROPTYPE property_type;What I suggest is:
@ -307,0 +372,4 @@ULONG len;CONFIGRET cr;DEVPROPTYPE property_type;done
Awsome, thanks!