Difference between revisions of "Component: WLAN (ESP-12S) (Comms: Networking)"
From Flowcode Help
Jump to navigationJump to search| (8 intermediate revisions by the same user not shown) | |||
| Line 5: | Line 5: | ||
|-  | |-  | ||
| width="20%" style="color:gray;" | Version  | | width="20%" style="color:gray;" | Version  | ||
| − | |   | + | | 8.0  | 
|-  | |-  | ||
| width="20%" style="color:gray;" | Category  | | width="20%" style="color:gray;" | Category  | ||
| Line 15: | Line 15: | ||
Wireless LAN component designed to work with the ESP-12S module. Provides a very simple interface to allow webpages to be hosted from hardware or simulation. Also available in the form of the BL0136 WIFI E-block.  | Wireless LAN component designed to work with the ESP-12S module. Provides a very simple interface to allow webpages to be hosted from hardware or simulation. Also available in the form of the BL0136 WIFI E-block.  | ||
| − | ==  | + | ==Version information==  | 
| + | |||
| + |  Library Version, Component Version, Date, Author, Info  | ||
| − | |||
==Detailed description==  | ==Detailed description==  | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| Line 40: | Line 49: | ||
==Examples==  | ==Examples==  | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| Line 58: | Line 75: | ||
''<span style="color:red;">No additional examples</span>''  | ''<span style="color:red;">No additional examples</span>''  | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
==Macro reference==  | ==Macro reference==  | ||
| + | ===CheckForPageRequests===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckForPageRequests'''  | 
|-  | |-  | ||
| − | | colspan="2" |   | + | | colspan="2" | To be called periodically. Returns non-zero if a request has been processed   | 
|-  | |-  | ||
|-  | |-  | ||
| − | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE  | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-  | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return''  | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | ||
|}  | |}  | ||
| + | ===CheckTCPServerIP===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CheckTCPServerIP'''  | 
|-  | |-  | ||
| − | | colspan="2" |   | + | | colspan="2" | Collects the local IP address of the active TCP server.   | 
|-  | |-  | ||
|-  | |-  | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING  | 
| width="90%" style="border-top: 2px solid #000;" | ''Return''  | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | ||
|}  | |}  | ||
| + | ===ClientConnect===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| Line 125: | Line 145: | ||
| + | ===ClientSendArray===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ClientSendArray'''  | 
|-  | |-  | ||
| − | | colspan="2" |   | + | | colspan="2" | Sends out an array of data bytes with the required AT+CIPSEND=Length$(Request) initialiser.   | 
|-  | |-  | ||
|-  | |-  | ||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE  | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE  | ||
| − | | width="90%" |   | + | | width="90%" | Data  | 
|-  | |-  | ||
| − | | colspan="2" |   | + | | colspan="2" |    | 
|-  | |-  | ||
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT  | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT  | ||
| − | | width="90%" |   | + | | width="90%" | NumBytes  | 
|-  | |-  | ||
| − | | colspan="2" |   | + | | colspan="2" |    | 
|-  | |-  | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID  | 
| width="90%" style="border-top: 2px solid #000;" | ''Return''  | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | ||
|}  | |}  | ||
| + | ===ClientSendRequest===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ClientSendRequest'''  | 
| + | |-  | ||
| + | | colspan="2" | Sends out a string with the required AT+CIPSEND=Length$(Request) initialiser.   | ||
| + | |-  | ||
|-  | |-  | ||
| − | |   | + | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING  | 
| + | | width="90%" | Request  | ||
|-  | |-  | ||
| + | | colspan="2" | e.g. "GET / HTTP/1.0\r\n\r\n"   | ||
|-  | |-  | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID  | 
| width="90%" style="border-top: 2px solid #000;" | ''Return''  | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | ||
|}  | |}  | ||
| + | ===ConnectToSSID===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ConnectToSSID'''  | 
|-  | |-  | ||
| − | | colspan="2" |   | + | | colspan="2" | Attempts to connect to the given SSID and Key values.  Returns 1 if the SSID has been connected.    | 
|-  | |-  | ||
|-  | |-  | ||
| − | | width="10%" align="center  | + | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING  | 
| − | | width="90%  | + | | width="90%" | SSID  | 
| − | |||
| − | |||
| − | |||
| − | |||
|-  | |-  | ||
| − | |   | + | | colspan="2" |    | 
| − | |||
|-  | |-  | ||
| − | |   | + | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING  | 
| + | | width="90%" | Key  | ||
|-  | |-  | ||
| + | | colspan="2" |    | ||
|-  | |-  | ||
| − | | width="10%" align="center" | [[File:Fc9-  | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE  | 
| − | | width="90%" |   | + | | width="90%" | Timeout  | 
|-  | |-  | ||
| − | | colspan="2" |   | + | | colspan="2" | Number of seconds to wait for the connection, default 20   | 
|-  | |-  | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE  | 
| width="90%" style="border-top: 2px solid #000;" | ''Return''  | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | ||
|}  | |}  | ||
| + | ===ControlTCPServer===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ControlTCPServer'''  | 
|-  | |-  | ||
| − | | colspan="2" |   | + | | colspan="2" | Allows a TCP web page server to be switched on and off on the selected port. Returns 1 if the command was completed correctly.   | 
|-  | |-  | ||
|-  | |-  | ||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE  | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE  | ||
| − | | width="90%" |   | + | | width="90%" | Enable  | 
| + | |-  | ||
| + | | colspan="2" | 0 = Stop Server, 1 = Start Server   | ||
| + | |-  | ||
| + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT  | ||
| + | | width="90%" | Port  | ||
|-  | |-  | ||
| − | | colspan="2" |   | + | | colspan="2" | Server port to listen for incoming TCP/IP data requests   | 
|-  | |-  | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE  | 
| width="90%" style="border-top: 2px solid #000;" | ''Return''  | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | ||
|}  | |}  | ||
| + | ===CreateAccessPoint===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| Line 243: | Line 275: | ||
| + | ===DisconnectFromSSID===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''DisconnectFromSSID'''  | 
|-  | |-  | ||
| − | | colspan="2" |   | + | | colspan="2" | Disconnects from the current SSID.  Returns 1 if the command was accepted and returned an "OK"   | 
|-  | |-  | ||
|-  | |-  | ||
| − | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE  | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-  | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return''  | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | ||
|}  | |}  | ||
| + | ===EndServerConnection===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| Line 279: | Line 303: | ||
| + | ===GetByteWithTimeout===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetByteWithTimeout'''  | 
|-  | |-  | ||
| − | | colspan="2" |    | + | | colspan="2" | Attempts to receive a byte from the circular buffer. If nothing is available then waits up to 200 ms for data to become available.   | 
|-  | |-  | ||
|-  | |-  | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE  | 
| width="90%" style="border-top: 2px solid #000;" | ''Return''  | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | ||
|}  | |}  | ||
| + | ===GetFirmwareVersion===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetFirmwareVersion'''  | 
|-  | |-  | ||
| − | | colspan="2" | Collects the   | + | | colspan="2" | Collects the firmware version from the ESP8266 module and returns it as a string.   | 
|-  | |-  | ||
|-  | |-  | ||
| − | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING  | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-  | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return''  | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | ||
|}  | |}  | ||
| + | ===GetInValue===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetInValue'''  | 
| + | |-  | ||
| + | | colspan="2" | Returns the string value of a Request parameter   | ||
| + | |-  | ||
|-  | |-  | ||
| − | |   | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE  | 
| + | | width="90%" | index  | ||
|-  | |-  | ||
| + | | colspan="2" | Index of the request paramter, starting at zero Range 0-2   | ||
|-  | |-  | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING  | 
| width="90%" style="border-top: 2px solid #000;" | ''Return''  | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | ||
|}  | |}  | ||
| + | ===GetRxArray===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetRxArray'''  | 
| + | |-  | ||
| + | | colspan="2" | Attempts to receive a number of bytes from the remote connection If nothing is available then waits up to 200 ms for data to become available. Returns the number of bytes received,.   | ||
| + | |-  | ||
| + | |-  | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE  | ||
| + | | width="90%" | Data  | ||
| + | |-  | ||
| + | | colspan="2" | Byte array to store the incoming data   | ||
|-  | |-  | ||
| − | |   | + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT  | 
| + | | width="90%" | MaxBytes  | ||
|-  | |-  | ||
| + | | colspan="2" | Maximum number of bytes to try and receive   | ||
|-  | |-  | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT  | 
| width="90%" style="border-top: 2px solid #000;" | ''Return''  | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | ||
|}  | |}  | ||
| + | ===Initialise===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''  | 
|-  | |-  | ||
| − | | colspan="2" |    | + | | colspan="2" | Initialise the device with the property data. Returns 1 if "ready" message successfully received  Returns 0 if no reply from module   | 
|-  | |-  | ||
|-  | |-  | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE  | 
| width="90%" style="border-top: 2px solid #000;" | ''Return''  | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | ||
|}  | |}  | ||
| + | ===ReadEncryptionModeFromScan===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| Line 367: | Line 407: | ||
| + | ===ReadSSIDFromScan===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadSSIDFromScan'''  | 
| + | |-  | ||
| + | | colspan="2" | Collects one of the SSID name strings from the last SSID Scan. The ScanForSSID macro must be called first.   | ||
| + | |-  | ||
|-  | |-  | ||
| − | |   | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE  | 
| + | | width="90%" | Index  | ||
|-  | |-  | ||
| + | | colspan="2" | SSID Index   | ||
|-  | |-  | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING  | 
| width="90%" style="border-top: 2px solid #000;" | ''Return''  | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | ||
|}  | |}  | ||
| + | ===ReadSignalStrengthFromScan===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadSignalStrengthFromScan'''  | 
|-  | |-  | ||
| − | | colspan="2" |   | + | | colspan="2" | Collects the signal strength from the last SSID Scan. The ScanForSSID macro must be called first. Value returned is in negative dB, smaller value = better signal   | 
|-  | |-  | ||
|-  | |-  | ||
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE  | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE  | ||
| − | | width="90%" |   | + | | width="90%" | Index  | 
|-  | |-  | ||
| − | | colspan="2" | Index   | + | | colspan="2" | SSID Index   | 
|-  | |-  | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-s16-icon.png]] - INT  | 
| width="90%" style="border-top: 2px solid #000;" | ''Return''  | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | ||
|}  | |}  | ||
| + | ===ScanForSSID===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ScanForSSID'''  | 
| − | |||
| − | |||
|-  | |-  | ||
| + | | colspan="2" | Checks for wireless networks in the local area which are broadcasting their SSID. Must not be connected to a network to allow this to function. Returns the number of wireless networks found, max 8.   | ||
|-  | |-  | ||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
|-  | |-  | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE  | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE  | ||
| Line 426: | Line 459: | ||
| + | ===SendString===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendString'''  | 
|-  | |-  | ||
| − | | colspan="2" | Sends   | + | | colspan="2" | Sends the given Text with no preappendment. Useful for sending preformatted command strings. Appends a CR to the end of the string if SendCR is greater than 0.   | 
|-  | |-  | ||
|-  | |-  | ||
| − | | width="10%" align="center" | [[File:Fc9-  | + | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING  | 
| − | | width="90%" |   | + | | width="90%" | Text  | 
|-  | |-  | ||
| colspan="2" |    | | colspan="2" |    | ||
|-  | |-  | ||
| − | | width="10%" align="center" | [[File:Fc9-  | + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE  | 
| − | | width="90%" |   | + | | width="90%" | SendCR  | 
|-  | |-  | ||
| colspan="2" |    | | colspan="2" |    | ||
| Line 449: | Line 483: | ||
| + | ===Send_Embedded_HTML_Page1===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Send_Embedded_HTML_Page1'''  | 
|-  | |-  | ||
| − | | colspan="2" |   | + | | colspan="2" |    | 
|-  | |-  | ||
|-  | |-  | ||
| − | | width="10%" align="center" | [[File:Fc9-  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID  | 
| − | | width="90%" |   | + | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | 
| + | |}  | ||
| + | |||
| + | |||
| + | ===Send_Embedded_HTML_Page2===  | ||
| + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| − | |   | + | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | 
| + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Send_Embedded_HTML_Page2'''  | ||
|-  | |-  | ||
| − | |   | + | | colspan="2" |    | 
| − | |||
|-  | |-  | ||
| − | |||
|-  | |-  | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID  | 
| width="90%" style="border-top: 2px solid #000;" | ''Return''  | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | ||
|}  | |}  | ||
| + | ===Send_Embedded_HTML_Page3===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Send_Embedded_HTML_Page3'''  | 
|-  | |-  | ||
| − | | colspan="2" |   | + | | colspan="2" |    | 
|-  | |-  | ||
|-  | |-  | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID  | 
| width="90%" style="border-top: 2px solid #000;" | ''Return''  | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | ||
|}  | |}  | ||
| + | ===Send_Embedded_HTML_Page4===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Send_Embedded_HTML_Page4'''  | 
|-  | |-  | ||
| − | | colspan="2" |   | + | | colspan="2" |    | 
|-  | |-  | ||
|-  | |-  | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID  | 
| width="90%" style="border-top: 2px solid #000;" | ''Return''  | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | ||
|}  | |}  | ||
| + | ===SetOutValue===  | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | {| class="wikitable" style="width:60%; background-color:#FFFFFF;"  | ||
|-  | |-  | ||
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]  | ||
| − | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''  | + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SetOutValue'''  | 
| + | |-  | ||
| + | | colspan="2" | Set the value of an outbound substitution string   | ||
| + | |-  | ||
| + | |-  | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE  | ||
| + | | width="90%" | index  | ||
| + | |-  | ||
| + | | colspan="2" | Range 0-4   | ||
|-  | |-  | ||
| − | |   | + | | width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING  | 
| + | | width="90%" | value  | ||
|-  | |-  | ||
| + | | colspan="2" |    | ||
|-  | |-  | ||
| − | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-  | + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID  | 
| width="90%" style="border-top: 2px solid #000;" | ''Return''  | | width="90%" style="border-top: 2px solid #000;" | ''Return''  | ||
|}  | |}  | ||
| − | |||
| − | |||
| Line 704: | Line 754: | ||
| colspan="2" | Decides if simulation TCP data is available via a console tab   | | colspan="2" | Decides if simulation TCP data is available via a console tab   | ||
|}  | |}  | ||
| + | |||
| + | ==Component Source Code==  | ||
| + | |||
| + | Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_WLAN_ESP12S.fcfx FC_Comp_Source_WLAN_ESP12S.fcfx]  | ||
| + | |||
| + | Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_WLAN_ESP12S.fcfx FC_Comp_Source_WLAN_ESP12S.fcfx]  | ||
Latest revision as of 08:59, 9 June 2025
| Author | Matrix Ltd. | 
| Version | 8.0 | 
| Category | Comms: Networking | 
Contents
- 1 WLAN (ESP-12S) component
 - 2 Version information
 - 3 Detailed description
 - 4 Examples
 - 5 Macro reference
- 5.1 CheckForPageRequests
 - 5.2 CheckTCPServerIP
 - 5.3 ClientConnect
 - 5.4 ClientSendArray
 - 5.5 ClientSendRequest
 - 5.6 ConnectToSSID
 - 5.7 ControlTCPServer
 - 5.8 CreateAccessPoint
 - 5.9 DisconnectFromSSID
 - 5.10 EndServerConnection
 - 5.11 GetByteWithTimeout
 - 5.12 GetFirmwareVersion
 - 5.13 GetInValue
 - 5.14 GetRxArray
 - 5.15 Initialise
 - 5.16 ReadEncryptionModeFromScan
 - 5.17 ReadSSIDFromScan
 - 5.18 ReadSignalStrengthFromScan
 - 5.19 ScanForSSID
 - 5.20 SendString
 - 5.21 Send_Embedded_HTML_Page1
 - 5.22 Send_Embedded_HTML_Page2
 - 5.23 Send_Embedded_HTML_Page3
 - 5.24 Send_Embedded_HTML_Page4
 - 5.25 SetOutValue
 
 - 6 Property reference
 - 7 Component Source Code
 
WLAN (ESP-12S) component
Wireless LAN component designed to work with the ESP-12S module. Provides a very simple interface to allow webpages to be hosted from hardware or simulation. Also available in the form of the BL0136 WIFI E-block.
Version information
Library Version, Component Version, Date, Author, Info
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
CheckForPageRequests
| CheckForPageRequests | |
| To be called periodically. Returns non-zero if a request has been processed | |
| Return | |
CheckTCPServerIP
| CheckTCPServerIP | |
| Collects the local IP address of the active TCP server. | |
| Return | |
ClientConnect
ClientSendArray
| ClientSendArray | |
| Sends out an array of data bytes with the required AT+CIPSEND=Length$(Request) initialiser. | |
| Data | |
| NumBytes | |
| Return | |
ClientSendRequest
| ClientSendRequest | |
| Sends out a string with the required AT+CIPSEND=Length$(Request) initialiser. | |
| Request | |
| e.g. "GET / HTTP/1.0\r\n\r\n" | |
| Return | |
ConnectToSSID
ControlTCPServer
CreateAccessPoint
DisconnectFromSSID
| DisconnectFromSSID | |
| Disconnects from the current SSID. Returns 1 if the command was accepted and returned an "OK" | |
| Return | |
EndServerConnection
| EndServerConnection | |
| Disconnects from the current active TCP/IP pipe. | |
| Return | |
GetByteWithTimeout
| GetByteWithTimeout | |
| Attempts to receive a byte from the circular buffer. If nothing is available then waits up to 200 ms for data to become available. | |
| Return | |
GetFirmwareVersion
| GetFirmwareVersion | |
| Collects the firmware version from the ESP8266 module and returns it as a string. | |
| Return | |
GetInValue
| GetInValue | |
| Returns the string value of a Request parameter | |
| index | |
| Index of the request paramter, starting at zero Range 0-2 | |
| Return | |
GetRxArray
Initialise
| Initialise | |
| Initialise the device with the property data. Returns 1 if "ready" message successfully received Returns 0 if no reply from module | |
| Return | |
ReadEncryptionModeFromScan
ReadSSIDFromScan
| ReadSSIDFromScan | |
| Collects one of the SSID name strings from the last SSID Scan. The ScanForSSID macro must be called first. | |
| Index | |
| SSID Index | |
| Return | |
ReadSignalStrengthFromScan
ScanForSSID
SendString
Send_Embedded_HTML_Page1
| Send_Embedded_HTML_Page1 | |
| Return | |
Send_Embedded_HTML_Page2
| Send_Embedded_HTML_Page2 | |
| Return | |
Send_Embedded_HTML_Page3
| Send_Embedded_HTML_Page3 | |
| Return | |
Send_Embedded_HTML_Page4
| Send_Embedded_HTML_Page4 | |
| Return | |
SetOutValue
| SetOutValue | |
| Set the value of an outbound substitution string | |
| index | |
| Range 0-4 | |
| value | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_WLAN_ESP12S.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_WLAN_ESP12S.fcfx