Component: WLAN (EB069, WIZ610wi) (Wireless)

From Flowcode Help
Revision as of 14:50, 5 March 2014 by BenR (talk | contribs) (→‎Examples)
Jump to navigationJump to search
Author Matrix Ltd.
Version 1.0
Category Wireless


Image 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.

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.


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

SendString

Sends the given Text.

Appends a CR/LF pair of characters it CrLf is true.

Parameters

<- STRING Text
This parameter may be returned back to the caller
BYTE CrLf


Return value

This call does not return a value


SendCommand

Sends the given command and returns the reply status.

(See GetReply for return values)

Parameters

<- STRING Command
This parameter may be returned back to the caller


Return value

BYTE


CheckForPageRequests

To be called periodically. Returns non-zero if a request has been processed

Parameters

This macro has no parameters


Return value

BYTE


EnableCommandMode

Enables command mode. Must be called before commands are issued.

Parameters

This macro has no parameters


Return value

This call does not return a value


ReceiveIncoming

Returns the received data string

Parameters

This macro has no parameters


Return value

STRING


ReadConnectionStatus

Checks the connection status.

Returns 0 if not connected, 1 if connected.

Parameters

This macro has no parameters


Return value

BYTE


SetOutValue

Set the value of an outbound substitution string

Parameters

BYTE index
<- STRING value
This parameter may be returned back to the caller


Return value

This call does not return a value


DisableCommandMode

Exits command mode

Parameters

This macro has no parameters


Return value

This call does not return a value


GetInValue

Returns the string value of a Request parameter

Parameters

BYTE index
Index of the request paramter, starting at zero.


Return value

STRING


ConnectToSSID

Attempts to connect to the given SSID and Key values. Returns 0 if successful.

Parameters

<- STRING SSID
This parameter may be returned back to the caller
<- STRING Key
This parameter may be returned back to the caller


Return value

BYTE


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

Parameters

This macro has no parameters


Return value

BYTE


Initialise

Initialise the device with the property data.

Returns 0 if successful

Parameters

This macro has no parameters


Return value

BYTE


Simulation macro reference

This component does not contain any simulation macros


Property reference

IP 0

This property is of type Unsigned integer and can be referenced with the variable name IP0.

No additional information


IP 1

This property is of type Unsigned integer and can be referenced with the variable name IP1.

No additional information


IP 2

This property is of type Unsigned integer and can be referenced with the variable name IP2.

No additional information


IP 3

This property is of type Unsigned integer and can be referenced with the variable name IP3.

No additional information


Mask 0

This property is of type Unsigned integer and can be referenced with the variable name MIP0.

No additional information


Mask 1

This property is of type Unsigned integer and can be referenced with the variable name MIP1.

No additional information


Mask 2

This property is of type Unsigned integer and can be referenced with the variable name MIP2.

No additional information


Mask 3

This property is of type Unsigned integer and can be referenced with the variable name MIP3.

No additional information


Gateway 0

This property is of type Unsigned integer and can be referenced with the variable name GIP0.

No additional information


Gateway 1

This property is of type Unsigned integer and can be referenced with the variable name GIP1.

No additional information


Gateway 2

This property is of type Unsigned integer and can be referenced with the variable name GIP2.

No additional information


Gateway 3

This property is of type Unsigned integer and can be referenced with the variable name GIP3.

No additional information


Trigger

This property is of type Single digital pin and can be referenced with the variable name TRIGGER.

No additional information


Reset

This property is of type Single digital pin and can be referenced with the variable name RESET.

No additional information


UART

This property is of type Fixed list of ints and can be referenced with the variable name UART_CHANNEL.

No additional information


Tx

This property is of type Single digital pin and can be referenced with the variable name TX.

No additional information


Rx

This property is of type Single digital pin and can be referenced with the variable name RX.

No additional information


SSID

This property is of type Line of text and can be referenced with the variable name SSID.

No additional information


SSID Broadcast

This property is of type Fixed list of ints and can be referenced with the variable name SSID_MODE.

No additional information


Server Port

This property is of type Unsigned integer and can be referenced with the variable name PORT.

No additional information


WLAN Mode

This property is of type Fixed list of ints and can be referenced with the variable name WLAN_MODEA.

No additional information


DHCP

This property is of type Fixed list of ints and can be referenced with the variable name WLAN_DHCPA.

No additional information


Start IP 0

This property is of type Unsigned integer and can be referenced with the variable name SIP0.

No additional information


Start IP 1

This property is of type Unsigned integer and can be referenced with the variable name SIP1.

No additional information


Start IP 2

This property is of type Unsigned integer and can be referenced with the variable name SIP2.

No additional information


Start IP 3

This property is of type Unsigned integer and can be referenced with the variable name SIP3.

No additional information


End IP 0

This property is of type Unsigned integer and can be referenced with the variable name EIP0.

No additional information


End IP 1

This property is of type Unsigned integer and can be referenced with the variable name EIP1.

No additional information


End IP 2

This property is of type Unsigned integer and can be referenced with the variable name EIP2.

No additional information


End IP 3

This property is of type Unsigned integer and can be referenced with the variable name EIP3.

No additional information


Security

This property is of type Fixed list of ints and can be referenced with the variable name WLAN_SMODE.

No additional information


Channel

This property is of type Fixed list of ints and can be referenced with the variable name CHANNEL.

No additional information


Data Rate

This property is of type Fixed list of ints and can be referenced with the variable name DATA_RATE.

No additional information


Tx Power

This property is of type Fixed list of ints and can be referenced with the variable name TX_POWER.

No additional information


Max Web Pages

This property is of type Fixed list of ints and can be referenced with the variable name PAGES.

No additional information


Web Page Timeout

This property is of type Unsigned integer and can be referenced with the variable name TIMEOUT.

No additional information


Name Page 1

This property is of type Line of text and can be referenced with the variable name name1.

No additional information


HTML Page 1

This property is of type Multiple lines of text and can be referenced with the variable name html1.

No additional information


Name Page 2

This property is of type Line of text and can be referenced with the variable name name2.

No additional information


HTML Page 2

This property is of type Multiple lines of text and can be referenced with the variable name html2.

No additional information


Name Page 3

This property is of type Line of text and can be referenced with the variable name name3.

No additional information


HTML Page 3

This property is of type Multiple lines of text and can be referenced with the variable name html3.

No additional information


Name Page 4

This property is of type Line of text and can be referenced with the variable name name4.

No additional information


HTML Page 4

This property is of type Multiple lines of text and can be referenced with the variable name html4.

No additional information


Label

This property is of type Line of text and can be referenced with the variable name label.

No additional information