Error 507: Unable to connect

The method takes two arguments. The first is the MAC address of the Bluetooth device. The second is the UUID of the service it advertises. The Connect method will always use the UUID of the SPP service. If you want to use a different service, presumably the manufacturer will tell you what the UUID is. Alternatively, you might be able to use another app to query for all of the UUIDs published by a Bluetooth device to get the UUID you need.

? So what would this look like?
How would you find this info?

Hello Eric

Can you please give us some detailed information:

  1. The Manufacturer and Model of your Android Device (e.g. Phone, Tablet)
  2. The Name of the Device you are connecting to (e.g. Ardunio Uno with HC-05 Bluetooth Module)
  3. Your App comms. e.g. Send and Receive, Send only, Receive only.
  4. What does your App Do? e.g. controls a robot, collects sensor data etc.
  5. How far have you got with your project?

My Connection issues:
Attempting to send text such as (S1F, S4B, S16N,....)
Using Android phone (Samsung Galaxy S9+) to:

*original attempt was Raspberry Pi4 with Waveshare servo control HAT (the Pi has onboard Bluetooth)
the text decoded on the device: S1F would rotate servo number 1 fully clockwise. S4B turn servo number 4 fully counter clockwise S16N turn servo number 16 to the mid position for these 180 degree rotating servos.

Raspberry, Waveshare, and Youtube led me to believe this would be a simple task for someone new to their devices. Totally NOT true. Maybe if you had someone tutoring you, then possible because they could lead you into success.

I gave up on the Raspberry Pi and got an Arduino Uno Wi/Fi Rev2 (because it also has the on board Bluetooth and I would not need to buy or connect additional components)

I copied everything from Binary updates Youtube video. But no joy.. (I figure there must be some special commands/coding that I need to enter because of the on board Wi/Fi capabilities. But I don't know where to start with that)

So I decided to get a HC-05 Bluetooth module. Making another attempt at copying everything exactly the same as the Binary Update Youtube video. This time, the HC-05 module could be seen on my phone. I was able to pair it with the phone. But... it would give me error messages in the MIT app and not turn the led on or off.

And this is where I am at today. I am waiting for Fedex to deliver an ELEGOO UNO R3. No bells, no whistles, just base UNO.

In all this, MIT app inventor is the only thing that seems simple.

All I want (and this seems to be what many others want as well) is the ability to control a servo shield with 16 servos using the MIT app. Like most people, I don't really want to learn in depth coding. Just enough to make simple changes to sample code.

1 Like

You have a lot of study material here. If you build some blocks and there are still problems. Place your blocks here along with a description of the problem.

This Topic may help you, it has App Inventor code and an Ardunio Sketch. It drives a very simple Robot Arm:

http://dcube.lk/d_cube_stem_gripper/

I would like to know how to connect a raspberry pi 3B in bluetooth to an App Mit inventor application or I have created an application. I would like to know how to connect a raspberry pi 3B to a bluetooth app mit inventor or I have created an app mit inventor. This app scans the devices around and must connect to the selected device, in this case the raspberry pi 3 B but for a test phase I try to connect it to a smartphone.

Hello Cristian

The first thing you need to find out is the exact Bluetooth version of the devices involved.

On the raspberry Pi 3B we have a version of 5.50 and on the smatphone we have version 10. I don't know the world of bluetooth so if you could please explain, thank you.

There isn't a version 10 Bluetooth Cristian - that is probably your Android OS version.

The BT versions are important because:

  1. Devices must be compatible with each other
  2. There are two types of Bluetooth

Some reading:
https://www.professorcad.co.uk/appinventortips#TipsBluetooth
https://www.professorcad.co.uk/appinventortips#TipsRaspberryPi

... although App Inventor does not have a Library of functions to communicate with Pi, it does have two Bluetooth Libs. We need to know the BT versions involved in order to select the correct lib.

Hello I looked at the phone version and it's a 5.0 version and the raspberry 5.5 as I had said. It is possible that it is incompatible

Look for a tutorial to configure Raspberry's Bluetooth with Python:

Here my experience in Spanish:
http://kio4.com/raspberry/31_bluetooth.htm

Hello, I would like to know how you did to connect your raspberry because, during the connection via app Mit Inventor I have a connection then a disconnection. I started by testing to connect to a smartphone but it shows me the same error. The error 507

I carried out the process indicated in the previous link.

except I wish I didn't have to use a server now. If possible with a bluetooth connection using an app mit inventor on a raspberry that is as simple as possible. After if it is impossible tell me in case you know things. Also I did not test your maneuver because the project will get heavier. I have to create a graphical interface with python for the raspberry Pi 3B with 3 buttons that are connected to led. Another application created with App Mit inventor which will allow to have the same options as on the graphical interface. If I press on the button one of the graphical interface, on the application app mit inventor it must be shown that the button one has been selected. In the same way for the use of the button on the application app mit inventor, if I press the button one of the application it can be seen on the graphical interface that the button one was used. The buttons will be managed by bluedot a python library that will allow to differentiate the buttons.

The problem here is the bluetooth connection to the application and to any andoid device for a test phase. Thanks

I used the app as ClientBluetooth and installed the Server BT in RPi, I have not done it the other way around.

Hi,

I am using Boat Rockerz headset. It is having Blue Tooth Version 5.0. I tried to use the Bluetoothe client. I am getting error as 507, Unable to connect. I am just testing to see how to connect to bluetooth. I am in learning stage. Please help me.

I was able to scan with Bluetooth Client, But, not able to connect. But, it is connecting to my andriod phone without any problems. I am using AI companion to test.

I also, tried with BluetoothLE1 extension. That is not able to scan first.

Bluetooth v5 is BLE and therefore requires the MIT BLE Extension. BLE scans in a similar way to BT.

What is the goal of your App? To play music, listened to via the headset? I'm not sure how that would be accomplished - probably the music would be sent to the headphones as bytes.

Here is an example BLE Project that shows how to scan for devices (but not how to send anything to headphones).

BLE_BASIC_SEND_TEXT.aia (192.4 KB)