0% found this document useful (0 votes)
188 views3 pages

At HM10

Here are the main AT commands in 3 sentences or less: AT commands are used to control Bluetooth modules like the HM-10, common commands include AT to disconnect, AT+NAME to change the name, AT+ADDR to get the address, and AT+RESET to restart the module. Other commands like AT+BAUD set the baud rate, AT+ROLE sets the role as master or slave, and AT+IMME sets the startup mode as auto-connect or manual connection. AT+RENEW resets the module to factory default settings.

Uploaded by

xuan vu dang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
188 views3 pages

At HM10

Here are the main AT commands in 3 sentences or less: AT commands are used to control Bluetooth modules like the HM-10, common commands include AT to disconnect, AT+NAME to change the name, AT+ADDR to get the address, and AT+RESET to restart the module. Other commands like AT+BAUD set the baud rate, AT+ROLE sets the role as master or slave, and AT+IMME sets the startup mode as auto-connect or manual connection. AT+RENEW resets the module to factory default settings.

Uploaded by

xuan vu dang
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Common AT commands

Here is a list of the main AT commands. Remember that commands should be in uppercase and not
include line ending characters (\r\n) unless you are using the above sketch in which case it does not
matter if you include line end characters or not.

If the module is not connected to a


remote device it will reply: “OK”
If the module has a connection then the
connection will be closed. If the
Test Command or notification setting is active, the module
AT Disconnect Command will reply with “OK+LOST”

Returns the name the module broadcasts


AT+NAME? Query the name such as HMsoft.

Changes the name broadcast by the


module. For example
AT+NAMEmyBTmodule changes the
name to myBTmodule.
Change the name of the The maximum length for a new name is
AT+NAMEnewname module 12 characters.

Returns the address as a 12 digit


Queries the HM-10s mac hexidecimal number. For example,
AT+ADDR? address OK+ADDR:606405D138A3

AT+VERS? Queries the firmware


AT+VERR? version number For example: HMSoft V540

Returns OK+RESET
Will close an active connection while
AT+RESET Restarts the module. restarting.

Restores the default factory A quick and easy way to reset all
AT+RENEW settings. settings.

AT+BAUD? Query the baud rate used Returns the value 0-8, for example,
for UART serial OK+Get:0
communication. This is the 0 – 9600
speed a host device like an 1 – 19200
Arduino uses to talk to the 2 – 38400
BT module. It is not the the 3 – 57600
speed used to send wireless 4 – 115200
signals between different 5 – 4800
modules. 6 – 2400
7 – 1200
8 – 230400
The default setting is 0 – 9600.
Remember that both devices, the
Arduino and the HM-10 need to use the
same baud rate. Garbage characters are
usually a sign of mismatched baud
rates.

x is a value from 0 to 8. See the above


for wwhat value represents which baud
rate.
Take care when using with an Arduino.
The maximum baud rate the Arduino
serial monitor allows is 115200. If you
Set the baud rate used for set the baud rate to 230400 with
UART serial AT+BAUD8 you wont be able to talk to
AT+BAUDx communication. the module.

If notifications are turned on, the HM-


10 will reply to commands with a
confirmation message or send out a
message when certain events take place,
like “OK” for the AT command and
“OK+LOST” when a connection is
broken.
AT+NOTI0 – turn off notifications
AT+NOTI1 – turn on notifications
AT+NOTI Set the notification status

Returns either 0 or 1:
Query the notification 0 – notifications are off
AT+NOTI? status 1 – notifications are on

Replies with a 6 digit number like


Query the password used “OK+Get:123456” or whatever the
AT+PASS? for pairing. current password is.
The password must be 6 characters
long..
AT+PASS123456 sets the new
AT+PASS Set a new password. password to 123456

AT+ROLE? returns either 0 or 1.


0 = Slave or Peripheral
Query the current Role; 1 = Master or Central.
AT+ROLE? Master or Slave The default setting is 0 (Slave).

AT+ROLEx Set the device role. x is 0 To change to Slave/Peripheral mode use


or 1. AT+ROLE0. This will return OK+Set:0
To change to Master/Central mode use
AT+ROLE1. This will return OK+Set:1
AT+ROLEx mat require a reset before
the changes take place.

AT+IMME? returns either 0 or 1.


0 = Connect immediately (assuming a
previous connection has been applied
1 = Wait for a connection command
before connecting (AT+START,
AT+CONN, AT+CONL
The default setting is 0 (connect on
AT+IMME? Query the start mode start).

AT+IMME0 sets auto connect on start*


AT+IMME1 sets manual connection
mode
AT+IMMEx is often used together with
AT+ROLEx
AT+IMMEx mat require a reset before
AT+IMMEx Set the start up mode the changes take place.

AT+RESET Restarts the module

Resets the module to


AT+RENEW the factory settings

You might also like