Error 507, unable to connect

i will try :grin:

1 Like

Thankyou very much Salman :blush: :blush:

I dont have a lot of knowledge of MIT App building. I watched a video on youtube and build this app.

Without all the information, no - I don't have a crystal ball.

I see your App is "Voice Controlled Automation" which is ambitious. What does the laptop have to do with that?

You are using an Arduino, so we need more information about that:

  1. Arduino Model (e.g. UNO)
  2. Arduino Bluetooth module version
  3. We need to see the Arduino Sketch (Script), which you can post here by changing the extension from .ino to .txt.
  4. We need to know the Bluetooth version of all devices your App is to connect to. Modern devices are most likely to be BLE and not Classic Bluetooth, which your code is using now (but your code is not adequate for communications with an Arduino, or for speech driven commands).

I have no idea what that is! :thinking:

1 Like

Bluetooth Module - HC - 05
Arduino UNO

kk.txt (693 Bytes)

where are you stuck salmaan?

I'm still thinking

1 Like

ohh, sorry to trouble you but it is very important for mee.

Maybe this can help you :

1 Like

not getting anything salman brother, isnt there anything which you can change in my blocks so that i can use the app?? I am going into some sort of depression now :sob: :sob:

Ah, I see - the equivalent of Fritzing. HC-05 Module is Bluetooth v2.0 + EDR. So, you are only wireless to the Arduino, the household devices are wired to the Arduino.

Utakarsha, have you ever heard the phrase "less haste, more speed"? It definitely applies to you :grin:

I'm attaching a Basic Setup project for sending text. It should work straight-out-of-the-box, many other people have used it as the base of their project.

For now, see if it solves your connection fault.

Next, we can test sending commands.

Finally, I will show you how to drive commands with speech.

BT_Basic_Setup_Send.aia (7.8 KB)

.... the Sketch needs some work :owl:

The Sketch, once we get over the other hurdles, should be like this:

AppToArduino_Cmds.txt (1.5 KB)

Note that speech commands must be "short and sweet".

//Receive commands from App

//vars
string sgCommand;
unsigned int igUpdateTime;

void setup()
{
              Serial.begin(9600); // open serial port, set the baud rate to 9600 bps
         igUpdateTime = millis(); // loop timer
}

void loop()
{
         //Execute loop every 10 seconds
	     if((millis() - igUpdateTime) > 10000)
         {
               igUpdateTime = millis();

               if(Serial.available() > 0)
               {
                     sgCommand = Serial.read();

                     switch (sgCommand)
                     {

                       case "light on":
                                digitalWrite(5, HIGH);
                                break;

                       case "light off":
                                digitalWrite(5, LOW);
                                break;

                       case "fan on":
                                digitalWrite(6, HIGH);
                                break;

                       case "fan off":
                                digitalWrite(6, LOW);
                                break;

                       case "all on":
                                digitalWrite(5, HIGH);
                                digitalWrite(6, HIGH);
                                break;

                       case "all off":
                                digitalWrite(5, LOW);
                                digitalWrite(6, LOW);
                                break;
                     }
               }
         }
}

Utakarsha

I'm taking a lunch break. When you have got the connection working, let me know here and I will upload an Enhanced Project that can handle Speech Commands (it is an update of the Basic Project)

Proteus Simulation for Bluetooth Module

Has no one in this thread yet mentioned that the error 507 happens when you try to send Bluetooth data but the BlueTooth device is not yet connected?

I don't see any code in the Original Poster's app that prevents this from happening.

The ChrisWard sample app does this by disabling the button that sends text until the BlueTooth component is connected.

Hi ABG - the Basic Project I uploaded addresses that issue.

Waiting for your feedback Utakarsha.

Hi,
are you sure of the HW connections ?
I don't see any power and ground lines to the HC06 in your schematic so I think that they aren't simply drawn, but you connected them.
More: the RX of the HC06 shall work @3.3 Volts, then a voltage divider is better for HC06 health.
Something like this:
image
It's a stupid hint, I believe, but before fighting with software be sure that the hardware is correct :slight_smile:
Cheers.

This is not my circuit, it is a Youtube tutorial by an author named Ibrahim kamr.
Look at the tutorial, it works for him.
I only put it to give an idea to any reader, the way to simulate Arduino, Bluetooth and a smartphone.
Here's another one, it's not mine either :slight_smile: