An open API service indexing awesome lists of open source software.

https://github.com/blackspherefollower/gattadvertisementtest


https://github.com/blackspherefollower/gattadvertisementtest

Last synced: over 1 year ago
JSON representation

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.