How To Register The Bluetooth Address As "Master".
Interfacing Bluetooth HC-05 and HC-06 with Arduino using AT Commands in Principal Way.
Connections:
To Bring Bluetooth HC-05 and HC-06 in command way, connect Pivot 34 (command) with 3.3v (Vcc), but remember, when HC-05 or HC-06 will exist in command style, its baud rate volition automatically change to 38400, which is default, no thing what take you gear up your baud rate before for data transfer.
Connect Bluetooth Module HC-05 or HC-06 with Arduino every bit:
Bluetooth | Arduino Mega 2560 |
1 – TX | RX1 |
2 – RX | TX1 |
12 – Vcc | +3.3v |
13 – Gnd | GND |
34 – PIO11 | +3.3v |
AT Commands for Bluetooth:
Make sure to utilize CR and \n at the end of each command or in Arduino use Both NL and CR option in Serial Monitor
AT Commands used by HC-05 & HC-06 and most of other Bluetooth Devices
Command FUNCTION ane AT Test UART Connection ii AT+RESET Reset Device 3 AT+VERSION Querry firmware version 4 AT+ORGL Restore settings to Factory Defaults 5 AT+ADDR Query Device Bluetooth Accost six AT+Name Query/Set Device Name 7 AT+RNAME Query Remote Bluetooth Device's Proper name eight AT+Function Query/Set Device Role 9 AT+Form Query/Set Class of Device CoD 10 AT+IAC Query/Set Inquire Access Code 11 AT+INQM Query/Set Inquire Admission Style 12 AT+PSWD Query/Set Pairing Passkey 13 AT+UART Query/Set UART parameter 14 AT+CMODE Query/Gear up Connectedness Mode xv AT+BIND Query/Fix Bounden Bluetooth Address xvi AT+POLAR Query/Set LED Output Polarity 17 AT+PIO Set up/Reset a User I/O pin 18 AT+MPIO Set/Reset multiple User I/O pivot 19 AT+MPIO? Query User I/O pin 20 AT+IPSCAN Query/Set Scanning Parameters 21 AT+SNIFF Query/Set SNIFF Energy Savings Parameters 22 AT+SENM Query/Ready Security & Encryption Modes 23 AT+RMSAD Delete Authenticated Device from Listing 24 AT+FSAD Find Device from Authenticated Device Listing 25 AT+ADCN Query Total Number of Device from Authenticated Device List 26 AT+MRAD Query Most Recently Used Authenticated Device 27 AT+State Query Electric current Condition of the Device 28 AT+INIT Initialize SPP Profile 29 AT+INQ Query Nearby Discoverable Devices 30 AT+INQC Abolish Search for Discoverable Devices 31 AT+PAIR Device Pairing 32 AT+LINK Connect to a Remote Device 33 AT+DISC Disconnect from a Remote Device 34 AT+ENSNIFF Enter Energy Saving style 35 AT+EXSNIFF Exit Energy Saving mode
Lawmaking for Arduino Mega:
{
Serial1.begin(38400);
Series.begin(38400);
}
void loop()
{
if(Serial1.bachelor())
{
byte a=Serial1.read();
Serial.write(a);
}
if(Serial.available())
{
byte a=Serial.read();
Serial1.write(a);
}
Sequence to Search and Pair a Device:
AT
OK
AT+CMODE=0
OK
AT+ROLE=i
OK
AT+INIT
OK
AT+INQ
+INQ:4D65:4D:CA6612,5A0204,7FFF
OK
AT+BIND=4D65,4D,CA6612
OK
AT+PAIR=4D65,4D,CA6612,xxx
OK
Bluetooth Data Mode:
To bring Bluetooth back in Data Style, simply disconnect Pin34 (PIO11) from +3.3v and leave information technology open / disconnected.
Video on Interfacing Bluetooth Modules with Arduino Mega 2560:
How To Register The Bluetooth Address As "Master".,
Source: https://www.galaxysofts.com/new/bluetooth-hc-05-hc-06-command-master-mode-commands/
Posted by: collinsbetaletted.blogspot.com
0 Response to "How To Register The Bluetooth Address As "Master"."
Post a Comment