Feeding data from Android phone to Bangle.js continuously?

Posted on
of 2
/ 2
  • @nienno,

    Sadly I have let this languish (in part because I finally got ControlIQ for my insulin pump which has made knowing the moment-to-moment number a bit less pressing).

    But, I do want to do it, and in fact hearing that there's someone else who could directly use it helps reinvigorate me! It will still take some time but hopefully not another 8 months.

  • @epw Thanks for your answer.
    I actually saw the code and played with it in my Garmin. And reusing such code I made my own Garmin app to see my glucose values while doing sports.
    However Garmin uses the ConnectIQ app to do the web request via

    I'd like to do the same thing but with a PineTime . I am trying to use the wasp-os for that platform using micropython but I believe a miss a companion app that accepts web request via BLE and returns the blood glucose data from xDrip.
    Any thoughts or advices are more than welcome.
    I don't know how to proceed... my thoughts are, reuse the android app shared on your post that advertises xDrip data via BLE under "request", and hopefully get such data in the call back and at that moment parse the data to get the glucose value as MVP (minimal valuable product).

  • I'm glad to hear you got something to work, @nienno!

    I think you're right about missing a companion app that accepts a Web request over BLE. The Android app on this thread might be able to do it, by making a Web request itself to, and then publishing that. While I don't think I can give many details on that, I can get you started with https://developer.android.com/training/vĀ­olley/simple

    It also might might sense to do this as a "push" action rather than a "pull" one. As in, maybe it would be too slow to make a Web request in order to respond to a BLE request and then give the answer. You can tell xDrip to send a "Broadcast Intent" every time it receives a new reading. The BLE app could then pick up those broadcast intents, and use them to publish the value.

    Again, I can only get you started, but you enable the broadcast intents by going to Settings -> Other Settings -> Inter-app settings -> Broadcast locally. There's some documentation at https://developer.android.com/guide/compĀ­onents/broadcasts, and it starts with probably-confusing overview, then gets to showing you actual code at the "Receiving broadcasts" heading.

    Let me know if you'd like me to try to expand on any of this!

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

Feeding data from Android phone to Bangle.js continuously?

Posted by Avatar for epw @epw