12-03-2020, 04:16 AM
(12-02-2020, 02:49 AM).laureote Wrote:(02-04-2020, 01:43 PM)danielt Wrote: Hello Daniel,
Thanks you for your job
I tried your os and it's works !!
I want to know if it's possible with micropython to send via urequest Heart Rate datat on a flask server from pinetime.
Thanks you !!
Possible? Yes. Implemented? No. It really depends on what protocol is used to communicate between the watch and the rest of the world.
Currently wasp-os adopts a very simple approach of presenting the Python REPL via the Nordic UART Service. Thus the watch is very much a peripheral and tools such as wasptool (for GNU/Linux) or GadgetBridge (for Android) work by connecting to the UART Service on the watch and sending it python commands and JSON via the "UART".
For urequests to work you'd need a full network stack which means switching the protocol from the UART Service to IPv6 over BLE. That would be really cool party trick but its a big job. Running IPv6 over BLE would also require users to setup some kind of gateway device (or run a special application) to bridge BLE to their home network. Over time such gateways may become common... although that world hasn't arrived yet (and maybe never will).
For now I'd recommend using the app model to exflitrate data from the watch. In other words get tools running on a WiFi capable device (wasptool or gadgetbridge) to periodically grab data from the watch and post it to your flask server.