Difference between revisions of "Component: WLAN (ESP32) (Comms: Networking)"

From Flowcode Help
Jump to navigationJump to search
 
(8 intermediate revisions by 3 users not shown)
Line 22: Line 22:
  
 
==Detailed description==
 
==Detailed description==
 +
 +
  
  
Line 35: Line 37:
 
==Examples==
 
==Examples==
  
 +
===Weather Predictor===
  
 +
Here is an example of a next-day weather predictor that also shows the current-day weather for a ESP32 embedded device
  
 +
It uses the BBC weather component via Netwoekcomms and WLAN ESP32 components to connect to the BBC server and retrieve the weather forecast for the specified area code.
  
 +
{{Fcfile|ESP32_TTGO_Weather_Forecast_Predictor.fcfx|ESP32 weather predictor}}
  
  
  
 +
===User Configurable Network Details===
  
 +
When creating a product using an ESP32 device it is important that it can connect to the network of the person buying the product.
  
''<span style="color:red;">No additional examples</span>''
+
This is complicated as the ESP32 requires that the network SSID and password be defined by the user and this requires a means of getting the data into the ESP32 device.
 
 
==Macro reference==
 
 
 
{| 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;" | '''ReadIPString'''
 
|-
 
| colspan="2" | Collects the local IP address and returns it as an ASCII string. e.g. "192.168.0.1"&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
  
 +
Luckily as the ESP32 features the ability to host it's own network we can use this to create a simple web interface where the user can enter their network details.
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
{{Fcfile|ESP32_Config_Wifi.fcfx|ESP32 Config WIFI}}
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SocketConnect'''
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Address
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Port
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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''
 
|}
 
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
More info on this available here [https://www.flowcode.co.uk/forums/viewtopic.php?f=10&t=634 Flowcode Forums - User Configurable Network Details]
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SocketListen'''
 
|-
 
| colspan="2" | Listen on, or bind, local port to already opened socket. Returns 1 if OK, 0 if fail&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Port
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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''
 
|}
 
  
 +
==Macro reference==
  
 +
===AcceptClose===
 
{| 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;" | '''ReadSSIDFromScan'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AcceptClose'''
 
|-
 
|-
| colspan="2" | Collects one of the SSID name strings from the last SSID Scan. The ScanForSSID macro must be called first.&nbsp;
+
| colspan="2" | Close the socket associated with the Accepted incoming connection&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
| width="90%" | Index
 
|-
 
| colspan="2" | SSID Index&nbsp;
 
|-
 
| 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''
 
|}
 
|}
  
  
 +
===AcceptOpen===
 
{| 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;" | '''CreateAccessPoint'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AcceptOpen'''
|-
 
| colspan="2" | 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.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | SSID
 
|-
 
| colspan="2" | Name of the wireless network to create&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Password
 
|-
 
| colspan="2" | Password used to gain access to the network&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Channel
 
|-
 
| colspan="2" | 802.11 Channel Range 1-14&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Encryption
 
|-
 
| colspan="2" | 0=Open, 1=WEP, 2=WPA_PSK, 3=WPA2_PSK, 4=WPA_WPA2_PSK&nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''ReadIP'''
 
|-
 
| colspan="2" | Collects a single byte from the local IP address. For example 192.168.0.1 Index = 3 : Return = 192 / Index = 0 : Return = 1&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Index
 
|-
 
| colspan="2" | Range: 0 to 3 Where 3 = the first number and 0 = the last number&nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''SocketWrite'''
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Buffer
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Size
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''Disconnect'''
 
|-
 
| colspan="2" | Attempts to disconnect from the SSID. &nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''ReadSignalStrengthFromScan'''
 
|-
 
| 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&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Index
 
|-
 
| colspan="2" | SSID Index&nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''ReadEncryptionModeFromScan'''
 
|-
 
| colspan="2" | 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&nbsp;
 
 
|-
 
|-
 +
| colspan="2" | Returns 1 if there is an incoming connection on the listening port&nbsp;
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Index
 
|-
 
| colspan="2" | SSID Index&nbsp;
 
 
|-
 
|-
 
| 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 242: Line 90:
  
  
 +
===ConnectToSSID===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 270: Line 119:
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
===CreateAccessPoint===
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SocketOpen'''
 
|-
 
| colspan="2" | Returns 1 if socket sucessfully opened&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''SocketClose'''
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''Uninitialise'''
 
|-
 
| colspan="2" | Shuts down the WiFi system  for low power operation. Returns 1 if successful  Returns 0 if not&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''AcceptOpen'''
 
|-
 
| colspan="2" | Returns 1 if there is an incoming connection on the listening port&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''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.&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''SocketRead'''
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Buffer
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Size
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''AcceptClose'''
 
|-
 
| colspan="2" | Close the socket associated with the Accepted incoming connection&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''Initialise'''
 
|-
 
| colspan="2" | Initialise the WiFi system Returns 1 if successful Returns 0 if not&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
 
 
 
 
==Property reference==
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Verbose Debug
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Network Interface
 
|-
 
| colspan="2" | List of network interfaces connected to the PC.  Sets which interface we are communicating via.&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Console Data
 
|-
 
| colspan="2" | Generate Console Data&nbsp;
 
|}==Macro reference==
 
 
 
{| 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;" | '''ReadIPString'''
 
|-
 
| colspan="2" | Collects the local IP address and returns it as an ASCII string. e.g. "192.168.0.1"&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''SocketConnect'''
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Address
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Port
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''SocketListen'''
 
|-
 
| colspan="2" | Listen on, or bind, local port to already opened socket. Returns 1 if OK, 0 if fail&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Port
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''ReadSSIDFromScan'''
 
|-
 
| colspan="2" | Collects one of the SSID name strings from the last SSID Scan. The ScanForSSID macro must be called first.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Index
 
|-
 
| colspan="2" | SSID Index&nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 519: Line 153:
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
===Disconnect===
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadIP'''
 
|-
 
| colspan="2" | Collects a single byte from the local IP address. For example 192.168.0.1 Index = 3 : Return = 192 / Index = 0 : Return = 1&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Index
 
|-
 
| colspan="2" | Range: 0 to 3 Where 3 = the first number and 0 = the last number&nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''SocketWrite'''
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Buffer
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Size
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 573: Line 167:
  
  
 +
===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;" | '''ReadSignalStrengthFromScan'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
|-
 
|-
| 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&nbsp;
+
| colspan="2" | Initialise the WiFi system Returns 1 if successful Returns 0 if not&nbsp;
 
|-
 
|-
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
+
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Index
 
|-
 
| colspan="2" | SSID Index&nbsp;
 
|-
 
| 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''
 
|}
 
|}
  
  
 +
===ReadEncryptionModeFromScan===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 609: Line 200:
  
  
 +
===ReadIP===
 
{| 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;" | '''ConnectToSSID'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadIP'''
 
|-
 
|-
| colspan="2" | Attempts to connect to the given SSID and Key values. Returns 1 if the SSID has been connected. &nbsp;
+
| colspan="2" | Collects a single byte from the local IP address. For example 192.168.0.1 Index = 3 : Return = 192 / Index = 0 : Return = 1&nbsp;
 
|-
 
|-
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | SSID
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Key
 
|-
 
| colspan="2" | &nbsp;
 
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Timeout
+
| width="90%" | Index
|-
 
| colspan="2" | Number of seconds to wait for the connection, default 20&nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''SocketOpen'''
 
|-
 
| colspan="2" | Returns 1 if socket sucessfully opened&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''SocketClose'''
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''Uninitialise'''
 
|-
 
| colspan="2" | Shuts down the WiFi system  for low power operation. Returns 1 if successful  Returns 0 if not&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''AcceptOpen'''
 
|-
 
| colspan="2" | Returns 1 if there is an incoming connection on the listening port&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''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.&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''SocketRead'''
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Buffer
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Size
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''AcceptClose'''
 
|-
 
| colspan="2" | Close the socket associated with the Accepted incoming connection&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''Initialise'''
 
|-
 
| colspan="2" | Initialise the WiFi system Returns 1 if successful Returns 0 if not&nbsp;
 
 
|-
 
|-
 +
| colspan="2" | Range: 0 to 3 Where 3 = the first number and 0 = the last number&nbsp;
 
|-
 
|-
 
| 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 751: Line 219:
  
  
 
+
===ReadIPString===
 
 
==Property reference==
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Verbose Debug
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Network Interface
 
|-
 
| colspan="2" | List of network interfaces connected to the PC.  Sets which interface we are communicating via.&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Console Data
 
|-
 
| colspan="2" | Generate Console Data&nbsp;
 
|}==Macro reference==
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 794: Line 233:
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
===ReadSSIDFromScan===
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SocketConnect'''
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Address
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Port
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''SocketListen'''
 
|-
 
| colspan="2" | Listen on, or bind, local port to already opened socket. Returns 1 if OK, 0 if fail&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Port
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 853: Line 252:
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
===ReadSignalStrengthFromScan===
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''CreateAccessPoint'''
 
|-
 
| colspan="2" | 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.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | SSID
 
|-
 
| colspan="2" | Name of the wireless network to create&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Password
 
|-
 
| colspan="2" | Password used to gain access to the network&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Channel
 
|-
 
| colspan="2" | 802.11 Channel Range 1-14&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Encryption
 
|-
 
| colspan="2" | 0=Open, 1=WEP, 2=WPA_PSK, 3=WPA2_PSK, 4=WPA_WPA2_PSK&nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''ReadIP'''
 
|-
 
| colspan="2" | Collects a single byte from the local IP address. For example 192.168.0.1 Index = 3 : Return = 192 / Index = 0 : Return = 1&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Index
 
|-
 
| colspan="2" | Range: 0 to 3 Where 3 = the first number and 0 = the last number&nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''SocketWrite'''
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Buffer
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Size
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''Disconnect'''
 
|-
 
| colspan="2" | Attempts to disconnect from the SSID. &nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 958: Line 271:
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
===ScanForSSID===
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadEncryptionModeFromScan'''
 
|-
 
| colspan="2" | 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&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Index
 
|-
 
| colspan="2" | SSID Index&nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''ConnectToSSID'''
 
|-
 
| colspan="2" | Attempts to connect to the given SSID and Key values.  Returns 1 if the SSID has been connected. &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | SSID
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Key
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Timeout
 
|-
 
| colspan="2" | Number of seconds to wait for the connection, default 20&nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''SocketOpen'''
 
|-
 
| colspan="2" | Returns 1 if socket sucessfully opened&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''SocketClose'''
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''Uninitialise'''
 
|-
 
| colspan="2" | Shuts down the WiFi system  for low power operation. Returns 1 if successful  Returns 0 if not&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''AcceptOpen'''
 
|-
 
| colspan="2" | Returns 1 if there is an incoming connection on the listening port&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 1,069: Line 285:
  
  
 +
===SocketClose===
 
{| 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;" | '''SocketRead'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SocketClose'''
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Buffer
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 
| width="90%" | Size
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| 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''
 
|}
 
 
 
{| 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;" | '''AcceptClose'''
 
|-
 
| colspan="2" | Close the socket associated with the Accepted incoming connection&nbsp;
 
 
|-
 
|-
 
|-
 
|-
Line 1,105: Line 299:
  
  
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
+
===SocketConnect===
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 
|-
 
| colspan="2" | Initialise the WiFi system Returns 1 if successful Returns 0 if not&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
 
 
 
 
==Property reference==
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Verbose Debug
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 
| width="90%" | Network Interface
 
|-
 
| colspan="2" | List of network interfaces connected to the PC.  Sets which interface we are communicating via.&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Console Data
 
|-
 
| colspan="2" | Generate Console Data&nbsp;
 
|}==Macro reference==
 
 
 
{| 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;" | '''ReadIPString'''
 
|-
 
| colspan="2" | Collects the local IP address and returns it as an ASCII string. e.g. "192.168.0.1"&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 1,184: Line 323:
  
  
 +
===SocketListen===
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
 
|-
Line 1,202: Line 342:
  
  
 +
===SocketOpen===
 
{| 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;" | '''ReadSSIDFromScan'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SocketOpen'''
 
|-
 
|-
| colspan="2" | Collects one of the SSID name strings from the last SSID Scan. The ScanForSSID macro must be called first.&nbsp;
+
| colspan="2" | Returns 1 if socket sucessfully opened&nbsp;
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Index
 
|-
 
| colspan="2" | SSID Index&nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''CreateAccessPoint'''
 
|-
 
| colspan="2" | 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.&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | SSID
 
|-
 
| colspan="2" | Name of the wireless network to create&nbsp;
 
 
|-
 
|-
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Password
 
|-
 
| colspan="2" | Password used to gain access to the network&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Channel
 
|-
 
| colspan="2" | 802.11 Channel Range 1-14&nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Encryption
 
|-
 
| colspan="2" | 0=Open, 1=WEP, 2=WPA_PSK, 3=WPA2_PSK, 4=WPA_WPA2_PSK&nbsp;
 
 
|-
 
|-
 
| 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 1,253: Line 356:
  
  
 +
===SocketRead===
 
{| 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;" | '''ReadIP'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SocketRead'''
|-
 
| colspan="2" | Collects a single byte from the local IP address. For example 192.168.0.1 Index = 3 : Return = 192 / Index = 0 : Return = 1&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Index
 
|-
 
| colspan="2" | Range: 0 to 3 Where 3 = the first number and 0 = the last number&nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''SocketWrite'''
 
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
Line 1,294: Line 380:
  
  
 +
===SocketWrite===
 
{| 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;" | '''Disconnect'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SocketWrite'''
|-
 
| colspan="2" | Attempts to disconnect from the SSID. &nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''ReadSignalStrengthFromScan'''
 
|-
 
| 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&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Index
 
|-
 
| colspan="2" | SSID Index&nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''ReadEncryptionModeFromScan'''
 
|-
 
| colspan="2" | 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&nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Index
 
|-
 
| colspan="2" | SSID Index&nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''ConnectToSSID'''
 
|-
 
| colspan="2" | Attempts to connect to the given SSID and Key values.  Returns 1 if the SSID has been connected. &nbsp;
 
|-
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | SSID
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
 
| width="90%" | Key
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
 
| width="90%" | Timeout
 
|-
 
| colspan="2" | Number of seconds to wait for the connection, default 20&nbsp;
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''SocketOpen'''
 
|-
 
| colspan="2" | Returns 1 if socket sucessfully opened&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''SocketClose'''
 
|-
 
| colspan="2" | &nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''Uninitialise'''
 
|-
 
| colspan="2" | Shuts down the WiFi system  for low power operation. Returns 1 if successful  Returns 0 if not&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''AcceptOpen'''
 
|-
 
| colspan="2" | Returns 1 if there is an incoming connection on the listening port&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''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.&nbsp;
 
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''SocketRead'''
 
 
|-
 
|-
 
| colspan="2" | &nbsp;
 
| colspan="2" | &nbsp;
Line 1,459: Line 404:
  
  
 +
===Uninitialise===
 
{| 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;" | '''AcceptClose'''
+
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Uninitialise'''
 
|-
 
|-
| colspan="2" | Close the socket associated with the Accepted incoming connection&nbsp;
+
| colspan="2" | Shuts down the WiFi system for low power operation. Returns 1 if successful Returns 0 if not&nbsp;
|-
 
|-
 
| 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''
 
|}
 
 
 
 
 
{| 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;" | '''Initialise'''
 
|-
 
| colspan="2" | Initialise the WiFi system Returns 1 if successful Returns 0 if not&nbsp;
 
 
|-
 
|-
 
|-
 
|-
Line 1,483: Line 416:
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 
|}
 
|}
 
 
  
  
Line 1,498: Line 429:
 
| width="90%" | Verbose Debug
 
| width="90%" | Verbose Debug
 
|-
 
|-
| colspan="2" | &nbsp;
+
| colspan="2" | Provides verbose debugging output via hardware UART channel 1 which is often connected to a UART to USB bridge. &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 +
| width="90%" | SSID Scan Size
 +
|-
 +
| colspan="2" | Maximum number of SSIDs that can be detailed from a single SSID network scan. Default 8&nbsp;
 
|-
 
|-
 
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]

Latest revision as of 12:24, 3 November 2023

Author Matrix Ltd.
Version 2.4
Category Comms: Networking


WLAN (ESP32) component

Wireless LAN component designed to work with ESP32 modules

Component Source Code

Please click here to download the component source project: FC_Comp_Source_WLAN_ESP32.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_WLAN_ESP32.fcfx

Detailed description

No detailed description exists yet for this component

Examples

Weather Predictor

Here is an example of a next-day weather predictor that also shows the current-day weather for a ESP32 embedded device

It uses the BBC weather component via Netwoekcomms and WLAN ESP32 components to connect to the BBC server and retrieve the weather forecast for the specified area code.

FC6 Icon.png ESP32 weather predictor


User Configurable Network Details

When creating a product using an ESP32 device it is important that it can connect to the network of the person buying the product.

This is complicated as the ESP32 requires that the network SSID and password be defined by the user and this requires a means of getting the data into the ESP32 device.

Luckily as the ESP32 features the ability to host it's own network we can use this to create a simple web interface where the user can enter their network details.

FC6 Icon.png ESP32 Config WIFI


More info on this available here Flowcode Forums - User Configurable Network Details

Macro reference

AcceptClose

Fc9-comp-macro.png AcceptClose
Close the socket associated with the Accepted incoming connection 
Fc9-void-icon.png - VOID Return


AcceptOpen

Fc9-comp-macro.png AcceptOpen
Returns 1 if there is an incoming connection on the listening port 
Fc9-u8-icon.png - BYTE Return


ConnectToSSID

Fc9-comp-macro.png ConnectToSSID
Attempts to connect to the given SSID and Key values. Returns 1 if the SSID has been connected.  
Fc9-string-icon.png - STRING SSID
 
Fc9-string-icon.png - STRING Key
 
Fc9-u8-icon.png - BYTE Timeout
Number of seconds to wait for the connection, default 20 
Fc9-u8-icon.png - BYTE Return


CreateAccessPoint

Fc9-comp-macro.png 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. 
Fc9-string-icon.png - STRING SSID
Name of the wireless network to create 
Fc9-string-icon.png - STRING Password
Password used to gain access to the network 
Fc9-u8-icon.png - BYTE Channel
802.11 Channel Range 1-14 
Fc9-u8-icon.png - BYTE Encryption
0=Open, 1=WEP, 2=WPA_PSK, 3=WPA2_PSK, 4=WPA_WPA2_PSK 
Fc9-u8-icon.png - BYTE Return


Disconnect

Fc9-comp-macro.png Disconnect
Attempts to disconnect from the SSID.  
Fc9-u8-icon.png - BYTE Return


Initialise

Fc9-comp-macro.png Initialise
Initialise the WiFi system Returns 1 if successful Returns 0 if not 
Fc9-u8-icon.png - BYTE Return


ReadEncryptionModeFromScan

Fc9-comp-macro.png 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 
Fc9-u8-icon.png - BYTE Index
SSID Index 
Fc9-u8-icon.png - BYTE Return


ReadIP

Fc9-comp-macro.png ReadIP
Collects a single byte from the local IP address. For example 192.168.0.1 Index = 3 : Return = 192 / Index = 0 : Return = 1 
Fc9-u8-icon.png - BYTE Index
Range: 0 to 3 Where 3 = the first number and 0 = the last number 
Fc9-u8-icon.png - BYTE Return


ReadIPString

Fc9-comp-macro.png ReadIPString
Collects the local IP address and returns it as an ASCII string. e.g. "192.168.0.1" 
Fc9-string-icon.png - STRING Return


ReadSSIDFromScan

Fc9-comp-macro.png ReadSSIDFromScan
Collects one of the SSID name strings from the last SSID Scan. The ScanForSSID macro must be called first. 
Fc9-u8-icon.png - BYTE Index
SSID Index 
Fc9-string-icon.png - STRING Return


ReadSignalStrengthFromScan

Fc9-comp-macro.png 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 
Fc9-u8-icon.png - BYTE Index
SSID Index 
Fc9-s16-icon.png - INT Return


ScanForSSID

Fc9-comp-macro.png 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. 
Fc9-u8-icon.png - BYTE Return


SocketClose

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


SocketConnect

Fc9-comp-macro.png SocketConnect
 
Fc9-string-icon.png - STRING Address
 
Fc9-u16-icon.png - UINT Port
 
Fc9-u8-icon.png - BYTE Return


SocketListen

Fc9-comp-macro.png SocketListen
Listen on, or bind, local port to already opened socket. Returns 1 if OK, 0 if fail 
Fc9-u16-icon.png - UINT Port
 
Fc9-u8-icon.png - BYTE Return


SocketOpen

Fc9-comp-macro.png SocketOpen
Returns 1 if socket sucessfully opened 
Fc9-u8-icon.png - BYTE Return


SocketRead

Fc9-comp-macro.png SocketRead
 
Fc9-string-icon.png - STRING Buffer
 
Fc9-u16-icon.png - UINT Size
 
Fc9-u16-icon.png - UINT Return


SocketWrite

Fc9-comp-macro.png SocketWrite
 
Fc9-string-icon.png - STRING Buffer
 
Fc9-u16-icon.png - UINT Size
 
Fc9-u16-icon.png - UINT Return


Uninitialise

Fc9-comp-macro.png Uninitialise
Shuts down the WiFi system for low power operation. Returns 1 if successful Returns 0 if not 
Fc9-u8-icon.png - BYTE Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-7-icon.png Verbose Debug
Provides verbose debugging output via hardware UART channel 1 which is often connected to a UART to USB bridge.  
Fc9-type-21-icon.png SSID Scan Size
Maximum number of SSIDs that can be detailed from a single SSID network scan. Default 8 
Fc9-conn-icon.png Simulation
Fc9-type-16-icon.png Network Interface
List of network interfaces connected to the PC. Sets which interface we are communicating via. 
Fc9-type-7-icon.png Console Data
Generate Console Data