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:
Mikael Falkvidd
2017-10-27 18:52:21 +02:00
committed by Henrik Ekblad
parent adfd9f36f1
commit 3ebeb4fea1
3 changed files with 9 additions and 2 deletions
+4 -1
View File
@@ -122,7 +122,10 @@ bool gatewayTransportInit(void)
#if defined(MY_IP_ADDRESS)
WiFi.config(_ethernetGatewayIP, _gatewayIp, _subnetIp);
#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) {
wait(500);
MY_SERIALDEVICE.print(F("."));
+4 -1
View File
@@ -154,7 +154,10 @@ bool gatewayTransportInit(void)
#if defined(MY_IP_ADDRESS)
WiFi.config(_MQTT_clientIp, _gatewayIp, _subnetIp);
#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 */
gatewayTransportConnect();
+1
View File
@@ -206,5 +206,6 @@ MY_IP_SUBNET_ADDRESS LITERAL1
# ESP8266
MY_ESP8266_SSID LITERAL1
MY_ESP8266_PASSWORD LITERAL1
MY_ESP8266_BSSID LITERAL1
MY_ESP8266_HOSTNAME LITERAL1
MY_ESP8266_SERIAL_MODE LITERAL1