BluetoothLE connect with saved address (without scanning)

First post, first app, first proposed change to an extension!

Just wanted to share a code bit with you all. App Inventor is awesome by the way! However, with my first app project I was a little frustrated with the fact that you cannot store the MAC address of a BLE device and connect to it between closing the application and opening it again.

So I went down the route of installing the sources and building App Inventor on my PC and modifying the BLE extension to permit the creation of a manual BluetoothDevice type. I have only done simple testing on it and it seems like I haven’t broken anything… yet. So, coupled with TinyDB, I have a persistent MAC address that I can use between closing and opening the application and BLE doesn’t give me that “no devices in the list” warning anymore.

The changes I did to the connectwithaddress method is attached. I might eventually get around to posting some proposed changes on git, but I am a bit lazy at the moment.

Cheers!

connectwithaddress.txt (2.7 KB)

Hello josechow

The latest BLE extension, yet to be published (do not know why) delivers on your request :slight_smile:

Thanks! I should have checked the Git branches more carefully.

Sorry to hijack this thread, but I have a similar requirement where I want to read the RSSI of a found device. I have the address set as a global variable, however, the BLE extension only reads RSSI of a given index in the list.
I need it to read the RSSI of a given address without connecting. I have addressed my concern in this post, but nobody has replied to it yet, and I’m compelled to reply here.

Edit: Any clue as to when the new extension is going to be published?

In this forum there is a link to version 20190701

https://groups.google.com/forum/#!searchin/mitappinventortest/rssi$20ble|sort:date/mitappinventortest/3U18LyiI8Rg/I559I8nPAgAJ

1 Like

Thank you so much! AI2 ftw!!

Now officially released: