I am using BLE plugin and try to make app to conect with Arduino using bluetooth. If I use some BLE terminal from store I get information from module. My app can find and connect to module, but I dont know how to read information from bluetooth.
Hi @Afomin31 , like the link shared, if have connected to module, the next need to get Serviceand Service's Characteristics ,
var services = await connectedDevice.GetServicesAsync();
var characteristics = await service.GetCharacteristicsAsync();
the info can be get form Characteristics like this:
var bytes = await characteristic.ReadAsync();
The last step , you need to deal with the bytes data. And the format of the data depends on the format in which the connected device is sent.
There is a demo can be refered to.
I am using the Plugin BLE....does anyone know how to get the phone to keep scanning when the android phone goes to sleep? All scanning seems to stop until the phone is woke back up
Answers
Hi @Afomin31 , like the link shared, if have connected to module, the next need to get
Service
and Service'sCharacteristics
,the info can be get form
Characteristics
like this:var bytes = await characteristic.ReadAsync();
The last step , you need to deal with the bytes data. And the format of the data depends on the format in which the connected device is sent.
There is a demo can be refered to.
This demo don't work for me...I think thats because I need this strange "guid". How can I get it?
Can we see some code as to what you are trying to do ?
I am using the Plugin BLE....does anyone know how to get the phone to keep scanning when the android phone goes to sleep? All scanning seems to stop until the phone is woke back up