I found this page
http://www.whatakuai.com/bluetooth-and-app-inventor/ I downloaded the aia file and installed it on my device. It does not have a disconnect button so if you look at the attached design and block I have added one.
Did some test, when I try to connect to my Tab 2 and other devices, I immediately get the 507 error. I have a HDE Slim BT 4.0 USB 2.0 Adapter Dongle with CSR Harmony Wireless software driver on my pc. I try to connect to this and it connects no errors. I got it here
BT Device.
With in the software for this device, there is a check box that I can check that says "automatically accept connections from this device" which is the phone I am trying to connect with. When it is checked and I select connect, with in the APP all works and I connect. If the box is unchecked and I select connect with in the APP, I then get a pop up message on the pc indicating that the device is trying to connect and if I do not click that message, I will then get the 507 error. But If I do select the message it connects.
Taifun, so I tried to connect with your blocks above to the HDE Slim. Guess what it works, I get the message "Connection was successful".
What is the difference between this device and all others? Why does it let me connect and the others don't?