Error 507 unable to connect is the device turned on?

Hello friends, I'm new to this. I have a problem: when I try to connect to HC-05, I always get the error 507. I've already tried it with several devices and it still gives me the same error.




ARDUINO CODE:

char Incoming_value = 0;     
void setup() 
{
  Serial.begin(9600);         
  pinMode(13, OUTPUT);       
}

void loop()
{
  if(Serial.available() > 0)  
  {
    Incoming_value = Serial.read();      
    Serial.print(Incoming_value);        
    Serial.print("\n");        
    if(Incoming_value == '1')             
      digitalWrite(13, HIGH);  
    else if(Incoming_value == '0')       
      digitalWrite(13, LOW);   
  }                            
}

Try to ask for connect and scan permissions, then try again, see the following thread

Taifun

...you also need location switched on - you can do that by dragging a location sensor item into the designer - your code can ignore it.

(added to FAQ)