background image

中山市博安通通信技术有限公司

ZHONGSHAN B&T TECHNOLOGYCo., Ltd

Page 1 of 34

RTL8720D AT instruction manual

Content

RTL8720D AT instruction manual .................................................................................................................... 1

Modify records.......................................................................................................................................... 2

1.

Basic information...................................................................................................................................2

2.

General AT Command ...........................................................................................................................3

2.1

AT-test AT Command................................................................................................................3

2.2 ATS? -List all commands

....................................................................................................... 3

2.3

Restart the ATSR module .......................................................................................................... 3

2.4

ATSV query version .................................................................................................................. 4

2.5 ATSP enters low power consumption mode

....................................................................... 4

2.6

ATSE sets serial port echo ......................................................................................................... 4

2.7

ATSY restore factory settings....................................................................................................4

2.8 ATSU sets serial port parameters

.........................................................................................5

2.9 ATSO OTA upgrade

................................................................................................................6

3. WIFI command

.......................................................................................................................................8

3.1

ATPW-set wifi mode................................................................................................................. 8

3.3

ATWD-disconnect from AP connection....................................................................................9

3.5 ATPA-enable AP mode

........................................................................................................ 10

3.7 ATPH-set DHCP mode

.........................................................................................................11

3.9 ATPF-set DHCP rules in AP mode

.....................................................................................12

3.11 ATPM-modify MAC address

.............................................................................................. 13

4.

TCP/UDP commands ...........................................................................................................................13

4.1

ATPS-create a TCP/UDP/SSL Server ..................................................................................... 13

4.3 ATPD-delete a connection

................................................................................................... 18

4.5 ATPR-receive data

................................................................................................................19

4.7 ATPI-View Connection list

....................................................................................................22

4.9

ATPU-set passthrough mode................................................................................................... 23

5.

Bluetooth command .............................................................................................................................26

6.

Appendix..............................................................................................................................................26

6.1

Appendix 1: OAT upgrade process..........................................................................................26

(3) Open the server program...........................................................................................................27

6.2

Appendix 2:simple config network configuration process...................................................... 28

(3)

Click configure new device....................................................................................................... 28

6.3

Appendix 3: Bluetooth network configuration process........................................................... 33

Summary of Contents for RTL8720D

Page 1: ...grade 6 3 WIFI command 8 3 1 ATPW set wifi mode 8 3 3 ATWD disconnect from AP connection 9 3 5 ATPA enable AP mode 10 3 7 ATPH set DHCP mode 11 3 9 ATPF set DHCP rules in AP mode 12 3 11 ATPM modify M...

Page 2: ...test_patch image_v01 2 Specify AT serial port to TX PB_1 RX PB_2 3 Add Bluetooth network configuration Yang Bin 2019 07 30 V2 4 0 M Upgrade to V2 4 1 Fixed the problem of printing redundant messages...

Page 3: ...xample AT AT OK 2 2 ATS List all commands ATS Description List all AT Commands Response ATS command list ATS OK ATS ERROR error_no Error Code 1 Failed to obtain the command list Example ATS ATS Common...

Page 4: ...onse ATSP OK 0 Be careful After a command is executed the system hibernates only when there are no tasks to be executed To wake up you need to run ATSP a command on the AT serial port Example ATSP r A...

Page 5: ...600 115200 921600 1152000 databits data bits 5 5 bit data 6 6 bit data 7 7 bit data 8 8 bit data default stopbits stop bit 1 1 bit stop default 2 2 bit stop Parity check bit 0 None parity default 1 Od...

Page 6: ...rameter IP server IP Port server Port Example Reference appendix 1 OAT upgrade process 2 10 ATSC switch Image ATSC image ID Description Switch images Response ATSC OK ATSC ERROR error_code Parameter i...

Page 7: ...ZHONGSHAN B T TECHNOLOGYCo Ltd Page 7 of 34 Parameter OPT R Reading IO level W output level PORT Specify GPIO Eg PA_12 DATA output level 0 output low level 1 Output high level...

Page 8: ...PA_12 1 1 0 ATSG OK 1 3 WIFI command 3 1 ATPW set wifi mode ATPW mode Description Set wifi mode Use ATPN and ATPA must match the specified mode The connection hotspot must be mode1 or mode3 and the s...

Page 9: ...or occurred 5 wifi mode error ATPW setting mode 6 An error occurred while obtaining the security type 7 dhcp times out using static IP address 192 168 1 80 Example ATPN test 12345678 ATPN OK 3 3 ATWD...

Page 10: ...3 Response Success ATPA OK Fail ATPA ERROR error_code Error code 1 The Command format is invalid 2 Parameter error 3 wifi initialization error 4 An error occurred while enabling AP 5 wifi mode error A...

Page 11: ...es for AP mode Example ATPH 2 2 ATPH OK 3 8 ATPE set DHCP rules in STA mode ATPE ip gateway mask Depai nt Set DHCP rules in STA mode Respo nse ATPE OK ATPE ERROR error_no Param eter ip The IP address...

Page 12: ...eter error Note 3 The default gateway IP address is 192 168 43 1 4 To start DHCP you need to enable the DHCP function ATPH 1 1 5 If DHCP is disabled you need to set it to static IP mode ATPH 1 2 Examp...

Page 13: ...12 ATWQ simple config Network configuration ATWQ Depai nt Simple config distribution network For more information about apps and references see SDK tools simple_config_wizard_3 4b Resp onse ATWQ OK Th...

Page 14: ...ZHONGSHAN B T TECHNOLOGYCo Ltd Page 14 of 34 returned when there is a client connection...

Page 15: ...s 10 Error in accept 11 Error creating seed con_id 12 udpserver already exists 13 Server cannot be created in transparent transmission mode 14 Unknown connection method 15 Failed to listen socket 16 s...

Page 16: ...port 52451 socket 2 con_id 2 server udp address 192 168 20 115 port 4005 socket 1 ATPI OK 4 2 ATPC create a TCP UDP SSL client ATPC mode Remote Addr Remote Port Local Port Description Create a TCP UD...

Page 17: ...ress conversion error 7 Error creating socket 8 hang tcp connection failed 9 connect error for tcp client 10 ang node error for udp client 11 local port should be 1 65535 12 bind local port error 13 c...

Page 18: ...20 112 10086 ATPC OK ATPC con_id 1 4 3 ATPD delete a connection ATPD con_id Description Close the connection Response Success ATPD OK Fail ATPD ERROR error_no Parameter con_id 0 close all connections...

Page 19: ...est123456 ATPN OK ATPS 0 4004 ATPS OK ATPS con_id 1 when the client connects ATPS A client connected to server 1 con_id 5 seed tcp address 192 168 20 112 port 52581 socket 2 ATPI con_id 1 server tcp a...

Page 20: ...ZHONGSHAN B T TECHNOLOGYCo Ltd Page 20 of 34 Error Code 1 The Command format is invalid 2 Buffer Size range 1 to MAX_BUFFER default 1600...

Page 21: ...I Con_id 1 server TCP address 192 168 20 115 port 4004 sockets 0 Con_id 2 server udp address 192 168 20 115 port 4005 sockets 1 ATPI OK Use the socket tool to send data to 192 168 20 115 4005 ATPR 210...

Page 22: ...ter error 2 An error occurred while enabling the automatic receive task Example The UDP server reads the data ATPN B T 1 test123456 ATPN OK ATPS 1400 5 ATPS OK ATPS con_id 2 ATPI Con_id 1 server TCP a...

Page 23: ...e IP address or domain name count ping the number of times loop ping all the time note that this operation will not return there is a ping message printed in the log port Error Code 1 The Command form...

Page 24: ...123456 ATPN OK Create a tcp server using the socket tool ATPC 0 192 168 20 112 10086 ATPC OK ATPC con_id 1 ATPU 1 ATPU OK pc send to 8720 4 10 ATPL automatic start up passthrough mode ATPL enable Desc...

Page 25: ...ZHONGSHAN B T TECHNOLOGYCo Ltd Page 25 of 34 Example ATPN hwap 1234567890 ATPN OK ATPG 1 ATPG OK ATPC 0 192 168 2 62 5002 ATPC OK ATPC con_id 1 ATPL 1...

Page 26: ...Response Turn on ATBB _AT_BT_CONFIG_ ON Turn off ATBB _AT_BT_CONFIG_ OFF deinit BT STACK Parameter mod 0 Turn Off the Bluetooth network 1 Turn on Bluetooth network Example Reference appendix 3 Blueto...

Page 27: ...e upgraded here exe 10086 OTA3_All bin 10086 is a self defined port number OTA3 bin is the upgrade file Start the server 4 The module connects to the network and starts downloading Use the ATPN to con...

Page 28: ...ule OTA more The new is complete and the server side is shown as follows 6 2 Appendix 2 simple config network configuration process 1 Mobile phone installation sdk tools simple_config_wizard_3 4b Andr...

Page 29: ...ZHONGSHAN B T TECHNOLOGYCo Ltd Page 29 of 34 4 Select the network to connect...

Page 30: ...ONGSHAN B T TECHNOLOGYCo Ltd Page 30 of 34 5 Enter the wifi password and click the link 6 In this case enter ATWQ on the module to enter the network configuration mode The log port is printed as follo...

Page 31: ...ZHONGSHAN B T TECHNOLOGYCo Ltd Page 31 of 34 7 Click skip on mobile APP 8 In this case the network allocation process is entered...

Page 32: ...ZHONGSHAN B T TECHNOLOGYCo Ltd Page 32 of 34 9 After the network configuration is successful the following is displayed The module log is printed as follows...

Page 33: ...module side run ATBB 1 to enable Bluetooth network distribution 3 Open the APP on the mobile phone and click the magnifying glass to Start Network allocation 4 If you want to connect to the network co...

Page 34: ...ZHONGSHAN B T TECHNOLOGYCo Ltd Page 34 of 34 The module log is as follows...

Reviews: