Is there any way to "cache" the primaryService for later use (and store it in a JSON or something like that)?
There is, yes! Although normally you'd cache them in the app, not between apps.
I believe all you really need to do is do:
st_status = new BluetoothRemoteGATTCharacteristic();
st_status.handle = ...; // i think - it may be called something slightly different
... and get the handle from the number in your existing code. The handle number won't actually ever change on that device - it basically only changes with different firmwares/device types.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
There is, yes! Although normally you'd cache them in the app, not between apps.
I believe all you really need to do is do:
... and get the handle from the number in your existing code. The handle number won't actually ever change on that device - it basically only changes with different firmwares/device types.