How to create a Bluetooth Device list that shows characteristics as well as device names

I'm trying to build an app where I use the AI2-generated phone app to interact with a set of arduino nano 33 BLE devices that are advertising the uuids of a particular service and characteristic. I'm attaching the .aia file that generates an app that looks like this:

The screenshot shows only a single device in the listview to connect to, but there are often many. I'm only interested in connecting to a device that has a certain value of the advertised characteristic (and service). So I'd like to either 1) list only those ble devices that have the desired characteristic value or 2) change the text in the listview to include not only the device name but also the characteristic value.

Does anyone know how to do that?

scratch_for_ai2_help.aia (194.4 KB)


There might be something useful in the search for 'bluetooth' in this community. You can find stuff like this by using the magnifying glass at the right page top. There are similar topics to your question in this list of discussions.

Thank you. I have looked there extensively, e.g. this and this . In fact, I'm using Taifun's suggestion from the first link to extract the local device name from the original device list string which contains space separated values for physical address, device name, and rssi value. But my problem is different. Let's say the arduinos are all advertising a service with a characteristic that takes on the values 0 or 1. I only want to connect to an arduino for which the characteristic is currently 0. How do I do that? I need to either 1) display in the listview only those arduinos for which the characteristic is 0 or 2) augment what's displayed in the listview from, e.g., 'device #3'
'device #4'
'device #3, char val = 0"
'device #4, char val = 1"

I don't know how to do 1) or 2) so I'm left with randomly choosing among the devices shown in the listview and checking. This is inefficient at best and unworkable at worst, when there are many devices and the ones you're looking for are in the minority.