Component: WLAN Dummy (EB069, ESP8266) (ESP8266) (Wireless)
Author | Matrix Ltd. |
Version | 2.0 |
Category | Wireless |
Contents
- 1 WLAN Dummy (EB069, ESP8266) component
- 2 Component Source Code
- 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
WLAN Dummy (EB069, ESP8266) component
Wireless LAN component designed to work with the ESP8266 module. Provides a very simple interface to allow webpages to be hosted from hardware or simulation. Also available in the form of the EB069 E-block.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_WLAN_ESP8266_Dummy.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_WLAN_ESP8266_Dummy.fcfx
Detailed description
No detailed description exists yet for this component
Examples
The examples below are all done using a EB091 board as the host
The EB069 ESP8266 Wifi E-block is connected to PORTD 0-7 with the patch setting set to B.
The EB005 LCD E-block is connected to PORTB 0-7 with the patch setting set to Default.
Other host boards are compatible with the examples, simply change the target chip and component connection properties.
Firmware Test
This example collects the firmware version from the ESP8266 module and displays it on an LCD. Tested working with firmware version 00150900.
Wireless Scanner
This example scans for wireless networks in range and prints the network IDs to the LCD along with the signal strength and security type.
Creating An Access Point
This example creates an access point you can connect your phone or laptop to named Flowcode_ESP8266. The password to connect to the access point is flowcode6.
Note this example simply creates an access point, no data is transferred.
Joining An Access Point
This example joins an existing access point. The network ID and Password must be altered to match your local WIFI network settings.
Note this example simply joins an access point, no data is transferred.
TCP Client
This example joins an existing access point. The network ID and Password must be altered to match your local WIFI network settings.
Once joined to the network the example connects to the MatrixTSL website and requests a file which is printed out on the LCD.
TCP Server
This example creates an access point you can connect your phone or laptop to named Flowcode_ESP8266. The password to connect to the access point is flowcode6.
Once the access point is created the example shows the server IP address on the LCD. Connecting to the wireless network on your phone or laptop and visiting the IP address shown on the LCD using a web browser allows you to switch LED outputs on and off.
Network Comms
Here are some examples using the Network Communication component linked to the ESP8266 component.
NetworkComms ESP8266 Webserver
Macro reference
CheckForPageRequests
CheckForPageRequests | |
To be called periodically. Returns non-zero if a request has been processed | |
- BYTE | Return |
CheckTCPServerIP
CheckTCPServerIP | |
Collects the local IP address of the active TCP server. | |
- STRING | Return |
ClientConnect
ClientSendArray
ClientSendArray | |
- BYTE | Data |
- UINT | NumBytes |
- VOID | Return |
ClientSendRequest
ClientSendRequest | |
Sends out a request for data | |
- STRING | Request |
e.g. "GET / HTTP/1.0\r\n\r\n" | |
- VOID | Return |
ConnectToSSID
ControlTCPServer
CreateAccessPoint
DisconnectFromSSID
DisconnectFromSSID | |
Disconnects from the current SSID. Returns 1 if the command was accepted and returned an "OK" | |
- BYTE | Return |
EndServerConnection
EndServerConnection | |
- BYTE | 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. | |
- BYTE | Return |
GetFirmwareVersion
GetFirmwareVersion | |
Collects the firmware version from the ESP8266 module and returns it as a string. | |
- STRING | Return |
GetInValue
GetInValue | |
Returns the string value of a Request parameter | |
- BYTE | index |
Index of the request paramter, starting at zero Range 0-2 | |
- STRING | Return |
GetRxArray
GetRxArray | |
- BYTE | Data |
- UINT | MaxBytes |
- UINT | Return |
Initialise
Initialise | |
Initialise the device with the property data. Returns 1 if "ready" message successfully received Returns 0 if no reply from module | |
- BYTE | Return |
ReadEncryptionModeFromScan
ReadSSIDFromScan
ReadSSIDFromScan | |
Collects one of the SSID name strings from the last SSID Scan. The ScanForSSID macro must be called first. | |
- BYTE | Index |
SSID Index | |
- STRING | Return |
ReadSignalStrengthFromScan
ScanForSSID
SendString
SendString | |
Sends the given Text. Appends a CR to the end of the string it SendCR is greater than 0. | |
- STRING | Text |
- BYTE | SendCR |
- VOID | Return |
Send_Embedded_HTML_Page1
Send_Embedded_HTML_Page1 | |
- VOID | Return |
Send_Embedded_HTML_Page2
Send_Embedded_HTML_Page2 | |
- VOID | Return |
Send_Embedded_HTML_Page3
Send_Embedded_HTML_Page3 | |
- VOID | Return |
Send_Embedded_HTML_Page4
Send_Embedded_HTML_Page4 | |
- VOID | Return |
SetOutValue
SetOutValue | |
Set the value of an outbound substitution string | |
- BYTE | index |
Range 0-4 | |
- STRING | value |
- VOID | Return |
Property reference
Properties |