Jump to content

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

From Flowcode Help
No edit summary
No edit summary
Line 17: Line 17:
==Component Source Code==
==Component Source Code==


Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_WLAN_ESP32.fcfx FC_Comp_Source_WLAN_ESP32.fcfx]
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_temp/WLAN_ESP32.fcfx FC_Comp_Source_temp/WLAN_ESP32.fcfx]


Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_WLAN_ESP32.fcfx FC_Comp_Source_WLAN_ESP32.fcfx]
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_temp/WLAN_ESP32.fcfx FC_Comp_Source_temp/WLAN_ESP32.fcfx]


==Detailed description==
==Detailed description==
Line 48: Line 48:


''<span style="color:red;">No additional examples</span>''
''<span style="color:red;">No additional examples</span>''




Line 55: Line 57:
==Macro reference==
==Macro reference==


===ReadIPString===
===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;" | '''ReadIPString'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AcceptClose'''
|-
|-
| colspan="2" | Collects the local IP address and returns it as an ASCII string. e.g. "192.168.0.1"&nbsp;
| colspan="2" | Close the socket associated with the Accepted incoming connection&nbsp;
|-
|-
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===SocketConnect===
===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;" | '''SocketConnect'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''AcceptOpen'''
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | Returns 1 if there is an incoming connection on the listening port&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="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
Line 93: Line 85:




===SocketListen===
===ConnectToSSID===
{| 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;" | '''SocketListen'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ConnectToSSID'''
|-
|-
| colspan="2" | Listen on, or bind, local port to already opened socket. Returns 1 if OK, 0 if fail&nbsp;
| 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-u16-icon.png]] - UINT
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" | Port
| width="90%" | SSID
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" | [[File:Fc9-string-icon.png]] - STRING
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" | Key
|}
 
 
===ReadSSIDFromScan===
{| 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;
|-
|-
| 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%" | Index
| width="90%" | Timeout
|-
|-
| colspan="2" | SSID Index&nbsp;
| 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-string-icon.png]] - STRING
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}
Line 165: Line 148:




===ReadIP===
===Disconnect===
{| 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;" | '''Disconnect'''
|-
| colspan="2" | Attempts to disconnect from the SSID. &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" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
 
 
===Initialise===
{| 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'''
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| colspan="2" | Initialise the WiFi system Returns 1 if successful Returns 0 if not&nbsp;
| 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="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
Line 184: Line 176:




===SocketWrite===
===ReadEncryptionModeFromScan===
{| 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;" | '''SocketWrite'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadEncryptionModeFromScan'''
|-
|-
| colspan="2" | &nbsp;
| 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-string-icon.png]] - STRING
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Buffer
| width="90%" | Index
|-
|-
| colspan="2" | &nbsp;
| colspan="2" | SSID Index&nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===Disconnect===
===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;" | '''Disconnect'''
| 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;
|-
|-
|-
| colspan="2" | Attempts to disconnect from the SSID. &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="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
Line 222: Line 214:




===ReadSignalStrengthFromScan===
===ReadIPString===
{| 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;" | '''ReadIPString'''
|-
|-
| 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" | Collects the local IP address and returns it as an ASCII string. e.g. "192.168.0.1"&nbsp;
|-
|-
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
| 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===
===ReadSSIDFromScan===
{| 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;" | '''ReadEncryptionModeFromScan'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadSSIDFromScan'''
|-
|-
| 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" | Collects one of the SSID name strings from the last SSID Scan. The ScanForSSID macro must be called first.&nbsp;
|-
|-
|-
|-
Line 255: Line 242:
| colspan="2" | SSID Index&nbsp;
| 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-string-icon.png]] - STRING
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===ConnectToSSID===
===ReadSignalStrengthFromScan===
{| 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;" | '''ReadSignalStrengthFromScan'''
|-
|-
| colspan="2" | Attempts to connect to the given SSID and Key values.  Returns 1 if the SSID has been connected. &nbsp;
| 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-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;
| 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-s16-icon.png]] - INT
| width="90%" style="border-top: 2px solid #000;" | ''Return''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===SocketOpen===
===ScanForSSID===
{| 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;" | '''SocketOpen'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ScanForSSID'''
|-
|-
| colspan="2" | Returns 1 if socket sucessfully opened&nbsp;
| 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;
|-
|-
|-
|-
Line 317: Line 294:




===Uninitialise===
===SocketConnect===
{| 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;" | '''Uninitialise'''
| 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;
|-
|-
| colspan="2" | Shuts down the WiFi system  for low power operation. Returns 1 if successful  Returns 0 if not&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="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
Line 331: Line 318:




===AcceptOpen===
===SocketListen===
{| 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;" | '''AcceptOpen'''
| 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;
|-
|-
|-
| colspan="2" | Returns 1 if there is an incoming connection on the listening port&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="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE
Line 345: Line 337:




===ScanForSSID===
===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;" | '''ScanForSSID'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SocketOpen'''
|-
|-
| 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;
| colspan="2" | Returns 1 if socket sucessfully opened&nbsp;
|-
|-
|-
|-
Line 383: Line 375:




===AcceptClose===
===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;" | '''AcceptClose'''
| 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;
|-
|-
| colspan="2" | Close the socket associated with the Accepted incoming connection&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-void-icon.png]] - VOID
| 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''
| width="90%" style="border-top: 2px solid #000;" | ''Return''
|}
|}




===Initialise===
===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;" | '''Initialise'''
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Uninitialise'''
|-
|-
| colspan="2" | Initialise the WiFi system Returns 1 if successful Returns 0 if not&nbsp;
| colspan="2" | Shuts down the WiFi system for low power operation. Returns 1 if successful Returns 0 if not&nbsp;
|-
|-
|-
|-

Revision as of 12:03, 3 February 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_temp/WLAN_ESP32.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_temp/WLAN_ESP32.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples




Macro reference

AcceptClose

AcceptClose
Close the socket associated with the Accepted incoming connection 
- VOID Return


AcceptOpen

AcceptOpen
Returns 1 if there is an incoming connection on the listening port 
- BYTE Return


ConnectToSSID

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


CreateAccessPoint

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


Disconnect

Disconnect
Attempts to disconnect from the SSID.  
- BYTE Return


Initialise

Initialise
Initialise the WiFi system Returns 1 if successful Returns 0 if not 
- BYTE Return


ReadEncryptionModeFromScan

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


ReadIP

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


ReadIPString

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


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

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


ScanForSSID

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


SocketClose

SocketClose
 
- VOID Return


SocketConnect

SocketConnect
 
- STRING Address
 
- UINT Port
 
- BYTE Return


SocketListen

SocketListen
Listen on, or bind, local port to already opened socket. Returns 1 if OK, 0 if fail 
- UINT Port
 
- BYTE Return


SocketOpen

SocketOpen
Returns 1 if socket sucessfully opened 
- BYTE Return


SocketRead

SocketRead
 
- STRING Buffer
 
- UINT Size
 
- UINT Return


SocketWrite

SocketWrite
 
- STRING Buffer
 
- UINT Size
 
- UINT Return


Uninitialise

Uninitialise
Shuts down the WiFi system for low power operation. Returns 1 if successful Returns 0 if not 
- BYTE Return



Property reference

Properties
Verbose Debug
 
Simulation
Network Interface
List of network interfaces connected to the PC. Sets which interface we are communicating via. 
Console Data
Generate Console Data