-
-
-
no no no no no... writing does work!
just the callback functiononWrite()
is not implemented
I can both read and write / edit the value of certain characteristic, but could not call theonWrite()
callback function
In my conception, I should write / edit the value of characteristic A, and then my ESP32 call theonWrite()
callback function to verify this value. If the value is valid, ESP32 will change characteristic B to readable mode.
Just like some kind of encryption verification. -
-
-
After solving the existing problems, I found that callback function for
onWrite()
is not implemented.
And Unable to implement thenotify
andindicate
, my phone always reports error when sending notification listening requests to ESP32.NRF.setServices({ 0x1901: { 0x1902: { value : "Hello", broadcast : true, readable : true, writable : true, notify : true, indicate: true, onWrite: (event) => { console.log("Got: ", event); } } } });
-
-
-
-
-
-
-
It is issue of ESP32 port. I have just tried the code without quotes and dashes:
NRF.setServices({ a18419019ed149b3b998172d8f29b213 : { a18419029ed149b3b998172d8f29b213 : { readable : true, writable : true, notify : true, onWrite: (event) => { console.log("Got: ", event); } } } }); NRF.setAdvertising({}, { name: "ISP" });
It does not work.
F 6
F 0
Uncaught Error: invalid Char UUID:UUID string should only contain hex characters and dashes at line 12 col 2
});May be there are some bugs in ESP32 code.
-
-
-
-
I am trying to send this command to my ESP32:
NRF.setServices({ "a1841901-9ed1-49b3-b998-172d8f29b213" : { "a1841902-9ed1-49b3-b998-172d8f29b213" : { readable : true, writable : true, notify : true, onWrite: (event) => { console.log("Got: ", event); } } } }); NRF.setAdvertising({}, { name: "ISP" });
Then the console reported an error:
F 0
F 0
Uncaught Error: invalid Char UUID:UUID string should only contain hex characters and dashes at line 12 col 2
});I changed the
Char UUID
to0x1901
, but it still doesn't work. -
👍👍👍