Component: WLAN (EB069, WIZ610wi) (Comms: Networking)

From Flowcode Help
Jump to navigationJump to search
Author Matrix Ltd.
Version 1.3
Category Comms: Networking


WLAN (EB069, WIZ610wi) component

Wireless LAN component designed to work with the WIZ610wi module from Wiznet. 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 Pack

COMMSB

Detailed description

No detailed description exists yet for this component

Examples

This example connects the WLAN module to a existing wireless router and starts a web page server running. The web page can be accessed by typing the IP address of the module into your browser.


Please note that due to limitations with use if RAM storage on some processors you will need to ensure that each line of the page text (HTML) is quite short, usually below 100 characters. Otherwise this can cause an error such as “Error: No remaining RAM block (on target) big enough for:”


Additional examples can be found in the “Apps and Bundles” section of this Wiki:

Internet Application Guide

Wireless LAN Application Guide


The example also hosts a web page server during simulation using your PC. You can access the web pages served by the PC running Flowcode by using the localhost loopback IP address "127.0.0.1:5000" where 5000 is the port assigned to the WLAN component. You can access the web pages from a PC on a network by using the IP address of the machine running Flowcode and specifying the correct port. Port 80 is used by default for HTML transfer but windows can be a bit funny about what is allowed on port 80 so we have used port 5000 in the example. You may have to check your server PC's incoming firewall settings to get this fully functional via a remote PC. FC6 Icon.png WLAN Webpage Server Here is one of the pages generated by the example.

Webpage.jpg


The TCPIP tab of the console window will show all the data sent and received during simulation which is useful for learning how things like web page servers work.

WebLog.jpg

Downloadable macro reference

Fc9-comp-macro.png SendString
Sends the given Text. Appends a CR/LF pair of characters it CrLf is true. 
Fc9-string-icon.png - STRING Text
 
Fc9-u8-icon.png - BYTE CrLf
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png SendCommand
Sends the given command and returns the reply status. (See GetReply for return values) 
Fc9-string-icon.png - STRING Command
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png EnableCommandMode
Enables command mode. Must be called before commands are issued. 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png ReceiveIncoming
Returns the received data string 
Fc9-string-icon.png - STRING Return


Fc9-comp-macro.png CheckForPageRequests
To be called periodically. Returns non-zero if a request has been processed 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png ReadConnectionStatus
Checks the connection status. Returns 0 if not connected, 1 if connected. 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png SetOutValue
Set the value of an outbound substitution string 
Fc9-u8-icon.png - BYTE index
 
Fc9-string-icon.png - STRING value
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Send_Embedded_HTML_Page4
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png DisableCommandMode
Exits command mode 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Send_Embedded_HTML_Page3
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Send_Embedded_HTML_Page2
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png Send_Embedded_HTML_Page1
 
Fc9-void-icon.png - VOID Return


Fc9-comp-macro.png GetInValue
Returns the string value of a Request parameter 
Fc9-u8-icon.png - BYTE index
Index of the request paramter, starting at zero. 
Fc9-string-icon.png - STRING Return


Fc9-comp-macro.png ConnectToSSID
Attempts to connect to the given SSID and Key values. Returns 0 if successful. 
Fc9-string-icon.png - STRING SSID
 
Fc9-string-icon.png - STRING Key
 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png GetReply
Returns the last received response to a command. 0 = OK 1 = FAIL_ERR 2 = STX_ERR 3 = CMD_ERR 4 = PARAM_ERR 5 = ETX_ERR 6 = SERIAL 255 = TOUT 
Fc9-u8-icon.png - BYTE Return


Fc9-comp-macro.png Initialise
Initialise the device with the property data. Returns 0 if successful 
Fc9-u8-icon.png - BYTE Return



Property reference

Fc9-prop-icon.png Properties
Fc9-conn-icon.png IP Address
Fc9-type-21-icon.png IP 0
First number in IP address - e.g. xxx.168.1.1  
Fc9-type-21-icon.png IP 1
Second number in IP address - e.g. 192.xxx.1.1  
Fc9-type-21-icon.png IP 2
Third number in IP address - e.g. 192.168.xxx.1  
Fc9-type-21-icon.png IP 3
Fourth number in IP address - e.g. 192.168.1.xxx 
Fc9-conn-icon.png Subnet Mask
Fc9-type-21-icon.png Mask 0
First number in Subnet mask - e.g. xxx.255.255.0  
Fc9-type-21-icon.png Mask 1
Second number in Subnet mask - e.g. 255.xxx.255.0  
Fc9-type-21-icon.png Mask 2
Third number in Subnet mask - e.g. 255.255.xxx.0  
Fc9-type-21-icon.png Mask 3
Fourth number in Subnet mask - e.g. 255.255.255.xxx  
Fc9-conn-icon.png Gateway IP
Fc9-type-21-icon.png Gateway 0
First number from IP address used as the gateway to the internet e.g. xxx.168.1.1 
Fc9-type-21-icon.png Gateway 1
Second number from IP address used as the gateway to the internet e.g. 192.xxx.1.1 
Fc9-type-21-icon.png Gateway 2
Third number from IP address used as the gateway to the internet e.g. 192.168.xxx.1 
Fc9-type-21-icon.png Gateway 3
Fourth number from IP address used as the gateway to the internet e.g. 192.168.1.xxx 
Fc9-conn-icon.png Connections
Fc9-type-5-icon.png Trigger
WLAN module trigger pin connection 
Fc9-type-5-icon.png Reset
WLAN module reset pin connection 
Fc9-type-16-icon.png UART
WLAN module UART channel selection 
Fc9-type-5-icon.png Tx
WLAN module UART data transmit pin. Connects to receive pin on WLAN module. 
Fc9-type-5-icon.png Rx
WLAN module UART data receive pin. Connects to transmit pin on WLAN module. 
Fc9-type-10-icon.png SSID
Wireless network identifier string 
Fc9-type-16-icon.png SSID Broadcast
Decides if the network is detectable by a nearby Wifi device. 
Fc9-type-21-icon.png Server Port
Port number which is being monitored by the server, for starndard webpages port 80 is the default. To specify a non standard port you can enter the custom port number in the URL after a colon like this. 192.168.1.1:8080 - here we use 8080 as an alternative port. 
Fc9-type-16-icon.png WLAN Mode
Decides if the WLAN module is configured as a end device (connects to another wifi router) Or as an access point (allowing other wifi devices to connect to it) 
Fc9-type-16-icon.png DHCP
Controls if we are assigning IPs to any joing wifi devices or if we are using a fixed IP based system. 
Fc9-conn-icon.png DHCP Pool Start IP Address
Fc9-type-21-icon.png Start IP 0
Minimum IP address that can be generated for a joining device under DHCP. 
Fc9-type-21-icon.png Start IP 1
Minimum IP address that can be generated for a joining device under DHCP. 
Fc9-type-21-icon.png Start IP 2
Minimum IP address that can be generated for a joining device under DHCP. 
Fc9-type-21-icon.png Start IP 3
Minimum IP address that can be generated for a joining device under DHCP. 
Fc9-conn-icon.png DHCP Pool End IP Address
Fc9-type-21-icon.png End IP 0
Maximum IP address that can be generated for a joining device under DHCP. 
Fc9-type-21-icon.png End IP 1
Maximum IP address that can be generated for a joining device under DHCP. 
Fc9-type-21-icon.png End IP 2
Maximum IP address that can be generated for a joining device under DHCP. 
Fc9-type-21-icon.png End IP 3
Maximum IP address that can be generated for a joining device under DHCP. 
Fc9-type-16-icon.png Security
Decides if the security if untouched or reset to open. Security settings can be assigned using the Wiznet control web interface which is built into the modules. 
Fc9-type-16-icon.png Channel
Configures the Wifi data channel, setting to auto will allow the device to scan for the best channel for your area and the surounding wifi devices. 
Fc9-type-16-icon.png Data Rate
The data rate to try and acheive with the wifi connection. 
Fc9-type-16-icon.png Tx Power
The amount of power to use when transmitting signals to other wifi devices. 
Fc9-conn-icon.png HTML Source
Fc9-type-16-icon.png Max Web Pages
Maximum number of individual webpages we can serve up with the component. 
Fc9-type-21-icon.png Web Page Timeout
Number of cycles to try and send / receive a webpage before timing out. 
Fc9-type-10-icon.png Name Page 1
HTML name of webpage 1 
Fc9-type-11-icon.png HTML Page 1
HTML content for webpage 1 
Fc9-type-10-icon.png Name Page 2
HTML name of webpage 2 
Fc9-type-11-icon.png HTML Page 2
HTML content for webpage 2 
Fc9-type-10-icon.png Name Page 3
HTML name of webpage 3 
Fc9-type-11-icon.png HTML Page 3
HTML content for webpage 3  
Fc9-type-10-icon.png Name Page 4
HTML name of webpage 4 
Fc9-type-11-icon.png HTML Page 4
HTML content for webpage 4 
Fc9-type-10-icon.png Label
Text label used to help identify the component on the panel.