ESP32 WiFi Library – Station Class

Home / References ESP32 Library / WiFi 

The Station section of the ESP32 Arduino WiFi Library allows the ESP32 to operate as a Wi-Fi station (STA), connecting to existing networks for internet and device communication. It provides functions for managing connections, handling credentials, retrieving status, and optimizing network performance—essential for IoT applications.

This section serves as a critical component for IoT applications, enabling seamless integration of ESP32-based devices into wireless ecosystems.

WiFi Station Configuration Category

  • begin: Configure and initiate a Wi-Fi connection.
  • config: Indicating the current Wi-Fi connection status.
  • disconnect: Terminate the current Wi-Fi connection.
  • reconnect:Re-establish WiFi connection after disconnected.
  • setAutoReconnect: Automatic reconnection of Wi-Fi network.
  • waitForConnectResult: Wait for the result of a WiFi connection attempt.
  • setHostname: sets the hostname on the network.

WiFi Station Information Category

  • status: Retrieve the current WiFi connection status.
  • onEvent: Register a callback function that will be invoked when specific WiFi events occur. 
  • SSID: Retrieve the name of the WiFi network that the ESP32 is connected.
  • localIP: Retrieves the local IP address of the ESP32 when it is connected to a Wi-Fi network.
  • gatewayIP: Retrieves the IP address of the gateway (router) of the currently connected Wi-Fi network.
  • macAddress: Retrieve the MAC (Media Access Control) address of the ESP32. 
  • subnetMask: Retrieves the subnet mask of the currently connected Wi-Fi network.
  • dnsIP: Retrieves the IP address of the DNS server configured for the ESP32. 
  • psk: Retrieves the password of the currently connected Wi-Fi network.
  • isConnected: Checks whether the ESP32 is currently connected to a Wi-Fi network.
  • RSSI: Retrieves the Received Signal Strength Indicator (RSSI) of the currently connected Wi-Fi network. 
  • BSSIDstr: Retrieves the MAC address (BSSID) of the currently connected Wi-Fi network Access Point device.
  • getAutoReconnect: Checks whether the ESP32 is configured to automatically reconnect to a Wi-Fi network. 
  • getHostname: Retrieves the current hostname of the ESP32 device.

ESP32 Library Index

ESP32 Arduino Core Library


FAQ

Ready to experiment and explore more about ESP32? Visit our website’s All About ESP32 Resources Hub, packed with tutorials, guides, and tools to inspire your maker journey. Experiment, explore, and elevate your skills with everything you need to master this powerful microcontroller platform!

error: Content is protected !!