AT command - ElecFreaks

AT commands of Elecfreaks BLEDuino and Ble Adapter
Note: The deault Baud rate is 9600 from 6th-11-2015, and the precious version was 115200,
expect BLEduino.
1. Test
Command
Response
Parameter
AT
OK
NONE
Command
Response
Parameter
AT+VERSION
+VERSION=V*.*
NONE
2. Get version
Example:
Command:
Response:
3. Get help
AT+VERSION
+VERSION=V2.0
Command
Response
Parameter
AT+HELP
Command
Description
1. AT
Check if the command terminal
work normally
...
NONE
4. Get/set name
Command
AT+NAME
Example:
1.
Command:
Response:
2.
Command:
Response:
3.
Command:
Response:
Response
+NAME=<name>
Parameter
<name>
?
AT+NAME
+NAME=BLE-Elecfreaks
AT+NAME BLE-Adapter
+NAME=BLE-Adapter, OK, please restart
AT+NAME ?
AT+NAME
AT+NAME <?>
AT+NAME <name>
5. Get/set baud rate
Get device name.
Get Usage.
Set device name.
Command
Response
Parameter
AT+BAUD
+BAUD=<baud>
9600
19200
38400
Product Data Sheet
Technical Support: [email protected]
57600
115200
?
Example:
1.
Command:
Response:
2.
Command:
Response:
3.
Command:
Response:
AT+BAUD
+BAUD=115200
AT+BAUD 115200
+BAUD=115200, OK, please restart.
AT+BAUD ?
AT+BAUD
AT+BAUD <?>
AT+BAUD <baud>
Get current baud rate.
Get Usage.
Set baud rate to <b>.
6. Set default settings
Command
Response
Parameter
AT+RENEW
OK, please restart.
NONE
Command
Response
Parameter
AT+ROLE
+ROLE=<role>
7. Get/set role(Central or Peripheral)
Example:
1.
Command:
Response:
2.
Command:
Response:
3.
Command:
Response:
0: Peripheral
1: Central
?
AT+ROLE
+ROLE=Peripheral
AT+ROLE 1
+ROLE=Central, OK, please restart.
AT+ROLE ?
AT+ROLE
AT+ROLE <?>
AT+ROLE <n>
8. Scan device
Get device role.
Get Usage.
Set device role.1:central,0:peripheral.
Command
Response
Parameter
AT+SCAN
Scanning...
NONE
Example:
Command:
Response:
AT+SCAN
Scanning...
Product Data Sheet
Technical Support: [email protected]
No.n
9. Connect device
devName= Addr=01:02:03:04:05:06 rssi=-70
Command
Response
Parameter
AT+CON
Connecting...
<n>
?
Example:
1.
Command:
Response:
AT+CON 1
Connecting...
Connect ok!
Connected addr=01:02:03:04:05:06
2.
Command:
Response:
AT+CON ?
AT+CON <n>
AT+CON <?>
10. Get mac address
Connect to n-th device from scan list.
Get Usage.
Command
Response
Parameter
AT+MYMAC
+MYMAC=01:02:03:04:05:06
NONE
11. Get/set transmit mode
Because of cc2540 has 2 port(usb port, uart port), so you need select a port for data transmit, this
transmit mode is valid only connected, otherwise data is from usb port to uart port.
Command
Response
AT+TRANSMODE
+TRANSMODE=<n>
Example:
1.
Command:
Response:
2.
Command:
Response:
3.
Command:
Response:
Parameter
1.USB<->Central <=> App;
USB<->Peripheral <=> App
2.USB<->Central <=> App;
UART<->Peripheral <=> App
3.UART<->Central <=> App;
USB<->Peripheral <=> App
4.UART<->Central <=> App;
UART<->Peripheral <=> App
AT+TRANSMODE
+TRANSMODE=1.USB<->Central
<=> App;USB<->Peripheral <=> App
AT+TRANSMODE 1
+TRANSMODE=1.USB<->Central
<=> App;USB<->Peripheral <=> App, OK.
AT+TRANSMODE ?
AT+TRANSMODE
AT+TRANSMODE ?
AT+TRANSMODE <n>
Product Data Sheet
Get transmitMode num.
Get Usage.
Set device transmitMode.
Technical Support: [email protected]
1.USB<->Central <=> App; USB<->Peripheral <=> App
2.USB<->Central <=> App; UART<->Peripheral <=> App
3.UART<->Central
<=> App; USB<->Peripheral <=> App
4.UART<->Central
<=> App; UART<->Peripheral <=> App
Product Data Sheet
Technical Support: [email protected]