AT Commands

From ElectroDragon Wiki
(Redirected from AT-commands)

Template

Excute Feedback Read Feedback Write Feedback Test Feedback Description
- - - - - - - - -


GSM - Basic

Command Description Header text
AT -> OK Example -
AT+CPIN? -> +CPIN: READY sim card ready, and will have "call ready" later -
AT+CREG? -> +CREG: 0,1 This checks if SIM is registered or not -
AT+CGATT? -> +CGATT: 1 Check if GPRS is attached or not -

GNSS

  • AT+QGNSSC=1 Power on
  • AT+QGNSSRD=NEMA/GLL, AT+QGNSSRD? GNSS read
  • AT+QGNSSTS? RTC time

GPRS - TCPIP

Command Description Header text
AT+QIOPEN="TCP","139.59.102.70","8100" -> CONNECT OK First open a TCP connection -
AT+QISEND -> type anythings -> 0x1a (send as hex input, this is a CTRL+Z character) -> SEND OK Send data to it -
AT+QICLOSE -> CLOSE OK Close connection -


Bluetooth Module Basic Command List

Send Parameter e.g Return Description Availability
AT No AT OK Test Communication EDPA, BC04-A, BC04-B
AT+BAUD? 1~9, A, B,C AT+BAUD1 OK1200 Change Baud Rate EDPA, BC04-A, BC04-B
AT+NAME? - AT+NnameElectrodragon OKElectrodragon Change Name EDPA, BC04-A, BC04-B
AT+PIN? - AT+PIN3456 OKsetpin Set pin password, 4 bytes EDPA, BC04-A, BC04-B

Baud rate Parameter

  • 1---------1200
  • 2---------2400
  • 3---------4800
  • 4---------9600
  • 5---------19200
  • 6---------38400
  • 7---------57600
  • 8---------115200
  • 9---------230400
  • A---------460800
  • B---------921600
  • C---------1382400

P.S: when the baud rate changed, if it's not default 9600, you need to set correct baud rate for further settings or data communication. It's not recommended to use over 115200 Baud rate, system will be not stable due to the interference. If you fail to use when the baud rate set to over 115200, please use MCU which has frequency over 115200 to re-programme it and reset AT commands, etc.

BC04-B Advanced Command List

Downlink Command

Command Name Command Response Parameter
Check version AT+VERSION +VERSION=<Para1> <Para1>: Firmware version number, the Bluetooth version number,
the local HCI version, HCI amendments,
LMP version number, LMP sub-version number
check help AT+HELP ...
Reset to default AT+DEFAULT OK null
reset AT+ RESET OK null
check/set device type AT+COD
AT+COD< Para1>,<Para2>
OK or error <Para1>: Local device type (length must be 6 bytes) from the mode is in effect,
the end retrieval
<Para2>: Filtration equipment type effect in the main mode for filtering
search to equipment (if you set 000,000 returns all search equipment) default: 001f00, 000000
check/set module SPP master/slave mode AT+ROLE
AT+ROLE< Para1>
OK or error <Para1>: 0 --- from the device;
1 --- master; Default: 0 from equipment
check/set GIAC AT+IAC< Para1> OK or Error <Para1>: The query access code, default value: 9e8b33
specific settings, see Appendix 2: query access code Description
check/set remote bluetooth device name AT+RNAME< Para1> OK or Error <Para1>: remote Bluetooth device address
check/set inquiry mode AT+INQM<Para1>,<Para2>,<Para3> OK or Error <Para1>: Query mode: 0: inquiry_mode_standard,1: inquiry_mode_rssi,
2: inquiry_mode_eir, Length: 1 byte,
<Para2>: Up Bluetooth Device response, Length: 2 bytes,
<Para3>: Query timeout, Timeout range :1-30(Converted into time :1.28-61.44 seconds), Length: 2 bytes, Default: 1,9,30 (16 hex)
check/set connection mode AT+CMODE< Para1> OK or Error <Para1>:
0: specified Bluetooth address connected mode
(specified Bluetooth address set by the BIND command)

1: Any Bluetooth address connection mode
(not the BIND command set address the constraints), the default value:

check/set bluetooth address AT+BIND<Para1> OK or Error <Para1>:

Set binding Bluetooth address format: 11,22,33,44,55,66
Reply the Bluetooth address format: 11:22:33:44:55:66
Default: 00:00:00:00:00:00

clear memory address AT+CLEAR OK Null
check/set UART MODE AT+ UARTMODE<Para1>,<Para2> OK or Error <Para1>: Stop bit: 0:1 stop bit, 1:2 stop bit

<Para2>: Parity: 0: no parity, 1: Odd, 2: Even parity, default value: 0,0

check local BT address AT+LADDR +LADDR=<Para1> <Para1>: Local Bluetooth address,
for example: 11:22:33:44:55:66
checkt BT module working status AT+STATE +STATE=<Para1> Example
check/set Remote Bluetooth device automatically search AT+ AUTOINQ<Para1> Ok or Error 0=no, 1=yes
check remote bluetooth device AT+INQ Ok null
cancel check remote bluetooth device AT+INQC Ok null
check/set Whether to automatically connect to a remote Bluetooth device AT+ AUTOCONN<Para1> OK or Error 0=Not Auto, 1= Auto
Connect to remote bluetooth device AT+CONNECT<Para1> OK or Error <Para1>:

Set the remote bluetooth address format:
11,22,33,44,55,66
Reply Bluetooth address format:
11:22:33:44:55:66

check/set Page scan and inquiry scan parameters AT+IPSCAN<Para1>,<Para2>,<Para3>,<Para4> OK or Error <Para1>: Query interval

<Para2>: Query duration
<Para3>: Paging time intervals
<Para4>: Paging duration
The above parameters are hexadecimal numbers.
Default: 800,12,800,12

check/set Encrypt mode AT+SENM<Para1>,<Para2> OK or Error <Para1>: Safe mode, the following values ​​(1 byte):

0 - sec_mode0_off
1 - sec_mode1_non_secure
2 - sec_mode2_service
3 - sec_mode3_link
4 - sec_mode4_ssp
<Para2>: Encryption mode, the following values ​​(1 byte):
0 - hci_enc_mode_off
1 - hci_enc_mode_pt_to_pt
2 - hci_enc_mode_pt_to_pt_and_bcast
Default: 0,0

Check/set low power Mode AT+ LOWPOWER<Para1> ok or error 0=not support, 1=support, default =1
check/set sniff energy save mode AT+SNIFF<Para1>,<Para2>,<Para3>,<Para4> ok or error <Para1> - max time, <Para2> - min time, <Para3> - trial time, <Para4> - timeout time
check/set indication upward command AT+ENABLEIND<Para1> ok or error 0= close, 1= open, default 1
check Bluetooth pairing list AT+LSP LSP=<Para1>,<Para2>,<Para3>
……
LSP=E
<Para1>:number(0-7)
<Para2>:bluetooth address code
<Para3>:name
default feedback:LSP=E
Clear all bluetooth pairing list AT+RESETPDL Ok -
clear selected bluetooth pairing record AT+REMOVEPDL<Para1> OK <Para1>:number(0-7)
check/set linkloss checking time AT+SUPERVISION<Para1> Ok or error <Para1> response time, unit in second (Hex), default 5

Uplink Command list

Command Name Command Response Parameter
ready +READY - -
inquiry status +INQUIRING - -
inquiry pairing status +PAIRABLE - -
connecting +CONNECTING<Para1> - -
connected +CONNECTED - -
connection fail +CONNECTION FAILED - -
report remote bluettoth device name +RNAME=<Para1> - <Para1>: report remote bluetooth name
report inquiry result +INQS start inquiry
+INQ=<Para1>,<Para2>,<Para3>
…… device information
+INQE inquiry completed
- <Para1>:bluetooth address
format:11:22:33:44:55:66
<Para2>:device type
<Para3>:RSSI signal strength (normal is decimal) signal strengthness (default in decimal return 7fff when is not available)


Reference

TC35 Official Command list PDF