Regarding reconnecting issue / BLE extension

Post the aia.

efx_iot_demo_copy.aia (332.5 KB)
this is the current working model

grafik

:upside_down_face:

Should be:

grafik

is there a way to update it or should we reimport the extension

same error again invalid address

Did you connect to the desired address during the test? I saw a block to store it in Tiny DB, but I didn't see a block to use it. You want it to keep that address for you from the first time you connect, and then connect automatically after entering the program, right?


if its true means we found your problem

yeah that's what I need


how to get the bluetooth address correctly.

when split at spaces block removed

If you only WANT TO KEEP THE FIRST PART,

  • SPLIT AT SPACES
  • SELECT ITEM 1 FROM THE SPLIT LIST
  • SAVE ITEM 1

(PARDON CAPS, I WAS STARING ONLY AT KEYBOARD)

1 Like

yeah thank u
I solved this issue so my concern is regarding reconnecting the app to the central so for the first time when I initiate a connection is there a way to store the device MAC address and when this app sees this device again while scanning there should be non delay in connecting is my logic right? 9if so can you guide me to implement it.

You should use "call tiny db get value" in uploading block then connect text (device_address) to tag and set value if tag not there to anything then use "if" block to see if your value don't returns your value if tag not there in Tiny DB, connect to address.

"If>not>call Tiny DB get value(device_address)>=>example:681>
Then>call BLE connect address (call Tiny DB get value tag (device_address)

Sorry I can't send you a screenshot because I don't have my PC, after getting my PC, I will send you a screenshot

hi Arman can u please share the screen shot iam still facing the same error

sure! just give me a minute to download your aia and fix it

so many changes are applied, I cant send screenshot, you should use the fixed aia
efx_iot_demo_copy (2).aia (333.2 KB)
is this ok? if you have any problem with this fixed aia, say it!

About reconnecting to a known device:
First of all, you save its device address in a TinyDB, like this (my example is about microbits):

Then, when you want to reconnect, you use:


In my app I ask with a notifier whether the device is on, but in your case it would be better to find the device in the list of scanned devices.


can u tell me where the code is executing after bytes received
block.....is it going to when disconnected block if yes we can call a function inside app disconnected block for reconnecting. I'm totally stuck.

  • I have solved your problem at previous topic, what happened?

  • so many blocks are disabled, do you have the previous project?

  • which blocks are changed?

  • still there is a problem?

  • why a new topic???