Add MY_ESP8266_BSSID parameter (#953)
To use this feature, add the following to a sketch, for example
GatewayESP8266MQTTClient:
const uint8_t bssid[] = {0x00, 0xDE, 0xAD, 0xBE, 0xEF, 0x00};
#define MY_ESP8266_BSSID bssid
This feature was requested in
https://github.com/mysensors/MySensors/issues/947
This commit is contained in:
committed by
Henrik Ekblad
parent
adfd9f36f1
commit
3ebeb4fea1
@@ -122,7 +122,10 @@ bool gatewayTransportInit(void)
|
|||||||
#if defined(MY_IP_ADDRESS)
|
#if defined(MY_IP_ADDRESS)
|
||||||
WiFi.config(_ethernetGatewayIP, _gatewayIp, _subnetIp);
|
WiFi.config(_ethernetGatewayIP, _gatewayIp, _subnetIp);
|
||||||
#endif /* End of MY_IP_ADDRESS */
|
#endif /* End of MY_IP_ADDRESS */
|
||||||
(void)WiFi.begin(MY_ESP8266_SSID, MY_ESP8266_PASSWORD);
|
#ifndef MY_ESP8266_BSSID
|
||||||
|
#define MY_ESP8266_BSSID NULL
|
||||||
|
#endif
|
||||||
|
(void)WiFi.begin(MY_ESP8266_SSID, MY_ESP8266_PASSWORD, 0, MY_ESP8266_BSSID);
|
||||||
while (WiFi.status() != WL_CONNECTED) {
|
while (WiFi.status() != WL_CONNECTED) {
|
||||||
wait(500);
|
wait(500);
|
||||||
MY_SERIALDEVICE.print(F("."));
|
MY_SERIALDEVICE.print(F("."));
|
||||||
|
|||||||
@@ -154,7 +154,10 @@ bool gatewayTransportInit(void)
|
|||||||
#if defined(MY_IP_ADDRESS)
|
#if defined(MY_IP_ADDRESS)
|
||||||
WiFi.config(_MQTT_clientIp, _gatewayIp, _subnetIp);
|
WiFi.config(_MQTT_clientIp, _gatewayIp, _subnetIp);
|
||||||
#endif /* End of MY_IP_ADDRESS */
|
#endif /* End of MY_IP_ADDRESS */
|
||||||
(void)WiFi.begin(MY_ESP8266_SSID, MY_ESP8266_PASSWORD);
|
#ifndef MY_ESP8266_BSSID
|
||||||
|
#define MY_ESP8266_BSSID NULL
|
||||||
|
#endif
|
||||||
|
(void)WiFi.begin(MY_ESP8266_SSID, MY_ESP8266_PASSWORD, 0, MY_ESP8266_BSSID);
|
||||||
#endif /* End of MY_GATEWAY_ESP8266 */
|
#endif /* End of MY_GATEWAY_ESP8266 */
|
||||||
|
|
||||||
gatewayTransportConnect();
|
gatewayTransportConnect();
|
||||||
|
|||||||
@@ -206,5 +206,6 @@ MY_IP_SUBNET_ADDRESS LITERAL1
|
|||||||
# ESP8266
|
# ESP8266
|
||||||
MY_ESP8266_SSID LITERAL1
|
MY_ESP8266_SSID LITERAL1
|
||||||
MY_ESP8266_PASSWORD LITERAL1
|
MY_ESP8266_PASSWORD LITERAL1
|
||||||
|
MY_ESP8266_BSSID LITERAL1
|
||||||
MY_ESP8266_HOSTNAME LITERAL1
|
MY_ESP8266_HOSTNAME LITERAL1
|
||||||
MY_ESP8266_SERIAL_MODE LITERAL1
|
MY_ESP8266_SERIAL_MODE LITERAL1
|
||||||
|
|||||||
Reference in New Issue
Block a user