Telit WL865E4-P Reference Guide

Page 1
WL865E4-P AT Command
Reference Guide
80613ST10987A Rev. 1.4.27 – 2021-01-17
Page 2
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 2 of 299 2021-01-17
NOTICES LIST
While reasonable efforts have been made to assure the accuracy of this document, Telit assumes no liability resulting from any inaccuracies or omissions in this document, or from use of the information obtained herein. The information in this document has been carefully checked and is believed to be reliable. However, no responsibility is assumed for inaccuracies or omissions. Telit reserves the right to make changes to any products described herein and reserves the right to revise this document and to make changes from time to time in content hereof with no obligation to notify any person of revisions or changes. Telit does not assume any liability arising out of the application or use of any product, software, or circuit described herein; neither does it convey license under its patent rights or the rights of others.
It is possible that this publication may contain references to, or information about Telit products (machines and programs), programming, or services that are not announced in your country. Such references or information must not be construed to mean that Telit intends to announce such Telit products, programming, or services in your country.
COPYRIGHTS
This instruction manual and the Telit products described in this instruction manual may be, include or describe copyrighted Telit material, such as computer programs stored in semiconductor memories or other media. Laws in the Italy and other countries preserve for Telit and its licensors certain exclusive rights for copyrighted material, including the exclusive right to copy, reproduce in any form, distribute and make derivative works of the copyrighted material. Accordingly, any copyrighted material of Telit and its licensors contained herein or in the Telit products described in this instruction manual may not be copied, reproduced, distributed, merged or modified in any manner without the express written permission of Telit. Furthermore, the purchase of Telit products shall not be deemed to grant either directly or by implication, estoppel, or otherwise, any license under the copyrights, patents or patent applications of Telit, as arises by operation of law in the sale of a product.
COMPUTER SOFTWARE COPYRIGHTS
The Telit and 3rd Party supplied Software (SW) products described in this instruction manual may include copyrighted Telit and other 3rd Party supplied computer programs stored in semiconductor memories or other media. Laws in the Italy and other countries preserve for Telit and other 3rd Party supplied SW certain exclusive rights for copyrighted computer programs, including the exclusive right to copy or reproduce in any form the copyrighted computer program. Accordingly, any copyrighted Telit or other 3rd Party supplied SW computer programs contained in the Telit products described in this instruction manual may not be copied (reverse engineered) or reproduced in any manner without the express written permission of Telit or the 3rd Party SW supplier. Furthermore, the purchase of Telit products shall not be deemed to grant either directly or by implication, estoppel, or otherwise, any license under the copyrights, patents or patent applications of Telit or other 3rd Party supplied SW, except for the normal non-exclusive, royalty free license to use that arises by operation of law in the sale of a product.
Page 3
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 3 of 299 2021-01-17
USAGE AND DISCLOSURE RESTRICTIONS
I. License Agreements
The software described in this document is the property of Telit and its licensors. It is furnished by express license agreement only and may be used only in accordance with the terms of such an agreement.
II. Copyrighted Materials
Software and documentation are copyrighted materials. Making unauthorized copies is prohibited by law. No part of the software or documentation may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language or computer language, in any form or by any means, without prior written permission of Telit
III. High Risk Materials
Components, units, or third-party products used in the product described herein are NOT fault-tolerant and are NOT designed, manufactured, or intended for use as on-line control equipment in the following hazardous environments requiring fail-safe controls: the operation of Nuclear Facilities, Aircraft Navigation or Aircraft Communication Systems, Air Traffic Control, Life Support, or Weapons Systems (High Risk Activities"). Telit and its supplier(s) specifically disclaim any expressed or implied warranty of fitness for such High Risk Activities.
IV. Trademarks
TELIT and the Stylized T Logo are registered in Trademark Office. All other product or service names are the property of their respective owners.
V. Third Party Rights
The software may include Third Party Right software. In this case you agree to comply with all terms and conditions imposed on you in respect of such separate software. In addition to Third Party Terms, the disclaimer of warranty and limitation of liability provisions in this License shall apply to the Third Party Right software.
TELIT HEREBY DISCLAIMS ANY AND ALL WARRANTIES EXPRESS OR IMPLIED FROM ANY THIRD PARTIES REGARDING ANY SEPARATE FILES, ANY THIRD PARTY MATERIALS INCLUDED IN THE SOFTWARE, ANY THIRD PARTY MATERIALS FROM WHICH THE SOFTWARE IS DERIVED
(COLLECTIVELY “OTHER CODE”), AND THE USE OF ANY OR ALL THE OTHER CODE IN
CONNECTION WITH THE SOFTWARE, INCLUDING (WITHOUT LIMITATION) ANY WARRANTIES OF SATISFACTORY QUALITY OR FITNESS FOR A PARTICULAR PURPOSE.
NO THIRD PARTY LICENSORS OF OTHER CODE SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND WHETHER MADE UNDER CONTRACT, TORT OR OTHER LEGAL THEORY, ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE OTHER CODE OR THE EXERCISE OF ANY RIGHTS GRANTED UNDER EITHER OR BOTH THIS LICENSE AND THE LEGAL TERMS APPLICABLE TO ANY SEPARATE FILES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Page 4
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 4 of 299 2021-01-17
Page 5
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 5 of 299 2021-01-17
APPLICABILITY TABLE
PRODUCTS
SW Versions
WL865E4-P
36.07.000
WL865E4-P
36.07.001
Page 6
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 6 of 299 2021-01-17
Page 7
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 7 of 299 2021-01-17
CONTENTS
NOTICES LIST ............................................................................................................... 2
COPYRIGHTS ................................................................................................................ 2
COMPUTER SOFTWARE COPYRIGHTS ..................................................................... 2
USAGE AND DISCLOSURE RESTRICTIONS.............................................................. 3
APPLICABILITY TABLE................................................................................................ 5
CONTENTS 7
FIGURES LIST ............................................................................................................. 15
TABLES LIST ............................................................................................................... 16
1. INTRODUCTION ...................................................................................... 19
1.1. Scope ....................................................................................................... 19
1.2. Audience .................................................................................................. 19
1.3. Contact Information, Support ................................................................... 19
1.4. Text Conventions ..................................................................................... 20
1.5. Related Documents .................................................................................. 20
2. OVERVIEW .............................................................................................. 23
2.1. AT Commands ......................................................................................... 23
2.2. Command Definition ................................................................................. 23
2.3. AT Command Syntax ............................................................................... 24
2.4. Command Lines ....................................................................................... 24
2.5. Information Response and Result Codes ................................................ 26
2.6. Parameter Types ...................................................................................... 27
3. ARCHITECTURE ..................................................................................... 30
3.1. System Overview ..................................................................................... 30
3.2. Working Principle ..................................................................................... 30
3.3. System Initialization ................................................................................. 31
4. HOST INTERACTION .............................................................................. 33
4.1. Interface ................................................................................................... 33
4.1.1. UART ........................................................................................................ 33
4.1.1.1. Baud Rate - B ........................................................................................... 33
4.1.1.2. Hardware Flow Control - &Kn .................................................................. 35
4.1.2. SPI/SDIO .................................................................................................. 36
4.1.2.1. SPI/SDIO Interface - +YSIF ..................................................................... 38
4.1.2.2. SPI/SDIO Interface Demonstration - +YIDEMO ...................................... 39
5. GENERAL OPERATIONS ....................................................................... 43
Page 8
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 8 of 299 2021-01-17
5.1. System Settings ....................................................................................... 43
5.1.1. Switch Between Legacy and AT Command - +YLC ................................ 43
5.1.2. Echo Mode - En ....................................................................................... 44
5.1.3. Backspace Handling - BKPn .................................................................... 44
5.1.4. Verbose Mode - Vn .................................................................................. 45
5.1.5. Boot Reason - +YBR ................................................................................ 45
5.1.6. Exception Boot Reason - +YBER ............................................................ 46
5.1.7. Auto Mode - Cn ........................................................................................ 48
5.1.8. Data Mode - An ........................................................................................ 49
5.1.9. Debug Log Level - +YLOGSL .................................................................. 49
5.1.10. File System ............................................................................................... 50
5.1.10.1. File Open - +YFOP ................................................................................... 50
5.1.10.2. File Close - +YFCL ................................................................................... 51
5.1.10.3. File Read - +YFRD ................................................................................... 51
5.1.10.4. File Write - +YFWR .................................................................................. 53
5.1.10.5. File Length - +YFLN ................................................................................. 54
5.1.10.6. File List - +YFLS ....................................................................................... 54
5.1.10.7. File Delete - +YFRM ................................................................................. 55
5.1.11. Flash Read - +YFR .................................................................................. 56
5.2. Profile Settings ......................................................................................... 57
5.2.1. Profile Read - Zn ...................................................................................... 57
5.2.2. Profile Set - &Yn ....................................................................................... 58
5.2.3. Profile Save - &Wn ................................................................................... 59
5.2.4. Save TCP Profile - +YPTCP .................................................................... 59
5.2.5. Save UDP Profile - +YPUDP ................................................................... 60
5.2.6. Profile Clear/Factory Reset - &F .............................................................. 61
5.3. Default Profile ........................................................................................... 62
5.3.1. AP DHCP server configuration - +DPNADSC.......................................... 62
5.3.2. AP Static IP configuration - +DPNAIPC ................................................... 64
5.3.3. AP WLAN configuration - +DPNAWC ...................................................... 66
5.3.4. Station Static IP configuration - +DPNSIPC ............................................ 69
5.3.5. Station Retry configuration - +DPSRC ..................................................... 71
5.3.6. Station WLAN configuration - +DPNSWC ................................................ 73
5.3.7. Update TCP Profile - +DPTC ................................................................... 75
5.3.8. Update UDP Profile - +DPUC .................................................................. 78
5.4. Real Time Clock (RTC) Settings .............................................................. 81
5.4.1. Time Settings - +YTIME ........................................................................... 81
5.5. Power Save .............................................................................................. 82
5.5.1. Standby - +YPS ........................................................................................ 82
5.6. Heap Information - +YHD ......................................................................... 83
Page 9
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 9 of 299 2021-01-17
5.7. Heap Information List - +YHLD ................................................................ 83
5.8. Reset - +YSR ........................................................................................... 84
5.9. Manufacturer's Name - +CGMI ................................................................ 84
5.10. Module Name - +CGMM .......................................................................... 85
5.11. Modem Version - +CGMR ........................................................................ 85
5.12. Package Version - #SWPKGV ................................................................. 86
5.13. Version - +YVER ...................................................................................... 87
5.14. Shut Down - +NSHUTDOWN .................................................................. 88
6. NETWORK CONNECTION MANAGER .................................................. 89
6.1. Wireless Network Connection Manager (WNCM) .................................... 89
6.1.1. NCM Initialize - +WNI ............................................................................... 89
6.1.2. NCM De-initialize - +WNDI ...................................................................... 90
6.1.3. Configure Station Mode - +WNSTAC ...................................................... 91
6.1.4. Configure AP Mode - +WNAPC ............................................................... 92
6.1.5. Configure IP Address - +WNIPC .............................................................. 94
6.1.6. Configure IP Address in AP Mode - +WNAPIPC ..................................... 95
6.1.7. NCM Create - +WNCR ............................................................................. 96
6.1.8. NCM Retry Count - +WNRETRYC ........................................................... 98
6.1.9. NCM Connect - +WNCN .......................................................................... 99
6.1.10. Interface Statistics in AP Mode - +WNAPST ........................................ 101
6.1.11. Get Associated Station Information - +WNASTINFO ............................ 104
6.1.12. Interface Configuration Information - +WNIFCFG ................................. 105
6.1.13. Interface Statistics in Station Mode - +WNSTAST ................................. 106
6.1.14. NCM Disconnect - +WNDC .................................................................... 110
6.1.15. EAP Configuration - +WNEAP ............................................................... 110
7. WIRELESS DRIVER .............................................................................. 112
7.1. Wireless Local Area Network (WLAN) ................................................... 112
7.1.1. Interface Initialization - +WI .................................................................... 112
7.1.2. Get MAC Address - +WMACG ............................................................... 113
7.1.3. Scan - +WS ............................................................................................ 114
7.1.4. Scan Time - +WST ................................................................................. 115
7.1.5. Get Country Code - +WCCG ................................................................. 116
7.1.6. Set Country Code - +WCCS .................................................................. 117
7.1.7. Get Regulatory Domain - +WREGDG .................................................... 117
7.1.8. Set Regulatory Domain - +WREGDS .................................................... 118
7.1.9. Get Physical Mode - +WPHYMODEG ................................................... 118
7.1.10. Set Physical Mode - +WPHYMODES .................................................... 119
7.1.11. Power Save - +WPOWERSAVE ............................................................ 120
7.1.12. Set Transmission Power - +WTXPOWERS ........................................... 121
Page 10
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 10 of 299 2021-01-17
7.1.13. Get Transmission Rate - +WTXRATEG ................................................. 121
7.1.14. Set Transmission Rate - +WTXRATES ................................................. 122
7.1.15. Get RSSI - +WRSSIG ............................................................................ 123
7.1.16. Send Raw Packets - +WRAWPKTS ...................................................... 124
7.1.17. Set Promiscuous Filter - +WPROMISCSETFILTER ............................. 126
7.1.18. Start Promiscuous Mode - +WPROMISCCMD ...................................... 127
7.1.19. Application Information Element - +WAPPIE ......................................... 127
7.1.20. Set Beacon Miss Interval - +WBMISSINTS ........................................... 128
7.2. Bluetooth Low Energy (BLE) .................................................................. 129
7.2.1. BLE Initialize/De-initialize - +BI .............................................................. 129
7.2.2. BLE Own Device Address - +BOAD ...................................................... 130
7.2.3. BLE Connect - +BCONNECT ................................................................ 130
7.2.4. BLE Disconnect - +BDISCONNECT ...................................................... 132
7.2.5. BLE Scan - +BSCAN .............................................................................. 132
7.2.6. BLE Scan Response Data - +BSCANRSPDATA .................................. 133
7.2.7. BLE Device Name - +BNAME ................................................................ 134
7.2.8. BLE Input/Output Capabilities - +BIOCAP ............................................. 136
7.2.9. Bond List - +BBNDLIST ......................................................................... 137
7.2.10. Bond Delete - +BBNDDEL ..................................................................... 138
7.2.11. BLE Secure Simple Pairing PIN (SSP-PIN) - +BSSPPIN ...................... 138
7.2.12. BLE FixPin - +BFIXPIN .......................................................................... 139
7.2.13. BLE Secure Simple Pairing Confirmation (SSP-CONF) - +BSSPCONF140
7.2.14. BLE Product ID - +BPNPPID ................................................................. 141
7.2.15. BLE Product Version ID - +BPNPPVER ................................................ 142
7.2.16. BLE Vendor ID - +BPNPVID .................................................................. 143
7.2.17. BLE Source Vendor ID - +BPNPVSRC .................................................. 144
7.2.18. BLE Terminal Input/Output - +BTIO ....................................................... 145
7.2.19. BLE Terminal Input/Ouput Data Mode - +BTIODATAMODE ................ 146
7.2.20. BLE Advertise Data - +BADDATA ......................................................... 146
7.2.21. BLE Advertise Enable - +BADVE ........................................................... 147
7.2.22. BLE Maximum Advertising Interval - +BADVINTMAX ........................... 148
7.2.23. BLE Minimum Advertising Interval - +BADVINTMIN ............................. 149
7.2.24. BLE Maximum Connection Interval - +BCONINTMAX .......................... 150
7.2.25. BLE Minimum Connection Interval - +BCONINTMIN ............................ 151
7.2.26. BLE Slave Latency - +BSLAVELAT ....................................................... 152
7.2.27. BLE Service Discovery - +BSRVD ......................................................... 153
7.2.28. BLE Read - +BREAD ............................................................................. 154
7.2.29. BLE Write - +BWRITE ............................................................................ 155
7.2.30. BLE Client Character Configuration - +BCCCD ..................................... 156
7.2.31. BLE Attribute Server - +BATTRIB .......................................................... 157
Page 11
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 11 of 299 2021-01-17
7.2.32. BLE Server Data Exchange - +BSRVDATAEX ..................................... 159
7.2.33. BLE Transmission Test - +BBPWRTXT ................................................. 160
7.2.34. BLE Reception Test - +BBPWRRXTEST .............................................. 161
7.2.35. BLE Set Transmission Power - +BTXPOWERSET ............................... 161
7.2.36. BLE Get Transmission Power - +BTXPOWERGET .............................. 162
7.2.37. BLE Power Measurement during Scan - +BTXPWMSCAN................... 163
7.2.38. BLE Power Measurement during Write - +BTXPWMWRITE ................. 163
8. NETWORK PROTOCOL ....................................................................... 165
8.1. Caller Identification (CID) ....................................................................... 165
8.1.1. Get CID Information - +NCIDI ................................................................ 165
8.1.2. CID Status Information - +NCIDS .......................................................... 166
8.2. Ping - +NPING ....................................................................................... 167
8.3. Ping Status - +NPINGSTATS ................................................................ 168
8.4. Socket .................................................................................................... 169
8.4.1. Socket Create - +SC .............................................................................. 170
8.4.2. Socket Bind - +SB .................................................................................. 172
8.4.3. Socket Connect - +SCO ......................................................................... 172
8.4.4. Socket Listen - +SL ................................................................................ 173
8.4.5. Set Socket Option - +SSOPT ................................................................. 174
8.4.6. Get Socket Option - +SGOPT ................................................................ 175
8.4.7. Socket Accept - +SA .............................................................................. 176
8.4.8. Socket Send - +SN ................................................................................. 177
8.4.9. Socket Receive Ready - +SRR .............................................................. 178
8.4.10. Socket Receive - +SR ............................................................................ 180
8.4.11. Get Socket Error - +SGERR .................................................................. 181
8.4.12. Socket Throughput Test - +STPTEST ................................................... 183
8.4.13. Socket Throughput Test Statistics - +STPTESTSTAT .......................... 185
8.4.14. Socket Close - +SCL .............................................................................. 186
8.5. Secure Socket Layer (SSL)/ Transport Layer Security (TLS) ................ 187
8.5.1. SSL Initialize - +NSSLINIT ..................................................................... 189
8.5.2. SSL Configure - +NSSLCFG ................................................................. 190
8.5.3. SSL Connect - +NSSLCO ...................................................................... 194
8.5.4. SSL Bind - +NSSLB ............................................................................... 195
8.5.5. SSL Listen - +NSSLL ............................................................................. 196
8.5.6. SSL Accept - +NSSLA ........................................................................... 196
8.5.7. SSL Receive Ready - +NSSLRR ........................................................... 197
8.5.8. SSL Receive - +NSSLRD ...................................................................... 198
8.5.9. SSL Write - +NSSLWR .......................................................................... 199
8.5.10. SSL Close - +NSSLCL ........................................................................... 200
8.5.11. SSL Certificate List - +NSSLCERTLIST ................................................ 201
Page 12
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 12 of 299 2021-01-17
8.5.12. SSL Certificate Store - +NSSLCERTSTORE ........................................ 202
8.5.13. SSL Certificate Deletion - +NSSLCERTDELETE .................................. 203
8.6. Simple Network Time Protocol (SNTP) Settings .................................... 203
8.6.1. SNTP Configure - +NSNTPCFG ............................................................ 203
8.6.2. SNTP Start - +NSNTPSTART ................................................................ 204
8.6.3. SNTP Stop - +NSNTPSTOP .................................................................. 205
8.7. Domain Name System (DNS) ................................................................ 206
8.7.1. DNS Client .............................................................................................. 206
8.7.1.1. DNS Resolve URL - +NDNSCRURL ..................................................... 206
8.7.1.2. DNS Set Server IP Address - +NDNSCSRVIP ...................................... 207
8.7.2. DNS Server ............................................................................................ 208
8.7.2.1. DNS Host Addition - +NDNSSADDHOST.............................................. 208
8.7.2.2. DNS Server Start - +NDNSSSTART ...................................................... 208
8.7.2.3. DNS Server Stop - +NDNSSSTOP ........................................................ 209
8.7.3. DNS Service Discovery - +NDNSSD ..................................................... 209
8.8. Multicast Domain Name System (mDNS) .............................................. 211
8.8.1. mDNS Start - +NMDNSSTART .............................................................. 211
8.8.2. mDNS Host Name Registration - +NMDNSHNREG .............................. 212
8.8.3. mDNS Service Registration - +NMDNSSRVREG ................................. 213
8.8.4. mDNS Service De-Registration - +NMDNSSRVDEREG ....................... 213
8.8.5. mDNS Text Update - +NMDNSUPDATETXT ........................................ 214
8.8.6. mDNS Stop - +NMDNSSTOP ................................................................ 214
8.9. HTTP Client (HTTPC) ............................................................................ 215
8.9.1. HTTP Client Initialize - +NHTTPCINIT ................................................... 216
8.9.2. HTTP Client Configure - +NHTTPCCFG ............................................... 217
8.9.3. HTTP Client Connect - +NHTTPCCO .................................................... 218
8.9.4. HTTP Client Request - +NHTTPCREQ ................................................. 219
8.9.5. HTTP Client Receive - +NHTTPCRDRSP ............................................. 220
8.9.6. HTTP Client Close - +NHTTPCCL ......................................................... 221
8.10. HTTP Server (HTTPD) ........................................................................... 222
8.10.1. HTTP Server Configure - +NHTTPDCFG .............................................. 222
8.10.2. HTTP Server Start - +NHTTPDSTART .................................................. 224
8.10.3. HTTP Server Configure URI - +NHTTPDCFGURI ................................ 224
8.10.4. HTTP Server Read - +NHTTPDRD ....................................................... 225
8.10.5. HTTP Server Send Data - +NHTTPDSENDDATA ................................ 226
8.10.6. HTTP Server - Send Header Response - +NHTTPDSENDHDR .......... 227
8.10.7. HTTP Server Receive Ready - +NHTTPDURIRR ................................. 228
8.10.8. HTTP Server Stop - +NHTTPDSTOP .................................................... 228
8.11. Message Queuing Telemetry Transport (MQTT) ................................... 229
8.11.1. MQTT Initialize - +NMQTTINIT .............................................................. 231
Page 13
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 13 of 299 2021-01-17
8.11.2. MQTT Client Connect - +NMQTTCONNECT ........................................ 231
8.11.3. MQTT Client Publish - +NMQTTPUBLISH ............................................ 233
8.11.4. MQTT Client Receive Request - +NMQTTRR ....................................... 234
8.11.5. MQTT Client Subscribe - +NMQTTSUBSCRIBE ................................... 235
8.11.6. MQTT Client Receive - +NMQTTR ........................................................ 236
8.11.7. MQTT Client UnSubscribe - +NMQTTUNSUBSCRIBE ......................... 237
8.11.8. MQTT Client Disconnect - +NMQTTCL ................................................. 238
8.12. WebSocket ............................................................................................. 239
8.12.1. WebSocket Create - +WEBSOCKNEW ................................................. 239
8.12.2. WebSocket Configure - +WEBSOCKCONF .......................................... 241
8.12.3. WebSocket Connect - +WEBSOCKCONN ............................................ 242
8.12.4. WebSocket Send Data - +WEBSOCKSEND ......................................... 242
8.12.5. WebSocket Ping - +WEBSOCKPING .................................................... 243
8.12.6. WebSocket Pong - +WEBSOCKPONG ................................................. 244
8.12.7. Send Data to WebSocket - +WEBSOCKSEND ..................................... 245
8.12.8. WebSocket Receive Ready Data - +WEBSOCKRECVREADY ............ 246
8.12.9. WebSocket Receive Data - +WEBSOCKRECV .................................... 247
8.12.10. WebSocket Close - +WEBSOCKCLOSE............................................... 249
9. ADVANCED SERVICES ........................................................................ 250
9.1. Provisioning ............................................................................................ 250
9.1.1. Web Provisioning - +WNWEBPROV ..................................................... 250
9.2. Firmware Upgrade ................................................................................. 251
9.2.1. HTTPC Initialize Firmware Upgrade - +FUHTTPCINIT ......................... 252
9.2.2. HTTPC Firmware Upgrade - +FUHTTPC .............................................. 253
9.2.3. HTTPD Firmware Upgrade - +FUHTTPD .............................................. 254
9.2.4. 254
9.2.4.1. XFP Start - +YXFPSTART ..................................................................... 256
9.2.5. Validate Firmware Upgrade - +FUVALIDATE ........................................ 257
9.3. M2M Smart Device Communication (TR50) .......................................... 258
9.3.1. deviceWISE Configure - +DWCFG ........................................................ 259
9.3.2. deviceWISE Connect/Disconnect - +DWCONN .................................... 260
9.3.3. deviceWISE Connection Status - +DWSTATUS ................................... 261
9.3.4. deviceWISE Send Data - +DWSEND .................................................... 262
9.3.5. deviceWISE Send Raw Data - +DWSENDR ......................................... 263
9.3.6. deviceWISE Receive Data - +DWRCV .................................................. 263
9.3.7. deviceWISE Receive Raw Data - +DWRCVR ....................................... 264
9.3.8. deviceWISE Read Unresolved Data - +DWLRCV ................................. 265
9.4. Amazon Web Service (AWS) ................................................................. 266
9.4.1. AWS Initialize - +CAWSINIT .................................................................. 273
9.4.2. AWS Configure - +CAWSCFG ............................................................... 274
Page 14
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 14 of 299 2021-01-17
9.4.3. AWS Command - +CAWSCMD ............................................................. 275
10. APPENDIX A - AT COMMANDS SUMMARY ....................................... 277
11. APPENDIX B ......................................................................................... 291
12. GLOSSARY AND ACRONYMS ............................................................ 293
13. DOCUMENT HISTORY ......................................................................... 294
Page 15
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 15 of 299 2021-01-17
FIGURES LIST
Figure 1: Communication between the Interfaces ....................................................................................... 30
Figure 2: Command processing in Serial to Wireless Application ............................................................... 31
Figure 3: Operating Modes of Serial to Wireless Application ...................................................................... 32
Page 16
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 16 of 299 2021-01-17
TABLES LIST
Table 1: Document Text Convention ........................................................................................................... 23
Table 2: AT Command Syntax .................................................................................................................... 24
Table 3: Example Response ....................................................................................................................... 26
Table 4: Status Responses ......................................................................................................................... 27
Page 17
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 17 of 299 2021-01-17
Page 18
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 18 of 299 2021-01-17
Page 19
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 19 of 299 2021-01-17
1. INTRODUCTION
1.1. Scope
This document covers the more significant standard and proprietary AT commands provided by Telit's modules. Several module features are described and for each one of them the related AT commands are explained through examples. This document is not an exhaustive description of the AT commands implemented on the Telit's modules series; its target is only to give you an entry point to the AT commands world.
1.2. Audience
This manual is designed for software engineers who want to evaluate, design, and implement the modules within their environment. To use this manual, you will need a basic understanding of wireless networks, network principles, and network protocols.
1.3. Contact Information, Support
For general contact, technical support services, technical questions and report documentation errors contact Telit Technical Support at:
TS-SRD@telit.com
For detailed information about where you can buy Telit modules or for recommendations on accessories and components visit:
https://www.telit.com
Our aim is to make this guide as helpful as possible. Keep us informed of your comments and suggestions for improvements. Telit appreciates feedback from the users of our information.
Page 20
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 20 of 299 2021-01-17
1.4. Text Conventions
Danger – This information MUST be followed, or catastrophic equipment failure or bodily injury may occur.
Caution or Warning – Alerts the user to important points about integrating the module, if these points are not followed, the module and end user equipment may fail or malfunction.
Tip or Information – Provides advice and suggestions that may be useful when integrating the module.
All dates are in ISO 8601 format, i.e. YYYY-MM-DD.
1.5. Related Documents
Please refer to https://www.telit.com/ for current documentation and downloads. For EVK: ­WL865E4-P Evaluation Board Quick Start Guide
Page 21
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 21 of 299 2021-01-17
WL865E4-P Use Case Reference Guide WL865E4-P Legacy Command Reference Guide
Page 22
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 22 of 299 2021-01-17
Page 23
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 23 of 299 2021-01-17
2. OVERVIEW
This chapter provides guidelines for using AT command line interface to design, configure and provision WL865E4-P module in a wireless network using serial commands.
2.1. AT Commands
Telit wireless module family can be controlled via the serial interface using the standard AT commands.
2.2. Command Definition
This document uses the following syntactical definitions:
Color text indicates cross-reference, hyperlinks to supplemental information
Command notation indicates commands, sub commands, or command elements
Following table describes the text conventions used in this manual for software procedures that are explained using the AT command line interface.
Convention Type
Description
[ ] Square brackets
Name enclosed in square brackets are optional parameters. Square brackets themselves do not appear in the command line.
<CR> Carriage return
It is the command line and result code terminator character. The ASCII equivalent decimal value of <CR> is 13.
<LF> Line Feed
It is the character recognized as line feed character. The ASCII equivalent decimal value of <LF> is 10. The line feed character is output after carriage return character if verbose result codes are used (ATV1 option used) otherwise, if numeric format result codes are used (ATV0 option used) it will not appear in the result codes.
<CR><LF> Carriage return Line feed
Each command is terminated by <CR><LF>.
< > Angle brackets
Name enclosed in angle brackets are optional parameters. Angle brackets themselves do not appear in the command line.
= Equal sign
Separates the variable from explanatory text and is entered as part of the command.
PROCESSID = <CID>
. Dot (period)
Allows the repetition of the element that immediately follows it multiple times. Do not enter as part of the command.
. AA:NN can be expanded to 1:01 1:02 1:03.
A.B.C.D IP address
IPv4-style address.
10.0.11.123
LINE End-to-line input token
Indicates user input of any string, including spaces. No other parameters may be entered after input for this token.
string of words
WORD Single token
Indicates user input of any contiguous string (excluding spaces). singlewordnospaces
Table 1: Document Text Convention
Page 24
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 24 of 299 2021-01-17
2.3. AT Command Syntax
Following table describes the syntax rules followed by Telit implementation used in this manual for software procedures that are explained using the AT command line interface.
Convention Type
Description
command syntax monospaced font
This monospaced font represents command strings entered on a command line and sample source code.
AT XXXX
Proportional font description
Gives specific details about a parameter. <Data> DATA.
UPPERCASE Variable parameter
Indicates user input. Enter a value according to the descriptions that follow. Each uppercased token expands into one or more other token.
lowercase Line Feed
Indicates keywords. Enter values exactly as shown in the command description.
M/O
Gives the condition of the parameter as mandatory or optional.
Table 2: AT Command Syntax
2.4. Command Lines
A command line is made up of three elements: the prefix, the body and the termination character. The command line prefix consists of the characters “AT” or “at”, followed by “+” or “#” or without “+/#”. Most commands are prefixed with “AT+”.
To repeat the execution of the previous command line, the characters “A/” or “a/” or AT#/ or at#/ is used.
The termination character may be selected by a user option, the default being <CR>. The basic structures of the command line are:
AT+CMD<CR> where AT+ is the command line prefix, YLC is the body of a basic command. <CR> is the command line terminator character AT+YLC=0<CR> where 0 is a sub parameter
AT+CMD? <CR> This is a Read command for checking current sub parameter values.
Page 25
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 25 of 299 2021-01-17
The set of proprietary AT commands differentiates from the standard one because
the name of each of them begins with either “@”, “#”, “$” or “*”. Proprietary AT
commands follow the same syntax rules as extended commands.
Following are the AT commands the does not have prefixes in Responses: AT+CGMI, AT#SWPKGV, AT+CGMR, AT+CGMM, ATIn and ATI. Following are the AT commands the does not have prefixes “AT+” in Command: ATCn, ATEn, ATVn, AT&Wn, AT&Yn, ATZn, AT&F, AT&Kn, AT#SWPKGV, ATIn and ATI.
Page 26
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 26 of 299 2021-01-17
2.5. Information Response and Result Codes
Following is an example of a command executed with response in verbose and non-verbose mode:
Sl No
Verbose mode
Non-verbose mode
1
AT+WNCN=1,"Telit_Guest","Welcome",6<CR>
AT+WNCN=1,"Telit_Guest","Welcome",6<C R>
2
<CR><LF>+WNCN:CONNECTED,192.168.3.4 5,255.255.255.0,192.168.3.1<CR><LF>
+WNCN:CONNECTED,192.168.3.45,255.25
5.255.0,192.168.3.1<CR><LF>
3
<CR><LF>OK<CR><LF>
0<CR>
……
……
4
<CR><LF>+WNCN:CONNECTED,192.168.3.4 6,255.255.255.0,192.168.3.1<CR><LF>
+WNCN:CONNECTED,192.168.3.46,255.25
5.255.0,192.168.3.1<CR><LF>
Table 3: Example Response
Synchronous Response:
Synchronous messaging is a two-way communication i.e. the information sent as a response of the command after the complete execution from the host. It is followed by the status of the command after execution.
In the above example, the node sends connection request to AP, AP sends response, node gets connected by acquiring IP address, net mask and Gateway.
Asynchronous Response:
Asynchronous Response is a one-way communication i.e. the information is sent as an indication of an event that occurred. This event may be due to the command issued previously.
For example, in disassociation event, when the AP gets reset a message is seen on the module. In few cases, there will be multiple responses. Following are the responses to the command scan:
AT+WS=1<CR> <CR><LF>+WS:C0:C1:C0:A6:7F:3A,"ssid153126173420",1,INFRA,-80,NONE<CR><LF> <CR><LF>+WS:2C:30:33:DC:83:FE,"dd-wrt",1,INFRA,-82,NONE<CR><LF> <CR><LF>+WS:C8:B3:73:4A:33:48,"wifiVirus",1,INFRA,-90,WPA2 PSK<CR><LF> <CR><LF>+WS:98:FC:11:F8:C7:15,"FWUP",3,INFRA,-94,WPA2 PSK<CR><LF> <CR><LF>+WS:68:7F:74:52:6F:D4,"homekit",6,INFRA,-90,NONE<CR><LF> <CR><LF>+WS:00:03:7F:50:00:01,"QSoftAP",6,INFRA,-93,WPA2 PSK<CR><LF> <CR><LF>+WS:00:8E:F2:56:24:04,"GainSpan4",6,INFRA,-79,WPA2 PSK<CR><LF> <CR><LF>OK<CR><LF>
Page 27
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 27 of 299 2021-01-17
The result or status codes for all possible responses are as follows:
Verbose mode
Non-verbose mode
Description
OK 0 Parsing and processing of command done
successfully.
ERROR
1
Parsing done but processing failed.
INVALID PARAM
2
Parsing of parameter failed, because one of the parameters entered is wrong-it may be because of data type mismatch.
INVALID COMMAND
3
Parsing of command failed as the command entered is not a valid command.
PARMETEROUTOF RANGE
4
Parsing of parameter failed as the parameter value entered is not within the range.
NO MEMORY
5
Parsing or processing of command failed, since the memory allocation failed.
EXCESS DATA RECIEVED
6
Parsing of parameter of type data failed, because the data entered is excess compared to the length mentioned in the command.
Table 4: Status Responses
Verbose Mode:
Verbose Mode displays the status of a command executed, is enabled by default. It is in the ASCII (human readable) format.
Example:
ATV1 OK
Non-Verbose Mode:
Non-Verbose Mode displays the output in numerical digits, each digit indicates specific status. Example:
ATV0 0
2.6. Parameter Types
Following are different types of parameter: Integer: The value must be entered in decimal format and that is stored in 4bytes value. The range
specified is the range of its value.
HEX: Hexadecimal value up to 4 bytes e.g. FF FF FF FF is the range specified is the range of its value. Long integer: A decimal value that cannot be stored in 4bytes value and can be stored in 8bytes value.
The range specified is the range of its value. String: It must be entered in double quote. All the special character can be used within the string. To have
double quote, escape character (‘\’) must be appended, e.g. “Te\”lit”. The range specified is the length of the string.
IP Address: It can be IPv4 address or IPv6 address notation. IPv4 Address: It must be IPv4 notation.
Page 28
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 28 of 299 2021-01-17
IPv6 Address: It must be IPv6 notation. MAC Address: It must be in the format (EUI48) i.e. XX:XX:XX:XX:XX:XX. Fixed String: It is a predefined string and doesn’t come in double quote. Hex Stream: It is a stream of hex bytes. The range specifies the length of the byte stream, e.g.
1234aabbcc is 5 bytes long. Binary Data: Binary data is not processed by parser and it is given as is to command processor. It is
always preceded by integer parameter that gives the length of the binary data. The binary data is not echoed by the parser.
As the parameter Data and Data length are mutually inclusive, if either of this parameter is present (optional or mandatory) then the other parameter must also be present in the command.
Example:
AT+NHTTPDSENDDATA=0,0[,0,]
Page 29
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 29 of 299 2021-01-17
Page 30
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 30 of 299 2021-01-17
3. ARCHITECTURE
This chapter provides a brief overview of the system and the architecture of Serial-to-Wireless application.
3.1. System Overview
The Serial to Wireless stack is used to provide wireless capability to any device having a serial interface. This approach offloads WLAN, TCP/IP stack and network management overhead to the wireless chip, allowing a small embedded host (for example an MCU) to communicate with other hosts on the network using a wireless link. The host processor can use serial commands to configure the serial to wireless application and create wireless or network connections.
The user will receive a pre-loaded firmware to Run the application. To customize the application user is required to perform the following steps.
3.2. Working Principle
The architecture of the Serial to Wireless interface communicates to and from TCP/IP network commands. These are network management commands of serial to wireless interface. The network connections intercepts using Command Processor. Following diagram represents the sequence of communication between the interfaces:
SPI
Driver
SDIO
Driver
UART
Driver
AT Command Parser
Command Processor
SPI
Drv Ctx
UART
Drv Ctx
SDIO
Drv Ctx
Driver Interface
Figure 1: Communication between the Interfaces
Serial to Wireless application takes command input from three different IOs. The software configurations can be UART and either SPI or SDIO combinations. The driver interface gives a transparent interface to the AT command parser. AT command parser does the parsing and calls the command processor API to process the command.
Page 31
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 31 of 299 2021-01-17
Figure 2: Command processing in Serial to Wireless Application
Following is an example of command processing in serial to wireless application:
Sl
No
Verbose mode
Non-verbose mode
Description
1
AT+WNCN=1,"Telit_Guest","Welc ome",6<CR>
AT+WNCN=1,"Telit_Guest","Wel come",6<CR>
Command
2
<CR><LF>+WNCN:CONNECTED,
192.168.3.45,255.255.255.0,192.1
68.3.1<CR><LF>
+WNCN:CONNECTED,192.168.
3.45,255.255.255.0,192.168.3.1 <CR><LF>
Command Response
3
<CR><LF>OK<CR><LF>
0<CR>
Command Status
3.3. System Initialization
Upon startup the serial to wireless interface performs the following actions:
During the initialization process, the module software tries to fetch the configuration file (also called as profile) from the file system. If the profile is not found, it sets the factory default values to profile and creates the file in the file system. For a default profile, the interface starts in Legacy command mode. User is required to check the mode of the command processing and start the specific operation.
In the profile, configuration related to wireless network- UDP/TCP/DNS/MDNS are kept. If the auto connection mode is set, then the module will attempt to join the wireless network and tries to open connection based on the UDP/TCP configuration.
Serial to wireless application is initialized based on the profile settings.
Page 32
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 32 of 299 2021-01-17
Start
Auto mode
enable
Configure the
module based on
the saved profile
and indicate to user
about the result of
the configuration
Wait for user
command
Wait for user
command
YES
NO
- Configures L2 and L3
connection indicate the result
- Configure UDP/TCP and indicates to user
- Configures mDNS and indicates to user
Figure 3: Operating Modes of Serial to Wireless Application
Page 33
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 33 of 299 2021-01-17
4. HOST INTERACTION
4.1. Interface
An embedded host uses one of the serial IO interfaces to connect to the module. By default, UART0 interface is enabled. When the module boots up, it initializes the UART0 interface to
receive command. Host can enable the second interface by issuing AT command (e.g. AT+YSIF = 1). The second interface supported can be either SPI or SDIO. Both SPI and SDIO supports Slave mode.
By default, the second interface is disabled. User can enable and save it in profile for the next boot where the module automatically starts the second interface. Upon factory reset, the second interface is disabled.
The default UART0 configuration is as shown below:
4.1.1. UART
4.1.1.1. Baud Rate - B
Description
This command is used to configure UART and set the UART parameters.
Pre-requisites
None.
Syntax
ATB=<Port>,<Baud rate>,[<Bits per character>,<Parity mode>,<Stop bits>]
Parameters Description
Paramet er
Value
Form at
Descripti on
Port
Range: 0,1
Integ er
It specifies port of the UART to be configur ed, where:
Page 34
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 34 of 299 2021-01-17
0 - High Speed UART,
1 ­Debug UART.
Baud rate
Range: 300,600,1200,2400,4800,9600,14400,19200,38400,57600,115200,230400, 460800,921600
Integ er
It specifies rate at which the data transmits over a channel, port 0 supports only 115200 baud rate and port 1 supports the baud rate 300 to
115200.
Bits per charact er
Range: 5-8 Default: 8
Integ er
It specifies the bits per characte r.
Parity mode
Range: 0-3 Default: 0
Integ er
It specifies the parity mode being used, where:-
0 is No Parity,
1 is odd Parity,
2 is Even Parity,
3 is Space Parity.
Stop bits
Range: 0-3 Default: 1
Integ er
It specifies the
Page 35
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 35 of 299 2021-01-17
number of stop bits.
Status
For all possible status responses refer Table 4: Status Responses
Example
ATB=0,115200,5,0,1 OK
4.1.1.2. Hardware Flow Control - &Kn
Description
This command is used to enable or disable the hardware flow control for UART interface.
Pre-requisites
None.
Syntax
AT&Kn
Parameters Description
Parameter
Value
Format
Description
n
Range: 0,3
Integer
It specifies state of the hardware flow control for UART interface, where:
3-Enables hardware flow control, 0-Disables hardware flow control.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT&K0 OK
Following command is used to get the status of the hardware flow control in UART interface:
Syntax
AT&K?
Response
&K:<mode>
Response Parameters Description
Parameter
Range
Type
Description
mode
0,3
Integer
It returns 0 or 3, if the HW flow control is disabled or enabled respectively.
Status
Page 36
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 36 of 299 2021-01-17
For all possible status responses refer Table 4: Status Responses
Example
AT&K? &K:0 OK
4.1.2. SPI/SDIO
WL865E4-P I/O interfaces supports two I/O interfaces:
1. UART: - First interface which is a default interface.
2. SPI/SDIO: - Second interface can be either SPI or SDIO.
User can use either SPI or SDIO interface along with UART interface.
SPI/SDIO Interface:
When WL865E4-P (Slave) device boots up, it starts with UART interface, by using UART interface user can issue AT+YSIF=1(SPI)/2(SDIO) command to select required second interface.
Following are the SDIO pin connections of WL865E4-P(Host) to WL865E4-P (Slave):
MASTER BOARD
GROUP
PIN
SIGNAL
PL 604
2
SDIO_CLK
PL 604
3
SDIO_CMD
PL 604
4
SDIO_D0
PL 604
5
SDIO_D1
PL 604
6
SDIO_D2
PL 604
7
SDIO_D3
PL 604
8
GND
SLAVE BOARD
GROUP
PIN
SIGNAL
PL 604
2
SDIO_CLK
PL 604
3
SDIO_CMD
PL 604
4
SDIO_D0
PL 604
5
SDIO_D1
PL 604
6
SDIO_D2
PL 604
7
SDIO_D3
Page 37
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 37 of 299 2021-01-17
PL 604
8
GND
Following are the SPI pin connections of WL865E4-P (Host) to WL865E4-P (Slave):
MASTER BOARD
GROUP
PIN
SIGNAL
PL 605
3 (Out)
SPI_M_MOSI
PL 605
5 (In)
SPI_M_MISO
PL 605
7 (Out)
SPI_M_CLK
PL 605
9 (Out)
SPI_M_CS
PL 605
11
GND
PL604
5 (In)
SDIO_D1
SLAVE BOARD
GROUP
PIN
SIGNAL
PL 604
7 (In)
SDIO_D3 (MOSI)
PL 604
4 (Out)
SDIO_D0 (MISO)
PL 604
2 (In)
SDIO_CLK (CLOCK)
PL 604
3 (In)
SDIO_CMD (CS)
PL 604
8
GND
PL 604
5 (Out)
SDIO_D1 (Slave interrupt)
Now the Host (also called as master or bridge which can be any device, including WL865E4-P module) connects to WL865E4-P(slave) with SPI/SDIO interface.
Following figure shows WL865E4-P UART and SPI/SDIO dual interface. Here the SPI/SDIO master device sends command received from UART interface to SPI/SDIO interface.
Page 38
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 38 of 299 2021-01-17
Following are the steps to demonstrate SPI/SDIO interface:
1. Flash both master and slave devices with their binaries.
2. Connect master and slave according to the given pin configuration.
3. Run both the devices together.
4. First issue AT+YSIF=1 (SPI)/2 (SDIO) command on the slave end by using slave’s UART interfaces.
5. Issue AT+YIDEMO command at the master end to initialize and send the commands.
4.1.2.1. SPI/SDIO Interface - +YSIF
Description
This command sets the second interface. First interface is the UART IO and second interface is
either SPI or SDIO. It also saves the information in the profile and enables automatically when it boots.
Pre-requisites
None.
Syntax
AT+YSIF=<Input/output type>
Parameters Description
Parameter
Value
Format
Description
Input/output type
Range: 0-2
Integer
It specifies serial IO to use, where: 0-Disables, 1-SPI, 2-SDIO.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+YSIF = 1 OK
Page 39
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 39 of 299 2021-01-17
4.1.2.2. SPI/SDIO Interface Demonstration - +YIDEMO
Description
This command demonstrates SPI or SDIO host interface. To demonstrate the SPI or SDIO interface, connect two WL865E4-P modules through the jumper
wires. One of the module acts as bridge and sends the command received from UART port to the SPI or SDIO port. The bridge simulates the host connected to the WL865E4-P module through SPI or SDIO interface. This command is read by the Bridge module and sends appropriate command to the WL865E4­P module via SPI or SDIO.
Following are the command usage in all possible cases:-
1.INITialization: AT+YIDEMO=1, interface type (1 for SPI, 2 for SDIO),clock frequency(KHZ)
2.SHOW Received message AT+YIDEMO=2, display mode (1 for text format, 2 for HEX format)
3.SENDs command to host with '\r\n' appending. AT+YIDEMO=3, Parameter
4.SENDs command to host without appending . AT+YIDEMO=4, Parameter
6.SENDs command to host with '\r' appending. AT+YIDEMO=6, Parameter
5.starts transmit throughput test AT+YIDEMO=5, packet size, packet count
7.initiates receive throughput test. AT+YIDEMO=7, packet size, packet count
8.Stops throughput test in case of receive throughput. AT+YIDEMO=8
9.Display statistics. AT+YIDEMO=9
Pre-requisites
Before executing initialization command at the host end, the user must issue AT+YSIF=1 (SPI)/2
(SDIO) command at slave end
For SDIO Host:
1). Set the teraterm terminal settings to:­ New-Line/Transmit as CR+LF and
Page 40
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 40 of 299 2021-01-17
New-Line/Receive as AUTO
2). Issue ATE1 command at Host end.
Syntax
AT+YIDEMO=<Configuration ID>,[<Parameter 2>,<Parameter 3>]
Parameters Description
Parameter
Value
Format
Description
Configuration ID
Range: 1-9
Integer
It specifies the value of the ID for configuration, where:
1-Initializing interface (either SPI or SDIO depends on the second parameter).
2-Display of the received message (display mode depends on the second parameter).
3-Sends second parameter to the slave with '\r\n' appending.
4-Sends second parameter to the slave without appending any data.
5-Starts transmitting throughput test. 6-Sends second parameter to the slave with '\r'
appending. 7-Initiates receive throughput test. 8-Stops throughput test in receive throughput(this
configuration ID does not require param2 and param3 parameters).
9-Display statistics(this configuration ID does not require param2 and param3 parameters).
Parameter 2
Range: NA Default: NA
RAW Data
It specifies the function of the parameter based on configuration ID. The format of the command with Parameter2 is:
AT+YIDEMO=<Configuration ID>, <Parameter 2>, <Parameter 3>
Configuration IDParameter 2
-------------------------------------------­11 for SPI, 2 for SDIO 21 for text format, 2 for HEX format 3,4,6Slave command 5Transmits packet size 7Receives packet size 8,9Not applicable
Parameter 3
Range: NA Default: NA
RAW Data
It specifies the function of the parameter based on configuration ID. The format of the command with
Page 41
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 41 of 299 2021-01-17
Parameter2 and Parameter 3 is: AT+YIDEMO=<Command ID>, <Parameter 2>,
<Parameter 3>
Configuration IDParameter 2Parameter 3
--------------------------------------------------------------------
-------------------------------------------------­11 for SPI, 2 for SDIOFreqency in
KHZ(3000,4000,6000,8000,12000,16000,24000) 21 for text format, 2 for HEX formatNot applicable 3,4,6Slave commandNot applicable 5Transmits packet sizeNumber of packets 7Receives packet sizeNumber of packets 8,9Not applicableNot applicable
Note:
Based on the Configuration ID the response of the command is: Configuration ID Response
------------------------------------------------------­ 1 'OK' or error messages prints 2 Received data prints on the console 3,4,6 On success 'OK' prints, on error 'ERROR' is printed 7 After successful throughput test it prints statistics 8 On success 'OK' prints, on error 'ERROR' prints 9 Prints statistics
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+YIDEMO=1,1,24000
OK AT+YIDEMO=6,at+wni=0
OK AT+YIDEMO=6,at+wncn=1,"SSID"
OK AT+YIDEMO=2,1
Page 42
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 42 of 299 2021-01-17
OK AT+YIDEMO=6,at+wpowersave=1,0
OK AT+YIDEMO=6,at+yps=0
OK AT+YIDEMO=6,AT+SC=2,2,0
OK AT+YIDEMO=6,at+sb=0,192.168.111.1,8377
OK AT+YIDEMO=6,at+srr=0,1
OK AT+YIDEMO=2,1
OK AT+YIDEMO=7,1452,10000
OK
Page 43
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 43 of 299 2021-01-17
5. GENERAL OPERATIONS
5.1. System Settings
For basic module setting and to get system information, the following AT commands are used:
ATEn - To enable/disable echo mode
ATVn – To enable/disable verbose mode
AT+YSR – To perform a software reset on the board
AT+YHD – To get heap information
AT+YTIME – To set and get time
AT+YLC – To switch between new command and legacy command
To store information in the internal Flash of the module, file system commands are used. User can open/create, read/write and close the file after the completion of specific operation and then delete the file if not required or not in use.
For a file to be saved in secure mode, a password can be provided during file open procedure. If a secured file is opened with a wrong password or without a password, then file read operation will give junk data. User must track and maintain the password of the files saved in secured mode.
User can list the files present in the internal flash and get information on the size of each file.
5.1.1. Switch Between Legacy and AT Command - +YLC
Description
This command resets the module and switches between the Legacy and New AT commands.
Pre-requisites
None.
Syntax
AT+YLC=<Mode>
Parameters Description
Parameter
Value
Format
Description
Mode
Range: 0-1
Integer
It specifies the mode in which the current AT commands are executed, where:
0-Enables New AT command, 1-Enables Legacy command. By default, the command mode is set to legacy
command mode. Once this command is issued, the system resets
and starts with the set command mode.
Response
+YLC:<mode>
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+YLC = 1
Page 44
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 44 of 299 2021-01-17
Serial2Wireless APP
Following command is used to get the status of the mode in which the module is currently operating:
Syntax
AT+YLC?
Response
+YLC:<mode>
Response Parameters Description
Parameter
Range
Type
Description
mode
0,1
Integer
It specifies the current command mode.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+YLC? +YLC=0 OK
5.1.2. Echo Mode - En
Description
This command enables or disables Echo mode. In UART interface, echo mode is enabled by
default and in SPI and SDIO interface, echo mode is disabled.
Pre-requisites
None.
Syntax
ATEn
Parameters Description
Parameter
Value
Format
Description
n
Range: 0-1
Integer
It specifies the state of echo mode, where: 1-Enables Echo mode, 0-Disables Echo mode.
Status
For all possible status responses refer Table 4: Status Responses
Example
ATE0 OK
5.1.3. Backspace Handling - BKPn
Description
Page 45
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 45 of 299 2021-01-17
This command enables or disables Backspace handling. Backspace handling is enabled by
default, but to optimize throughput this can be disabled.
Pre-requisites
None.
Syntax
ATBKPn
Parameters Description
Parameter
Value
Format
Description
n
Range: 0-1
Integer
It specifies the state of backspace handling logic, where:
1-Enables backspace handling, 0-Disables backspace handling.
Status
For all possible status responses refer Table 4: Status Responses
Example
ATBKP0 OK
5.1.4. Verbose Mode - Vn
Description
This command enables or disables Verbose mode.
Pre-requisites
None.
Syntax
ATVn
Parameters Description
Parameter
Value
Format
Description
n
Range: 0-1
Integer
It specifies the state of Verbose mode, where: 1-Enables Verbose mode 0-Disables Verbose mode.
Status
For all possible status responses refer Table 4: Status Responses
Example
ATV1 OK
5.1.5. Boot Reason - +YBR
Description
Page 46
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 46 of 299 2021-01-17
This command identifies the reason for system reset.
Pre-requisites
None.
Syntax
AT+YBR
Response
+YBR: <Boot Reason>
Response Parameters Description
Parameter
Range
Type
Description
Boot Reason
N/A
Hardware Reset, Watchdog Reset, Software Reset, Exception Hard Fault, Exception Memory Management Fault, Exception Usage Fault, Exception Bus Fault
It specifies the boot reason.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+YBR +YBR:Hardware Reset OK
5.1.6. Exception Boot Reason - +YBER
Description
This command identifies the reason for system reset and prints the register details, when
exception occurs.
Pre-requisites
None.
Syntax
AT+YBER
Response
+YBER:<Boot Reason>, <R1>, <R2>, <R3>, <R4>, <R5>, <R6>, <R7>, <R8>, <R9>, <R10>,
<R11>, <R12>, <R13>, <R14>, <R15>, <R16>
Response Parameters Description
Parameter
Range
Type
Description
Boot Reason
N/A
Hardware Reset, Watchdog Reset,
It specifies the boot
Page 47
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 47 of 299 2021-01-17
Software Reset, Exception Hard Fault, Exception Memory Management Fault, Exception Usage Fault, Exception Bus Fault
reason.
R1
N/A
Hexadecimal
It specifies the value of register R1.
R2
N/A
Hexadecimal
It specifies the value of register R2.
R3
N/A
Hexadecimal
It specifies the value of register R3.
R4
N/A
Hexadecimal
It specifies the value of register R4.
R5
N/A
Hexadecimal
It specifies the value of register R5.
R6
N/A
Hexadecimal
It specifies the value of register R6.
R7
N/A
Hexadecimal
It specifies the value of register R7.
R8
N/A
Hexadecimal
It specifies the value of register R8.
R9
N/A
Hexadecimal
It specifies the value of register R9.
R10
N/A
Hexadecimal
It specifies the value of register R10.
R11
N/A
Hexadecimal
It specifies the value of register R11.
R12
N/A
Hexadecimal
It specifies the value of register R12.
R13
N/A
Hexadecimal
It specifies the value of register R13.
R14
N/A
Hexadecimal
It specifies the value of register R14.
R15
N/A
Hexadecimal
It specifies the value of register R15.
R16
N/A
Hexadecimal
It specifies the value of register R16.
Status
For all possible status responses refer Table 4: Status Responses
Page 48
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 48 of 299 2021-01-17
Example
AT+YBER +YBER:EXCEPTION USAGE
FAULT,0,10088B40,100877D0,1,0,10088A88,0,0,0,0,100882D0,0,100035B8,100AFFA0,1000619F,0
OK
5.1.7. Auto Mode - Cn
Description
This command enables or disables auto mode, it does not erase the profile. So even if auto mode
is disabled all saved parameters in profile will not be erased.
In auto mode, the profile can be set using AT&Yn.
Pre-requisites
None.
Syntax
ATCn
Parameters Description
Parameter
Value
Format
Description
n
Range: 0-1
Integer
It specifies the status of Auto mode, where: 1-Enables Auto mode, 0-Disables Auto mode.
Status
For all possible status responses refer Table 4: Status Responses
Example
ATC0 OK ATC1 OK
Following command is used to get the status of auto mode:
Syntax
ATC?
Response
C:Status
Response Parameters Description
Parameter
Range
Type
Description
Status
N/A
DISABLE, ENABLE
It specifies the auto mode status.
Status
For all possible status responses refer Table 4: Status Responses
Page 49
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 49 of 299 2021-01-17
Example
ATC? C:DISABLE OK
5.1.8. Data Mode - An
Description
This command is used to enable data mode.
Pre-requisites
None.
Syntax
ATAn
Parameters Description
Parameter
Value
Format
Description
CID
Range: 0-11
Integer
It specifies the CID in the data mode.
Status
For all possible status responses refer Table 4: Status Responses
Example
ATA0 OK
5.1.9. Debug Log Level - +YLOGSL
Description
This command sets the severity of the debug logs, the module firmware sends debug log over
debug UART port.
Pre-requisites
Debug module should be initialized in the application.
Syntax
AT+YLOGSL=<Severity level>
Parameters Description
Parameter
Value
Format
Description
Severity level
Range: 0-8
Integer
It specifies the level of severity to be set for the debug log, where:
0 - Off logging, 1 - Severity Emergency, 2 - Severity Alert, 3 - Severity Critical,
Page 50
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 50 of 299 2021-01-17
4 - Severity Error, 5 - Severity WARN, 6 - Severity NOTICE, 7 - Severity INFO, 8 - Severity DEBUG.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+YLOGSL=5 OK
5.1.10. File System
5.1.10.1. File Open - +YFOP
Description
This command opens a specified file with the given option.
Pre-requisites
None.
Syntax
AT+YFOP=<Name>,<Option>,[<Password>]
Parameters Description
Parameter
Value
Format
Description
Name
Range: 1-64
String
It specifies the file name along with the path. Ex: /sys/abc.txt
Option
Range: 0x0­0x2, 0x41, 0x42, 0xC1, 0xC2, 0x241, 0x242, 0x441, 0x442, 0x4C1, 0x4C2
Hexadecimal
It specifies the options for Open flag, following are the options:
0x0 to Open in read only mode. 0x1 to Open in write only mode. 0x2 to Open in read and write mode.
In addition to the above flags, any of the following flags can be bitwise "OR"ed:
0x400 APPEND: - Data written will be appended to the end of the file. The file operations will always adjust the position pointer to the end of the file.
0x40 CREAT: - Create the file if it does not exist. 0x80 EXCL: - Used with CREAT. If the file already
exists, then fail, and return error. 0x200 TRUNC: - If the file already exists then
discard its previous contents, reducing it to an empty file.
Page 51
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 51 of 299 2021-01-17
Password
Range: 16 Default:
String
It specifies the password for a secured file, supported each time to open a file. If the password is not necessary to open a file, then it is a unsecure file.
Response
+FOP:<File Descriptor>
Response Parameters Description
Parameter
Range
Type
Description
File Descriptor
0X0-0XFFFFFFFF
Hexadecimal
It specifies the file descriptor in use for other file operations.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+YFOP="/abc.txt",42,"TelitIndiaPvtLtd" +YFOP:1006E6A0 OK
5.1.10.2. File Close - +YFCL
Description
This command closes a specified file.
Pre-requisites
A file must be open before issuing this command.
Syntax
AT+YFCL=<File Descriptor>
Parameters Description
Parameter
Value
Format
Description
File Descriptor
Range: 0X0­0XFFFFFFFF
Hexadecimal
It specifies the return value while opening the file.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+YFCL=0 OK
5.1.10.3. File Read - +YFRD
Description
Page 52
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 52 of 299 2021-01-17
This command reads the specified number of bytes of a file from a given offset and the start of the
file.
Pre-requisites
A file must be open before issuing this command.
Syntax
AT+YFRD=<File Descriptor>,[<Offset>],<Length>
Parameters Description
Parameter
Value
Format
Description
File Descriptor
Range: 0X0­0XFFFFFFFF
Hexadecimal
It specifies the return value while opening a file.
Offset
Range: -1­16384
Default: -1
Integer
It specifies the offset of the file to start. If the change in offset value is not required then the
offset value is -1, else it is 0-4096 for any valid offset value.
If the offset value is not given then by default -1 in taken as the offset.
Length
Range: 1­16384
Integer
It specifies the data to be sent with a gap of ~10msec before sending the data.
Response
+YFRD:<File Descriptor>,<Requested Length>,Available Length>,<Data>
Response Parameters Description
Parameter
Range
Type
Description
File Descriptor
0X0-0XFFFFFFFF
Hexadecimal
It specifies the File Descriptor.
Requested length
1-4294967295
Integer
It specifies the length requested by user
Available length
1-4294967295
Integer
It specifies the length of data following
Data
1-4294967295
Binary Data
It specifies the data to be sent.
Status
For all possible status responses refer Table 4: Status Responses
Example
Example1: AT+YFRD=0,0,5
Page 53
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 53 of 299 2021-01-17
+YFRD=0,5,5,abcde OK
Example2: If the file size is 4224 and the user request a read command for 4500 bytes, then AT+YFRD=0,4500 +YFRD:0,4500,1024,<data of 1024 bytes> +YFRD:0,4500,1024,<data of 1024 bytes> +YFRD:0,4500,1024,<data of 1024 bytes> +YFRD:0,4500,1024,<data of 1024 bytes> +YFRD:0,4500,128,<data of 128 bytes> OK
5.1.10.4. File Write - +YFWR
Description
This command writes in a specified file from a given offset.
Pre-requisites
A file is required to be open before issuing this command.
Syntax
AT+YFWR=<File Descriptor>,[<Offset>],<Data length>,<Data>
Parameters Description
Parameter
Value
Format
Description
File Descriptor
Range: 0X0­0XFFFFFFFF
Hexadecimal
It specifies the return value while opening a file.
Offset
Range: -1­16384
Default: -1
Integer
It specifies the offset of the file to start. If the change in offset value is not required then the
offset value is -1, else it is 0-4096 for any valid offset value.
If the offset value is not given then by default -1 in taken as the offset.
Data length
Range: 1­4294967295
Integer
It specifies the data to be sent with a gap of ~10msec before sending the data.
Data
Range: 1­4294967295
Binary Data
It specifies the data to be sent.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+YFWR=0,5,5,fghij
Page 54
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 54 of 299 2021-01-17
OK
5.1.10.5. File Length - +YFLN
Description
This command is used to get the actual file length and the space occupied in FLASH. If the file is
secure, then it adds more bytes to the actual data written by the user.
Pre-requisites
The file should to be present in file system.
Syntax
AT+YFLN=<Name>
Parameters Description
Parameter
Value
Format
Description
Name
Range: 0-64
String
It specifies the file name along with the path.
Response
+YFLN:<Actual file size>,<Total file size<
Response Parameters Description
Parameter
Range
Type
Description
Actual file size
0-4096
Integer
It specifies the actual file size, if the file is secure then it adds more bytes to the actual data written by the user.
Total file size in FLASH
0-4096
Integer
It specifies the total file size occupied in the flash.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+YFLN="/abc.txt" +YFLN:55,1024 OK
5.1.10.6. File List - +YFLS
Description
This command lists all the files in the specified path.
Pre-requisites
The path of the file should be present in the Flash.
Syntax
Page 55
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 55 of 299 2021-01-17
AT+YFLS=[<Path>]
Parameters Description
Parameter
Value
Format
Description
Path
Range: 0-64 Default:
String
It specifies the location of the file.
Response
+YFLS:<File Name>,<Actual file size>,<Total file size in the FLASH>
Response Parameters Description
Parameter
Range
Type
Description
File name
0-64
String
It specifies the file name with the path.
Actual file size
0-4096
Integer
It specifies the actual size of the file in bytes. If the file is secure, then it adds more bytes to the actual data written by the user.
Total file size in flash
0-4096
Integer
It specifies the space occupied by the file in flash in bytes.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+YFLS="/abc" +YFLS:/abc/xyz.txt,55,1024 +YFLS:/abc/def.txt,110,1024 OK
5.1.10.7. File Delete - +YFRM
Description
This command deletes or removes a specified file from the file system.
Pre-requisites
A file should be present in the file system before issuing this command.
Syntax
AT+YFRM=<File name>
Parameters Description
Parameter
Value
Format
Description
Page 56
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 56 of 299 2021-01-17
File name
Range: 1-64
String
It specifies the file to remove or delete.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+YFRM="/abc.txt" OK
5.1.11. Flash Read - +YFR
Description
This command reads the content of the flash from the specified location.
Pre-requisites
None.
Syntax
AT+YFR=<Address>,<Size>
Parameters Description
Parameter
Value
Format
Description
Address
Range: 0­4194300
Integer
It specifies the location of the flash to read. Size
Range: 1-4096
Integer
It specifies the size in bytes to read.
Response
+YFR:<Requested Length>,<Available Length>,<Data>
Response Parameters Description
Parameter
Range
Type
Description
Requested length
Integer
It specifies the length requested by user
Available length
Integer
It specifies the length of data following
Data
Binary Data
It specifies the data to be sent.
Status
For all possible status responses refer Table 4: Status Responses
Example
Page 57
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 57 of 299 2021-01-17
AT+YFR=0,10 +YFR:10,10,abcdef1234 OK
5.2. Profile Settings
Following are the set of AT commands for profile setting:
Profile Read - Zn
Profile Set - &Yn
Profile Save - &Wn
Save TCP Profile - +YPTCP
Save UDP Profile - +YPUDP
Profile Clear/Factory Reset - &F
The configuration parameter values that define the behaviour of the node are grouped into Profiles. These profiles are stored in non-volatile memory when not in use. The WL865E4-P node supports two Profiles by default (profile0 and profile1).
Profile includes configuration of layer2 (Wi-Fi), layer3 (DHCP), and Layer4 (TCP, UDP etc.). There are two set of profiles that can be stored in the Flash.
User connects to an access point or creates a network (Limited AP), upon L2 connection. Start the DHCP server and open TCP/UDP sockets for data transmission, all the configuration set up is stored in SRAM.
To save the configuration in flash user must issue AT&Wn (where, n can take 0/1 value based on profile0 and profile1). The profile parameters are saved in JSON format in the file system.
If user enables NCM auto mode, then the system automatically initializes itself with saved profile configuration. After successful connection (layer3/layer4), user can store L2, L3 and L4 (TCP/UDP) socket connection information in Profile.
Following commands are executed to save a specified CID for TCP/UDP configuration in the profile,
AT+YPTCP
AT+YPUDP
Following AT commands are executed for reading, setting default and saving the current profile:
ATZn - To read parameters, from the specified profile. Upon execution of this command, module displays the profile (profile 0, or profile 1) parameters.
AT&Yn - This command is used to select the default profile. The settings from the profile that are chosen as the default profile are loaded from non-volatile memory, when the device starts.
AT&Wn - This command is used to save the current profile. Upon execution of this command, the current configuration settings are stored in non-volatile memory under the specified profile (profile 0, or profile 1).
5.2.1. Profile Read - Zn
Description
This command reads the profile from Flash.
Pre-requisites
None.
Syntax
ATZn
Parameters Description
Parameter
Value
Format
Description
Page 58
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 58 of 299 2021-01-17
n
Range: 0-1
Integer
It specifies the Profile number to be read.
Response
+ZN:<Profile>
Response Parameters Description
Parameter
Range
Type
Description
Profile
0-65575
String
It specifies the profile details in JSON format.
Status
For all possible status responses refer Table 4: Status Responses
Example
ATZ0
Zn:""profile":{"s2w_cfg":{"app_type":0,"echo":1,"verbos":1,"auto_mode":0},"system":{"wlan_mode":
0,"wlan_domain":0,"sta_cfg":{"wlan":[{"enable":0,"ssid":"Telit","pwd":"12345678","auth":0,"enc":0,"channel" :1}],"ip":{"flag":2,"ipv4":"192.168.240.1","ip_subnet":"255.255.255.0","ip_gw":"192.168.240.1"},"scan_cfg":{ "fast_scan_interval":20,"fast_scan_duration":10,"slow_scan_interval":5},"roaming_cfg":{"enable":0,"rssi_lo w_threshold":65446,"rssi_high_threshold":65516,"poll_time":30,"force_fg_scan":10,"home_dwell_time":10 ,"force_scan_interval":30,"scan_type":0,"num_of_channel":6,"channel_list":[1,3,6,9,11,0,0,0,0,0]}},"ap_cfg ":{"ap_wlan_cfg":{"mac":"5f:97:24:7e:21:02","ssid":"Telit_AP_24975f","pwd":"12345678","channel":6,"auth" :4,"enc":3,"hidden_mode":0,"beacon_interval":100,"dtim":3,"wps_flag":0},"ip":{"flag":1,"ipv4":"192.168.3.2", "ip_subnet":"255.255.255.0","ip_gw":"192.168.3.1"},"ap_dhcp_cfg":{"start_ip":"192.168.3.3","end_ip":"192.
168.3.24","lease_time_ms":86400000}},"dns_host_cfg":[{"enable":1,"name":"Telit","ip":"192.168.3.1"}],"md ns_cfg":{"enable":1,"mdns_host_cfg":{"host_name":"Telit","ttl":60},"mdns_service_cfg":[{"enable":1,"servic e_name":"_QCA4020","service_type":"_MyDevice._tcp.local","service_subtype":"","protocol":"","domain":" Telit","txt_record":"Telit","port":60,"ttl":120}]},"uart_cfg":[{"enable":1,"port":1,"baud":115200,"parity":0,"stop _bits":1,"char_bits":3,"loopback":0,"flow_ctrl":0},{"enable":1,"port":0,"baud":115200,"parity":0,"stop_bits":1, "char_bits":3,"loopback":0,"flow_ctrl":0}],"dbg_cfg":{"enable":1,"debug_config":{"enableCI":0,"buffer_size": 1024,"log_level":1024}},"sntp_cfg":{"sntp_enable_in":0,"sntp_server_id_in":0,"sntp_server_name_in":0,"sn tp_svr_poll_interval_in":0},"ble_cfg":{"ble_connParam_in":{"connIntMax_in":40,"connIntMin_in":20,"slaveL atency_in":0},"ble_centralCfg_in":{"scanDuration_in":10000},"ble_securityCfg_in":{"iocap_in":0,"mitm_in":0 ,"fixPin_in":""},"ble_disInfo_in":{"pnpidVendorId_in":143,"pnpidVendorIdSource_in":1,"pnpidProductId_in": 45082,"pnpidProductVersion_in":1792},"ble_advParam_in":{"advIntMax_in":200,"advIntMin_in":100,"advD ata_in":"","scanRspData_in":""},"ble_genParam_in":{"ble_role_in":2,"ble_pairMode_in":1,"ble_bondStore_i n":1,"ble_bondSize_in":1,"ble_deviceName_in":"WL865E4","ble_manufacturer_Name_in":"Telit"}}}}"
OK
5.2.2. Profile Set - &Yn
Description
This command sets a profile to the specified profile number which is used in auto configuration
mode.
Pre-requisites
None.
Syntax
Page 59
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 59 of 299 2021-01-17
AT&Yn
Parameters Description
Parameter
Value
Format
Description
n
Range: 0-1
Integer
It specifies the profile number to be set.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT&Y0 OK
5.2.3. Profile Save - &Wn
Description
This command saves the profile to Flash in JSON format.
Pre-requisites
None.
Syntax
AT&Wn
Parameters Description
Parameter
Value
Format
Description
n
Range: 0-1
Integer
It specifies the profile number to save.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT&W0 OK
5.2.4. Save TCP Profile - +YPTCP
Description
This command saves a specified CID for TCP configuration in the profile.
Pre-requisites
None.
Syntax
AT+YPTCP=<CID>,[<Add or Delete Profile>]
Parameters Description
Parameter
Value
Format
Description
Page 60
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 60 of 299 2021-01-17
CID
Range: 0-15
Integer
It specifies the CID obtained from issuing AT+SC or AT+SA command.
Add or Delete Profile
Range: 0-1 Default: 0
Integer
It specifies the addtion or deletion of configuration in Profile, where:
0 - Add, 1 - Delete.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+WNI=0 +WNI:1 OK AT+WNCN=1,"dtim_5" +WNCN:192.168.1.110,255.255.255.0,192.168.1.1 OK AT+SC=2,1,0 +SC:0 OK AT+SCO=0,192.168.140.3,8355 OK AT+YPTCP=0 OK ATC1 OK AT&w0 OK AT+ysr OK Serial2Wireless APP +YPSTA:SUCCESS,192.168.1.110,255.255.255.0,192.168.1.1 +YPTCP:SUCCESS,0,CLIENT,0,192.168.0.109,3456
5.2.5. Save UDP Profile - +YPUDP
Description
This command saves a specified CID for UDP configuration in the profile.
Pre-requisites
None.
Syntax
Page 61
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 61 of 299 2021-01-17
AT+YPUDP=<CID>,[<Add or Delete Profile>]
Parameters Description
Parameter
Value
Format
Description
CID
Range: 0-15
Integer
It specifies the CID obtained from issuing AT+SC or AT+SA command.
Add or Delete Profile
Range: 0-1 Default: 0
Integer
It specifies the addtion or deletion of configuration in Profile, where:
0 - Add, 1 - Delete.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+WNI=0 +WNI:1 OK AT+WNCN=1,"dtim_5" +WNCN:192.168.1.110,255.255.255.0,192.168.1.1 OK AT+SC=2,2,0 +SC:0 OK AT+SB=0,,8355 OK AT+YPUDP=0 OK ATC1 OK AT&w0 OK AT+ysr OK Serial2Wireless APP +YPSTA:SUCCESS,192.168.1.110,255.255.255.0,192.168.1.1 +YPUDP:SUCCESS,0,SERVER,8355,,
5.2.6. Profile Clear/Factory Reset - &F
Description
This command resets the profile to factory setting.
Pre-requisites
Page 62
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 62 of 299 2021-01-17
None.
Syntax
AT&F
Status
For all possible status responses refer Table 4: Status Responses
Example
AT&F OK Serial2Wireless APP
5.3. Default Profile
Default Profile setting provides AT commands to set the default profile parameters. Following are the set of AT commands to set the default profile parameters:
AP DHCP server configuration - +DPNADSC
AP Static IP configuration - +DPNAIPC
AP WLAN configuration - +DPNAWC
Station Static IP configuration - +DPNSIPC
Station Retry configuration - +DPSRC
Station WLAN configuration - +DPNSWC
Update TCP Profile - +DPTC
Update UDP Profile - +DPUC
Using this command user can set the default parameters to the profile stored in SRAM, even without validating the profile parameters. To set the AP configuration in STA mode, user can directly set the parameters even without getting connected to it. Similarly, the other profile parameters can be configured without executing the process.
If user wants to save it to flash, to retain these values across boot, AT&Wn command must be issued. Sequence of execution: To put the module in auto mode user can follow the following sequence: -
1. Since all the configuration just saved into profile without applying, there is no sequence for all above commands.
2. Enable NCM auto mode by ATCn command.
3. Save profile into flash by AT&Wn command.
4. Reset the device.
5.3.1. AP DHCP server configuration - +DPNADSC
Description
This command sets the DHCP server configuration of AP mode in profile.
Pre-requisites
None.
Syntax
AT+DPNADSC=<IP Start Address>,<IP End Address>,<Lease Time>
Parameters Description
Page 63
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 63 of 299 2021-01-17
Parameter
Value
Format
Description
IP Start Address
Range: N/A
IP Address
It specifies the starting IP address allocated to the connected stations.
This address must have the same network ID as that of the IP address configured in the At command AT+DPNAIPC.
IP End Address
Range: N/A
IP Address
It specifies the end IP address until which the connected STAs will get IP addresses.
The end IP address must have the host ID greater than the host ID given in the start address.
Lease Time
Range: 1­4294967295
Integer
It specifies the lease time in seconds for the DHCP server.
Status
For all possible status responses refer Table 4: Status Responses
Example
Serial2Wireless APP AT&F OK above commands are just to make sure that profile parameters are set to default. by giving below commands user can change same default profile parameters. AT+DPNAWC="prasad","password","NONE","NONE",1,0,100,3,0 OK AT+DPNADSC=192.168.23.24,192.168.23.55,86400000 OK AT+DPNAIPC=192.168.23.2,255.255.255.0,192.168.23.1 OK ATC1 OK AT&w0 OK AT+ysr OK Serial2Wireless APP +YPAP:SUCCESS,192.168.23.2,255.255.255.0,192.168.23.1
Following command is used to get the DHCP server configurations of an AP.
Syntax
AT+DPNADSC?
Response
+DPNADSC:<IP Start Address>,<IP End Address>,<Lease time>
Page 64
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 64 of 299 2021-01-17
Response Parameters Description
Parameter
Range
Type
Description
IP Start Address
N/A
IP Address
It specifies the current IP Start address for DHCP server in AP mode.
IP End Address
N/A
IP Address
It specifies the current IP End address for DHCP server in AP mode.
Lease time
1-4294967295
Integer
It specifies the current lease time for DHCP server in AP mode.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+DPNADSC? +DPNADSC:192.168.3.5,192.168.3.250,86400000 OK
5.3.2. AP Static IP configuration - +DPNAIPC
Description
This command sets the IP configurations for AP.
Pre-requisites
None.
Syntax
AT+DPNAIPC=<IP Address>,<IP Mask>,<IP Gateway>
Parameters Description
Parameter
Value
Format
Description
IP Address
Range: N/A
IP Address
It specifies the static IP address of the interface in AP mode.
IP Mask
Range: N/A
IPv4 Address
It specifies the static net mask of the interface in AP mode.
IP Gateway
Range: N/A
IP Address
It specifies the static gate way of the interface in AP mode.
Status
For all possible status responses refer Table 4: Status Responses
Example
Page 65
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 65 of 299 2021-01-17
Serial2Wireless APP AT&F OK above commands are just to make sure that profile parameters are set to default. by giving below commands user can change same default profile parameters. AT+DPNAWC="prasad","password","NONE","NONE",1,0,100,3,0 OK AT+DPNADSC=192.168.23.24,192.168.23.55,86400000 OK AT+DPNAIPC=192.168.23.2,255.255.255.0,192.168.23.1 OK ATC1 OK AT&w0 OK AT+ysr OK Serial2Wireless APP +YPAP:SUCCESS,192.168.23.2,255.255.255.0,192.168.23.1
Following command is used to get the AP IP configurations.
Syntax
AT+DPNAIPC?
Response
+DPNAIPC:<IP address>, <Subnet address>, <Gateway address>
Response Parameters Description
Parameter
Range
Type
Description
IP Address
N/A
IP Address
It specifies the current IP address.
Subnet address
N/A
IP Address
It specifies the current Subnet mask address.
Gateway address
N/A
IP Address
It specifies the current Gateway address.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+DPNAIPC? +DPNAIPC:192.168.3.45,255.255.255.0,192.168.3.1 OK
Page 66
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 66 of 299 2021-01-17
5.3.3. AP WLAN configuration - +DPNAWC
Description
This command sets the AP configurations in profile.
Pre-requisites
None.
Syntax
AT+DPNAWC=<SSID>,[<PWD>,<Auth>,<Enc>],<Channel>,[<Hidden SSID>,<Beacon
Interval>,<DTIM Period>,<WPS>]
Parameters Description
Paramet er
Value
Form at
Description
SSID
Range: 1-32
String
It specifies the SSID of the AP.
PWD
Range: 8-64 Default:
String
It specifies password of the AP
Auth
Range: 4 Default:
String
It specifies the type of security and types are:
"NONE", "WPA2".
Enc
Range: 1-4 Default:
String
It specifies the type of encryption and the types are:
"NONE", "AES".
Channe l
Range: 1­14,36,40,44,48,52,56,60,64,100,104,108,112,116,132,136,140,149,15 3,157,161,165
Integ er
It specifies the channel number of the network.
Hidden SSID
Range: 0-1 Default: 0
Integ er
It specifies the hidden SSID flag for a network.
0 - disables the hidden SSID
1 - enables the hidden SSID
Page 67
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 67 of 299 2021-01-17
Beacon Interval
Range: 100-1000 Default: 100
Integ er
It specifies the interval between the beacon frames in TU (unit of time equal to 1024 microsecond s). It is not supported
DTIM Period
Range: 1-255 Default: 1
Integ er
It specifies the DTIM (Delivery Traffic Indication Map) count. It is not supported
WPS
Range: 0-1 Default: 0
Integ er
It specifies the WPS support for a network, where:
0-Disables WPS,
1-Enables WPS.
Note: WPS in AP mode is not supported.
Status
For all possible status responses refer Table 4: Status Responses
Example
Serial2Wireless APP AT&F OK above commands are just to make sure that profile parameters are set to default. by giving below commands user can change same default profile parameters. AT+DPNAWC="prasad","password","NONE","NONE",1,0,100,3,0 OK AT+DPNADSC=192.168.23.24,192.168.23.55,86400000 OK AT+DPNAIPC=192.168.23.2,255.255.255.0,192.168.23.1 OK ATC1
Page 68
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 68 of 299 2021-01-17
OK AT&w0 OK AT+ysr OK Serial2Wireless APP +YPAP:SUCCESS,192.168.23.2,255.255.255.0,192.168.23.1
Following command is used to get the AP configurations.
Syntax
AT+DPNAWC?
Response
+DPNAWC:<SSID>, <PWD>, <Auth>, <Enc>, <Channel><Hidden SSID>, <Beacon Interval>,
<DTIM Period>, <WPS support>
Response Parameters Description
Parameter
Range
Type
Description
SSID
1-32
String
It specifies the SSID.
PWD
8-64
String
It specifies the password.
Auth
N/A
None, WPA2
It specifies set Authentication type.
Enc
N/A
None, AES
It specifies set Encryption type.
Channel
1-14
Integer
It specifies the operating channel in AP mode.
Hidden SSID
0-1
Integer
It specifies the status of hidden SSID feature in AP mode.
Beacon Interval
100-1000
Integer
It specifies the current beacon interval value in AP mode.
DTIM Period
1-255
Integer
It specifies the current DTIM count in AP mode.
WPS support
0-1
Integer
It specifies the current WPS support in AP mode.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+DPNAWC?
Page 69
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 69 of 299 2021-01-17
+DPNAWC:"SSID","Password","NONE","NONE",1,0,100,3,0 OK
5.3.4. Station Static IP configuration - +DPNSIPC
Description
This command sets the station IP configuration
Pre-requisites
None.
Syntax
AT+DPNSIPC=<IP Flag>,[<IP Address>,<IP Mask>,<IP Gateway>,<DNS Primary Server>,<DNS
Secondary Server>]
Parameters Description
Parameter
Value
Format
Description
IP Flag
Range: 1-2
Integer
It specifies the IP configuration, where: 1-Static mode that requires all the optional
parameters, 2-Dynamic mode, where DHCP is enabled.
IP Address
Range: N/A Default: N/A
IP Address
It specifies the static IPV4 address of the interface in Station mode.
IP Mask
Range: N/A Default: N/A
IPv4 Address
It specifies the static net mask of the interface in Station mode.
IP Gateway
Range: N/A Default: N/A
IP Address
It specifies the static gate way of the interface in Station mode.
DNS Primary Server
Range: N/A Default: N/A
IP Address
It specifies the Primary DNS server address.
DNS Secondary Server
Range: N/A Default: N/A
IP Address
It specifies the Secondary DNS server address.
Status
For all possible status responses refer Table 4: Status Responses
Example
Serial2Wireless APP AT&F OK above commands are just to make sure that profile parameters are set to default. by giving below commands user can change same default profile parameters. AT+DPNSWC=0,"prasad",,"NONE","NONE",6
Page 70
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 70 of 299 2021-01-17
OK AT+DPNSIPC=1,192.168.1.130,255.255.255.0,192.168.1.1,192.168.1.1,192.168.1.1 OK AT+DPSRC=5,6000,20,6000,5,20 OK ATC1 OK AT&w0 OK AT+ysr OK Serial2Wireless APP +YPSTA:SUCCESS,192.168.1.130,255.255.255.0,192.168.1.1
Following command is used to get the STA IP configurations.
Syntax
AT+DPNSIPC?
Response
+DPNSIPC:<IP flag>,<IP address>, <Subnet address>, <Gateway address>, <DNS1>, <DNS2>
Response Parameters Description
Parameter
Range
Type
Description
IP flag
N/A
Integer
It specifies the IP flag.
IP Address
N/A
IP Address
It specifies the current IP address.
Subnet address
N/A
IP Address
It specifies the current Subnet mask address.
Gateway address
N/A
IP Address
It specifies the current Gateway address.
DNS1 address
N/A
IP Address
It specifies the Primary DNS server address
DNS2 address
N/A
IP Address
It specifies the Secondary DNS server address.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+DPNSIPC? +DPNSIPC:1,192.168.3.45,255.255.255.0,192.168.3.1,192.168.3.1,0.0.0.0 OK
Page 71
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 71 of 299 2021-01-17
5.3.5. Station Retry configuration - +DPSRC
Description
This command sets the configurations of retry counts and intervals for L2 , L3 and L4 connections.
Pre-requisites
None.
Syntax
AT+DPSRC=[<Scan retry count>,<Scan retry time delay>,<L3 retry count>,<L3 retry delay
time>,<L4 retry count>,<L4 retry delay time>]
Parameters Description
Parameter
Value
Format
Description
Scan retry count
Range: 1­65535
Default: 3
Integer
It specifies the scan retry count before connection.
Scan retry time delay
Range: 5000­65535
Default: 5000
Integer
It specifies the time between scan retries in milliseconds.
L3 retry count
Range: 1­65535
Default: 10
Integer
It specifies the L3 retry count, when the device is in STA mode.
L3 retry delay time
Range: 5000­65535
Default: 5000
Integer
It specifies the time between L3 retries in milliseconds.
L4 retry count
Range: 1­65535
Default: 3
Integer
It specifies the L4 retry count when device is in STA mode.
L4 retry delay time
Range: 1­65535
Default: 1000
Integer
It specifies the time between L4 retries in milliseconds.
Status
For all possible status responses refer Table 4: Status Responses
Example
Serial2Wireless APP AT&F OK above commands are just to make sure that profile parameters are set to default. by giving below commands user can change same default profile parameters. AT+DPNSWC=0,"prasad",,"NONE","NONE",6 OK
Page 72
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 72 of 299 2021-01-17
AT+DPNSIPC=1,192.168.1.130,255.255.255.0,192.168.1.1,192.168.1.1,192.168.1.1 OK AT+DPSRC=5,6000,20,6000,5,20 OK ATC1 OK AT&w0 OK AT+ysr OK Serial2Wireless APP +YPSTA:SUCCESS,192.168.1.130,255.255.255.0,192.168.1.1
Following command is used to get the Retry configurations in an STA mode.
Syntax
AT+DPSRC?
Response
+DPSRC:<Scan Retry Cnt>,<Scan Retry Delay>,<L3 Retry Cnt>,<L3 Retry Delay>,<L4 Retry
Cnt>,<L4 Retry Delay>,
Response Parameters Description
Parameter
Range
Type
Description
Scan Retry Cnt
N/A
Integer
It specifies the scan retry count in STA mode set in Profile.
Scan Retry Delay
N/A
Integer
It specifies the scan retry delay in msec in STA mode set in Profile.
L3 Retry Cnt
N/A
Integer
It specifies the L3 retry count in STA mode set in Profile.
L3 Retry Delay
N/A
Integer
It specifies the L3 retry delay in msec in STA mode set in Profile.
L4 Retry Cnt
N/A
Integer
It specifies the L4 retry count in STA mode set in Profile.
L4 Retry Delay
N/A
Integer
It specifies the L4 retry delay in msec in STA mode set in Profile.
Status
For all possible status responses refer Table 4: Status Responses
Example
Page 73
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 73 of 299 2021-01-17
AT+DPSRC? +DPSRC:5,6000,20,6000,5,20 OK
5.3.6. Station WLAN configuration - +DPNSWC
Description
This command sets the STA configurations in profile.
Pre-requisites
None.
Syntax
AT+DPNSWC=[<ID>],<SSID>,[<PWD>,<Auth>,<Enc>,<Channel>]
Parameters Description
Paramet er
Value
Form at
Description
ID
Range: 0 Default: 0
Integ er
It specifies the ID at which the STA configuratio n is to be set, in current implementati on ID supports only 0
SSID
Range: 1-32
String
It specifies the SSID of the AP to connect.
PWD
Range: 8-64 Default:
String
It specifies password of the AP
Auth
Range: 1-4 Default:
String
It specifies the type of security and types are:
"NONE", "WPA", "WPA2".
Enc
Range: 1-4 Default:
String
It specifies the type of encryption and the types are:
"NONE",
Page 74
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 74 of 299 2021-01-17
"TKIP", "AES".
Channe l
Range: 0,1­14,36,40,44,48,52,56,60,64,100,104,108,112,116,132,136,140,149,15 3,157,161,165
Default: 0
Integ er
It specifies the channel number of the network.
Status
For all possible status responses refer Table 4: Status Responses
Example
Serial2Wireless APP AT&F OK above commands are just to make sure that profile parameters are set to default. by giving below commands user can change same default profile parameters. AT+DPNSWC=0,"prasad",,"NONE","NONE",6 OK AT+DPNSIPC=1,192.168.1.130,255.255.255.0,192.168.1.1,192.168.1.1,192.168.1.1 OK AT+DPSRC=5,6000,20,6000,5,20 OK ATC1 OK AT&w0 OK AT+ysr OK Serial2Wireless APP +YPSTA:SUCCESS,192.168.1.130,255.255.255.0,192.168.1.1
Following command is used to get the STA configurations.
Syntax
AT+DPNSWC?
Response
+DPNSWC:<ID>, <SSID>, <PWD>, <Auth>, <Enc>, <channel>>
Response Parameters Description
Paramet er
Range
Type
Description
ID 0 Integ er
It specifies the ID of the configuratio
Page 75
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 75 of 299 2021-01-17
n.
SSID
1-32
String
It specifies the SSID.
PWD
8-64
String
It specifies the password.
Auth
N/A
None , WPA, WPA 2
It specifies set Authenticati on type.
Enc
N/A
None , TKIP, AES
It specifies set Encryption type.
Channel
0,1­14,36,40,44,48,52,56,60,64,100,104,108,112,116,132,136,140,149,153 ,157,161,165
Integ er
It specifies the operating channel in AP mode.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+DPNSWC? +DPNSWC:0,"SSID","Password","NONE","NONE",6 OK
5.3.7. Update TCP Profile - +DPTC
Description
This command saves the TCP configuration in the profile. Maximum 16 sockets (TCP and UDP
together) can be stored in profile
Pre-requisites
None.
Syntax
AT+DPTC=<index number>,<Add Delete>,[<Enable>,<IO Interface Id>,<network Interface
Id>,<Family>,<Autoflag>,<LPort>,<Remote IP address>,<Remote Port>,<client or server>]
Parameters Description
Parameter
Value
Format
Description
index number
Range: 0-15
Integer
It specifies the configuration number, it should be in sequence,
user can modify any existing configurations by using its configuration number
it should be either within available numbers or new
Page 76
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 76 of 299 2021-01-17
one in sequence.
Add Delete
Range: 0-1
Integer
It specifies if the configuration is to be added or deleted.
0 to add and 1 to delete.
Enable
Range: 0-1 Default: 1
Integer
It specifies if the configuration is to be enable or disable when the profile applies.
0-disable, 1-enable,If add-delete filed is set to add, then this parameter is mandatory.
IO Interface Id
Range: 1-3 Default: 3
Integer
It specifies the I/O Interface to use, 1-SPI, 2-SDIO, 3-UART.
If add-delete filed is set to add, then this parameter is mandatory.
network Interface Id
Range: 0-2 Default: 2
Integer
It specifies the Interface to use, 0-STA, 1-AP, 2­Any.
If add-delete filed is set to add, then this parameter is mandatory.
Family
Range: 2-5 Default: 2
Integer
It specifies communications domain in which a socket is to be created,
2 - (IPv4), 3 - (IPv6), 4 - (IPv4 and IPv6), 5 - (packet). If add-delete parameter is set to add, this filed is
mandatory.
Autoflag
Range: 0-2 Default: 0
Integer
It specifies if user wants this socket to use it in Auto Recv mode.
in case of TCP server it is auto accept the connections.
0 - disable recv ready/ in case of TCP server disables auto accept
1 - enable auto receive/ in case of TCP server enables auto accept
2 - enable receive ready but not auto receive. If add-delete parameter is set to add, this filed is
mandatory.
LPort
Range: 0­65535
Default: 0
Integer
It specifies the local port number to bind. If add-delete parameter is set to add, this filed is
mandatory.
Remote IP address
Range: N/A Default:
IP Address
It specifies the remote IP address. This parameter is mandatory only in case of TCP
client.If add-delete parameter is set to add, this filed is mandatory.
Page 77
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 77 of 299 2021-01-17
Remote Port
Range: 0­65535
Default: 0
Integer
It specifies the remote port. This parameter is mandatory only in case of TCP
client.If add-delete parameter is set to add, this filed is mandatory.
client or server
Range: 1-3 Default:
Integer
It specifies the server or client. 1-TCP server 2-TCP client If add-delete parameter is set to add, this filed is
mandatory.
Status
For all possible status responses refer Table 4: Status Responses
Example
Serial2Wireless APP AT&F OK above commands are just to make sure that profile parameters are set to default. by giving below commands user can change same default profile parameters. AT+DPNSWC=0,"prasad",,"NONE","NONE",6 OK AT+DPNSIPC=1,192.168.1.130,255.255.255.0,192.168.1.1,192.168.1.1,192.168.1.1 OK AT+DPSRC=5,6000,20,6000,5,20 OK AT+DPTC=0,0,1,3,0,2,1,8344,192.168.1.128,8366,2 OK ATC1 OK AT&w0 OK AT+ysr OK Serial2Wireless APP +YPSTA:SUCCESS,192.168.1.130,255.255.255.0,192.168.1.1 +YPTCP:SUCCESS,0,CLIENT,8344,192.168.1.128,8366
Following command is used to get the TCP configurations.
Syntax
AT+DPTC?
Response
+DPTC:<Index>,<Enable>,<IO type>,<nwk if>,<Family>,<Auto>,<Local Port>,<IP address>,
<Remote Port>, <client or server>>
Page 78
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 78 of 299 2021-01-17
Response Parameters Description
Parameter
Range
Type
Description
Index number
0-15
Integer
It specifies the configuration Index.
Enable
0-1
Integer
It specifies whether the configuration is Enabled or Disabled.
IO type
1-3
Integer
It specifies the I/O Interface to use
nwk interface
0-2
Integer
It specifies the Interface to use.
Family
2-5
Integer
It specifies communications domain in which a socket is to be created.
Autoflag
0-2
Integer
It specifies if the configuration will be enabled Auto receive or not.
Local Port
1-65535
Integer
It specifies the local port to use.
Remote IP address
N/A
IP Address
It specifies the remote IP address to use.
Remote Port
1-65535
Integer
It specifies the remote port to use.
client or server
1-2
Integer
It specifies the server or client
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+DPTC? +DPTC:0,1,2,0,2,2,1234,192.168.3.45,5678,2 OK
5.3.8. Update UDP Profile - +DPUC
Description
This command saves the UDP configuration in the profile. Maximum 16 sockets (TCP and UDP
together) can be stored in profile
Pre-requisites
None.
Syntax
Page 79
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 79 of 299 2021-01-17
AT+DPUC=<index number>,<Add Delete>,[<Enable>,<IO Interface Id>,<network Interface
Id>,<Family>,<Autoflag>,<LPort>]
Parameters Description
Parameter
Value
Format
Description
index number
Range: 0-15
Integer
It specifies the configuration number, it should be in sequence,
user can modify any existing configurations by using its configuration number
it should be either within available numbers or new one in sequence.
Add Delete
Range: 0-1
Integer
It specifies if the configuration is to be added or deleted.
0 to add and 1 to delete.
Enable
Range: 0-1 Default: 1
Integer
It specifies if the configuration is to be enable or disable when the profile applies.
0-disable, 1-enable,If add-delete filed is set to add, then this parameter is mandatory.
IO Interface Id
Range: 1-3 Default: 3
Integer
It specifies the I/O Interface to use, 1-SPI, 2-SDIO, 3-UART.
If add-delete filed is set to add, then this parameter is mandatory.
network Interface Id
Range: 0-2 Default: 2
Integer
It specifies the Interface to use, 0-STA, 1-AP, 2­Any.
If add-delete filed is set to add, then this parameter is mandatory.
Family
Range: 2-5 Default: 2
Integer
It specifies communications domain in which a socket is to be created,
2 - (IPv4), 3 - (IPv6), 4 - (IPv4 and IPv6), 5 - (packet). If add-delete parameter is set to add, this filed is
mandatory.
Autoflag
Range: 0-2 Default: 0
Integer
It specifies if user wants this socket to use it in Auto Recv mode.
0 - disable recv ready 1 - enable auto receive 2 - enable receive ready but not auto receive If add-delete filed is set to add, then this parameter
is mandatory.
LPort
Range: 0­65535
Integer
It specifies the local port number to bind. If add-delete filed is set to add, then this parameter
Page 80
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 80 of 299 2021-01-17
Default: 0
is mandatory.
Status
For all possible status responses refer Table 4: Status Responses
Example
Serial2Wireless APP AT&F OK above commands are just to make sure that profile parameters are set to default. by giving below commands user can change same default profile parameters. AT+DPNSWC=0,"prasad",,"NONE","NONE",6 OK AT+DPNSIPC=1,192.168.1.130,255.255.255.0,192.168.1.1,192.168.1.1,192.168.1.1 OK AT+DPSRC=5,6000,20,6000,5,20 OK AT+DPUC=0,0,1,3,0,2,1,8344 OK ATC1 OK AT&w0 OK AT+ysr OK Serial2Wireless APP +YPSTA:SUCCESS,192.168.1.130,255.255.255.0,192.168.1.1 +YPUDP:SUCCESS,0,8344
Following command is used to get the UDP configurations.
Syntax
AT+DPUC?
Response
+DPUC:<Index>,<Enable>,<IO type>,<nwk if>,<Family>,<Auto>,<Local Port>
Response Parameters Description
Parameter
Range
Type
Description
index number
0-15
Integer
It specifies the configuration Index.
Enable
0-1
Integer
It specifies whether the configuration is Enabled or Disabled.
Page 81
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 81 of 299 2021-01-17
IO type
1-3
Integer
It specifies the I/O Interface to use
nwk interface
0-2
Integer
It specifies the Interface to use.
Family
2-5
Integer
It specifies communications domain in which a socket is to be created.
Autoflag
0-2
Integer
It specifies if the configuration will be used in Auto mode or not.
Local Port
1-65535
Integer
It specifies the local port to use.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+DPUC? +DPUC:0,1,3,0,2,1,8344 OK
5.4. Real Time Clock (RTC) Settings
System has a real time clock. The time can be set and get from it. The time is kept till the power is supplied to the system, across different power save mode.
Upon power on, the RTC sets the default time to 01/01/2000,00:00:00+05. User must configure the time to the correct value manually issuing the AT command or user can start NTP to get the time from the NTP server.
Once the device boots up, the system time would set to a default value and the time starts running. If the user sets the time, then the current running time will be updated with the time given as input by issuing this command.
5.4.1. Time Settings - +YTIME
Description
This command is used to set and get time from the RTC module in Julian format. To get the
system Time, it is to be set once.
Pre-requisites
None.
Syntax
AT+YTIME=<Absolute Time>
Parameters Description
Parameter
Value
Format
Description
Page 82
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 82 of 299 2021-01-17
Absolute Time
Range: 1-32
String
It specifies the absolute time to be set in Julian format.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+YTIME="09/01/2018,11:15:00+04" OK
Following command is used to get time from RTC module:
Syntax
AT+YTIME?
Response Parameters Description
Parameter
Range
Type
Description
time
String
It specifies the UTC time in Julian format.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+YTIME? +YTIME:"01/01/2000,02:00:45+05"
5.5. Power Save
5.5.1. Standby - +YPS
Description
This command puts the system into different power save modes.
Pre-requisites
None.
Syntax
AT+YPS=<Mode>,[<Duration>]
Parameters Description
Parameter
Value
Format
Description
Mode
Range: 0-3
Integer
It specifies the power save mode, where: 0-Disables sleep mode, 1-Enables sleep mode, 2-Enables deep-sleep, in this mode-the serial IO
turns off and the system wakes up only when there is any network event in L4 that is occurred, or if any timer interrupt occurs or if wakeup event is received from GPIO 8.
Page 83
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 83 of 299 2021-01-17
3-Puts the system in standby mode. It is necessary to specify the next parameter to set the duration to go to standby.
Duration
Range: 0,100­131072000
Default: 1000
Integer
It specifies the time in msec.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+YPS=3,1000
5.6. Heap Information - +YHD
Description
This command gets information on total heap size and the memory available for allocation. The
memory available for allocation is in fragments which results in malloc function to fail, though the requested memory to allocate is less than the available memory.
Pre-requisites
None.
Syntax
AT+YHD
Response
+YFD:<Total heap size>,<Free memory>
Response Parameters Description
Parameter
Range
Type
Description
Total heap size
0-204800
Integer
It specifies the total heap size.
Free memory
0-204800
Integer
It specifies the total available free memory in heap.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+YHD +YFD:102400,9024 OK
5.7. Heap Information List - +YHLD
Description
This command prints the current allocated memory. For appropriate results, the
M2MB_HEAP_DEBUG in the system is enable during binary compilation.
Page 84
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 84 of 299 2021-01-17
Pre-requisites
None.
Syntax
AT+YHLD
Status
For all possible status responses refer Table 4: Status Responses
Example
To get the length a file. AT+YHLD File = ../../m2mb/nwk/tr50/tr50.message.c, line = 45, size = 72 File = ../../m2mb/nwk/tr50/util/tr50.json.c, line = 62, size = 6 File = ../../m2mb/nwk/tr50/util/tr50.json.c, line = 69, size = 56 EmptyList!! OK
5.8. Reset - +YSR
Description
This command performs a soft reset.
Pre-requisites
None.
Syntax
AT+YSR
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+YSR Serial2Wireless APP
5.9. Manufacturer's Name - +CGMI
Description
This command reads the manufacturer's name.
Pre-requisites
None.
Syntax
AT+CGMI
Response
<Manufacturer Name>
Response Parameters Description
Page 85
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 85 of 299 2021-01-17
Parameter
Range
Type
Description
Manufacturer Name
String
It specifies the manufacturer's name.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+CGMI Telit OK
5.10. Module Name - +CGMM
Description
This command reads the name of the Module.
Pre-requisites
None.
Syntax
AT+CGMM
Response
<Module Name>
Response Parameters Description
Parameter
Range
Type
Description
Module Name
7
String
It specifies name of the module.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+CGMM WL865E4 OK
5.11. Modem Version - +CGMR
Description
This command reads the version number of the Modem.
Pre-requisites
None.
Syntax
Page 86
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 86 of 299 2021-01-17
AT+CGMR
Response
<Modem Version>
Response Parameters Description
Parameter
Range
Type
Description
Modem Version
10
String
It specifies the current modem version.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+CGMR M0G.000002 OK
5.12. Package Version - #SWPKGV
Description
This command reads all the available version details of the package.
Pre-requisites
None.
Syntax
AT#SWPKGV
Response
<Module Version>, <Modem Version>, <Package Version>, <Application Version>, <Source Code
Version>
Response Parameters Description
Parameter
Range
Type
Description
Module Version
20-25
String
It specifies the current Wi-Fi software version of the module.
Modem Version
10
String
It specifies the current version of the modem.
Package Version
10
String
It specifies current version of the software package.
Application Version
10
String
It specifies current Telit application version.
Source Code Version
10
String
It specifies the version
Page 87
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 87 of 299 2021-01-17
of ADC source code.
BLE FW Version
10
String
It specifies current BLE software version of the module.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT#SWPKGV
36.07.000-B010-P0G.000000 M0G.000002 P0G.000000 A0G.000002 A0G.000002 B0G.000002 OK
5.13. Version - +YVER
Description
This command is used to get the version number of the software.
Pre-requisites
None.
Syntax
AT+YVER
Response
+YVER:<VERSION>
Response Parameters Description
Parameter
Range
Type
Description
Version
9-14
String
It specifies the Version number of software.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+YVER +YVER:"36.07.000-B013" OK
Page 88
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 88 of 299 2021-01-17
5.14. Shut Down - +NSHUTDOWN
Description
This command is used to close all sockets and shutdown the network.
Pre-requisites
Syntax
AT+NSHUTDOWN
Status
For all possible status responses refer ResponseCodes
Example
AT+NSHUTDOWN
OK
Page 89
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 89 of 299 2021-01-17
6. NETWORK CONNECTION MANAGER
6.1. Wireless Network Connection Manager (WNCM)
NCM supports commands to set the module in Station mode and to connect to a configured Wi-Fi network. It does L2 and L3 level connection.
It also supports commands to create a network - initializes the AP mode and enable DHCP server to assign IP address to the connecting devices. Commands to configure station and AP mode is also supported. Station mode and AP mode can be configured to run simultaneously.
Following is the sequential execution of the AT commands:
1. AT+WNI
2. AT+WNCN
3. AT+WNIPC
4. AT+WNAPC
5. AT+WNAPIPC
6. AT+WNCR
7. AT+WNDC
8. AT+WNIFCFG
9. AT+WNAPST
10. AT+WNSTAST
11. AT+WNASTINFO
Sequential execution in Station mode:
AT+WNI=0 AT+WNIPC [By default the IP configuration will be through DHCP] is not needed or AT+WNIPC=1,2,,,,”hostname”[setting hostname with DHCP enabled] or AT+WNIPC=1,1,192.168.45.3,255.255.255.0,192.168.45.1,”hostname” [setting static IP and hostname] AT+WNCN=1,”test_ap”,”12345678”
Sequential execution in AP mode:
AT+WNI=1 AT+WNAPC=0,1,200,3,0 AT+WNIPC=0,1,192.168.45.3,255.255.255.0,192.168.45.1 AT+WNAPIPC=0,192.168.45.4,192.168.45.25,86400000 AT+WNCR=0,”telit_ap”,6,”WPA2”,”AES”,”12345678”
6.1.1. NCM Initialize - +WNI
Description
This command initializes the NCM module and the WLAN module internally.
Pre-requisites
None
Syntax
AT+WNI=<Mode>
Parameters Description
Page 90
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 90 of 299 2021-01-17
Parameter
Value
Format
Description
Mode
Range: 0-1
Integer
It specifies the mode of the NCM module, where: 0-Enables Station mode, 1-Enables AP mode.
Response
+WNI:<WHandle>
Response Parameters Description
Parameter
Range
Type
Description
WHandle
0-1
Integer
It specifies the handle which used in the next NCM AT commands.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+WNI=1 +WNI:0 OK
6.1.2. NCM De-initialize - +WNDI
Description
This command is used to de-initialize the NCM module.
Pre-requisites
AT+WNDC command should be issued, provided the device is in connected state.
Syntax
AT+WNDI=<WHandle>
Parameters Description
Parameter
Value
Format
Description
WHandle
Range: 0-1
Integer
It specifies the WHandle obtained after issuing AT+WNI command.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+WNDI=1 OK
Page 91
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 91 of 299 2021-01-17
6.1.3. Configure Station Mode - +WNSTAC
Description
This command sets the Station mode configurations. It should be issued before AT+WNCN
command, else default values will be taken.
Pre-requisites
AT+WNI=0 command should be issued.
Syntax
AT+WNSTAC=<WHandle>,[<Listen interval>,<Keep alive interval>,<WPS flag>,<Method>,<Pin>]
Parameters Description
Parameter
Value
Format
Description
WHandle
Range: 0-1
Integer
It specifies the WHandle obtained after issuing AT+WNI command.
Listen interval
Range: 1-50 Default: 1
Integer
It specifies the listen interval in station mode in number of beacon intervals.
Keep alive interval
Range: 0-255 Default: 0
Integer
It specifies the keep alive interval in STA mode after connection in seconds.
WPS flag
Range: 0-1 Default: 0
Integer
It specifies the WPS support in Station mode, where:
0-Disables WPS support, 1-Enables WPS support. If WPS flag is enabled, then the module uses WPS
method to join the network by executing the command AT+WNCN. Also, the SSID in the command AT+WNCN is not necessary to provide.
Method
Range: 0-1 Default: 1
Integer
It specifies the method used for WPS procedure, where:
0-for PIN method, 1-for PUSH method.
Pin
Range: 8 Default: N/A
String
It specifies the pin used in WPS PIN method during the parameter "Method" selection.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+WNSTAC=1,100,0,0,0 OK
Following command is used to get the STA related configurations.
Syntax
Page 92
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 92 of 299 2021-01-17
AT+WNSTAC?
Response
+WNSTAC:<Listen interval>, <Keep alive interval>, <WPS support>, <WPS method>, <Pin>
Response Parameters Description
Parameter
Range
Type
Description
Listen interval
1-50
Integer
It specifies the value of the current listen interval in Station mode in number of beacon intervals.
Keep alive interval
0-255
Integer
It specifies the value of the current keep alive interval in Station mode in seconds.
WPS support
0-1
Integer
It specifies the method used for WPS support in STA mode.
Method
0-1
Integer
It specifies the method used for WPS procedure. This value is considered only when WPS support in enabled.
Pin
N/A
String
It specifies the current value of the pin in WPS pin method.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+WNSTAC? +WNSTAC:100,0,0,0,"" OK
6.1.4. Configure AP Mode - +WNAPC
Description
This command sets the AP configurations. It must be executed before AT+WNCR command, else
will take default values.
Pre-requisites
AT+WNI=1 command is mandatory.
Syntax
AT+WNAPC=<WHandle>,[<Hidden SSID>,<Beacon Interval>,<DTIM Period>,<WPS>]
Parameters Description
Page 93
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 93 of 299 2021-01-17
Parameter
Value
Format
Description
WHandle
Range: 0-1
Integer
It specifies the WHandle obtained after issuing AT+WNI command.
Hidden SSID
Range: 0-1 Default: 0
Integer
It specifies the hidden SSID flag for a network. 0 - disables the hidden SSID 1 - enables the hidden SSID
Beacon Interval
Range: 100­1000
Default: 100
Integer
It specifies the interval between the beacon frames in TU (unit of time equal to 1024 microseconds).
DTIM Period
Range: 1-255 Default: 3
Integer
It specifies the DTIM (Delivery Traffic Indication Map) count.
WPS
Range: 0-1 Default: 0
Integer
It specifies the WPS support for a network, where: 0-Disables WPS, 1-Enables WPS.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+WNAPC=0,0,100,3,1 OK
Following command is used to get the AP related configurations.
Syntax
AT+WNAPC?
Response
+WNAPC:<Hidden SSID>, <Beacon Interval>, <DTIM Period>, <WPS support>
Response Parameters Description
Parameter
Range
Type
Description
Hidden SSID
0-1
Integer
It specifies the status of hidden SSID feature in AP mode.
Beacon Interval
100-1000
Integer
It specifies the current beacon interval value in AP mode.
DTIM Period
1-255
Integer
It specifies the current DTIM count in AP mode.
WPS support
0-1
Integer
It specifies the current WPS support in AP mode.
Page 94
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 94 of 299 2021-01-17
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+WNAPC? +WNAPC:0,100,3,0 OK
6.1.5. Configure IP Address - +WNIPC
Description
This command sets the static IP configurations.
Pre-requisites
AT+WNI command should be issued.
Syntax
AT+WNIPC=<WHandle>,<IP Flag>,[<IP Address>,<IP Mask>,<IP Gateway>,<Host Name>]
Parameters Description
Parameter
Value
Format
Description
WHandle
Range: 0-1
Integer
It specifies the WHandle obtained after issuing AT+WNI command.
IP Flag
Range: 1-2
Integer
It specifies the IP configuration, where: 1-Static mode that requires all the optional
parameters, 2-Dynamic mode, where DHCP is enabled, its the
optional parameter is not necessary and the Host name is specified to use.
Note:
1). In STA mode, DHCP is set by default.
2). In AP mode, user must set the flag to 1.
IP Address
Range: N/A Default: N/A
IP Address
It specifies the static IPV4 address of the interface in either Station or AP mode.
IP Mask
Range: N/A Default: N/A
IPv4 Address
It specifies the static net mask of the interface in Station or AP mode.
IP Gateway
Range: N/A Default: N/A
IP Address
It specifies the static gate way of the interface in Station or AP mode.
Host Name
Range: 0-32 Default:
Telit_Device
String
It specifies the host name of the interface in Station or AP mode.
Status
Page 95
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 95 of 299 2021-01-17
For all possible status responses refer Table 4: Status Responses
Example
AT+WNIPC=0,1,"192.168.23.2","255.255.255.0","192.168.23.1","Telit_Device" OK
6.1.6. Configure IP Address in AP Mode - +WNAPIPC
Description
This command sets the DHCP server configuration in AP mode.
Pre-requisites
AT+WNIPC command should be issued.
Syntax
AT+WNAPIPC=<WHandle>,<IP Start Address>,<IP End Address>,<Lease Time>
Parameters Description
Parameter
Value
Format
Description
WHandle
Range: 0-1
Integer
It specifies the WHandle obtained after issuing AT+WNI command.
IP Start Address
Range: N/A
IP Address
It specifies the starting IP address allocated to the connected stations. This address must have the same network ID as that of the IP address configured in the At command +WNIPC.
IP End Address
Range: N/A
IP Address
It specifies the end IP address until which the connected STAs will get IP addresses. The end IP address must have the host ID greater than the host ID given in the start address.
Lease Time
Range: 1­4294967295
Integer
It specifies the lease time in seconds for the DHCP server.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+WNAPIPC=0,192.168.23.24,192.168.23.55,86400000 OK
Following command is used to get the DHCP server configurations of an AP.
Syntax
AT+WNAPIPC?
Response
+WNAPIPC:<IP Start Address>,<IP End Address>,<Lease time>
Response Parameters Description
Parameter
Range
Type
Description
Page 96
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 96 of 299 2021-01-17
IP Start Address
N/A
IP Address
It specifies the current IP Start address for DHCP server in AP mode.
IP End Address
N/A
IP Address
It specifies the current IP End address for DHCP server in AP mode.
Lease time
1-4294967295
Integer
It specifies the current lease time for DHCP server in AP mode.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+WNAPIPC? +WNAPIPC:192.168.3.5,192.168.3.250,86400000 OK
6.1.7. NCM Create - +WNCR
Description
This command is used to create a network.
Pre-requisites
AT+WNAPIPC command should be issued.
Syntax
AT+WNCR=<WHandle>,<SSID>,<Channel>,<Security Type>,<Encryption Type>,[<PassPhrase>]
Parameters Description
Parameter
Value
Format
Description
WHandle
Range: 0-1
Integer
It specifies the WHandle obtained after issuing AT+WNI command.
SSID
Range: 1-32
String
It specifies the SSID of the network.
Channel
Range: 1­14,36,40,44,48,149,153,157,161,165
Integer
It specifies the channel number of the network.
Security Type
Range: N/A
String
It specifies the type of security and types are:
"NONE", "WPA", "WPA2".
Page 97
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 97 of 299 2021-01-17
Encryption Type
Range: N/A
String
It specifies the type of encryption and the types are:
"NONE", "TKIP", "AES".
PassPhrase
Range: 8-64 Default: N/A
String
It specifies the pass phrase for a secured network.
Response
+WNCR:<Create status>
Response Parameters Description
Parameter
Range
Type
Description
Create status
N/A
Not created, Created
It specifies the status of the AP mode.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+WNCR=0,"Telit_Guest",6,"WPA","TKIP","12345678" +WNCR:CREATED OK
Following command is used to get the status of current AP mode.
Syntax
AT+WNCR?
Response
+WNCR:<Create status>
Response Parameters Description
Parameter
Range
Type
Description
Create status
N/A
Not created, Created
It specifies the status of the AP mode.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+WNCR? +WNCR:CREATED OK
Page 98
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 98 of 299 2021-01-17
6.1.8. NCM Retry Count - +WNRETRYC
Description
This command sets the configurations to retry counts and intervals at L2 , L3 and L4 connections.
Pre-requisites
AT+WNI=0 command should be issued.
Syntax
AT+WNRETRYC=<WHandle>,[<Scan retry count>,<Scan retry tin=me delay>,<L3 retry
count>,<L3 retry delay time>,<L4 retry count>,<L4 retry delay time>]
Parameters Description
Parameter
Value
Format
Description
WHandle
Range: 0-1
Integer
It specifies the WHandle obtained from AT+WNI command.
Scan retry count
Range: 1­65535
Default: 3
Integer
It specifies the scan retry count before connection.
Scan retry tin=me delay
Range: 5000­65535
Default: 5000
Integer
It specifies the time between scan retries in milliseconds.
L3 retry count
Range: 1­65535
Default: 10
Integer
It specifies the L3 retry count, when the device is in STA mode.
L3 retry delay time
Range: 5000­65535
Default: 5000
Integer
It specifies the time between L3 retries in milliseconds.
L4 retry count
Range: 1­65535
Default: 3
Integer
It specifies the L4 retry count when device is in STA mode.
L4 retry delay time
Range: 1­65535
Default: 1000
Integer
It specifies the time between L4 retries in milliseconds.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+WNRETRYC=1,5,6000,20,6000,5,20 OK
Syntax
Page 99
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 99 of 299 2021-01-17
AT+WNRETRYC?
6.1.9. NCM Connect - +WNCN
Description
This command connects the existing network up to L3 level.
Pre-requisites
AT+WNI=0 command is a mandatory. For static IP address, AT+WNIPC command should be
issued.
Syntax
AT+WNCN=<WHandle>,[<SSID>,<PassPhrase>,<Channel>]
Parameters Description
Parameter
Value
Format
Description
WHandle
Range: 0-1
Integer
It specifies the WHandle obtained after issuing AT+WNI command.
SSID
Range: 1-32 Default: N/A
String
It specifies the SSID of the existing network to which user wants to connect. If the SSID is NULL, then the WPS connection happens provided WPS is enabled.
PassPhrase
Range: 0-64 Default: N/A
String
It specifies the pass phrase required to connect to a network. If user doesn't give passphrase and if the profile have the details of same network, then this command will take the passphrase from the profile
Channel
Range: 1­14,36,40,44,48, 52,56,60,64,100, 104,108,112,116, 132,136,140,149, 153,157,161,165
Default: 0
Integer
It specifies the channel of an existing AP to connect.
Response
+WNCN:<Connect status>,<IP Address>,<Net Mask>,<Gateway>
Response Parameters Description
Parameter
Range
Type
Description
Connect status
N/A
not connected, connected, disconnected, DHCP failed, auto IP done, new IP
It specifies the current connection status.
IP Address
N/A
IP Address
It specifies the current IP Address.
Page 100
WL865E4-P AT Command Reference Guide
80613ST10987A Rev. 1.4.27 Page 100 of 299 2021-01-17
Net Mask
N/A
IPv4 Address
It specifies the current network mask.
Gateway
N/A
IP Address
It specifies the current gateway address.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+WNCN=1,"Telit_Guest","qwerty123456",1 +WNCN:CONNECTED,192.168.0.88,255.255.255.0,192.168.0.1 OK
Following command is used to get the connection status up to L3 level:
Syntax
AT+WNCN?
Response
+WNCN:<connect status>,<IP Address>,<Net Mask>,<Gateway>
Response Parameters Description
Parameter
Range
Type
Description
connect status
N/A
not connected, connected
It specifies status of connection.
IP Address
N/A
IP Address
It specifies current IP address
Net Mask
N/A
IPv4 Address
It specifies current subnet mask.
Gateway
N/A
IP Address
It specifies current gateway.
Status
For all possible status responses refer Table 4: Status Responses
Example
AT+WNCN? +WNCN:CONNECTED,192.168.3.45,255.255.255.0,192.168.3.1 OK
Asynchronous Response
+WNCN:<Connect status>,<IP Address>,<Net Mask>,<Gateway>
Asynchronous Response Parameters Description
Parameter
Range
Type
Description
Connect status
N/A
not connected, connected,
It specifies the current connection status.
Loading...