Skip to content

Add missing wifi parameters to test configs #9778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
2 changes: 1 addition & 1 deletion TESTS/netsocket/tls/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#error [NOT_SUPPORTED] No network configuration found for this target.
#endif
#ifndef MBED_CONF_APP_ECHO_SERVER_ADDR
#error [NOT_SUPPORTED] Requires parameters from mbed_app.json
#error [NOT_SUPPORTED] Requires echo-server-discard-port parameter from mbed_app.json
#endif

#include "mbed.h"
Expand Down
45 changes: 36 additions & 9 deletions features/netsocket/mbed_lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,42 @@
"name": "nsapi",
"config": {
"present": 1,
"default-stack": "LWIP",
"default-wifi-ssid": null,
"default-wifi-password": null,
"default-wifi-security": "NONE",
"default-cellular-plmn": null,
"default-cellular-sim-pin": null,
"default-cellular-apn": null,
"default-cellular-username": null,
"default-cellular-password": null,
"default-stack": {
"help" : "Default stack to be used, valid values: LWIP, NANOSTACK.",
"value" : "LWIP"
},
"default-wifi-ssid" : {
"help" : "Default Wi-Fi SSID.",
"value": null
},
"default-wifi-password" : {
"help" : "Password for the default Wi-Fi network.",
"value": null
},
"default-wifi-security" : {
"help" : "Wi-Fi security protocol, valid values are WEP, WPA, WPA2, WPA/WPA2.",
"value" : "NONE"
},
"default-cellular-plmn" : {
"help" : "Default Public Land Mobile Network for cellular connection.",
"value": null
},
"default-cellular-sim-pin" : {
"help" : "PIN for the default SIM card.",
"value": null
},
"default-cellular-apn" : {
"help" : "Default cellular Access Point Name.",
"value": null
},
"default-cellular-username" : {
"help" : "Username for the default cellular network.",
"value": null
},
"default-cellular-password" : {
"help" : "Password for the default cellular network.",
"value": null
},
"default-mesh-type": {
"help": "Configuration type for MeshInterface::get_default_instance(). [LOWPAN/THREAD]",
"value": "THREAD"
Expand Down
38 changes: 37 additions & 1 deletion tools/test_configs/ESP8266Interface.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
{
"config": {
"wifi-secure-ssid": {
"help": "Wi-Fi SSID for WPA2 secured network",
"value": "\"WIFI_SSID_SECURED\""
},
"wifi-unsecure-ssid": {
"help": "Wi-Fi SSID for unsecure netwrok",
"value": "\"WIFI_SSID_UNSECURE\""
},
"wifi-password": {
"help": "Wi-Fi Password",
"value": "\"WIFI_PASSWORD\""
},
"wifi-secure-protocol": {
"help": "Wi-Fi security protocol, valid values are WEP, WPA, WPA2, WPA_WPA2",
"value": "\"WPA2\""
},
"wifi-ch-secure": {
"help": "Channel number of secure SSID",
"value": null
},
"wifi-ch-unsecure": {
"help": "Channel number of unsecure SSID",
"value": null
},
"ap-mac-secure": {
"help": "BSSID of secure AP in form of AA:BB:CC:DD:EE:FF",
"value": "\"AA:AA:AA:AA:AA:AA\""
},
"ap-mac-unsecure": {
"help": "BSSID of unsecure AP in form of \"AA:BB:CC:DD:EE:FF\"",
"value": "\"BB:BB:BB:BB:BB:BB\""
},
"max-scan-size": {
"help": "How many networks may appear in Wifi scan result",
"value": 10
},
"echo-server-addr" : {
"help" : "IP address of echo server",
"value" : "\"echo.mbedcloudtesting.com\""
Expand All @@ -26,7 +62,7 @@
"target.network-default-interface-type": "WIFI",
"nsapi.default-wifi-ssid": "\"WIFI_SSID\"",
"nsapi.default-wifi-password": "\"WIFI_PASSWORD\"",
"nsapi.default-wifi-security": "WIFI_SECURITY",
"nsapi.default-wifi-security": "WPA2",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To keep thos configs compileable out of the box I had to change this setting.
Otherwise we get:

[Error] NetworkInterfaceDefaults.cpp@86,0:  #20: identifier "NSAPI_SECURITY_WIFI_SECURITY" is undefined

"esp8266.provide-default": true
}
}
Expand Down
38 changes: 37 additions & 1 deletion tools/test_configs/HeapBlockDeviceAndWifiInterface.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
{
"config": {
"wifi-secure-ssid": {
"help": "Wi-Fi SSID for WPA2 secured network",
"value": "\"WIFI_SSID_SECURED\""
},
"wifi-unsecure-ssid": {
"help": "Wi-Fi SSID for unsecure netwrok",
"value": "\"WIFI_SSID_UNSECURE\""
},
"wifi-password": {
"help": "Wi-Fi Password",
"value": "\"WIFI_PASSWORD\""
},
"wifi-secure-protocol": {
"help": "Wi-Fi security protocol, valid values are WEP, WPA, WPA2, WPA_WPA2",
"value": "\"WPA2\""
},
"wifi-ch-secure": {
"help": "Channel number of secure SSID",
"value": null
},
"wifi-ch-unsecure": {
"help": "Channel number of unsecure SSID",
"value": null
},
"ap-mac-secure": {
"help": "BSSID of secure AP in form of AA:BB:CC:DD:EE:FF",
"value": "\"AA:AA:AA:AA:AA:AA\""
},
"ap-mac-unsecure": {
"help": "BSSID of unsecure AP in form of \"AA:BB:CC:DD:EE:FF\"",
"value": "\"BB:BB:BB:BB:BB:BB\""
},
"max-scan-size": {
"help": "How many networks may appear in Wifi scan result",
"value": 10
},
"echo-server-addr" : {
"help" : "IP address of echo server",
"value" : "\"echo.mbedcloudtesting.com\""
Expand Down Expand Up @@ -31,7 +67,7 @@
"target.network-default-interface-type": "WIFI",
"nsapi.default-wifi-ssid": "\"WIFI_SSID\"",
"nsapi.default-wifi-password": "\"WIFI_PASSWORD\"",
"nsapi.default-wifi-security": "WIFI_SECURITY"
"nsapi.default-wifi-security": "WPA2"
}
}
}
60 changes: 30 additions & 30 deletions tools/test_configs/ISM43362Interface.json
Original file line number Diff line number Diff line change
@@ -1,48 +1,28 @@
{
"config": {
"echo-server-addr" : {
"help" : "IP address of echo server",
"value" : "\"echo.mbedcloudtesting.com\""
},
"echo-server-port" : {
"help" : "Port of echo server",
"value" : "7"
},
"echo-server-discard-port" : {
"help" : "Discard port of echo server",
"value" : "9"
},
"echo-server-port-tls" : {
"help" : "Port of echo server for TLS",
"value" : "2007"
},
"echo-server-discard-port-tls" : {
"help" : "Discard port of echo server for TLS",
"value" : "2009"
},
"wifi-secure-ssid": {
"help": "WiFi SSID for WPA2 secured network",
"value": "\"SSID-SECURE\""
"help": "Wi-Fi SSID for WPA2 secured network",
"value": "\"WIFI_SSID_SECURE\""
},
"wifi-unsecure-ssid": {
"help": "WiFi SSID for unsecure network",
"value": "\"SSID-UNSECURE\""
"help": "Wi-Fi SSID for unsecure netwrok",
"value": "\"WIFI_SSID_UNSECURE\""
},
"wifi-password": {
"help": "WiFi Password",
"value": "\"PASSWORD\""
"help": "Wi-Fi Password",
"value": "\"WIFI_PASSWORD\""
},
"wifi-secure-protocol": {
"help": "WiFi security protocol, valid values are WEP, WPA, WPA2, WPA/WPA2",
"help": "Wi-Fi security protocol, valid values are WEP, WPA, WPA2, WPA_WPA2",
"value": "\"WPA2\""
},
"wifi-ch-secure": {
"help": "Channel number of secure SSID",
"value": 1
"value": null
},
"wifi-ch-unsecure": {
"help": "Channel number of unsecure SSID",
"value": 2
"value": null
},
"ap-mac-secure": {
"help": "BSSID of secure AP in form of AA:BB:CC:DD:EE:FF",
Expand All @@ -55,6 +35,26 @@
"max-scan-size": {
"help": "How many networks may appear in Wifi scan result",
"value": 10
},
"echo-server-addr" : {
"help" : "IP address of echo server",
"value" : "\"echo.mbedcloudtesting.com\""
},
"echo-server-port" : {
"help" : "Port of echo server",
"value" : "7"
},
"echo-server-discard-port" : {
"help" : "Discard port of echo server",
"value" : "9"
},
"echo-server-port-tls" : {
"help" : "Port of echo server for TLS",
"value" : "2007"
},
"echo-server-discard-port-tls" : {
"help" : "Discard port of echo server for TLS",
"value" : "2009"
}
},
"target_overrides": {
Expand All @@ -63,7 +63,7 @@
"target.network-default-interface-type": "WIFI",
"nsapi.default-wifi-ssid": "\"WIFI_SSID\"",
"nsapi.default-wifi-password": "\"WIFI_PASSWORD\"",
"nsapi.default-wifi-security": "WIFI_SECURITY",
"nsapi.default-wifi-security": "WPA2",
"ism43362.provide-default": true
}
}
Expand Down
38 changes: 37 additions & 1 deletion tools/test_configs/SpwfSAInterface.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,41 @@
{
"config": {
"wifi-secure-ssid": {
"help": "Wi-Fi SSID for WPA2 secured network",
"value": "\"WIFI_SSID_SECURE\""
},
"wifi-unsecure-ssid": {
"help": "Wi-Fi SSID for unsecure netwrok",
"value": "\"WIFI_SSID_UNSECURE\""
},
"wifi-password": {
"help": "Wi-Fi Password",
"value": "\"WIFI_PASSWORD\""
},
"wifi-secure-protocol": {
"help": "Wi-Fi security protocol, valid values are WEP, WPA, WPA2, WPA_WPA2",
"value": "\"WPA2\""
},
"wifi-ch-secure": {
"help": "Channel number of secure SSID",
"value": null
},
"wifi-ch-unsecure": {
"help": "Channel number of unsecure SSID",
"value": null
},
"ap-mac-secure": {
"help": "BSSID of secure AP in form of AA:BB:CC:DD:EE:FF",
"value": "\"AA:AA:AA:AA:AA:AA\""
},
"ap-mac-unsecure": {
"help": "BSSID of unsecure AP in form of \"AA:BB:CC:DD:EE:FF\"",
"value": "\"BB:BB:BB:BB:BB:BB\""
},
"max-scan-size": {
"help": "How many networks may appear in Wifi scan result",
"value": 10
},
"echo-server-addr" : {
"help" : "IP address of echo server",
"value" : "\"echo.mbedcloudtesting.com\""
Expand Down Expand Up @@ -34,7 +70,7 @@
"target.network-default-interface-type": "WIFI",
"nsapi.default-wifi-ssid": "\"WIFI_SSID\"",
"nsapi.default-wifi-password": "\"WIFI_PASSWORD\"",
"nsapi.default-wifi-security": "WIFI_SECURITY",
"nsapi.default-wifi-security": "WPA2",
"idw0xx1.provide-default": true
}
}
Expand Down