BLE Scan...no devices found

Issue:
when I press the Scan button the msg that’s printed in the label is “undefined”.

I have a simple test app. The Design portion is simple there’s a Button for Scan and a label for the error results of the scan.

Design:

Blocks:
image

I’m using this with Arduino and have tested the scan with the Arduino app from the Android app store and I can find my ESP32 device in the scan results. When I use the ThX scan I get the “undefined”.

Any suggestions on what might be the problem.

what type of device are you using currently? Samsung note, iPhone, etc.

is your phone up to date?

your blocks only show a place to handle the error, what are you doing with the other green component blocks?

is your bluetooth on?

can you post a share link to help you further?

are these the only blocks? is there anything else going on potentially that could be interfering?

I have an AI2 app that I have up and running and trying to transition to ThX.
ThX has several nice feautures that I can use.
My AI2 app uses BT Classic and ThX uses BLE. The BT is used to send temp, Ph and dissolved oxygen values from ESP32 to BT android phone.
At this point I only need the BTClassic comm.
Can I download an extension for BTClassic? If so, which extension is recommended?

NOTE:
I’ve implemented this simple test in AI2 and I get a list of the scanned devices. When I move to ThX I don’t get any devices list.

My conclusion, is that there must be something that I’m not considering. ThX is web based so I’m getting the latest version. I’ve looked at countless youtube vids and read many articles on this subject but keep coming up with a blank.

My current thought is that the transition from BTClassic to BLE is an issue, possibly misunderstandings on my part. What I would like to do is start with a BTClassic extension and determine if that works then move to BLE. Thus my question from above “Can I download an extension for BTClassic?”


Thanks…response to jgibb q’s:

Q: what type of device are you using currently? Samsung note, iPhone, etc.
A: SamsungJ7

Q: is your phone up to date?
A: Yes, it auto updates

Q:your blocks only show a place to handle the error, what are you doing with the other green component blocks?
A: This is just a simple test to display the scanned devices. The depiction, in the original post, for the Design/Blocks is the complete test. I only want to display scanned devices…very simple.
In fact, it’s part of a you tube vid put out by Thunkable, see below:

Q: is your bluetooth on?
A: Yes, as I said in my original question I downloaded an app from app store called Serial Terminal Emulator. This basically emulates the ThX code and let’s me test my server setup. The results is the emulation displays the all scanned devices.

Q: can you post a share link to help you further?
A: Everything that I can link has been given in the original post. Keep in mind that this is just a test app for scanning. It’s very simple…the total components are minimal.

Q:are these the only blocks? is there anything else going on potentially that could be interfering?
A: I’ve thought about that and the fact that my emulation app lists the scanned devices leads me to believe that there are no other issues.

1 Like

At a quick glance, the only thing I see different is this. the blocks don’t exactly match.

this is hers
Screen Shot 2020-03-15 at 9.01.35 PM

this is yours

Thanks for the response.
That should not make any difference.
All that it’s saying is to display the error instead of the device name.
If the connection was made w/o any errors the “error” s/b blank but I was getting “undefined”

After working on this all day I finally stumbled on the following from the ThX blog.

What this said was the Stroage permission on the android Thunkable app has to be set. I did that and it worked. All the research that I did never said anything about settings permissions.

2 Likes

Great work! Is there any way you can post a screenshot of your fix? that would probably be helpful and appreciated by other android users!

I was to early to declare victory. The original problem of not displaying the device names still persists. I’m starting to think that it may be easier to go back to AI2. It seems like there are many issues with ThX. It seems like it’s such a great platform but I’m having difficulty just doing the basic things with BLE.

Hi,
I get exactly the same problem. It doesn’t scan anything and worth, sometimes the screen became all white!!
Go to AI2 is the best way. Like you I did the thing to scan and pick the discovered device and it works well with AI2.

Did you try attaching “Device Ids” to your ScanLabel (as in, “then do → from “ScanLabel” set Text to Device Ids”)?
I had a similar issue. I made a button to do a BLE scan and then assign the result to a label and a list (I used both as outputs because I wanted to see what it looked like) and they were oddly empty, although the Label had a series of commas. Apparently devices don’t have to have names, just Device Ids, so the Device Names output from the “call Scan” function could be empty while the Device Ids is not (unless there are zero BLE devices in range, then I assume both outputs will be empty).
That was the issue in my case, not sure if it fixes yours.