-
Notifications
You must be signed in to change notification settings - Fork 7.6k
BLEScan reports wrong MAC address -- Arduino ESP32 version 2.0.12 #8609
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Of course, right after I post, I find a work around, but I'd still love to know why those two don't match up. Workaround: |
Can you please take a look and try to reproduce it @P-R-O-C-H-Y? Thanks |
@SuGlider Thank you! I do apologize for creating an issue for something clearly documented. This is my first project using the MAC address for identification, and reading others' forum post about how to get the MAC address seemed to me their answers were how to get the one MAC address. Now I see there is a MAC address for a specific network interface. Thank you! |
Sure! I'm happy in helping you! |
I wrote an example sketch named ‘MacAddress’ for show how to call for the default and interface specific MAC addresses. PR#8618 I’m using the BLE library so ‘BLEDevice::getAddress()’ is really all I need. |
Board
ESP32-WROOM-32E
Device Description
ESP32 dev boards with ESP32-WROOM-32E modules.
Hardware Configuration
Nothing.
Version
other
IDE Name
Arduino IDE
Operating System
Windows 11 Pro
Flash frequency
40MHz
PSRAM enabled
no
Upload speed
921600
Description
Synopsis:
Printing to the serial monitor (and also running "espefuse.py --port COM15 summary", which I'll talk about later), the ESP32's MAC address shows: "54:43:b2:c9:8d:4c".
Using another ESP32, scanning for BLE devices, found device MAC address shows: "54:43:b2:c9:8d:4e"
I've attempting on multiple units, and each time the very last byte is always incremented by two. (4c -> 4e)
Detailed Explanation:
I have a ESP32 acting as a "Controller", and I have an ESP32s acting as a "Remote".
Controller ESP32:
Board: ESP32-PICO-DevKitM-2U
Chip Model: ESP32-PICO-V3-02
Chip Revision: 3
Chip Cores: 2
Remote ESP32:
Board: ESP32_DevKitc_V4
Chip Model: ESP32-D0WD-V3
Chip Revision: 3
Chip Cores: 2
The Controller scans for BLE devices, checks to see if the name contains "BLE Remote", then checks the MAC address, and if it matches a hardcoded string, will attempt to connect.
On the Remote, I have the following sketch that simply prints out the MAC address:
And this is what is printed to the serial monitor:
54:43:B2:C9:8D:4C
Here is the sketch for the Controller to scan for BLE devices:
And here is the serial monitor output:
My first thought was either the sketch to print out the MAC address or the sketch to scan for devices was not working correctly. So I opened up an ESP-IDF command window, created a new project called "dummy", navigated to that directory, and ran the following command:
espefuse.py --port COM15 summary
Which gave me the summary for the eFuses. Here is the snippet for the MAC address:
This issue has been the case for every ESP32 that I have attempted. I have dug in to find out why the last byte was always off by 2, but it's beginning to turn into a rabbit hole.
Sketch
Debug Message
Other Steps to Reproduce
I have a small pile of ESP32_DevKitc_V4 boards I've been using, none match the scanner output. I have even tried using a 'ESP32-PICO-DevKitM-2U'
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: