I am trying to send a unlock command for a lock but ble manager return undefined
in result.
code below:
let finalCommand =
"f11fffee03100014fdb247fd2a15291d1c21f417d508cb62be27d05513ded16374f6f572666f6aa043f22f";
const data = stringToBytes(finalCommand);
const unlockDevice = (data) => {
BleManager.retrieveServices(reduxSingleDevice.doc.id).then(
(peripheralData) => {
BleManager.write(
"CC:B7:15:27:DD:32",
"6e400001-b5a3-f393-e0a9-e50e24dcca9e",
"6e400002-b5a3-f393-e0a9-e50e24dcca9e",
data
)
.then((result) => {
// Success code
console.log(new Date());
console.log("data: " + data);
console.log("result: " + result);
})
.catch((error) => {
// Failure code
console.log(error);
});
}
);
};
package info:
"react-native-ble-manager": "^8.8.0",
"react-native": "0.70.5"
I am not able to send the command via ble manager in write head.