Open schell opened 3 years ago
It is unclear why this is not working. The BlueZ documentation doesn't give any information about why 0x540
might be an invalid device class, and neither does the Bluetooth website.
Yes, it seems weird. In the meantime I'm using the cli as a backup.
I think it's notable that the 0x2000
part of 0x2540
sets the device in limited discovery mode. I thought maybe the problem was that setting 0x540
when the device is not already in limited discover would result in an invalid param error, so I set the device explicitly in limited discovery by first using set_discoverable
. This doesn't seem to remedy the situation, though.
Thank you for this nice crate. When trying to set up my rpi as a bluetooth keyboard I run into the following error, specifically while setting the device class:
Where
Xfer
is my own Error enum.This is roughly my program:
It's notable however, that using the command line to set the device class is working:
After running the cli above, the settings have properly updated:
I'm new to working with bluetooth so I'm not sure what the problem is, but I thought it might be that the
DeviceClass
wasn't being converted into the correctu16
- indeed my device class seems to convert to0x540
, but makingexec_command
public and calling it with an explicit class of0x2540
encounters the same error.