Advertisement

Quick Links

RTL8720D AT instruction manual

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
中山市博安通通信技术有限公司
ZHONGSHAN B&T TECHNOLOGYCo., Ltd
Content
Page 1 of 34

Advertisement

Table of Contents
loading

Summary of Contents for b&t RTL8720D

  • Page 1: Table Of Contents

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd 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 ......................
  • Page 2: Modify Records

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd Modify records Type Modify content Modifie Date Software release First draft version Yang 2019/06/05 V2.2.1 Upgrade to V2.3.0 and modify the ATSP sleep Yang 2019/07/05 V2.3.0 wake-up mode Change the position AT the serial port Upgrade to V2.4.0 Yang 2019/07/30...
  • Page 3: General At Command

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd 2. General AT Command 2.1 AT-test AT Command Description Test whether the AT command is started Response [AT] OK Example [AT] OK 2.2 ATS? -List all commands ATS? Description List all AT Commands [ATS?] Response <command list>...
  • Page 4: Atsv Query Version

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd 2.4 ATSV query version ATSV Description Query version information Response [ATSV] OK:<at-version>,<sdk-version>(<compile_time>) Example # ATSV [ATSV] OK:v2.2.1,v6.0a(Jun 5 2019) 2.5 ATSP enters low power consumption mode ATSP=<mode> Description Enter low power consumption mode Parameter Mode: r allows sleep. a Disable hibernation Response [ATSP] OK:0...
  • Page 5: Atsu Sets Serial Port Parameters

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd Error 1: failed to restore the default settings. Code 2: failed to restore the default image. # ATSY Example [ATSY] OK AT COMMAND READY 2.8 ATSU sets serial port parameters ATSU=<baudrate>,<databits>,<stopbits>,<parity>,<flowcontrol>,<configmode> Description Set serial port parameters Response Success [ATSU] OK Fail...
  • Page 6: Atso Ota Upgrade

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd 2.9 ATSO OTA upgrade ATSO=<IP>,<port> Description OTA upgrade Response ATS0] OK This is an asynchronous operation. Receiving OK simply means the task has started. Other messages need to be checked in the log port. It will automatically restart after work Parameter IP: server IP Port: server Port...
  • Page 7 中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd 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 7 of 34...
  • Page 8: Wifi Command

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd DIR:IO direction control 0:Input mode 1:Output mode PULL:Pull down mode 0:There is no drop-down mode 1:Pull 2:down 3:Open leak mode Example // Read IO ATSG=R,P A_12 [ATSG] OK :1 // Output # ATSG=W,PA_12,1,1,0 [ATSG] OK :1 3.
  • Page 9: Atwd-Disconnect From Ap Connection

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd 3.2 ATPN-connect to AP ATPN=<ssid>,<pwd> Description Connect to a specified AP Parameter ssid: AP name (add '\' before special characters) pwd: password Response Success [ATPN] OK Fail [ATPN] ERROR:<error_code> Error code 1: The Command format is invalid. 2: Parameter error 3: wifi initialization error 4: an AP connection error occurred.
  • Page 10: Atpa-Enable Ap Mode

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd Example # ATWS AP : 2,test-AP,1,WPA/WPA2 AES,-44,2c:3b:44:54:66:77 [ATWS] OK 3.5 ATPA-enable AP mode ATPA=<ssid>,<pwd>,<chl>,<hidden>[,<max_conn>] Description Enable AP mode Parameter ssid:AP name (add '\' before special characters) pwd:password chl:Channel (1~11) hidden: 0:Don't hide SSID 1:hide SSID max_conn: Maximum number of connections (1 to 3 By default, 3) Response Success...
  • Page 11: Atph-Set Dhcp Mode

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd 3.7 ATPH-set DHCP mode ATPH=<mode>,<enable> Description Set DHCP mode Response [ATPH] OK [ATPH] ERROR:<error_no> Parameter Mode:1:AP Mode 2:STA mode Enable:1:DHCP mode 2: Static IP mode Error 1: The Command format is invalid. Code 2: Parameter error Note 1.
  • Page 12: Atpf-Set Dhcp Rules In Ap Mode

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd 3.9 ATPF-set DHCP rules in AP mode ATPF=<start_ip>,<end_ip>,<gateway> Description Set DHCP rules in AP mode Response [ATPF] OK [ATPF] ERROR:<error_no> Parameter start_ip:DHCP start IP, for example, 192.168.1.100 end_ip:DHCP end IP (note that the end IP and the start IP must belong to the same CIDR block and not the gateway IP, and cannot be 255) gateway: The gateway IP address, which must belong to the same CIDR block as the start and end IP addresses.
  • Page 13: Atpm-Modify Mac Address

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd [ATPG] OK 3.11 ATPM-modify MAC address ATPM=<mac> Description Modify MAC address Response Success [ATPM] OK Fail [ATPM] ERROR:<error_no> Parameter mac:6-byte hex number Error 1: The Command format error. Code 2: Parameter error Note After the MAC is set successfully, it needs to be restarted to take effect. Example # ATPM=aa2233cc55ff [ATPM] OK...
  • Page 14 中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd returned when there is a client connection Page 14 of 34...
  • Page 15 中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd [ATPS] A client connected to server[<server_id>] con_id:<x>,seed,tcp,address:xxx.xxx.xxx.xxx,port:<x>, socket:<x> (response format refer to section 4.8 ATPI) Fail [ATPS] ERROR:<error_no> Parameter mod: 0:TCP 1:UDP 2:SSL Local Port:1~65535 Error code 1: wrong number of parameters 2: Local Port range error 3: Error creating con_id 4: Error creating server task 5: Error creating socket...
  • Page 16 中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd After the client is connected [ATPS] A client connected to server[1] con_id:3,seed,tcp,address:192.168.20.112,port:52451,socket:2 # ATPI con_id:1,server,tcp,address:192.168.20.115,port:4004,socket:0 con_id:3,seed,tcp,address:192.168.20.112,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, UDP, or SSL client Response Success [ATPC] OK...
  • Page 17 中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd Error code 1: wrong number of parameters 2: The remote IP is malformed or cannot be connected 3: Remote Port range error 4: Error creating con_id 5: Error creating client task 6: Remote address conversion error 7: Error creating socket 8: hang tcp connection failed 9: connect error for tcp client...
  • Page 18: Atpd-Delete A Connection

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd 18:Initiate a TCP connection with host:port failed for ssl client 19:memory allocation failed for ssl context structure 20:ssl context initialization failed 21:ssl handshake failed 22:hang node failed for ssl client Example # ATPN=B&T-1,test123456 [ATPN] OK //Create a tcp server using the socket tool # ATPC=0,192.168.20.112,10086 [ATPC] OK...
  • Page 19: Atpr-Receive Data

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd Code 2: <Buffer Size> exceeds ATPT limit 3: con_id not found 4: <dst_ip> or <dst_port> error for udp server case 5: sendto() error for udp server 6: sendto() error for udp client 7: TCP server should send data to the seed (server needs to send data to the client, not directly to server) 8: write error for tcp client/server...
  • Page 20 中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd Error 1: The Command format is invalid. 2:<Buffer Size> range: 1 to MAX_BUFFER (default: 1600) Code Page 20 of 34...
  • Page 21 中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd 3:<con_id> not find 4:recvfrom() error for udp server 5:recvfrom() error for udp client/seed not found 6:TCP server should receive from seed (the server needs to read from the client, not directly read server) 7:connection lost 8:read() error for tcp con_id Note If it is a TCP server, data cannot be read or written from the con_id of the server...
  • Page 22: Atpi-View Connection List

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd 4.6 ATPK-automatic data receiving mode ATPK=<enable> Description Set the automatic receive mode. The received data is in the same format as the ATPR response in normal mode. Only data is returned, and no other format is returned. Response Success [ATPK] OK...
  • Page 23: Atpu-Set Passthrough Mode

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd # ATPN=B&T-1,test123456 Example [ATPN] OK # ATPS=0,4004 [ATPS] OK [ATPS] con_id=1 # ATPI con_id:1,server,tcp,address:192.168.20.115,port:4004,so cket:0 [ATPI] OK 4.8 ATPP-ping command ATPP=<Remote IP>,[count] ATPP=<con_id>, [count/loop] Description Modify MAC address Response Success [ATPP] OK Fail [ATPP] ERROR:<error_no> Parameter Remote IP: indicates the IP address or domain name count: ping the number of times...
  • Page 24 中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd 3: The server mode cannot enter the transparent transmission mode 4: There can be only one connection in passthrough 5: Failed to enable transparent transmission Note 1. Enter the transparent transmission mode and send four minus signs "----" to exit the mode 2.
  • Page 25 中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd 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 25 of 34...
  • Page 26: Bluetooth Command

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd [ATPL] OK 5. Bluetooth command 5.1 ATBB-Bluetooth network configuration instruction ATPS =<mode> Description Turn Off/On Bluetooth network 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...
  • Page 27: Open The Server Program

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd (3) Open the server program The Server program is in sdk\tools\DownloadServer\ downloadserver.exe In windows cmd command line mode, go to the server directory and copy the OTA files to be 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 connect to the same network as the server (the module can ping the server IP...
  • Page 28: Appendix 2:Simple Config Network Configuration Process

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd OTA is finished. Please reset device. Ota is finished. Please reset device. At this time restart the module 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\Android configuration tools in the directory SimpleConfigWizard_v115.apk...
  • Page 29 中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd (4) Select the network to connect Page 29 of 34...
  • Page 30 中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd (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 follows: Page 30 of 34...
  • Page 31 中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd (7) Click skip on mobile APP (8) In this case, the network allocation process is entered. Page 31 of 34...
  • Page 32 中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd (9) After the network configuration is successful, the following is displayed: The module log is printed as follows: Page 32 of 34...
  • Page 33: Appendix 3: Bluetooth Network Configuration Process

    中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd 6.3 Appendix 3: Bluetooth network configuration process (1) Mobile phone installation sdk\tools\bluetooth\BT Config\Android\WiFiConfig_v2.1_20190315.apk (2) On the 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 connected by the current mobile phone, enter the password and click Continue.
  • Page 34 中山市博安通通信技术有限公司 ZHONGSHAN B&T TECHNOLOGYCo., Ltd The module log is as follows: Page 34 of 34...

Table of Contents