First message from the device after switching on
| Notification | |
|---|---|
| Message | +STARTED |
Test command
| Command | |
|---|---|
| Message | AT |
| Response | OK |
Enable/disable echo
| Command | |
|---|---|
| Message | ATE <echo> |
| Response | OK |
| Error | FAIL |
| Parameters | <echo>0 - disable 1 - enable |
| Example | ATE1ATE0 |
Request device version
| Command | |
|---|---|
| Message | AT+VERSION |
| Response | +VERSION:<dev-model>,<app-name>,<app-version>,<app-date>OK |
| Parameters | <dev-model> - device model<app-name> - firmware name <app-version> - firmware version<app-date> - firmware release date |
AT+VERSION
+VERSION:"M-3003","AT_MODEM","1.0.1","16.09.2025"
OK
Unique device identifier
| Command | |
|---|---|
| Message | AT+UID |
| Response | +UID:<uid>OK |
| Parameters | <uid> - unique device identifier |
Restart the device
| Command | |
|---|---|
| Message | AT+RESET |
| Response | OK |
Enter low-power mode
| Command | |
|---|---|
| Message | AT+SLEEP |
| Response | OK |
To exit this mode, you need to send any AT command and wait for a message
+STARTED.
Setting up WiFi mode
| Request | |
|---|---|
| Message | AT+WFMODE? |
| Response | +WFMODE:<mode>OK |
| Parameters | <mode> - operating mode0 - disabled 1 - station 2 - access point 3 - station + access point |
| Set command | |
|---|---|
| Message | AT+WFMODE= <mode> |
| Response | OK |
| Error | +WFMODE ERROR:<error>FAIL |
| Parameters | see table "Request" |
| Example | AT+WFMODE=0AT+WFMODE=1 |
| Test | |
|---|---|
| Message | AT+WFMODE=? |
| Response | +WFMODE:<mode>OK |
| Parameters | see table "Request" |
Scan available access points
The device must operate in "Station" mode (see setting)
| Command | |
|---|---|
| Message | AT+WFSCANAP |
| Response | +WFSCANAP:<ssid>,<mac>,<channel>,<auth>,<rssi>,<bandwidth>,<pairwise_cipher>,<group_cipher>,<phy>,<wps>OK |
| Error | +WFSCANAP ERROR:<error>FAIL |
| Parameters | <ssid> - name<mac> - MAC address<channel> - channel<auth> - authentication type (list of values)<rssi> - signal strength in dBm<bandwidth> - channel bandwidth0 - HT20 1 - 20 MHz 2 - HT40 3 - 40 MHz 4 - 80 MHz 5 - 160 MHz 6 - 80 + 80 MHz <pairwise_cipher> - pairwise cipher type (list of values)<group_cipher> - group cipher type (list of values)<phy> - supported network maskbit0 - 802.11b bit1 - 802.11g bit2 - 802.11n <wps> - wps support |
AT+WFSCANAP
+WFSCANAP:"ESP_E70839","f4-12-fa-e7-08-39",1,0,-25,2,0,0,1,0
+WFSCANAP:"70mai_d02_98ba","44-27-f3-13-98-ba",3,4,-87,1,5,3,1,0
+WFSCANAP:"BEG","9c-e3-74-0f-90-d4",4,4,-68,1,5,3,1,0
+WFSCANAP:"GKU_D200_9a0a","bc-c7-da-be-9a-0a",5,4,-90,1,4,3,1,0
+WFSCANAP:"A1-FT34-A8A038-2.4G","20-57-af-a8-a0-3e",7,4,-85,2,5,3,1,1
+WFSCANAP:"TD1","60-08-10-3c-e0-c4",10,4,-40,1,5,3,1,0
+WFSCANAP:"HUAWEI-h48W","dc-99-14-24-01-cc",10,4,-59,1,5,3,1,1
OK
Setting the format for a command AT+WFSCANAP
| Request | |
|---|---|
| Message | AT+WFSCANAPOPT? |
| Response | +WFSCANAPOPT:<mask>OK |
| Error | +WFSCANAPOPT ERROR:<error>FAIL |
| Parameters | <mask> - mask of displayed parametersbit0 - parameter ssidbit1 - parameter macbit2 - parameter channelbit3 - parameter authmodebit4 - parameter rssibit5 - parameter bandwidthbit6 - parameter pairwise_cipherbit7 - parameter group_cipherbit8 - parameter phybit9 - parameter wpsBit values: 0 - do not include parameter 1 - include parameter |
| Set command | |
|---|---|
| Message | AT+WFSCANAPOPT= <mask> |
| Response | +WFSCANAPOPT:<mask>OK |
| Parameters | see table "Request" |
| Example | AT+WFSCANAPOPT=1023 |
| Test | |
|---|---|
| Message | AT+WFSCANAPOPT=? |
| Response | +WFSCANAPOPT:<mask>OK |
| Parameters | see table "Request" |
Setting the station IP address
The device must operate in "Station" mode (see setting)
| Request | |
|---|---|
| Message | AT+WFSTAIP? |
| Response | +WFSTAIP=<static>,<ip>,<mask>,<gateway>OK |
| Error | +WFSTAIP ERROR:<error>FAIL |
| Parameters | <static>0 - use DHCP 1 - static IP address <ip> - station IP address<mask> - subnet mask<gateway> - default gateway address |
| Set command | |
|---|---|
| Message | AT+WFSTAIP= <static>[,<ip>,<mask>,<gateway>] |
| Response | OK |
| Error | see table "Request" |
| Parameters | see table "Request" |
| Example | AT+WFSTAIP=0AT+WFSTAIP=1,"192.168.1.2","255.255.255.0","192.168.1.1" |
Setting the station's MAC address
The device must operate in "Station" mode (see setting)
| Request | |
|---|---|
| Message | AT+WFSTAMAC? |
| Response | +WFSTAMAC=<mac>OK |
| Error | +WFSTAMAC ERROR:<error>FAIL |
| Parameters | <mac> - MAC address of the station |
| Set command | |
|---|---|
| Message | AT+WFSTAMAC= <mac> |
| Response | OK |
| Error | see table "Request" |
| Parameters | see table "Request" |
| Example | AT+WFSTAMAC="11:22:33:44:55:66" |
Connect to an access point
The device must operate in "Station" mode (see setting)
| Command | |
|---|---|
| Message | AT+WFCONNAP= <ssid> [,<password>,<mac>] |
| Response | OK |
| Error | +WFCONNAP ERROR:<error>FAIL |
| Parameters | <ssid> - access point name<password> - authentication password<mac> - MAC address |
| Example | AT+WFCONNAP="Ntc","12345678","11:22:33:44:55:66" |
If the command returned a response
OK, then one of the notifications will subsequently be generated:
➜+STA_CONNECTED
➜+STA_DISCONNECTED
If the command returns an error, then no notifications are generated.
The device is successfully connected to the access point in "Station" mode
| Notification | |
|---|---|
| Message | +STA_CONNECTED |
The device has disconnected from the access point or the connection could not be established.
| Notification | |
|---|---|
| Message | +STA_DISCONNECTED: <reason> |
| Parameters | <reason> - reason for shutdown (list of values) |
Disconnect from access point
The device must operate in "Station" mode (see setting)
| Command | |
|---|---|
| Message | AT+WFDISCONNAP |
| Response | OK |
| Error | +WFDISCONNAP ERROR:<error>FAIL |
Setting the IP address of the access point
The device must operate in "Access Point" mode (see setting)
| Request | |
|---|---|
| Message | AT+WFAPIP? |
| Response | +WFAPIP=<ip>,<mask>OK |
| Error | +WFAPIP ERROR:<error>FAIL |
| Parameters | <ip> - default gateway address<mask> - subnet mask |
| Set command | |
|---|---|
| Message | AT+WFAPIP= <ip>[,<mask>] |
| Response | OK |
| Error | see table "Request" |
| Parameters | see table "Request" |
| Example | AT+WFAPIP="192.168.1.1","255.255.255.0" |
Setting the MAC address of the access point
The device must operate in "Access Point" mode (see setting)
| Request | |
|---|---|
| Message | AT+WFAPMAC? |
| Response | +WFAPMAC=<mac>OK |
| Error | +WFAPMAC ERROR:<error>FAIL |
| Parameters | <mac> - MAC address of the access point |
| Set command | |
|---|---|
| Message | AT+WFAPMAC= <mac> |
| Response | OK |
| Error | see table "Request" |
| Parameters | see table "Request" |
| Example | AT+WFAPMAC="11:22:33:44:55:66" |
Set up an access point
The device must operate in "Access Point" mode (see setting)
| Command | |
|---|---|
| Message | AT+WFAPCONF= <ssid> [,<password>,<channel>,<auth>,<max_conn>,<hidden>] |
| Response | OK |
| Error | +WFAPCONF ERROR:<error>FAIL |
| Parameters | <ssid> - name<password> - password<channel> - channel1 .. 13 - valid values <auth> - authentication type (list of values)<max_conn> - maximum number of stations (clients)<hidden>0 - visible access point 1 - hidden access point |
| Example | AT+WFAPCONF="Ntc","12345678",1,1,5,0 |
Ping
| Command | |
|---|---|
| Message | AT+PING=<ip>[,<timeout>,<interval>,<data-size>,<count>] |
| Response | +PING,<n>:<result>+PING: <req>,<resp>,<full-time>OK |
| Error | +PING ERROR:<error>FAIL |
| Parameters | <ip> - IP address<timeout> - request timeout in milliseconds (default 250)<interval> - interval between requests in milliseconds (default 250)<data-size> - data size in bytes (default 16)<count> - number of requests (default 4)<n> - request number <result> - result: response time or timeout<req> - number of requests <resp> - number of responses<full-time> - total time |
| Example | AT+PING="192.168.1.1" |
Determining the domain's IP address
| Command | |
|---|---|
| Message | AT+DNS=<domain> |
| Response | +DNS:<ip>OK |
| Error | +DNS ERROR:<error>FAIL |
| Parameters | <domain> - domain name<ip> - IP address |
| Example | AT+DNS="ya.ru" |
Open UDP socket
| Command | |
|---|---|
| Message | AT+UDPOPEN[=<src-port>,<dst-addr>,<dst-port>,<index>] |
| Response | +UDPOPEN:<index>OK |
| Error | +UDPOPEN ERROR:<error>FAIL |
| Parameters | <src-port> - source port (if not specified, it is assigned automatically)<dst-addr> - destination DNS/IP address<dst-port> - destination port<index> - socket number (if not specified, it will be assigned automatically) |
| Example | AT+UDPOPENAT+UDPOPEN=,"example.com",12345 |
Connect to a TCP socket
| Command | |
|---|---|
| Message | AT+TCPCONN=<dst-addr>,<port>[,<index>] |
| Response | +TCPCONN:<index>OK |
| Error | +TCPCONN ERROR:<error>FAIL |
| Parameters | <dst-addr> - target DNS/IP address<port> - target port<index> - socket number (if not specified, it will be assigned automatically) |
| Example | AT+TCPCONN="192.168.1.100",12345 |
TCP socket successfully connected to the target address
| Notification | |
|---|---|
| Message | +CONNECTED,<index> |
| Parameters | <index> - socket number |
TCP socket disconnected
| Notification | |
|---|---|
| Message | +DISCONNECTED,<index> |
| Parameters | <index> - socket number |
If this notification is received, the socket is automatically closed and resources are released. (no need to call the command
AT+CLOSE)
Wait for an incoming connection to a TCP socket
| Command | |
|---|---|
| Message | AT+TCPLISTEN=<port>[,<conn-count>,<index>] |
| Response | +TCPLISTEN:<index>OK |
| Error | +TCPLISTEN ERROR:<error>FAIL |
| Parameters | <port> - port<conn-count> - maximum number of connections<index> - socket number (if not specified, it will be assigned automatically) |
| Example | AT+TCPLISTEN=12345 |
When there is an incoming connection to this socket, a notification will be sent
+CONNECTEDwith a socket number that can be used to receive and send data
Close UDP or TCP socket
| Command | |
|---|---|
| Message | AT+CLOSE=<index> |
| Response | OK |
| Error | +CLOSE ERROR:<error>FAIL |
| Parameters | <index> - socket number |
| Example | AT+CLOSE=0 |
Send data via UDP or TCP socket
| Command | |
|---|---|
| Message | AT+WRITE=<index>,<data>[,<dst-addr>,<port>] |
| Response | OK |
| Error | +WRITE ERROR:<error>FAIL |
| Parameters | <index> - socket number<data> - data in text or HEX format:HEX format - two characters per byte Text - printed text enclosed in quotation marks Only for UDP socket: dst-addr - DNS/IP address of destinationport - destination port.Can be omitted if parameters were specified during opening, in a previous data sending, or data from an outgoing connection has already been received |
| Example | AT+WRITE=0,3031323334AT+WRITE=0,"01234" |
Sending a sequence of 35 bytes 404e5443000000000100000013004c472a3e533a313233343531323334353132333435
AT+WRITE=0,404e544301000000000000001300464d2a3e533a383636373935303333333233383634
OK
+READ,0:19,404E544300000000010000000300455E2A3C53
Send data via UDP or TCP socket
| Command | |
|---|---|
| Message | AT+WRITEB=<index>,<size>[,<dst-addr>,<port>]<CRLF> <BIN> |
| Response | OK |
| Error | +WRITEB ERROR:<error>FAIL |
| Parameters | <index> - socket number<size> - data size<CRLF> - Separator between text and binary parts of the message (byte sequence 0x0D, 0x0A)<BIN> - data in BIN formatOnly for UDP socket: dst-addr - DNS/IP address of destinationport - destination port.Can be omitted if parameters were specified during opening, in a previous data sending, or data from an outgoing connection has already been received |
Sending a sequence of 35 bytes 404e5443000000000100000013004c472a3e533a313233343531323334353132333435
AT+WRITEB=0,35 <- Текст
404e5443000000000100000013004c472a3e533a313233343531323334353132333435 <- перевод строки и бинарные данные
OK <- Текст
+READB,0:19 <- Текст
404e544300000000010000000300455e2a3c53 <- перевод строки и бинарные данные
Setting the data reception mode
| Request | |
|---|---|
| Message | AT+DATAMODE? |
| Response | +DATAMODE=<data-mode>OK |
| Parameters | <data-mode> - data reception mode: |
| Set command | |
|---|---|
| Message | AT+DATAMODE= <data-mode> |
| Response | OK |
| Error | +DATAMODE ERROR:<error>FAIL |
| Parameters | see table "Request" |
| Example | AT+DATAMODE=1 |
Receiving data (in HEX format) via UDP or TCP socket
| Notification | |
|---|---|
| Message | +READ,<index>[,<addr>,<port>]:<size>,<data> |
| Parameters | <index> - socket number<addr> - DNS/IP address of the sender (only if the socket is UDP)<port> - sender port (only if the socket is UDP)<size> - data size<data> - data in HEX format (two characters per byte) |
An example of use can be seen in the section AT+WRITE
Receiving data (in BIN format ) via UDP or TCP socket
| Notification | |
|---|---|
| Message | +READB,<index>[,<addr>,<port>]:<size> <CRLF> <BIN> |
| Parameters | <index> - socket number<addr> - DNS/IP address of the sender (only if the socket is UDP)<port> - sender port (only if the socket is UDP)<size> - data size<CRLF> - Separator between text and binary parts of the message (byte sequence 0x0D, 0x0A)<BIN> - data in BIN format |
An example of use can be seen in the section AT+WRITEB
The socket was closed for some reason
| Notification | |
|---|---|
| Message | +CLOSED,<index> |
| Parameters | <index> - socket number |
If this notification is received, the socket is automatically closed and resources are released. (no need to call the command
AT+CLOSE)
Information about the sockets in use
| Command | |
|---|---|
| Message | AT+SSTAT |
| Response | +SSTAT:<index>,<type>,<local-port>[,<remote-ip>,<remote-port>]OK |
| Parameters | <index> - socket number<type> - socket type:1 - UDP 2 - TCP server 3 - TCP outgoing client connection 4 - TCP incoming client connection <local-port> - local port<remote-ip> - remote IP address<remote-port> - remote port |
AT+SSTAT
+SSTAT:0,3,57683,193.193.165.165,21626
+SSTAT:1,3,57684,193.193.165.165,21627
+SSTAT:2,3,57685,193.193.165.165,21628
OK
Information about firmware in the device
| Command | |
|---|---|
| Message | AT+FWINFO |
| Response | +FWINFO:<index>,<id>,<app-name>,<app-version>,<app-date>,<active>OK |
| Parameters | <index> - firmware number<id> - firmware identifier<app-name> - firmware name <app-version> - firmware version<app-date> - firmware release date<active> - currently active |
Switching firmware
| Command | |
|---|---|
| Message | AT+FWSEL=<index> |
| Response | OK |
| Error | +FWSEL ERROR:<error>FAIL |
| Parameters | <index> - firmware number |
Write firmware (data in HEX format)
| Command | |
|---|---|
| Message | AT+FWWRITE=<id>,<address>,<data> |
| Response | OK |
| Error | +FWWRITE ERROR:<error>FAIL |
| Parameters | <id> - firmware identifier, for the main firmware it is 0 (may not be specified)<address> - address (offset)<data> - data in HEX format (two characters per byte) |
Write firmware (data in BIN format)
| Command | |
|---|---|
| Message | AT+FWWRITEB=<id>,<address>,<data-size> <CRLF> <BIN> |
| Response | OK |
| Error | +FWWRITEB ERROR:<error>FAIL |
| Parameters | <id> - firmware identifier, for the main firmware it is 0 (may not be specified)<address> - address (offset)<data-size> - data size <CRLF> - Separator between text and binary parts of the message (byte sequence 0x0D, 0x0A)<BIN> - data in BIN |
Update to recorded firmware
| Command | |
|---|---|
| Message | AT+FWUPDATE[=<id>,<size>,<crc>] |
| Response | OK |
| Error | +FWUPDATE ERROR:<error>FAIL |
| Parameters | <id> - firmware identifier<size> - size of the recorded firmware file<crc> - firmware checksum |
Initialize BLE
| Command | |
|---|---|
| Message | AT+BLEINIT |
| Response | OK |
| Error | +BLEINIT ERROR:<error>FAIL |
All services and features must be added before executing this command. (commands:
AT+BLESSVC,AT+BLESCHR). After executing this command, services and characteristics cannot be added. If services and characteristics were not added before executing this command, the device will be unconnectable. You can only connect to the first BLE instance (<instance>= 0), the rest are always unconnected.
Add service
| Command | |
|---|---|
| Message | AT+BLESSVC=<uuid-data> |
| Response | OK |
| Error | +BLESVCADD ERROR:<error>FAIL |
| Parameters | <uuid-data> - UUID of the service in HEX format (2, 4 or 16 bytes of data) |
Add a characteristic to the last added service
| Command | |
|---|---|
| Message | AT+BLESCHR=<uuid-data>[,<flags>,<data>,<data-size>,<format>,<exponent>,<units>,<namespace>,<description>] |
| Response | +BLECHRADD:<handle>OK |
| Error | +BLECHRADD ERROR:<error>FAIL |
| Parameters | <uuid-data> - UUID of the service in HEX format (2, 4 or 16 bytes of data)<flags> - type of access to the characteristic:bit0 - not used bit1 - reading bit2 - write without response bit3 - write bit4 - notification on change bit5 - indication on change <data> - data in HEX format<data-size> - data size (if this field is specified, then the field <data> can be omitted, and the characteristic will be initialized to zero values)<format> - value format (if not specified or 0 is specified, then the remaining parameters have no meaning) (see specifications for values Assigned Numbers - 2.4.1 GATT Format Types)<exponent> - the power of the multiplier 10, by which the value must be multiplied to obtain the correct result (allowed values: -128..127) <units> - units of measurement (see specifications for values Assigned Numbers - 3.5.1 Units by Name)<namespace> - namespace, usually equal to 1<description> - description identifier<handle> - characteristic identifier |
BLE device name
| Request | |
|---|---|
| Message | AT+BLENAME=[<instance>]? |
| Response | +BLENAME,<instance>=<name>OK |
| Error | +BLENAME ERROR:<error>FAIL |
| Parameters | <instance> - BLE instance number (default 0)<name> - name |
| Set command | |
|---|---|
| Message | AT+BLENAME=[<instance>],<name> |
| Response | OK |
| Error | see table "Request" |
| Parameters | see table "Request" |
| Example | AT+BLENAME=0,"Abc" |
Type (appearance) BLE devices
| Request | |
|---|---|
| Message | AT+BLEAPP=[<instance>]? |
| Response | +BLEAPP,<instance>=<appearance>OK |
| Error | +BLEAPP ERROR:<error>FAIL |
| Parameters | <instance> - BLE instance number (default 0)<appearance> - device type |
| Set command | |
|---|---|
| Message | AT+BLEAPP=[<instance>],<appearance> |
| Response | OK |
| Error | see table "Request" |
| Parameters | see table "Request" |
| Example | AT+BLEAPP=0,512 |
Set up a BLE device
| Command | |
|---|---|
| Message | AT+BLECONF[=<instance>,<type>,<interval-min>,<interval-max>,<channel-mask>,<address>,<primary-phy>,<secondary-phy>] |
| Response | OK |
| Error | +BLECONF ERROR:<error>FAIL |
| Parameters | <instance> - BLE instance number (default 0)<type> - notification type:0 - classic BLE (message data size up to 31 bytes) 1 - advanced BLE (message data size up to 254 bytes) <interval-min> - minimum interval between notifications (ms)<interval-max> - maximum interval between notifications (ms)<channel-mask> - mask of channels used for notifications:bit0 - channel 37 bit1 - channel 38 bit2 - channel 39 <address> - address<primary-phy> - PHY notification channels:1 - Uncoded 1M 3 - Coded <secondary-phy> - PHY channels after connection:1 - Uncoded 1M 2 - Uncoded 2M 3 - Coded |
| Example | AT+BLECONF=0,0,1000,2000,4,"01:02:03:04:05:06" |
Launch BLE device
| Command | |
|---|---|
| Message | AT+BLESTART[=<instance>] |
| Response | OK |
| Error | +BLESTART ERROR:<error>FAIL |
| Parameters | <instance> - BLE instance number (default 0) |
Stop BLE device
| Command | |
|---|---|
| Message | AT+BLESTOP[=<instance>] |
| Response | OK |
| Error | +BLESTOP ERROR:<error>FAIL |
| Parameters | <instance> - BLE instance number (default 0) |
Install raw data in BLE beacon
| Command | |
|---|---|
| Message | AT+BLEADVDATA=[<instance>],<data> |
| Response | OK |
| Error | +BLEADVDATA ERROR:<error>FAIL |
| Parameters | <instance> - beacon number (default 0)<data> - data in HEX format |
This command allows you to set any data in the BLE beacon message. To set standard data, use the commands:
AT+BLEADVDF,AT+BLEADVDFMSD,AT+BLEADVDFURI,AT+BLEADVDFSDU16,AT+BLEADVDFSDU32,AT+BLEADVDFSDU128.
Set standard fields in BLE beacon message
| Command | |
|---|---|
| Message | AT+BLEADVDF=[<instance>],[<flags-enable>,<name-enable>,<appearance-enable>,<tx-power-enable>] |
| Response | OK |
| Error | +BLEADVDF ERROR:<error>FAIL |
| Parameters | <instance> - beacon number (default 0)<flags-enable> - enable the flags field (0x01)<name-enable> - enable title field (0x09)<appearance-enable> - enable type field (0x19)<tx-power-enable> - enable the TX signal strength field (0x0A) |
Set field: manufacturer specific data (0xFF)
| Command | |
|---|---|
| Message | AT+BLEADVDFMSD=[<instance>],<data> |
| Response | OK |
| Error | +BLEADVDFMSD ERROR:<error>FAIL |
| Parameters | <instance> - beacon number (default 0)<data> - data in HEX format |
Set field: URI link (0x24)
| Command | |
|---|---|
| Message | AT+BLEADVDFURI=[<instance>],[<uri-prefix>],<uri> |
| Response | OK |
| Error | +BLEADVDFURI ERROR:<error>FAIL |
| Parameters | <instance> - beacon number (default 0)<uri-prefix> - link prefix:1 - no prefix (default value) 17 - ftp: 22 - http: 23 - https: For other values, see the documentation (Assigned Numbers - 2.7 URI Scheme Name String Mapping) <uri> - link in text format |
| Example | AT+BLEADVDFURI=,,"navtelecom.ru" |
Set field: service data - 16-bit UUID (0x16)
| Command | |
|---|---|
| Message | AT+BLEADVDFSDU16=[<instance>],<uuid-data>,<data> |
| Response | OK |
| Error | +BLEADVDFSDU16 ERROR:<error>FAIL |
| Parameters | <instance> - beacon number (default 0)<uuid-data> - 16-bit UUID in HEX format (2 bytes of data)<data> - data in HEX format |
| Example | AT+BLEADVDFSDU16=,1001,0A0B0C0D |
Set field: service data - 32-bit UUID (0x20)
| Command | |
|---|---|
| Message | AT+BLEADVDFSDU32=[<instance>],<uuid-data>,<data> |
| Response | OK |
| Error | +BLEADVDFSDU32 ERROR:<error>FAIL |
| Parameters | <instance> - beacon number (default 0)<uuid-data> - 32-bit UUID in HEX format (4 bytes of data)<data> - data in HEX format |
| Example | AT+BLEADVDFSDU32=,1001001,0A0B0C0D |
Set field: service data - 128-bit UUID (0x21)
| Command | |
|---|---|
| Message | AT+BLEADVDFSDU128=[<instance>],<uuid-data>,<data> |
| Response | OK |
| Error | +BLEADVDFSDU128 ERROR:<error>FAIL |
| Parameters | <instance> - beacon number (default 0)<uuid-data> - 128-bit UUID in HEX format (16 bytes of data)<data> - data in HEX format |
| Example | AT+BLEADVDFSDU128=,0102030405060708090A0B0C0D0E0F10,0A0B0C0D |
Read the characteristic value in BLE server mode
| Command | |
|---|---|
| Message | AT+BLESRD=<handle> |
| Response | +BLESRD:<handle>,<data>OK |
| Error | +BLESRD ERROR:<error>FAIL |
| Parameters | <handle> - characteristic identifier<data> - characteristic value (data in HEX format) |
Write the characteristic value in BLE server mode
| Command | |
|---|---|
| Message | AT+BLESWR=<handle>,<data> |
| Response | OK |
| Error | +BLESWR ERROR:<error>FAIL |
| Parameters | <handle> - characteristic identifier<data> - characteristic value (data in HEX format) |
Characteristic value written (server mode)
| Notification | |
|---|---|
| Message | +BLESWRN:<handle>,<data> |
| Parameters | <handle> - characteristic identifier<data> - characteristic value (data in HEX format) |
Client connected to the device (server mode)
| Notification | |
|---|---|
| Message | +BLESCONN |
Client disconnected from the device (server mode)
| Notification | |
|---|---|
| Message | +BLESDISCONN |
Scan BLE devices
| Command | |
|---|---|
| Message | AT+BLEDISC[=<filter-dublicates>,<interval>,<out-mode>] |
| Response | OK |
| Error | +BLEDISC ERROR:<error>FAIL |
| Parameters | <filter-dublicates> - filter out identical notifications (default 1)<interval> - scanning time (0 - continuous scanning)<out-mode> - notification mode (if not specified, does not change) (by default set to 1)0 - data mode 1 - field mode |
Stop scanning BLE devices
| Command | |
|---|---|
| Message | AT+BLEDISCSTOP |
| Response | OK |
| Error | +BLEDISCSTOP ERROR:<error>FAIL |
Add addresses to white scan list
| Command | |
|---|---|
| Message | AT+BLEWLADD=<addr1>[,<addr2>,...] |
| Response | +BLEWLADD:<addrN>,<error>OK |
| Error | FAIL |
| Parameters | <addr1> - address 1<addr2> - address 2... <addrN> - address that could not be added |
Remove addresses from white scan list
| Command | |
|---|---|
| Message | AT+BLEWLREM=<addr1>[,<addr2>,...] |
| Response | +BLEWLREM:<addrN>,<error>OK |
| Error | FAIL |
| Parameters | <addr1> - address 1<addr2> - address 2... <addrN> - address that could not be deleted |
Clear white scan list
| Command | |
|---|---|
| Message | AT+BLEWLCLR |
| Response | OK |
BLE device scanning completed
| Notification | |
|---|---|
| Message | +BLEDISCCOMP |
Received notification from BLE device
| Notification | |
|---|---|
| Message | +BLEADV:<addr-type>,<addr>,<legacy_type>,<rssi>,(<data>)|(<field_type1>,<field-value1>,<field_type2>,<field-value2>,...) |
| Parameters | <addr-type> - address type:0 - public 1 - random <addr> - device address<legacy_type> - notification type0 - available for connection and scanning 1 - directed to a specific device 2 - available for scanning (not available for connection) 3 - not available for scanning and connection 4 - response to scan request <rssi> - signal strength<data> - notification data in HEX format (used in data mode)<field_typeN> - field type (used in field mode)<field_valueN> - field value (used in field mode). The format depends on the field type. |
Field formats:
| Type | Description | Format |
|---|---|---|
| 0x01 | Flags | Unsigned DEC number |
| 0x08 | Incomplete device name | String |
| 0x09 | Device name | String |
| 0x0A | TX power level | Signed DEC number |
| 0x17 | Public target address | Address |
| 0x18 | Random target address | Address |
| 0x19 | Device type | Unsigned DEC number |
| 0x1A | Interval between notifications | Unsigned DEC number |
| 0x1C | LE role | Unsigned DEC number |
| 0x1B | Device address | Address type + address (<addr-type>/<type>) |
| 0x24 | Link (URI) | String |
| 0x27 | Supported LE Features | Unsigned DEC number |
| ... | Default | HEX data |
Connect to BLE device
| Command | |
|---|---|
| Message | AT+BLECCONN[=<addr-type>],<addr>,[<timeout>] |
| Response | OK |
| Error | +BLECCONN ERROR:<error>FAIL |
| Parameters | <addr-type> - address type (default 0):0 - public 1 - private <addr> - address<timeout> - timeout (ms) |
If the command is successfully accepted for execution, a notification should be sent
+BLECCONNDor after a timeout has expired+BLECDISCONND.
Disconnect from BLE device
| Command | |
|---|---|
| Message | AT+BLECDISCONN |
| Response | OK |
| Error | +BLECDISCONN ERROR:<error>FAIL |
Connected to BLE device
| Notification | |
|---|---|
| Message | +BLECCONND |
After receiving this message, the process of determining the BLE device services starts automatically.
There was a disconnection from the BLE device
| Notification | |
|---|---|
| Message | +BLECDISCONND |
Service defined
| Notification | |
|---|---|
| Message | +BLEADV=[<parent-handle>],<handle>,<uuid> |
| Parameters | <parent-handle> - parent service number (omitted for primary services)<handle> - number<uuid> - identifier in HEX format |
Characteristic defined
| Notification | |
|---|---|
| Message | +BLEADV=<service-handle>,<handle>,<flags>,<uuid> |
| Parameters | <service-handle> - service number<handle> - number<flags> - flags:bit0 - broadcast bit1 - reading bit2 - entries without answer bit3 - records bit4 - notification (notify) bit5 - indication (indicate) <uuid> - identifier in HEX format |
Description defined
| Notification | |
|---|---|
| Message | +BLECDSC=<parent-handle>,<handle>,<uuid> |
| Parameters | <parent-handle> - characteristic number<handle> - number<uuid> - identifier in HEX format |
The service definition process is complete
| Notification | |
|---|---|
| Message | +BLECDISCDONE |
Read BLE attribute (in client mode)
| Command | |
|---|---|
| Message | AT+BLECRD=<handle> |
| Response | OK |
| Error | +BLECRD ERROR:<error>FAIL |
| Parameters | <handle> - number of characteristics or descriptions |
Subscribe to characteristic changes (in client mode)
| Command | |
|---|---|
| Message | AT+BLECSUBS=<handle>[,<subs-type>] |
| Response | OK |
| Error | +BLECSUBS ERROR:<error>FAIL |
| Parameters | <handle> - characteristic number<subs-type> - subscription type (if omitted, then automatic selection):0 - disable subscription 1 - notification 2 - indication |
Retrieved attribute value
| Notification | |
|---|---|
| Message | +BLECRDD=<handle>,<error>,<data-index>,<data> |
| Parameters | <handle> - number of characteristics or descriptions<error> - error if the attribute could not be read, otherwise this field is omitted<data-index> - buffer number<data> - data in HEX format |
Write BLE attribute (in client mode)
| Command | |
|---|---|
| Message | AT+BLECWR=<handle>,[<write-type>],<data> |
| Response | OK |
| Error | +BLECWR ERROR:<error>FAIL |
| Parameters | <handle> - number of characteristics or descriptions<write-type> - record type (if omitted, automatic selection):0 - with notification 1 - without notice <data> - data in HEX format |
Attribute recorded
| Notification | |
|---|---|
| Message | +BLECWRN=<handle>,<error> |
| Parameters | <handle> - number of characteristics or descriptions<error> - error if the attribute could not be read, otherwise this field is omitted |
Preset MTU.
| Request | |
|---|---|
| Message | AT+BLEPMTU? |
| Response | +BLEPMTU:<data-size>OK |
| Error | +BLEPMTU ERROR:<error>FAIL |
| Parameters | <data-size> - value for the current connection |
| Set command | |
|---|---|
| Message | AT+BLEPMTU=<data-size> |
| Response | OK |
| Error | +BLEPMTU ERROR:<error>FAIL |
| Parameters | <data-size> - data size |
This value is used in MTU negotiation. Used in both server and client mode.
Current MTU (in client mode)
| Request | |
|---|---|
| Message | AT+BLECMTU? |
| Response | +BLECMTU:<data-size>OK |
| Error | +BLECMTU ERROR:<error>FAIL |
| Parameters | <data-size> - value for the current connection |
| Set command | |
|---|---|
| Message | AT+BLECMTU=<data-size> |
| Response | OK |
| Error | +BLECMTU ERROR:<error>FAIL |
| Parameters | <data-size> - data size |
This command is sent after the connection is established
Current MTU (in server mode)
| Request | |
|---|---|
| Message | AT+BLESMTU |
| Response | +BLESMTU:<data-size>OK |
| Error | +BLESMTU ERROR:<error>FAIL |
| Parameters | <data-size> - value for the current connection |
This command is sent after the client has connected.
Device MTU value updated (server mode) (Maximum transmission unit)
| Notification | |
|---|---|
| Message | +BLESMTUUPD:<mtu-value> |
| Parameters | <mtu-value> - new MTU value |
Supply voltage
| Command | |
|---|---|
| Message | AT+POWER |
| Response | +POWER:<main-voltage>,<bat-voltage>OK |
| Parameters | <main-voltage> - supply voltage<bat-voltage> - battery supply voltage |
Login setup
| Request | |
|---|---|
| Message | AT+INCONF=[<index>]? |
| Response | +INCONF,<index>=<u-filter-coeff>,<u-hi-thr>,<u-lo-thr>,<inverse>,<debounce>,<f-filter-coeff>,<f-min>,<notify-enabled>OK |
| Error | +INCONF ERROR:<error>FAIL |
| Parameters | <index> - entry number (default 0)<u-filter-coeff> - voltage filtering coefficient (ms)<u-hi-thr> - voltage at which the logical input goes into state '1'<u-lo-thr> - voltage at which the logical input goes into state '0'<inverse> - invert logic input <debounce> - contact bounce time for logical input (ms)<f-filter-coeff> - frequency filtering coefficient (ms)<f-min> - minimum measured frequency<notify-enabled> - enable notifications about changes in the logical state of the input |
| Set command | |
|---|---|
| Message | AT+INCONF=[<index>,<u-filter-coeff>,<u-hi-thr>,<u-lo-thr>,<inverse>,<debounce>,<f-filter-coeff>,<f-min>,<notify-enabled>] |
| Response | OK |
| Error | +INCONF ERROR:<error>FAIL |
| Parameters | see above |
Input value
| Command | |
|---|---|
| Message | AT+IN[=<index>] |
| Response | +IN:<index>,<discrete>,<voltage>,<counter>,<frequence>OK |
| Error | +IN ERROR:<error>FAIL |
| Parameters | <index> - move number (default 0)<discrete> - logical input value<voltage> - input voltage<counter> - counter value (number of transitions from logical '0' to logical '1')<frequence> - input frequency |
The logical value at the input has changed
| Notification | |
|---|---|
| Message | +DISC=<index>,<discrete>,<voltage> |
| Parameters | <index> - move number<discrete> - logical value<voltage> - input voltage |
Output value
| Request | |
|---|---|
| Message | AT+OUT[=<index>]? |
| Response | +OUT,<index>=<discrete>OK |
| Error | +OUT ERROR:<error>FAIL |
| Parameters | <index> - exit number (default 0)<discrete> - output value (0 or 1) |
| Set command | |
|---|---|
| Message | AT+OUT=[<index>],<discrete>] |
| Response | OK |
| Error | +OUT ERROR:<error>FAIL |
| Parameters | <index> - exit number (default 0)<discrete> - output value (0 or 1) |
| Meaning | Description |
|---|---|
-1 |
General error |
1 |
Not enough memory |
2 |
Operation timed out (timeout) |
3 |
Invalid address |
4 |
Invalid argument |
5 |
Incorrect data |
6 |
Invalid condition |
7 |
Invalid size |
8 |
Incorrect response received |
9 |
Invalid resource ID |
10 |
Invalid CRC or checksum |
11 |
Incorrect version |
12 |
Invalid MAC address |
13 |
The requested resource was not found |
14 |
Operation or feature not supported |
15 |
The operation is not completely completed |
16 |
Operation not allowed |
17 |
The operation is already in progress |
18 |
The operation has already been completed |
19 |
Operation failed, please try again later |
20 |
No connection |
21 |
Resource busy |
22 |
Reading prohibited |
23 |
Entry prohibited |
24 |
Application error |
25 |
System error |
26 |
Unknown error |
27 |
Authentication Error |
28 |
Authorization error |
29 |
Synchronization error |
30 |
Cryptographic error |
41 |
Wi-Fi has not been initialized |
42 |
Wi-Fi was not started |
43 |
Wifi was not stopped |
44 |
Wi-Fi error |
45 |
Wi-Fi mode error |
46 |
Wi-Fi Internal Status Error |
47 |
Error in the internal control unit of the station or access point |
48 |
Internal NVS Wi-Fi module error |
49 |
Invalid MAC address |
50 |
Invalid SSID |
51 |
Invalid password |
52 |
Timeout error |
53 |
Wi-Fi in sleep mode (RF off), and awakening failed |
54 |
The calling thread would be blocked |
55 |
The station is still in a state of shutdown |
58 |
Failed to send event to Wi-Fi task |
59 |
Invalid Wi-Fi state |
60 |
Returns when Wi-Fi stops |
61 |
Wi-Fi connection is not associated |
62 |
Wi-Fi transmission is prohibited |
63 |
No thread ID available |
64 |
TWT configuration response timeout |
65 |
Error sending TWT configuration frame |
66 |
TWT configuration request rejected by access point |
67 |
Frame discarded |
68 |
Scan operation in progress |
70 |
BLE: InvalidPdu |
71 |
BLE: InsufficientAuthen |
72 |
BLE: ReqNotSupported |
73 |
BLE: InvalidOffset |
74 |
BLE: InsufficientAuthor |
75 |
BLE: PrepareQueueFull |
76 |
BLE: AttrNotFound |
77 |
BLE: AttrNotLong |
78 |
BLE: InsufficientKeySize |
79 |
BLE: InvalidAttrValueSize |
80 |
BLE: Unlikely |
81 |
BLE: InsufficientEnc |
82 |
BLE: UnsupportedGroup |
83 |
BLE: InsufficientRes |
84 |
BLE: DbOutOfSync |
| Meaning | Description |
|---|---|
0 |
open |
1 |
WEP |
2 |
WPA_PSK |
3 |
WPA2_PSK |
4 |
WPA_WPA2_PSK |
5 |
Wi-Fi EAP security |
6 |
Wi-Fi EAP security |
7 |
WPA3_PSK |
8 |
WPA2_WPA3_PSK |
9 |
WAPI_PSK |
10 |
OWE |
11 |
WPA3_ENT_SUITE_B_192_BIT |
12 |
WIFI_AUTH_WPA3_PSK |
13 |
WIFI_AUTH_WPA3_PSK |
14 |
DPP |
15 |
WPA3-Enterprise Only |
16 |
WPA3-Enterprise Transition |
| Meaning | Description |
|---|---|
0 |
not used |
1 |
WEP40 |
2 |
WEP104 |
3 |
TKIP |
4 |
CCMP |
5 |
TKIP and CCMP |
6 |
AES-CMAC-128 |
7 |
SMS4 |
8 |
GCMP |
9 |
GCMP-256 |
10 |
AES-GMAC-128 |
11 |
AES-GMAC-256 |
| Meaning | Description |
|---|---|
1 |
Unknown |
2 |
Authentication has expired |
3 |
Deauthentication due to leaving the network |
4 |
Lost connection due to inactivity |
5 |
Too many connected stations |
6 |
Class 2 frame received from unauthenticated STA |
7 |
Received class 3 frame from untethered STA |
8 |
Lost connection due to network disconnection |
9 |
Association without authentication |
10 |
Lost connection due to low power |
11 |
Lost connection due to unsupported channel |
12 |
Lost connection due to BSS transition |
13 |
Invalid information element (IE) |
14 |
MIC check error |
15 |
4-way handshake timeout |
16 |
Group key update timeout |
17 |
IE difference in 4-way handshake |
18 |
Invalid group cipher |
19 |
Invalid pair cipher |
20 |
Invalid AKMP |
21 |
Unsupported version of RSN IE |
22 |
Incorrect RSN IE capabilities |
23 |
802.1X Authentication Error |
24 |
Rejected cipher suite |
25 |
TDLS node unavailable |
26 |
Unspecified TDLS error |
27 |
SSP requested disconnection |
28 |
Missing SSP roaming agreement |
29 |
Bad cipher or AKM |
30 |
No authorization at this location |
31 |
Service change excludes TS |
32 |
Unspecified QoS reason |
33 |
Not enough bandwidth |
34 |
No confirmations (ACK) |
35 |
TXOP exceeded |
36 |
The station leaves the network |
37 |
End of block confirmation (BA) |
38 |
Unknown block confirmation (BA) |
39 |
Timeout |
46 |
Disconnection initiated by node |
47 |
Disconnection initiated by access point |
48 |
Incorrect number of FT frames |
49 |
Incorrect PMKID |
50 |
Invalid MDE |
51 |
Incorrect FTE |
67 |
Transmission line installation error |
68 |
Alternate channel busy |
200 |
Beacon Timeout (Beacon) |
201 |
Access point not found |
202 |
Authentication Error |
203 |
Association error |
204 |
Handshake timeout |
205 |
Connection error |
206 |
Resetting the access point's TSF |
207 |
Roaming |
208 |
Association return time is too long |
209 |
SA request timeout |
210 |
No access point found with compatible security |
211 |
Access point not found within authentication threshold |
212 |
Access point not found within RSSI threshold |