Blue tooth Error 507: Unable to Connect Is the device turned on

14,125 views
Skip to first unread message

Dana Auman

unread,
Jan 27, 2015, 9:17:04 PM1/27/15
to app-inventor-o...@googlegroups.com
Hello,

I an not a programmer and I am using App Inv for the first time.  I have posted this question in App Inv 2 and it does not look like any body knows how or if this problem can be solved.  I found this area when I was searching for answers via Google search, so I thought I would give this area a try.

I have attached the block view of this simple test to see if the app will connect to a blue tooth device.  after the selection is made I get the 507 error.  I know that the selection works as it will list the address to the text, after the selection is made, but the connection will not occur.

As I have searched and searched the other questions regarding blue tooth connection via App Inv 2 in that forum, all of the questions that are answered with a fix, seam to be only working for the Arduino devices.

In the long run, All I would like to do is get the app to see a blue tooth device and know that it is connected and when the connection fails to report it to the app.  

Any help would be great.  TY
bt.png

Yifan Li

unread,
Jan 27, 2015, 10:35:06 PM1/27/15
to app-inventor-o...@googlegroups.com
Hi ,   

    I tried out your block. Same error happens to me. I think since you could select the bluetooth device in your list. This means your bluetooth device and android system call is working fine. But the problem is that bluetooth communication uses this Server-to-Client module. If you ever want to connect to device,there need to be a server program running on that machine. If there is no such a server, it would behave like you type a website that doesn't exist anymore.
   
There is a link might help:http://puravidaapps.com/btchat.php/     By the way , I tried a Bluetooth serial terminal on my computer. But it seems my phone is not visible there, I'm still figuring out why.(It seems there is not Serial Port dedicated for my connection which should be created by my app on the phone).

First time to try to answer somebody, hope it helps a little bit.
Evan.

在 2015年1月27日星期二 UTC-5下午9:17:04,Dana Auman写道:

Dana Auman

unread,
Jan 28, 2015, 7:31:00 AM1/28/15
to app-inventor-o...@googlegroups.com
Evan,

Ty for the reply, I have tried that link you posted and have loaded his aia.  the app works but I still get the 507 error.  I thought it was a server issue aswell, but the device I wish to truely connect to would be like a blue tooth speaker or something link that.  The blue tooth that I want to connect to will not be connected to a computer or a phone.

Taifun

unread,
Jan 28, 2015, 8:33:16 AM1/28/15
to app-inventor-o...@googlegroups.com
as Evan said, you need this app on both devices for this example to work 

 but the device I wish to truely connect to would be like a blue tooth speaker or something link that.
as far as I know this is not possible with App Inventor
Taifun 

Evan Lee(Yifan Li)

unread,
Feb 1, 2015, 12:34:59 PM2/1/15
to app-inventor-o...@googlegroups.com
Dana,   

      Are you trying to connect a blue tooth speaker to a phone ?     

      You probably need to be more specific about what you want to do with blue tooth and the app you want to create. 

       One thing worth to note is this document: http://developer.android.com/guide/topics/connectivity/bluetooth.html .
       The connecting to server part in the previous document mentioned that "When you want to connect two devices, one must act as a server by holding an open BluetoothServerSocket"   Your previous block doesn't have a server.   

在 2015年1月28日星期三 UTC-5上午7:31:00,Dana Auman写道:

md.mohiminol Islam

unread,
Feb 5, 2015, 5:20:11 AM2/5/15
to app-inventor-o...@googlegroups.com
I also got smae problem.I cant fix it,It may be the apps problem,we should check it again

Dana Auman

unread,
Feb 7, 2015, 8:13:50 PM2/7/15
to app-inventor-o...@googlegroups.com
I have the answer why, its because of a server client issue.  see blue tooth issue 507 error

There are a few issues look at all of the post.

Evan Lee(Yifan Li)

unread,
Feb 15, 2015, 7:31:44 PM2/15/15
to app-inventor-o...@googlegroups.com
So hey dana,    have you solved the problem? Would you like to share the block?

Evan

在 2015年2月7日星期六 UTC-5下午8:13:50,Dana Auman写道:

Dana Auman

unread,
Feb 15, 2015, 7:42:59 PM2/15/15
to app-inventor-o...@googlegroups.com
Hello,

Look over this link Connection via Blue Tooth.

I did and I did not solve the problem.  Depends on what you are trying to connect to.

I have come to the conclusion that it is a Server - Client issue.  I created two little apps one as a Server and one as a Client to try to connect to the device that I wanted to connect to and the only app that would work was the Client app.

I have attached both aia files.  

What I ultimately want to do with the Bluetooth, App Inventor can not do it, because there a few things that it is not capable to do.  So I have started to look into Android Studio.  Don't get me wrong App Inventor is a great tool.

Hope this helps.
BTCONNCLIENT.aia
BTCONNSERVER.aia

Albert Schulz

unread,
Sep 9, 2017, 1:05:58 PM9/9/17
to App Inventor Open Source Development

A video on Youtube helped me to solve this issu


https://www.youtube.com/watch?v=DmtJBc229Rg&t=128s


In the video is used a command which has led me to an error


sudo python setup.py install


„Fatal error: Python.h: no such file or direvtory“


I just had to install a missing package


sudo apt-get install python2.7-dev


Otherwise I did everything exactly as in the video

Albert Schulz

unread,
Sep 9, 2017, 1:24:02 PM9/9/17
to App Inventor Open Source Development
what i forgot to explain.
In my case. I try to make an bleutooth connection between Android Smartphon and Raspberry Pi
For the Smartphone i create an App with App Inv 2 (LED-ON-OFF.PNG)

On the Raspberry Pi i run a script with python (pi3bluetooth.py)
The script must be running if you try to connect.

LED-ON-OFF.PNG
pi3bluetooth.py

Nigel Yong

unread,
Nov 28, 2017, 11:33:47 AM11/28/17
to App Inventor Open Source Development
Use another separate bluetooth module connected to your rpi, it works!

Michał Solewicz

unread,
Nov 7, 2018, 7:37:28 PM11/7/18
to App Inventor Open Source Development
Could You share .aia file?

Reply all
Reply to author
Forward
0 new messages