Suspend bluetooth - mergBLE?

This is the place to get technical support and discuss all things to do with MergEXT

Moderators: FourthWorld, heatherlaine, Klaus, robinmiller, monte

Post Reply
david_fff
Posts: 29
Joined: Wed Nov 12, 2014 5:29 pm

Suspend bluetooth - mergBLE?

Post by david_fff » Sat May 04, 2019 12:32 am

I am a type 1 diabetic using a continuous glucose monitor (CGM) to track my blood sugar levels. On a few occasions my blood sugar may drop into the very low range and the monitor sounds a loud alert. Even after I eat carbs to bring my sugar levels up, the monitor will beep loudly every 5 minutes for 20 to 30 minutes until my sugars drift into an acceptable range. I can stop the beeping by turning off bluetooth then turning it on 30 minutes later. When this happens in the middle of the night, however, I would prefer to open an app that would suspend bluetooth for 20 to 30 minutes. Someone suggested the extension mergBLE could do this, but I am totally a novice when it comes to using extensions in Livecode. I would be most grateful for any suggestions, and I imagine many other diabetics using CGM would as well.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Suspend bluetooth - mergBLE?

Post by jacque » Sat May 04, 2019 4:47 pm

Once installed, an extension works just like it's part of the engine. It sends messages to your scripts and scripts send commands to the extension.

Can you clarify a little more on the behavior you want? Do you want the app to recognize the alarm and turn off bluetooth by itself or are you just looking for a convenient way to tap an icon?

I assume you're on an iPhone since the merg extensions only work with iOS. If you have an Android phone there may be an easier way to do what you want with available software.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

SparkOut
Posts: 2834
Joined: Sun Sep 23, 2007 4:58 pm

Re: Suspend bluetooth - mergBLE?

Post by SparkOut » Sat May 04, 2019 7:29 pm

I *think* he does not wamt any interactions between LiveCode and the CGM software. Only to have an app that can turn off Bluetooth (which will stop the alarm) and turn it ln again 30 minutes later (which will restore the app's monitoring).

On iOS, yes.

david_fff
Posts: 29
Joined: Wed Nov 12, 2014 5:29 pm

Re: Suspend bluetooth - mergBLE?

Post by david_fff » Sat May 04, 2019 10:46 pm

Yes, exactly that: when I click a button, it turns off Bluetooth (which will stop the alarm from repeating) and after a scripted amount of time (say 25 minutes) it automatically turns Bluetooth back on. That way I can go back to sleep right away without being continuously awakened by the alarm.
And yes, this is for iOS. Android users already can get an app that does this.
The CGM manufacturer (Dexcom) should really script this function into its iOS app but so far they do not seem to be interested.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7210
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: Suspend bluetooth - mergBLE?

Post by jacque » Sun May 05, 2019 4:07 pm

I took a look at the list of commands and messages available and while mergBLE has options for setting up and interacting with a device, I don't see anything that allows you to turn off Bluetooth at the hardware level. You might want to look at IFTTT in the App Store, there may be some options there.

On the other hand, Apple is very restrictive about what software can do, and they may not allow apps to control Bluetooth availability. If so, that may be why there isn't an iOS app already.

Edit : A quick search shows that Apple does disallow software control of the Bluetooth state.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “MergEXT”