From dbc1c681a5ad770dc102eb033b3d61511fa28ef0 Mon Sep 17 00:00:00 2001 From: keeramis Date: Mon, 3 Jun 2024 10:40:02 -0700 Subject: [PATCH] Add hidden network key to join networks --- src/wifi-device.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wifi-device.js b/src/wifi-device.js index a7b88b8..7617a96 100644 --- a/src/wifi-device.js +++ b/src/wifi-device.js @@ -70,7 +70,7 @@ const WifiDevice = base => class extends base { * @param {Object} options See sendControlRequest(), same options are here. * @return {ProtobufInteraction} - empty response */ - async joinNewWifiNetwork({ ssid, security, password = null }, options) { + async joinNewWifiNetwork({ ssid, security, password = null, hidden }, options) { let dataPayload; if (password === null) { dataPayload = { @@ -82,6 +82,7 @@ const WifiDevice = base => class extends base { dataPayload = { ssid, bssid: null, + hidden: hidden === true, security: security ? WiFiSecurity.toProtobuf(security) : null, credentials: { type: 1, // CredentialsType.PASSWORD @@ -187,7 +188,7 @@ const WifiDevice = base => class extends base { * @param {Object} options See sendControlRequest(), same options are here. * @return {ProtobufInteraction} - empty response */ - async setWifiCredentials({ ssid, security, password = null }, options) { + async setWifiCredentials({ ssid, security, password = null, hidden }, options) { let dataPayload; if (password === null) { dataPayload = { @@ -199,6 +200,7 @@ const WifiDevice = base => class extends base { dataPayload = { ssid, bssid: null, + hidden: hidden === true, security : security ? WiFiSecurity.toProtobuf(security) : null, credentials: { type: 1, // CredentialsType.PASSWORD