Error 509 : Unable to accept a connection from a bluetooth device

Why, when I connect with a low level Android SDK device, this error dialog appears.


Chatv10.aia (61.1 KB)

So the error dialog appears when I want to connect a high-level Android SDK to a low-level Android SDK, and when I try to connect a low-level Android SDK to a high-level Android SDK it works

This is my block :

Best Regards,
Salman Dev

you might want to reveal, what kind of device and Android versions work for you and which do not work

how do you use SDK 26 or another SDK? can you elaborate?

can you elaborate? Somehow I do not understand, wha you are talking about, you probably already know, how to ask questions... see also

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

I have updated my topic, do you understand now?

  • Android SDK Level 17 successful
  • Android SDK Level 26 unsuccessful

which means, testing on an Android device which runs Android 4.2.x works fine

however on an Android 8 device you get the Error 509: Unable to accept a connection from a bluetooth device

I think, you can ignore that message, see also chapter "Known Issues" in my Bluetooh chat example here App Inventor Tutorials and Examples: Bluetooth Chat | Pura Vida Apps

to catch that error message, just use a Screen.ErrorOccured event

Taifun

Yes :+1: :flushed:

YES :thinking: :disappointed_relieved:

This block generated the error, so now what I do

So Now what do I do

remove that notifier completely and only keep an empty ErrorOccured event
or add an if statement like this

if errorNumber != 509
then display the message 

Taifun

Okay I will try it Sir

I have tried both ways but it can't be connected

And this is the information about my device that cannot be connected to API Level 17 devices :

  • Brand = asus
  • Model = ASUS_Z012DB
  • Android Version = 8.0.0
  • API = 26
  • Codename = Oreo
  • Release = 8.0
    :sob:

please help me guys, i really appreciate your help. thank you

I am going to take a stab in the dark, and guess that your Clock Timer is asking one of your blueTooth components to do something when it is not yet ready to do so.

So here is your original Clock Timer


and here is my proposed revision ...

The blocks should be draggable, and are from my account on the code server, which does not yet have the fix for appearance of external sockets on the and blocks.
I probably went overboard on my tests for the server readiness, which I have never used.

Note: I started to originally code the big AND blocks as nested if/then blocks, then took the lazy way out with the AND block. The nested IF/THEN blocks are probably safer, because I can't guarantee the order of eveluation of an AND octopus.

Thank you for the help, Mr. @ABG , I will try it

I have tried various ways and nothing has worked, I hope the mit app inventor developer can fix this problem. thank you :pray:

Mr. @Taifun I want to ask, why my device having Error 509, is it an error from the bluetooth machine or what?

The 'high level' device can communicate with most other devices, but the low level device might not. It's not necessarily the Android version but the version of Bluetooth.

There is sometimes a difference between what it is claimed Bluetooth can do and what it can actually do in the real world. One device using an old version BT and another using latest BLE can be an issue, especially where custom Apps are concerned as they generally support only a narrow range of BT versions.

Note also that earlier versions of Android had less security requirements but latest versions require 'Locate' to be switched on for successful BT comms. The very latest version (10) may require 'Fine Location' (instead of Coarse Location).

So, what are the specifications for each device?

  1. Manufacturer
  2. Device type (Phone, tablet, microprocessor (e.g. Arduino)
  3. Device OS Name and exact Version
  4. Device Bluetooth exact Version

sorry; I do not know
as already mentioned, in my tests (which are already a few years old) I could just ignore the error... this seems to be not possible anymore

Taifun

It's okay @Taifun, I will try to research this deeper, thank you very much for your help, Mr. @Taifun.

Regards,
Salman Dev