# \[Solved\] How do I list results of BLE scan to include BOTH the Device Name and Device ID?

**URL:** https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914
**Category:** BLE / BlueTooth
**Tags:** solved, bluetooth
**Created:** [November 14, 2019, 12:45am UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914 "2019-11-14T00:45:00Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![zimbu-bcb](https://avatars.discourse-cdn.com/v4/letter/z/6a8cbe/32.png) [@zimbu-bcb](https://community.thunkable.com/u/zimbu-bcb)
#### Post date: [November 14, 2019, 12:45am UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914/1 "2019-11-14T00:45:00Z")

</div>

I am scanning for BLE devices then listing the results on screen. I can list the Device Names without a problem, and the Device IDs without a problem, but I would like to show _ **both** _ of these together on each line of the list. I have tried various approaches including join text (see below failure), but no luck so far. Any suggestions appreciated!

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/a/1a3a72062c2d358c9efc61aa48e9778ab1acb555.png)

---

<div class="post-metadata">

### Author: ![CBVG](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/cbvg/32/32401_2.png) [@CBVG](https://community.thunkable.com/u/CBVG)
#### Post date: [November 14, 2019, 1:09am UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914/2 "2019-11-14T01:09:29Z")

</div>

As a matter of point, “text items” implies more than one item. The list viewer is a tool to see and select different entries from a LIST, so I assume that you may need to assign a LIST, which could be two individual text strings, as opposed to a string.

So, you do not join the two text; you assign each text component “Device Ids” and “Device Names” to a “create a list” block, which then is assigned to the list viewer.

---

<div class="post-metadata">

### Author: ![zimbu-bcb](https://avatars.discourse-cdn.com/v4/letter/z/6a8cbe/32.png) [@zimbu-bcb](https://community.thunkable.com/u/zimbu-bcb)
#### Post date: [November 14, 2019, 1:25am UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914/3 "2019-11-14T01:25:33Z")

</div>

Thanks. I saw this image in the list viewer docs:

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/a/8a43e9d870a01e4372743956ff7c25ecfb545160.png)

But I can not find the “Create a list” block in ThunkableX. I tried the simple List block:

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/9/b94a4a53f267cb9fe464226dca3d46a6b1e28da0.png)

I put Device IDs as the first line and Device Names as the second, but that just resulted in all the Device IDs squeezed onto the first line of the listviewer and all of the Device Names squeezed onto the second line.

So I am still stumped.

---

<div class="post-metadata">

### Author: ![CBVG](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/cbvg/32/32401_2.png) [@CBVG](https://community.thunkable.com/u/CBVG)
#### Post date: [November 14, 2019, 2:36am UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914/4 "2019-11-14T02:36:44Z")

</div>

I see. You want name#1 to be besides id#1, and name#2 besides id#2, etc.

That will take some doing.

You will have to parse both lists (names and ids), grabbing each element of both list in parallel and associate them in a resulting combined list. There is no free lunch, the logic you want will not happen just because you need it, you will have to code it.

An alternative would be to have two listview, side by side, with the first one on the left having the name, and the right one on the right the id. The issue would be that those, if they need to scroll, would not do so synchronously.  
Having a composite list, with both the name and id, would mean that selection would pick up an element that is neither a device name nor a device id, and would need to be split to return something that could be used.

---

<div class="post-metadata">

### Author: ![zimbu-bcb](https://avatars.discourse-cdn.com/v4/letter/z/6a8cbe/32.png) [@zimbu-bcb](https://community.thunkable.com/u/zimbu-bcb)
#### Post date: [November 14, 2019, 5:33am UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914/5 "2019-11-14T05:33:14Z")

</div>

OK, that makes sense. I will give it a shot. Shouldn’t be too difficult…🤣

Thanks!

---

<div class="post-metadata">

### Author: ![jane](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jane/32/27575_2.png) [@jane](https://community.thunkable.com/u/jane)
#### Post date: [November 14, 2019, 12:34pm UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914/6 "2019-11-14T12:34:47Z")

</div>

Hi @zimbu-bcb,

@CBVG has been giving you excellent advice! I’m just letting you know that the ‘list’ block you refer to is exactly the same as the ‘create list with’ block - we just renamed it.

---

<div class="post-metadata">

### Author: ![zimbu-bcb](https://avatars.discourse-cdn.com/v4/letter/z/6a8cbe/32.png) [@zimbu-bcb](https://community.thunkable.com/u/zimbu-bcb)
#### Post date: [November 14, 2019, 7:09pm UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914/7 "2019-11-14T19:09:38Z")

</div>

Thanks for jumping in, Jane. That’s what I assumed; I have some experience with MIT AI2 where the support docs are sometimes “a little bit” out of sync with reality.

I’m just testing out whether the ThunkableX platform is ready to handle BLE apps yet or not. From my experiments yesterday, it seems to not be quite there yet. I was hoping to build an app to configure beacons, so I definitely need a “BLE When Strings Received” block, a disconnect BLE block, and some ability to include both Service UUIDs _and_ Characteristic UUIDs.

But it seems pretty solid so far for communicating with Arduinos, so that’s a nice step in the right direction. Hopefully the BLE coder at Thunkable X can keep up the hard work!

Thanks!

---

<div class="post-metadata">

### Author: ![neuheisser](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@neuheisser](https://community.thunkable.com/u/neuheisser)
#### Post date: [March 25, 2020, 12:07pm UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914/8 "2020-03-25T12:07:58Z")

</div>

Can I ask you to check if you can get anything out of the list of BLE device names? I can only get a list of ID’s, but when I try to display names, there are only blank fields. Thanks.

---

<div class="post-metadata">

### Author: ![neuheisser](https://avatars.discourse-cdn.com/v4/letter/n/9fc29f/32.png) [@neuheisser](https://community.thunkable.com/u/neuheisser)
#### Post date: [March 25, 2020, 12:49pm UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914/9 "2020-03-25T12:49:09Z")

</div>

Actually, it shows some names sometimes…

---

<div class="post-metadata">

### Author: ![jcutlerywalajkh6wn](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/32.png) [@jcutlerywalajkh6wn](https://community.thunkable.com/u/jcutlerywalajkh6wn)
#### Post date: [April 28, 2020, 11:17am UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914/10 "2020-04-28T11:17:40Z")

</div>

How did you manage to show names. Also, how can I count the number of Bluetooth Devices in a list of .DeviceFound. I am able to display the list but cannot count the number of elements in it.

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [April 28, 2020, 12:28pm UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914/11 "2020-04-28T12:28:40Z")

</div>

In the list blocks. There is this block

Have you tried it? Also, I suggest you check out this example

[https://x.thunkable.com/copy/2b15204588729bb5cd9c94e1e511c279](https://x.thunkable.com/copy/2b15204588729bb5cd9c94e1e511c279)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/4/e4c516993d1a42cc64d8dae60e654ecac3d57f33.jpeg)

---

<div class="post-metadata">

### Author: ![jcutlerywalajkh6wn](https://avatars.discourse-cdn.com/v4/letter/j/8e7dd6/32.png) [@jcutlerywalajkh6wn](https://community.thunkable.com/u/jcutlerywalajkh6wn)
#### Post date: [April 28, 2020, 12:48pm UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914/12 "2020-04-28T12:48:42Z")

</div>

Yes I tried the list option. It seems to scan all devices using .DeviceList but I cannot count the number of devices detected for some reason. I might use the Classic Bluetooth extension by Pura Vida to help.

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [April 28, 2020, 1:55pm UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914/13 "2020-04-28T13:55:49Z")

</div>

I’ll check this out later today. I’ll add the feature and get back to you!

---

<div class="post-metadata">

### Author: ![tmoreno258gns](https://avatars.discourse-cdn.com/v4/letter/t/db5fbb/32.png) [@tmoreno258gns](https://community.thunkable.com/u/tmoreno258gns)
#### Post date: [January 29, 2022, 9:00pm UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914/14 "2022-01-29T21:00:50Z")

</div>

I have this solution

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/7/a76ea97629040ff0d6dafec82b6dbdb483b3fc79.png)

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [January 30, 2022, 6:52am UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914/15 "2022-01-30T06:52:09Z")

</div>

You are responding on a post where the last reply was **2 years ago**.

---

<div class="post-metadata">

### Author: ![tmoreno258gns](https://avatars.discourse-cdn.com/v4/letter/t/db5fbb/32.png) [@tmoreno258gns](https://community.thunkable.com/u/tmoreno258gns)
#### Post date: [January 31, 2022, 4:42am UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914/16 "2022-01-31T04:42:44Z")

</div>

sorry, i was it recently

---

<div class="post-metadata">

### Author: ![claudio.ray5q0d](https://avatars.discourse-cdn.com/v4/letter/c/8dc957/32.png) [@claudio.ray5q0d](https://community.thunkable.com/u/claudio.ray5q0d)
#### Post date: [April 1, 2022, 12:56pm UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914/17 "2022-04-01T12:56:51Z")

</div>

Still… it helped me.

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 11:29am UTC](https://community.thunkable.com/t/solved-how-do-i-list-results-of-ble-scan-to-include-both-the-device-name-and-device-id/318914/18 "2024-11-08T11:29:36Z")

</div>


