Can't get Lilygo T to display MAC address

I have used some simple code that works on every other ESP32 I have, but the Lilygo T display doesn't return the MAC address through the serial monitor.

I use the line:

Serial.println(WiFi.macAddress());

But it doesn't return the MAC address. Here is everything I get.

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0xa (SPI_FAST_FLASH_BOOT)
Saved PC:0x420213a6
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbe4
load:0x403cc700,len:0x2a38
entry 0x403c98d4

I've seen that the 3d barcode on the metal cover on the ESP32 chip also has the MAC address, but this chip is bare.

Any help would be great!
Thanks.

The mac address is a six byte unsigned char array,
you have to be lucky to get it printed directly.

Maybe you can print all the bytes in hex?

Yes, I know what a MAC address is, and I need to know what the MAC address is for my Lilygo T display s3.

Here is the results I get with the same Serial.println function with another ESP32 board.

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13924
ho 0 tail 12 room 4
load:0x40080400,len:3600
entry 0x400805f0
E (176) psram: PSRAM ID read error: 0xffffffff
MAC Address: D4:D4:DA:5B:30:1C

As you can see, it prints the MAC address to the serial monitor.

Thanks,

It could be as simple as having a different baud rate in the sketches,
good luck with your project.

#include "WiFi.h"
#include "esp_wifi.h"

void setup() {
    Serial.begin(115200);
    Serial.print("MAC Address: ");
    Serial.println(WiFi.macAddress());
}

void loop() {
  Serial.println("MAC: ");
  Serial.println(WiFi.macAddress());
  delay(1000);
}

This worked for me. Not quite sure why the redundancy helped in the loop but I was able to pull the MAC off of both my LilyGO T-Display & T-HMI.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.