How To Configure and Pair Two HC-05 Bluetooth Module as Master and Slave | AT Commands
Вставка
- Опубліковано 14 кві 2016
- howtomechatronics.com/tutoria... ► Find more details, circuit schematics and source codes on my official website.
In this Arduino Tutorial we will learn how to configure and pair two HC-05 Bluetooth Modules as Master and Slave devices.You can watch the following video or read the written tutorial below.
Visit HowToMechatronics.com for more Tutorials, Tips, Projects and How It Works videos:
► howtomechatronics.com/
Like my page on Facebook:
► / howtomechatr. .
Add me on Google+:
►plus.google.com/+Howtomechatr...
Music: Aduro by Jens Kiilstofte (machinimasound.com/music)
I know this video is older, but it just saved my day. This it a clear, easy-to-follow HC-05 setup tutorial. Thanks!
Thanks awesome video very rare unique and useful.
Can't believe the channel doesn't get as much popularity as Great Scott!'s, keep up with the great videos.
Awesome and highly informative as per usual :)
Awesome video mate, I think I'll be using this in a project I'm currently working on. Thanks!
Excelente vídeo y excelente explicación! Muchas gracias por tu aporte! Tu vídeo nos ayudo mucho en un proyecto escolar!
It took lot of time for me to do this one...
But finally worked....thanks uploaded!!!
Regards and well wishes to you...!!!
At commands to set hc05 as master and slave are very helpful. Working charm for me. Thank you
Thanks so much! It helped me a lot to understand about Bluetooth device.
Great video, thanks Dejan :D
Keep up the good work
Dejan
Hello Sir, first of all thankyou so much for a lovely explanation.
Can you please tell me how many slaves can be connected to the master as active listeners at the same time?
And which is the best bluetooth module with GPIOS and memory?
Hello is it possible to have two of the HC-05 as transmitters and one HC-05 as receiver?
Thank you i love this video soo much
hi brother , thanks to your videos.. I want to ask something ,i walk on project of audio transmission using bluetooth. i use two microcontrollers thus two BTs (one slave the other is master) with audio amplfier, microphone and speaker.... can you upload a video or help with instructions about transmitter and receiver circuits
could you do the same with one hc-06 and one hc-05? and if so what are the modifications in the soft/hardware?
I like your work man...
Hi Dejan! Great videos; love your channel! Quick question tho: what would be the most efficient way of transferring data from multiple pins on one board through the Bluetooth to the same corresponding pins on a second board?
you could use the SoftwareSerial.h library
I have an application where I would like to send sync pulses at various frequencies unrelated to a particular baud rate - 5HZ or 11HZ for example instead of an RS 232 character. Would this work? Could I just pair them and then replicate random data at the other end as if I was replacing one wire with Bluetooth. Simple on an off basically.
Great tutorial!! I also wanted to know how can we build piconet with this??
*can i pair three or more bluetooth modules?*
Hello I need help with my project, my question is can we connect bluetooth module with BASYS2 and send data via bluetooth module?
As far as i see u have connected RX to TX and TX to Rx?
new one to see , wow bro!!!
If I have HM10 Bluetooth Module so how use it.
first of all thank you for the informative video,secondly, I am using the adafruit EZ-Link Shield, does it work as a master?
if so, how do I choose what Bluetooth device I want to connect to ?
thank you
no
thank you
how to get RSSI from HC-05
Hi, great tutorial, thanks a lot!!!
I'm trying to connect my HC-05 to a slightly different module: HM-10 broken out on the zs-040 board. I configured the HC-05 as master and the other one as slave. But the address the slave gives me looks quite different than in this example. It is 00:15:83:00:5E:EB. When using the AT+BIND command I get back an error (0). Do you know what I'm doing wrong?
Do AT+BIND= (Address) make sure there is a space between the = and the address
is it possible to put the button on the same side as the Potentiometer and the led on the servo side. how would i go about chaging the code.
sir,
I guess the resistors are labeled wrong, checked using colour band calculator which one should i go with the labeled one or the schematic??
hi
I just started searching the way to use the bluetooth module 2 days before. but when i watched your tutorial video, i learnt almost every thing, i wanted to know, just in few minutes.
this is great and very easy to learn tutorial boss.
i have some questions.
if i configure 1 HC-05 as master and other HC-05 as slave on 9600 baud rate, can i use both for simple digital data communication by using both with 2 separate MCUs ?
will these both work full duplex mode ? means if master send any data string to slave so can slave also send any data back to master?
Thanks to help me in advance
I am trying to do the same thing with HC-12 and i dont know where to start
Awesome vid! Can you have the state be anything other than 1 or 0?
How do I tell if I own a hc o5 or hc 06 and I assume the 06 can only be the slave not the master ?
Great video. Programmed as you showed, placed the Slave on a portable Uno and did a range test. Almost ran out of distance before I lost the link. Keep them oriented the same, as in standing up on the breadboard and don't stand between them and the 50 foot range seems to be accurate. I only needed 25 feet.
One thing I did notice, when I asked for the UART settings it sent back 9600 even though I was communicating with the serial monitor on 38,400 to program them. It sees the 9600 only applies to the baud rate of data between the two units. That's perfect for me as well. Excellent detailed video.
Thanks
Regarding to HC-05 problems:
My hc05 moduls does not make the 2s blinks even if they're in AT command mode. There is no visible indication. It just fast blinks like you have no connection. But if the connections are right, I can successfully use AT commands. So imho just forget about blink indication. Not every model doing that.
Also my HC-05 moduls came with 9600 baudrate default. Also consider checking other baudrates if you can't get response from 38400. You can change it later on. "AT+UART=38400,0,0" command will put your moduls into 38400 baudrate.
Try givining 3,3V into Enable pin instead of 5V. This could help with some models.
After successfully solving problems and setting HC-05s, this training worked like a charm.
Other than that; color codes on resistors are wrong but the writing is correct in the schematics. Check that if you did it wrong.
I still can't get it to work though, my led is blinking slowly and I tried different baudrates, also connecting different voltages to the enable pin didn't solve it, I just don't get a response when I type AT
I found the problem I forgot reopening the serial monitor
i have also same problem plz help me
Help are the two of my bluetooths connected? Both of them flashes once every 2 seconds? Its connected now right? I did all your steps...
Thank you, good tutorial. I am trying to control 10 Servo motors this way, but I am having trouble. Any advice?
it is a very helpfull video. but how many motors can i control if im using arduino mega?
I want to control 4 servo motors from the master to the slave suing 4 potentiometer.......
can i do it using this Bluetooth module...
Is there any problem if the two modules flash at the same time or is it necessary that they do it one after the other?
Hi I had following the step, the bluetooth module seen like connected, but the button-LED and the Servo Motor didn't workout
Thanks for the video and website.
I read your instruction for configuring the master HC-05. Why doesn't it need the password (pin code) of the slave module ?
Does it mean that we would need only the "address" of the slave module ?
Never mind. I got it.
what is the largest servo i could connect to this circuit?
Well explained, thank you!
Glad it was helpful!
Great tutorial, thank you for sharing. I have a question, is that a Fritzing drawing? and if yes, where did you find the Bluetooth part? I have an HC-05 part in my library but it doesn't have the little button. Thank you.
Thank you for the quick reply but I can't find it. I am referring to the Fritzing part, not the Bluetooth item itself.
Sounds good, thank you.
can I use a 2.2 Ohms resistor?
Thank you sir for your tutorial. i followed all the steps. but i can not paired two module. Can you help me now, what can be the problem there??
hello and thanks for a good movie. why the maping isn't to 0-180?
Awesome information thank you! !
Glad it was helpful!
Can we use amplifire bt with aurdino
I cant pair my bluetooth modules since when i bind command the master bluetooth, there is a capital 'C' in the slave bluetooth's address and when i type the address with the capital 'C' it becomes small letter 'c' in the serial monitor. What's going on here? Can i change my slave's address? The 'C' doesnt stay capitalized when i set that in the bind command of the master bluetooth :/
Good video, question, if I were to set CMODE=0, could I use AT+BIND to talk to more than 1 slave from the master? i.e. add 2 or more "fixed" slaves?
+Taylor Schlupp Thanks Taylor, yes, I presumed you couldn't bind to different masters, once the device is paired that's usually it until you unpair it.
So, to have multiple slaves the only thing to do is setting “AT+CMODE” to 1 in the master?
If i want to control two servo motor with two potentiometer what should be changed in the code
Can you connect 2 differnt hc-05 to a single ardunio? I'm trying to send and receive data between the ardunio and my android phone?
hello , I want to know how to modify the program to control three cervomotors , please help me, thanks
Hi, Bro, thanks alot! I remember about 5 or 6 years ago I wasn't using Arduino, libraries etc. I was programming everything by my self. OMG, how long it take and how difficult it was to adjust 2 HC-04 modules using AVR Atmega48, assembler language, and USB-UART based on MCP 2200. I had absolutely NO KNOWLEGE how to do it. I even wasn't know how to correct write AT commands. I mean "AT+name" or "AT + name" etc. I got how to do it correct through experiments and tons of time. And now I have a choice - order these modules and spent 2-3 weeks until its arrive to me. Or take my HC-04 modules (I hope it's alive after 5 years :D), my old assembler code and rewrite it to Arduino's language)) In any case the video is pretty much useful. Good job.
Lol I totally forgot what it means :D
SB21: cpi UARTTemp,2 ;Сравнить пришедший байт с 3
brne SB31
ldi s,11 ;
ldi d,11 ;
ldi e,10 ;-
ldi m,10 ;-
rjmp showbatt1
SB31: cpi UARTTemp,3
brne SB41
ldi s,11 ;
ldi d,10 ;-
ldi e,10 ;-
ldi m,10 ;-
rjmp showbatt1
SB41: cpi UARTTemp,4
brne SB51
ldi s,10 ;-
ldi d,10 ;-
ldi e,10 ;-
ldi m,10 ;-
rjmp showbatt1
i'm learning assembler but still cant interfacing bluetooth module xD
Hello i have a problem, i should comunicate two module bluetooth HC-05, for pass dates of sensor d18b20, this sensor is digital?
can we send array over Bluetooth connection..
good job
will it connect even if the password of the slave is unkown by the master?
Can I send music from my phone to one HC05, send that to another HC05, and have that HC05 send the data to a speaker?
No
Could I use several blutooth HC05 device comunicate with one master HC05 module + arcduino ? I mean, all devices on listening the master?
Please help me, I want to build a device where it can connect a smartphone to play music/connect to incoming call, but the device will have two output, one to speaker (wired connection) other to connect headset(wireless connection either through Bluetooth or something else)
How much range can be of hc 05
HI my bluetooth module is not incuding the EN pin. Can I ignore it?
I would like to create a brake light system for a motorcycle that could be activated by bluetooth where the led would be on the rider's jacket. But that didn't use a cell phone, but a button on the motorcycle's brake pedal.
Do you have a tutorial that could help me?
Nice video, But i have question how to give address to arduino as master and slave?
because i want to use xbee to communication
Thanx man.!!!!!
1 master is connected to two or more slaves....? Is there any posibility...?
Hello, what is the possibility of connecting 2 or more bluetooth modules to 1 only?
configuration is necessary for slave mode
can i determine to auto connect 10 bluetooth module to to master ? Can i bind 10 module ? and my phone ?
looking for the same setup, got any answers?
@@YatenKou_jp how connect talmatry with ardunio control in led
are this modules compatible BLE CC2540 CC2541with lilypad or arduino?thx
Sir , can we use arduino uno rather than arduino mega board
can i use HC 06 bluetooth as master and slave ?
Sr. I did it. it's working for 1 button as u did but when I am using more than 1 buttons and making respective changes in programme i.e calling the both button storing it's value and then sending it to Bluetooth and then using if else loop printing it but it's not working.....
plz give me the soln
what should I Do??
Круто ❤
Can Arduino with blutoo find blutooth speaker?
is this a full duplex?
data transmission is very slow, how can we get a quick response?
please help...
Hi... default board rate of my HC-05 module is 9600,0,0. so should i need to change it to 34800. if it is yes, then how can i do it?
How to change AT command mode ,,, for using with phone Bluetooth
Hello there I have been looking on UA-cam for hours and hours and billions and billions and billions of seconds and now I’ve found my solution thank you so much sincerely thanks
I'm glad you found this video useful. Thanks!
Anyone getting stuck - the blue green wire might be around the wrong way and they need to be attached before you start to get a response from serial monitor after uploading the blank sketch.
ja n lawede
Thanks for great explanation! But could you tell how to switch bluetooth modules from AT to Data modes back. My bluetooth modules stuck at AT modes.
anybody knows?
Just unplug it and plug it in again
Can I connect the master Bluetooth with slave bluetooth also with my smart phone?
yes
so slave recive datas from master? right?
Solution to a problem.
If someone is getting the getsync() error like I did, it's because you HAVE to remove the wires from tx and rx pins on the arduino before uploading the blank code. Then you may attach them.
I have a couple "master" modules that plug into the Windows USB (CP2102 + HC-05-USB / HC-06-USB).. and while Windows is able to open the COM port associated to the HC-05/HC-06, the Android phone sees the bluetooth device, but is not able to connect/pair!
how would i set up 2 servos and 2 potentiometers? do i add a different angle or just connect it to a different pin?
use the same code
potValue = analogRead(A0);
int potValueMapped = map(potValue, 0, 1023, 0, 255);
Serial.write(potValueMapped); // Sends potValue to servo motor
delay(10);
but double it, like this
potValue1 = analogRead(A0);
potValue2 = analogRead(A1);
int potValue1Mapped = map(potValue1, 0, 1023, 0, 255);
int potValue2Mappes = map(potValue2, 0, 1023, 0, 255);
Serial.write(potValue1Mapped); // Sends potValue1 to servo motor
1
delay(10);
Serial.write(potValue2Mapped); // Send potValue2 to servo motor 2
delay(10);
and for the slave side you would do the same just with the servos
Will this work on lilypad? if not which does? thx
sir thanks for make this video is very useful.
sir pliss make video about send multiple data through bluetooth between arduino and arduino. thanks sir
can use hc 06 ?
How many devices can be connected to one HC-05 module?
So have gotten to the AT command mode as indicated by the light but it wont take any commands ?
Same ...
Also same. Just a blank screen on the serial monitor
Can I use this for two HC-06 module ? these command don't work , and if not ,is there another code to pair two of hc-06 ? or I must buy hc-05 ??
hc-06 are slave only modules - you need either both hc-05 or one of each hc-05 and one hc-06
I have one question, Every single module Bluetooth has a single direction or u can find 2 modules with the same direction?
What do you mean? In the AT mode, you can make one moulde slave; thus making a 2 way communication.
hi, can we use utrasonic sensor in this project?
Yes
how do I send multiple signals from the master to the slave. For example, Joystick X and Y value + potentiometer + pushbuttons without getting signal interference. I am trying to make a bluetooth controlled car. But it seems like the signals are digital 0 and 1. Because whenever I send a number greater than 1 it is still interpreted as 1 by the slave. Any ideas?
I figured it out. You can send char commands from master to slave