I am working on a simple web application that sends commands to an HC-06 Bluetooth module using Web Bluetooth API. So far, I have successfully connected the device to the browser and gained access to the server, service, and characteristics. The problem starts when I try to do anything after that point. Reading or writing to the HC-06 throws DOMException: GATT operation not permitted
.
I logged characteristic.properties
(in the fourth promise chain) and seem to have found the problem. BluetoothCharacteristicProperties is the following object:
{
authenticatedSignedWrites: false
broadcast: false
indicate: false
notify: true
read: false
reliableWrite: false
writableAuxiliaries: false
write: false
writeWithoutResponse: false
}
So, it makes sense that I can not perform any operations on the module. What I don't understand is why the permissions are set to false. I already have a working Python application that perfectly communicates with the same HC-06 - and I can send commands to it through an Android terminal. This leads me to believe there is some misconfiguration I've overlooked in the web app implementation. Is there a way to change these permissions through the Web Bluetooth API? Or perhaps through AT commands to the module itself? Or maybe the API simply won't work with this model? Any help would be appreciated!