HI , i’m using ionic to connect Nordicsemi device with BLE pluging, i cant get the list of devices and can connect but for reading and writing the api have this signature in BLE plugin
read(deviceId, serviceUUID, characteristicUUID)
and i don’t now what is serviceUUID and characteristicUUID for reading and writing
Hi,
A BLE device has different services (identified by UUID like 0x180a) and each services has multiple characteristics (identified by UUID like 0x2A24).
For example the service Device Information 0x180A has a characteristic Name Facturer 0x2A29, another characteristic Model Number 0x2A24 etc…
So, if you want to retrieve the Name facturer information, you have to use :
ble.read(deviceId,'180A','2A29').then(function(buffer){
alert(String.fromCharCode.apply(null,new Uint8Array(buffer)))
});
You will find more information here : https://www.bluetooth.com/specifications/gatt/services clic on services to get the detail
1 Like