Handels the WLAN-Connection.
More...
#include <Network.h>
Handels the WLAN-Connection.
Definition at line 30 of file Network.h.
◆ Network()
Network::Network |
( |
String |
ssid, |
|
|
String |
password, |
|
|
int |
WIFI_CS, |
|
|
int |
WIFI_IRQ, |
|
|
int |
WIFI_RST, |
|
|
int |
WIFI_EN |
|
) |
| |
Construct a new Network object.
- Parameters
-
ssid | - SSID of the WLan you would like to connect |
password | - Password of the desired WLAN |
WIFI_CS | - |
WIFI_IRQ | - |
WIFI_RST | - |
WIFI_EN | - |
Definition at line 17 of file Network.cpp.
◆ connectToWiFi()
void Network::connectToWiFi |
( |
| ) |
|
◆ decodeEncryptionType()
String Network::decodeEncryptionType |
( |
int |
errorcode | ) |
|
|
private |
◆ decodeWiFistate()
String Network::decodeWiFistate |
( |
int |
errorcode | ) |
|
|
private |
Decodes the Error Values from Wifi status() and returns a description.
- Parameters
-
errorcode | - errorvalue from wifi101 |
- Returns
- String - Errordescription
Definition at line 118 of file Network.cpp.
◆ init()
Intitialize WLan-Hardware.
Sets Pins from Communication-Config file and checks if a WiFi-Shield is present. If not the programm stops else it calls connectToWiFi()
Definition at line 25 of file Network.cpp.
◆ printCurrentNet()
void Network::printCurrentNet |
( |
| ) |
|
|
private |
Prints all relevant Information of the current Network.
SSID, BSSID, RSSI and encryptionType
Definition at line 85 of file Network.cpp.
◆ printMacAddress()
void Network::printMacAddress |
( |
byte |
mac[] | ) |
|
|
private |
Pritns Mac-address.
- Parameters
-
Definition at line 105 of file Network.cpp.
◆ printNetworkInfo()
void Network::printNetworkInfo |
( |
| ) |
|
Prints all relevant Network-Information of the connected network to serial.
IP-Address, MAC address (printWiFiData) SSID, BSSID, RSSI and encryptionType (printCurrentNet)
Definition at line 64 of file Network.cpp.
◆ printWiFiData()
void Network::printWiFiData |
( |
| ) |
|
|
private |
Prints all relevant WiFi-Information of the connected network to serial.
IP-Address, MAC address
Definition at line 72 of file Network.cpp.
◆ pEncryption
byte Network::pEncryption |
|
private |
value represents the type of encryption
Definition at line 132 of file Network.h.
◆ pIPLocal
IPAddress Network::pIPLocal |
|
private |
Contains own IP-Adress.
Definition at line 129 of file Network.h.
◆ pMac
Contains own MAC Adress.
Definition at line 131 of file Network.h.
◆ pMacRouter
byte Network::pMacRouter[6] |
|
private |
Contains MAC Adress of the Router BSSID.
Definition at line 130 of file Network.h.
◆ pPassword
String Network::pPassword |
|
private |
Contains WiFi Password.
Definition at line 124 of file Network.h.
◆ pRssi
The current RSSI /Received Signal Strength in dBm.
-30 dBm Maximum signal strength, you are probably standing right next to the access point.
-50 dBm Anything down to this level can be considered excellent signal strength.
-60 dBm Good, reliable signal strength.
-67 dBm Reliable signal strength. The minimum for any service depending on a reliable connection and signal strength, such as voice over Wi-Fi and non-HD video streaming.
-70 dBm Not a strong signal. Light browsing and email.
-80 dBm Unreliable signal strength, will not suffice for most services. Connecting to the network.
-90 dBm The chances of even connecting are very low at this level.
Source https://eyesaas.com/wi-fi-signal-strength/
Definition at line 146 of file Network.h.
◆ pSsid
Contains the SSID the WiFi shield is currently connected to.
Definition at line 123 of file Network.h.
◆ pWifi_CS
◆ pWifi_EN
◆ pWiFi_IRQ
◆ pWifi_RST
The documentation for this class was generated from the following files: