AT COMMANDS
AT
- Basic AT-Command.
Command | Syntax |
---|---|
AT | AT |
Example:
AT
OK
ATE
- Turn echo on/off. (On per default).
Command | Syntax |
---|---|
ATE | ATE0 |
ATE1 |
Example:
ATE0
ECHO OFF
ATI
- Device information query. Returns firmware version, hardware type and unique organization identifier.
Command | Syntax |
---|---|
ATI | ATI |
Example:
ATI
Smart Sensor Devices
DA14683
Smart USB Dongle
Firmware Version: 1.0.9
Peripheral role
Not Connected
Not Advertising
ATR
- Trigger platform reset.
Command | Syntax |
---|---|
ATR | ATR |
Example:
ATR
OK
AT+ADVDATA
- Sets or queries the advertising data. Data must be provided as hex string.
The content will take effect only after advertising is restarted.
If you want to send several data types separate it with a space.
Command | Syntax |
---|---|
AT+ADVDATA | |
AT+ADVDATA=xx:xx:xx:xx:xx:xx | |
AT+ADVDATA=(xx:xx:xx:xx) (xx:xx:xx:xx:xx) |
Example:
AT+ADVDATA=04:09:43:41:54
OK
ADVERTISING DATA: 0409434154
AT+ADVDATAI
- Sets advertising data in a way that lets it be used as an iBeacon.
Command | Syntax |
---|---|
AT+ADVDATAI | AT+ADVDATAI=(UUID)(MAJOR)(MINOR)(TX) |
Example:
AT+ADVDATAI=5f2dd896-b886-4549-ae01-e41acd7a354a0203010400
OK
iBeacon created with uuid: 5f2dd896-b886-4549-ae01-e41acd7a354a
AT+ADVSTART
- Starts advertising. Advertising interval can optionally be specified in milliseconds (100 to 3000ms). Time_ms controlls how for how long the dongle will advertise. Set to 0 for unlimited. Returns ERROR if advertising is already active or if the device is in central role.
Command | Syntax |
---|---|
AT+ADVSTART | AT+ADVSTART |
AT+ADVSTART=(mode);(intv_min);(intv_max);(time_ms); |
Supported modes:
Code | Mode |
---|---|
0: | Non-connectable mode |
1: | Undirected mode |
2: | Directed mode |
3: | Directed Low Duty Cycle mode |
Example:
AT+ADVSTART=1;200;300;20;
Advertising type: GAP_CONN_MODE_UNDIRECTED Advertising interval minimum: 200 maximum: 300
ADVERTISING...
AT+ADVSTOP
- Stops advertising. Returns ERROR if not already advertising.
Command | Syntax |
---|---|
AT+ADVSTOP | AT+ADVSTOP |
Example:
AT+ADVSTOP
STOPPING ADVERTISING...
ADVERTISING STOPPED.
AT+ADVRESP
- Sets or queries scan response data. Data must be provided as hex string. Changes to take effect after restart of advertising.
Command | Syntax |
---|---|
AT+ADVRESP | |
AT+ADVRESP=(xx:xx:xx:xx:xx:xx:xx) |
Example:
AT+ADVRESP=04:09:43:41:54
OK
RESPONSE DATA: 0409434154
AT+CENTRAL
- Sets the device Bluetooth role to central role. Advertising must be stopped and any connection must be terminated before the role change is accepted.
Command | Syntax |
---|---|
AT+CENTRAL | AT+CENTRAL |
Example:
AT+CENTRAL
OK
AT+FINDSCANDATA
- Scans for all advertising/response data which contains the search params.
Command | Syntax |
---|---|
AT+FINDSCANDATA | AT+FINDSCANDATA=search params |
Example:
AT+FINDSCANDATA=FF5
SCANNING...
[00:D4:2E:CD:72:23] Device Data [ADV]: 02010618FF5B00110101010101010101011405326845343864353466757675
[D7:D3:AA:00:B5:24] Device Data [ADV]: 02010618FF540930430924302903049320943094F90890548359049E495432
[F9:0D:00:E7:72:21] Device Data [ADV]: 02010618FF540930430924302903049320943094F90890548359049E495432
[F3:00:ED:AD:8A:22] Device Data [ADV]: 02010618FF5A40930430924302903049320943094F90890548359049E49543
[F3:DE:00:D5:96:33] Device Data [ADV]: 0201061AFF5C49320943094F90890548359049E49543249320943094F90890
[C9:70:27:AF:01:54] Device Data [ADV]: 02010618FF5E924302903049320943094F9089054835992430290304932094
[D7:00:AA:07:00:EE] Device Data [ADV]: 02010618FF5301010101010101011405326845343864353466701010101010
AT+GAPCONNECT
- Initiates a connection with a specific slave device. Upon succesfully connecting atempts to display device name, advertising and response data and the services of the peripheral. The local device must be in central role.
Command | Syntax |
---|---|
AT+GAPCONNECT | AT+GAPCONNECT=slave_address |
Example:
AT+GAPCONNECT=FD:37:13:D0:6D:02
CONNECTED
{connection infomation}
AT+GAPDISCONNECT
- Disconnects from a peer Bluetooth device. This command can be used in both central and peripheral role.
Command | Syntax |
---|---|
AT+GAPDISCONNECT | AT+GAPDISCONNECT |
Example:
AT+GAPDISCONNECT
DISCONNECTED
AT+GAPSCAN
- Starts a Bluetooth device scan with or without timer set in seconds. Only accepted when device is in central role and not connected. The scan will continue indefinitly in no parameters set or until amount of time set is reached. Scan will abort if user presses CTRL+C.
Command | Syntax |
---|---|
AT+GAPSCAN | AT+GAPSCAN |
AT+GAPSCAN=seconds |
Example:
AT+GAPSCAN
SCANNING...
[01] Device: [1]30:63:C5:D0:B1:DE RSSI: -38
[02] Device: [0]D0:76:50:80:0A:98 RSSI: -75(closebeacon.com)
[03] Device: [1]27:5D:B8:2E:96:B0 RSSI: -51
[04] Device: [1]5E:CE:CF:C5:20:BB RSSI: -84
SCAN COMPLETE
AT+GAPSTATUS
- Reports the Bluetooth role.
Command | Syntax |
---|---|
AT+GAPSTATUS | AT+GAPSTATUS |
Example:
AT+GAPSTATUS
Central role
Not Connected
Not Advertising
AT+GATTCREAD
- Read attribute of remote GATT server. Can only be used in Central role and when connected to a peripheral.
Command | Syntax |
---|---|
AT+GATTCREAD | AT+GATTCREAD=handle param |
Example:
AT+GATTCREAD=001B
OK
handle_evt_gattc_read_completed: conn_idx=0000 handle=001b status=0
Value read: HELLO
Hex: 0x48454C4C4F
Size: 5
AT+GATTCWRITE
- Write attribute to remote GATT server in ASCII. Can only be used in Central role and when connected to a peripheral.
Command | Syntax |
---|---|
AT+GATTCWRITE | AT+GATTCWRITE=(handle param) (msg) |
Example:
AT+GATTCWRITE=001B HELLO
DATA WRITTEN: HELLO
handle_evt_gattc_write_completed: conn_idx=0000 handle=001b status=1
AT+GATTCWRITEB
- Write attribute to remote GATT server in Hex. Can only be used in Central role and when connected to a peripheral.
Command | Syntax |
---|---|
AT+GATTCWRITEB | AT+GATTCWRITEB=(handle param) (msg) |
Example:
AT+GATTCWRITE=001B
DATA WRITTEN: 0101
Size: 2
AT+PERIPHERAL
- Sets the device Bluetooth role to peripheral. Any connection must be terminated before the role change is accepted.
Command | Syntax |
---|---|
AT+PERIPHERAL | AT+PERIPHERAL |
Example:
AT+PERIPHERAL
OK
AT+SCANTARGET
- Scan a target device. Displaying it's advertising and response data as it updates.
Command | Syntax |
---|---|
AT+SCANTARGET | AT+SCANTARGET=(slave address) |
Example:
AT+SCANTARGET=00:00:00:00:00:01
SCANNING...
[00:00:00:00:00:01] Device Data [ADV]: DataXYZ
[00:00:00:00:00:01] Device Data [RESP]: DataXYZ
[00:00:00:00:00:01] Device Data [ADV]: DataXYZ
[00:00:00:00:00:01] Device Data [RESP]: DataXYZ
[00:00:00:00:00:01] Device Data [ADV]: DataXYZ
AT+SPSSEND
- Send a message or data via the SPS profile. Without parameters it opens a stream for continiously sending data.
Command | Syntax |
---|---|
AT+SPSSEND | AT+SPSSEND=(message) |
AT+SPSSEND |
Example:
AT+SPSSEND=HELLO
[SENT]
--H
- Shows all AT-Commands.
Command | Syntax |
---|---|
--H | --H |
Example:
--H
{List of all AT-Commands...}
...