I have tried a lot of method but in vain! Nothing helped me getting connected successfully, I know blynk is primarily for iot things but it would be great if it works well for Bluetooth also, just because of its great UI it made me to try all the workaround for 2 days!!
Please anyone help me with it!!
Thanks a lot!!
What board are you using with the HC05, how have you connected them together, and what code are you using?
Pete.
Board used : ARDUINO NANO
And regarding connection I’m using software serial!! I hope that helps! ( pretty usual way of connecting nothing fancy)
Thank you!
Well, first of all, that code shouldn’t compile.
It declares the SoftwareSerial object as SwSerial but then attempts to connect to Blynk using an undeclared SerialBLE object
Secondly, I was hoping you’d explained which pins on the Nano you connected to which pins on the HC05, which you haven’t bothered to do.
Pete.
Sorry, I forgot to mention I had manually declared SerialBLE! Or to say it that it got compiled! And fixed the errors!
Pins used were (10, 11) //RX, TX
And ya I needed to ask why we’re there errors in the blynk example genrator!
I had also tried serial hc05/hc06 example from GitHub!
But no result!
Thanks Pete sir!
I hope I’m more clear now!
Link to the other example i had used :
Okay, I’ll ask once more, then walk away.
Four of the pins on the Nano should be connected to four of the pins on the HC05.
Please tell us EXACTLY which pins on the Nano are connected to EXACTLY which pins on the HC05.
Look at the GitHub page and you’ll will see that the issue has been reported as an error.
Pete.
Connection:
RX (OF BT) TO NANO PIN NUMBER 10
TX (OF BT) TO NANO PIN NUMBER 11
(Also reversed the PIN connection and tried, but didn’t work)
VCC (OF BT) TO NANO 5V
GND (OF BT) TO NANO GND
THANKS A LOT SIR!
You should always connect Rx to Tx.
Your second example used pins 2 & 3 rather than 10 & 11
Have you changed the HC05 baud rate from 9600?
Have you put your own auth code in the sketch?
Pete.
I had tried with both PIN 10,11 & 2,3
Baudrate used was 9600 only for hc06 and hC05 38400 (also tried with 9600)
And yes I had used auth code! Given by the blynk!
Literally ot didn’t work for whatever reason! But one thing to note was sometimes when I try to connect to Bluetooth , the led would slow down it’s blinking (just like when it’s connected) but after a few seconds it would display the error message, unable to connect to Bluetooth!!
What does this mean?
Pete.
I mean I tried for both of them, by uploading different baud rates… But no luck
I’m not able to connect in the app it self!! Like the Bluetooth is paired,it also shows in blynk but it doesn’t get connected!!!
It sounds to me as if you are trying a wide variety of options and settings without really understanding what the effect is, and what the correct settings are.
You should choose two software serial pins and stick with them in everything you do. Connect Rx on one device to Tx on the other and try to establish the correct baud rate for the Bluetooth adapter you are using.
If you haven’t issued an AT command to the Bluetooth adapter to change the baud rate from its default setting then look at the specification sheet and establish what the default baud rate is, and use this in your sketch.
If this doesn’t work then find a non Blynk test sketch and try to get this working.
Pete.
Actually the non blynk sketch works very well!!
And yes I have tried hell lot of option, so now I will retry it once again and yes I have Crossverified the bt configs using AT command!
Will try once again and get back sir!
If possible could you direct me to a proper blynk sketch for hc06??
Okay so I’m joining the discussion to help you
For convenience please type or paste the full code starting and ending with three ` (Back tick)
Please show us the complete circuit diagram and the Blynk app widgets you used.
Also let us know that if you have ever used Blynk in the past
We will try to help you the best we can
Alright, I have used blynk with Nodemcu and they were working really fine!!
But for the Bluetooth it’s not even connecting!!
Code was the example code it self , but from the git repo :
Link: https://github.com/blynkkk/blynk-library/blob/master/examples/Boards_Bluetooth/Serial_HC05_HC06/Serial_HC05_HC06.ino
Circuit connection:
Bt TX >> NANO PIN 2
Bt RX >> NANO PIN 3
Bt gnd >> gnd
Bt vcc >> 5V
Blynk app widgets:
Just Bluetooth connection and gauge! Well it didn’t connect to Bluetooth at the very first place so I didn’t go further to program the gauge!!
It doesn’t make sense!!
In your screenshot you’ve shown that the device name is “HELIOS-5”.
According to the documentation, this isn’t the standard response for the HC-05 module.
Pete.