Author
|
Matrix Ltd.
|
Version
|
2.1
|
Category
|
Comms: Networking
|
WLAN 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.
Component Pack
COMMSB
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Downloadable macro reference
|
SendString
|
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.
|
- STRING
|
Text
|
|
- BYTE
|
SendCR
|
|
- VOID
|
Return
|
|
DisconnectFromSSID
|
Disconnects from the current SSID. Returns 1 if the command was accepted and returned an "OK"
|
- BYTE
|
Return
|
|
ClientConnect
|
Creates a TCP or UDP connection to a remote server. Returns the state of the connection. 0=Connection failed 1=Connection active
|
- BYTE
|
Type
|
0 = TCP, 1 = UDP
|
- STRING
|
IPAddress
|
e.g. "192.168.1.20"
|
- UINT
|
Port
|
Remote port number to connect to, HTTP comms = Port 80
|
- BYTE
|
Return
|
|
ControlTCPServer
|
Allows a TCP web page server to be switched on and off on the selected port. Returns 1 if the command was completed correctly.
|
- BYTE
|
Enable
|
0 = Stop Server, 1 = Start Server
|
- UINT
|
Port
|
Server port to listen for incoming TCP/IP data requests
|
- BYTE
|
Return
|
|
GetFirmwareVersion
|
Collects the firmware version from the ESP8266 module and returns it as a string.
|
- STRING
|
Return
|
|
CheckForPageRequests
|
To be called periodically. Returns non-zero if a request has been processed
|
- BYTE
|
Return
|
|
ClientSendRequest
|
Sends out a string with the required AT+CIPSEND=Length$(Request) initialiser.
|
- STRING
|
Request
|
e.g. "GET / HTTP/1.0\r\n\r\n"
|
- VOID
|
Return
|
|
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
|
|
CreateAccessPoint
|
Sets up the wireless LAN module into AP mode to host a wireless network. Other WIFI enabled devices can then connect to the module. Returns 1 for success.
|
- STRING
|
SSID
|
Name of the wireless network to create
|
- STRING
|
Password
|
Password used to gain access to the network
|
- BYTE
|
Channel
|
802.11 Channel Range 1-14
|
- BYTE
|
Encryption
|
0=Open, 1=WEP, 2=WPA_PSK, 3=WPA2_PSK, 4=WPA_WPA2_PSK
|
- BYTE
|
Return
|
|
SetOutValue
|
Set the value of an outbound substitution string
|
- BYTE
|
index
|
Range 0-4
|
- STRING
|
value
|
|
- VOID
|
Return
|
|
EndServerConnection
|
Disconnects from the current active TCP/IP pipe.
|
- BYTE
|
Return
|
|
Send_Embedded_HTML_Page4
|
|
- VOID
|
Return
|
|
ReadSignalStrengthFromScan
|
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
|
- BYTE
|
Index
|
SSID Index
|
- INT
|
Return
|
|
Send_Embedded_HTML_Page3
|
|
- VOID
|
Return
|
|
Ev_Property
|
Sent when a property has been changed by the User
|
- ULONG
|
Return
|
|
Send_Embedded_HTML_Page2
|
|
- VOID
|
Return
|
|
Send_Embedded_HTML_Page1
|
|
- VOID
|
Return
|
|
ReadEncryptionModeFromScan
|
Collects one of the encryption modes from the last SSID Scan. The ScanForSSID macro must be called first. 0=Open, 1=WEP, 2=WPA_PSK, 3=WPA2_PSK, 4=WPA_WPA2_PSK
|
- BYTE
|
Index
|
SSID Index
|
- BYTE
|
Return
|
|
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
|
|
GetInValue
|
Returns the string value of a Request parameter
|
- BYTE
|
index
|
Index of the request paramter, starting at zero Range 0-2
|
- STRING
|
Return
|
|
ConnectToSSID
|
Attempts to connect to the given SSID and Key values. Returns 1 if the SSID has been connected.
|
- STRING
|
SSID
|
|
- STRING
|
Key
|
|
- BYTE
|
Timeout
|
Number of seconds to wait for the connection, default 20
|
- BYTE
|
Return
|
|
ClientSendArray
|
Sends out an array of data bytes with the required AT+CIPSEND=Length$(Request) initialiser.
|
- BYTE
|
Data
|
|
- UINT
|
NumBytes
|
|
- VOID
|
Return
|
|
GetRxArray
|
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,.
|
- BYTE
|
Data
|
Byte array to store the incoming data
|
- UINT
|
MaxBytes
|
Maximum number of bytes to try and receive
|
- UINT
|
Return
|
|
ScanForSSID
|
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.
|
- BYTE
|
Return
|
|
Initialise
|
Initialise the device with the property data. Returns 1 if "ready" message successfully received Returns 0 if no reply from module
|
- BYTE
|
Return
|
|
CheckTCPServerIP
|
Collects the local IP address of the active TCP server.
|
- STRING
|
Return
|
Property reference
|
Properties
|
|
Receive Buffer Size
|
Buffer used to store incoming data ready for processing. Default 128 Bytes.
|
|
Scan Buffer Size
|
Buffer used to hold SSID names when performing a SSID network scan. Default 100 Bytes.
|
|
Reset Mode
|
The initialise automatically resets the WIFI module before establishing communications. Software reset uses an AT command to preform the reset Hardware reset uses an extra I/O pin to toggle the signal to the reset pin on the module.
|
|
Command Termination
|
Older versions of the firmware require \r to terminate a AT command string. Newer versions of the firmware have changed to use \r\n termination.
|
|
Max Web Pages
|
Maximum number of individual webpages we can serve up with the component.
|
|
Web Page Timeout
|
Number of cycles to try and send / receive a webpage before timing out.
|
|
Line Delay
|
Fixed delay in microseconds sent in between sending a HTML line when running as a web page server.
|
|
Name Page 1
|
HTML name of webpage 1
|
|
HTML Page 1
|
HTML content for webpage 1
|
|
Name Page 2
|
HTML name of webpage 2
|
|
HTML Page 2
|
HTML content for webpage 2
|
|
Name Page 3
|
HTML name of webpage 3
|
|
HTML Page 3
|
HTML content for webpage 3
|
|
Name Page 4
|
HTML name of webpage 4
|
|
HTML Page 4
|
HTML content for webpage 4
|
|
Count
|
Maximum number of outbound string substitutions
|
|
Length 0
|
Number of bytes to reserve for data string.
|
|
Count
|
Maximum number of inbound string substitutions
|
|
Length 0
|
Number of bytes to reserve for data string.
|
|
Data Recorder Traces
|
Selects if the scope traces are automatically added to the data recorder window or not. Simulation - draws an approximation of the UART data onto the scope trace. ICT - sets up the scope trace for incoming data and adds UART packet decoding at the correct BAUD.
|
|
Data Source
|
Simulation data source used to allow the component to connect to various remote devices Nothing - Simulation data is ignored COM port - Routes the communication data to and from a physical or virtual COM port API - Routes the communication data via a data API component on the Panel.
|
|
API
|
Selects which API component to route the communication data via. Add API components to the panel before they will be available in this list. API components are available from the Comms component category.
|
|
Connections
|
|
Channel
|
UART Channel selector Software channels are bit banged using generic I/O pins but are not as reliable as hardware channels. Hardware channels use the selected peripheral on-board the target microcontroller.
|
|
Baud Options
|
Baud rate option selector
|
|
Baud Rate
|
|
|
TX
|
Pin to be used for Transmit data
|
|
TX Remap Pin
|
Allows the hardware transmit pin to be configured from a list of available pins based on your target device,
|
|
RX
|
Pin to be used for Receive data
|
|
RX Remap Pin
|
Allows the hardware receive pin to be configured from a list of available pins based on your target device,
|
|
Reset
|
WLAN module reset pin connection
|
|
Use Flow Control
|
Flow Control (Handshake) enable or disable. On: Two I/O pins are used to control the flow of data in and out of the device. Off: Flow control is disabled.
|
|
Simulations
|
|
Label
|
Text label used to help identify the component on the panel.
|
|
Simulation Method
|
Decides how to handle the simulation of the component. TCP Base - Allows simulation of the network communications using the TCP Base component and DLL. COM/Injector - Allows the simulation to connect to real hardware or injectors.
|
|
Console Data
|
Decides if simulation TCP data is available via a console tab
|