Go Down

Topic: pairing rejected by HC05 (Read 256 times) previous topic - next topic

vin_swadi

I am unable to BT pair for anroid  mobile with HC05, after clicking pair on mobile screen receiving error message "pairing rejected by HC05". please help

Power_Broker

I am unable to BT pair for anroid  mobile with HC05, after clicking pair on mobile screen receiving error message "pairing rejected by HC05". please help
Did you put in the passcode for the HC-05 in your android app? Can you post your code and description of your project?
"The desire that guides me in all I do is the desire to harness the forces of nature to the service of mankind."
   - Nikola Tesla

vin_swadi

Did you put in the passcode for the HC-05 in your android app? Can you post your code and description of your project?
NO password,
here is code
/*
 *  Bluetooh Basic: LED ON OFF - Avishkar
 *  Coder - Mayoogh Girish
 *  Website - http://bit.do/Avishkar
 *  Download the App :
 *  This program lets you to control a LED on pin 13 of arduino using a bluetooth module
 */
char Incoming_value = 0;                //Variable for storing Incoming_value
void setup()
{
  Serial.begin(9600);         //Sets the data rate in bits per second (baud) for serial data transmission
  pinMode(13, OUTPUT);        //Sets digital pin 13 as output pin
}
void loop()
{
  if(Serial.available() > 0) 
  {
    Incoming_value = Serial.read();      //Read the incoming data and store it into variable Incoming_value
    Serial.print(Incoming_value);        //Print Value of Incoming_value in Serial monitor
    Serial.print("\n");        //New line
    if(Incoming_value == '1')            //Checks whether value of Incoming_value is equal to 1
      digitalWrite(13, HIGH);  //If value is 1 then LED turns ON
    else if(Incoming_value == '0')       //Checks whether value of Incoming_value is equal to 0
      digitalWrite(13, LOW);   //If value is 0 then LED turns OFF
  }                           
 
}                 

Power_Broker

NO password,
There's your problem (or, at least one of them) right there. HC-05's have a default password/pin of '1234' and this password/pin is required by the phone when pairing and connecting to the HC-05
"The desire that guides me in all I do is the desire to harness the forces of nature to the service of mankind."
   - Nikola Tesla

Go Up