Home › Forums › Mayfly Data Logger › need to find WiFi Bee ESP8266 MAC address › Reply To: need to find WiFi Bee ESP8266 MAC address
2020-12-14 at 12:54 PM
#14914
I’m sorry, I should have read that more carefully. That program is meant to be written to an ESP, not to a Mayfly.
Anyway, you should be able to do something like this:
Arduino
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
#include <Arduino.h> setup(){ Serial.begin(115200); Serial1.begin(115200); delay(200); Serial.println("Changing ESP8266 baud, if necessary"); Serial.println("This response may not be read-able"); Serial1.println("AT+UART_CUR=9600,8,1,0,0"); // Wait for and print the response, if it's intelligible delay(100); while (Serial1.available()){Serial.write(Serial1.read());} Serial.println(); Serial1.end(); Serial1.begin(9600); Serial.println("Asking the ESP for its default station mac address"); Serial1.println("AT+CIPSTAMAC_DEF?"); Serial.println("Response:"); delay(100); while (Serial1.available()){Serial.write(Serial1.read());} Serial.println(); Serial.println("Asking the ESP for its current station mac address"); Serial1.println("AT+CIPSTAMAC_CUR?"); Serial.println("Response:"); delay(100); while (Serial1.available()){Serial.write(Serial1.read());} Serial.println(); } loop(){} // do no more |