I have an issue using bluetoothctl and the gatt menu. I want to write in a specific device handle, but when I'm doing this nothing is returned. I have a second handle with some fields to check if an error occurred with what I wrote.
My data is a public key that I retrieve in hex format that I convert with python into bytes format.
I want to send a JSON as message so I convert my message withjson.dumps(message).encode()
When I have these data, I'm using the python PKCS1_OAEP to encrypt my message and retrieve my cyphertext.
The purpose is to send my cyphertext by air via the Linux BLE with bluetoothctl. However as I said before, when I use the bluetoothctl menu gatt and select the attributes where I want to write, nothing is returned even an error message but I know that an error occurred thanks to the second handle.
It's not my entire cyphertext but That's what it looks like \xbfm\xcd\xea\x15\xd1\x87\x90f]\xc9\x7f\x18M
. I don't know if the "write" functionality from menu gatt support cyphertext.
I know that the basics formats is like write "0x.. 0x.."
but I can't use it.
Do you have any ideas ? Thanks you !