NimBLE-Arduino icon indicating copy to clipboard operation
NimBLE-Arduino copied to clipboard

Read / Write BLERemoteCharacteristic like stream or serial

Open softwarecrash opened this issue 1 year ago • 1 comments

Hello, i hope anyone can help me with my little problem.

i have a Bluetooth device that act like a serial interface, it wait for data like A503000.... and answer with similar over wire it works perfect, so it exist a Bluetooth dongle for this device that "replace" the wire and give me the serviceUUID: 0xfff0

so i have a library/function that build and send this data, and receive it and split it in readable pieces, badly the library need a stream class where it can send and receive.

any chance to build a function that create a stream class like a serial with read, write, flush, available... from the BLERemoteCharacteristic?

the BluetoothSerial library doesn't work, it cant discover or connect this Bluetooth device.

softwarecrash avatar Dec 30 '23 12:12 softwarecrash

This would require skipping the GATT layer and going to l2cap. This is possible but probably not something many would be familiar with. When the PR at esp-nimble-cpp is ready I will look to add it here.

h2zero avatar Jun 15 '24 04:06 h2zero