Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions components/wifi/esp8266-driver/ESP8266Interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@

#define TRACE_GROUP "ESPI" // ESP8266 Interface

#define ESP8266_WIFI_IF_NAME "es0"

using namespace mbed;
using namespace rtos;

Expand Down Expand Up @@ -413,6 +415,12 @@ const char *ESP8266Interface::get_netmask()
return _conn_stat != NSAPI_STATUS_DISCONNECTED ? _esp.netmask() : NULL;
}

char *ESP8266Interface::get_interface_name(char *interface_name)
{
memcpy(interface_name, ESP8266_WIFI_IF_NAME, sizeof(ESP8266_WIFI_IF_NAME));
return interface_name;
}

int8_t ESP8266Interface::get_rssi()
{
return _esp.rssi();
Expand Down
7 changes: 7 additions & 0 deletions components/wifi/esp8266-driver/ESP8266Interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,13 @@ class ESP8266Interface : public NetworkStack, public WiFiInterface {
*/
virtual const char *get_netmask();

/** Get the network interface name
*
* @return Null-terminated representation of the network interface name
* or null if interface not exists
*/
virtual char *get_interface_name(char *interface_name);

/** Gets the current radio signal strength for active connection
*
* @return Connection strength in dBm (negative value)
Expand Down