https://github.com/blackspherefollower/gattadvertisementtest
https://github.com/blackspherefollower/gattadvertisementtest
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/blackspherefollower/gattadvertisementtest
- Owner: blackspherefollower
- License: bsd-3-clause
- Created: 2023-12-19T10:38:01.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-04T09:23:18.000Z (over 2 years ago)
- Last Synced: 2025-01-30T17:47:05.079Z (over 1 year ago)
- Language: C#
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# GattAdvertisementTest
This is a quick test to see if the Bluetooth Advertisement features exposed by the Windows SDK can be used to control MuSe/LoveSpouce/etc devices
## Conclusion
Maybe.
Whilst it is possible to craft and publish the manufacturer data required, the SDK prevents you from changing the flags required to get the devices to read the advertisement as a command.
This is explicitly called out in https://learn.microsoft.com/en-us/uwp/api/windows.devices.bluetooth.advertisement.bluetoothleadvertisementpublisher.advertisement?view=winrt-22621#windows-devices-bluetooth-advertisement-bluetoothleadvertisementpublisher-advertisement:
```
When configuring the publisher object, you can't add restricted section types (BluetoothLEAdvertisementPublisher.Advertisement.Flags and BluetoothLEAdvertisementPublisher.Advertisement.LocalName). Trying to set those property values results in a runtime exception. You can still set the manufacturer data section, or any other sections not defined by the list of restrictions.
```
But as @arz321 points out here https://github.com/buttplugio/docs.buttplug.io/issues/2#issuecomment-1975239077 it is possible to just pad the manufacturer data to achieve the same end goal.
However: I'm seeing it take upwards of 5 seconds for devices to respond when controlled this way.