I am trying to connect and send data from my android application to a microship RN4871 Bluetooth low energy module.
I want to use the transparent UART mode.
For that, I am scanning the device with a BroadcastReceiver and then i am connecting to the module with the following code :
socket = device.createRfcommSocketToServiceRecord(UUID.fromString("00002A00-0000-1000-8000-00805F9B34FB"));
receiveStream = socket.getInputStream();
sendStream = socket.getOutputStream();
Where "00002A00-0000-1000-8000-00805F9B34FB" is the seriial port uuid
and then I send data with :
String data = "test";
sendStream.write(data.getBytes());
sendStream.flush();
The problem is that i don't receive any data on my microcontroller..
Do you know what could be the problem ?