ZG2100NetIf Class Reference
ZG2100 Wi-Fi Module network interface. More...
#include <ZG2100NetIf.h>
Inherits LwipNetIf, and LwipNetIf.
Public Member Functions | |
ZG2100NetIf (PinName mosi, PinName miso, PinName sclk, PinName cs, PinName intp, PinName nrst) | |
Instantiates the Interface and register it against the stack, DHCP will be used. | |
ZG2100NetIf (PinName mosi, PinName miso, PinName sclk, PinName cs, PinName intp, PinName nrst, IpAddr ip, IpAddr netmask, IpAddr gateway, IpAddr dns) | |
Instantiates the Interface and register it against the stack, DHCP will not be used. | |
void | init () |
Initializes module. | |
void | setSsid (const char *ssid) |
Sets network's SSID. | |
void | setWepKey (const byte *key, int len) |
Sets network's WEP key. | |
void | setWpaPass (const char *pass) |
Sets network's WPA passphrase (can last up to 30s) | |
void | setPskKey (const byte *key, int len) |
Sets network's PSK key (preferred when using WPA to avoid computing it each time) | |
ZG2100Err | connect (ZG_BSS_TYPE type, ZG_SECURITY security) |
Connects to network. | |
void | disconnect () |
Disconnects from network. | |
ZG2100Err | setup (int timeout_ms=15000) |
Brings the interface up (must be connected to a network first) | |
ZG2100NetIf (PinName mosi, PinName miso, PinName sclk, PinName cs, PinName intp, PinName nrst) | |
Instantiates the Interface and register it against the stack, DHCP will be used. | |
ZG2100NetIf (PinName mosi, PinName miso, PinName sclk, PinName cs, PinName intp, PinName nrst, IpAddr ip, IpAddr netmask, IpAddr gateway, IpAddr dns) | |
Instantiates the Interface and register it against the stack, DHCP will not be used. | |
void | init () |
Initializes module. | |
void | setSsid (const char *ssid) |
Sets network's SSID. | |
void | setWepKey (const byte *key, int len) |
Sets network's WEP key. | |
void | setWpaPass (const char *pass) |
Sets network's WPA passphrase (can last up to 30s) | |
void | setPskKey (const byte *key, int len) |
Sets network's PSK key (preferred when using WPA to avoid computing it each time) | |
ZG2100Err | connect (ZG_BSS_TYPE type, ZG_SECURITY security) |
Connects to network. | |
void | disconnect () |
Disconnects from network. | |
ZG2100Err | setup (int timeout_ms=15000) |
Brings the interface up (must be connected to a network first) | |
IpAddr | getIp () const |
Returns the IP of the interface once it's connected. | |
IpAddr | getIp () const |
Returns the IP of the interface once it's connected. |
Detailed Description
ZG2100 Wi-Fi Module network interface.
This class provides Wi-Fi connectivity to the stack
Definition at line 48 of file LPC1768/if/zg2100/ZG2100NetIf.h.
Constructor & Destructor Documentation
ZG2100NetIf | ( | PinName | mosi, |
PinName | miso, | ||
PinName | sclk, | ||
PinName | cs, | ||
PinName | intp, | ||
PinName | nrst | ||
) |
Instantiates the Interface and register it against the stack, DHCP will be used.
ZG2100NetIf | ( | PinName | mosi, |
PinName | miso, | ||
PinName | sclk, | ||
PinName | cs, | ||
PinName | intp, | ||
PinName | nrst, | ||
IpAddr | ip, | ||
IpAddr | netmask, | ||
IpAddr | gateway, | ||
IpAddr | dns | ||
) |
Instantiates the Interface and register it against the stack, DHCP will not be used.
IpAddr is a container class that can be constructed with either 4 bytes or no parameters for a null IP address.
ZG2100NetIf | ( | PinName | mosi, |
PinName | miso, | ||
PinName | sclk, | ||
PinName | cs, | ||
PinName | intp, | ||
PinName | nrst | ||
) |
Instantiates the Interface and register it against the stack, DHCP will be used.
ZG2100NetIf | ( | PinName | mosi, |
PinName | miso, | ||
PinName | sclk, | ||
PinName | cs, | ||
PinName | intp, | ||
PinName | nrst, | ||
IpAddr | ip, | ||
IpAddr | netmask, | ||
IpAddr | gateway, | ||
IpAddr | dns | ||
) |
Instantiates the Interface and register it against the stack, DHCP will not be used.
IpAddr is a container class that can be constructed with either 4 bytes or no parameters for a null IP address.
Member Function Documentation
ZG2100Err connect | ( | ZG_BSS_TYPE | type, |
ZG_SECURITY | security | ||
) |
Connects to network.
ZG2100Err connect | ( | ZG_BSS_TYPE | type, |
ZG_SECURITY | security | ||
) |
Connects to network.
void disconnect | ( | ) |
Disconnects from network.
void disconnect | ( | ) |
Disconnects from network.
IpAddr getIp | ( | ) | const [inherited] |
Returns the IP of the interface once it's connected.
IpAddr getIp | ( | ) | const [inherited] |
Returns the IP of the interface once it's connected.
void init | ( | ) |
Initializes module.
void init | ( | ) |
Initializes module.
void setPskKey | ( | const byte * | key, |
int | len | ||
) |
Sets network's PSK key (preferred when using WPA to avoid computing it each time)
void setPskKey | ( | const byte * | key, |
int | len | ||
) |
Sets network's PSK key (preferred when using WPA to avoid computing it each time)
void setSsid | ( | const char * | ssid ) |
Sets network's SSID.
void setSsid | ( | const char * | ssid ) |
Sets network's SSID.
ZG2100Err setup | ( | int | timeout_ms = 15000 ) |
Brings the interface up (must be connected to a network first)
Uses DHCP if necessary
- Parameters:
-
timeout_ms : You can set the timeout parameter in milliseconds, if not it defaults to 15s
- Returns:
- : ZG_OK on success or ZG_TIMEOUT on timeout
ZG2100Err setup | ( | int | timeout_ms = 15000 ) |
Brings the interface up (must be connected to a network first)
Uses DHCP if necessary
- Parameters:
-
timeout_ms : You can set the timeout parameter in milliseconds, if not it defaults to 15s
- Returns:
- : ZG_OK on success or ZG_TIMEOUT on timeout
void setWepKey | ( | const byte * | key, |
int | len | ||
) |
Sets network's WEP key.
void setWepKey | ( | const byte * | key, |
int | len | ||
) |
Sets network's WEP key.
void setWpaPass | ( | const char * | pass ) |
Sets network's WPA passphrase (can last up to 30s)
void setWpaPass | ( | const char * | pass ) |
Sets network's WPA passphrase (can last up to 30s)
Generated on Tue Jul 12 2022 13:17:38 by 1.7.2