Bluetooth classic. How to set device class?
Posted: Fri Jul 14, 2023 3:06 pm
Hello.
I'm trying to set the device class to "Headphones".
But during the scan, the controller provides the following information
I think the problem is in the packet data. Most likely, there is some information missing for the controller. But I can't find any hints on the net about what a properly formed package should look like for this command. Can someone share this information with me? Thanks!
I'm trying to set the device class to "Headphones".
- // init buf
- setPackSize(buf, 4 + 3);
- uint8ToBuf(buf, PACK_TYPE_CMD);
- setOpCode(buf, HCI_OGF_CONTROLLER, HCI_OCF_WRITE_DEVICE_CLASS);
- //data
- uint8ToBuf(buf, 3);
- uint8ToBuf(buf, 0b00100000);
- uint8ToBuf(buf, 0b00000100);
- uint8ToBuf(buf, 0b00011000);
- // send packet
But during the scan, the controller provides the following information
I think the problem is in the packet data. Most likely, there is some information missing for the controller. But I can't find any hints on the net about what a properly formed package should look like for this command. Can someone share this information with me? Thanks!