Component: WLAN (ESP32) (Comms: Networking)

From Flowcode Help
Revision as of 15:17, 20 January 2023 by Wiki bot (talk | contribs)
Jump to navigationJump to search
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 view the component source code (Beta): FC_Comp_Source_WLAN_ESP32.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples

Macro reference

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Fc9-comp-macro.png Initialise
Initialise the WiFi system 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
 
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 

==Macro reference==

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


Fc9-comp-macro.png Initialise
Initialise the WiFi system 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
 
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