Skip to content
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

Is it possible to get static MAC of BLE client ? #1179

Open
dharmikP17 opened this issue Dec 23, 2023 · 0 comments
Open

Is it possible to get static MAC of BLE client ? #1179

dharmikP17 opened this issue Dec 23, 2023 · 0 comments

Comments

@dharmikP17
Copy link

I am creating a BLE server on esp32 and I am trying to get the MAC address of devices connecting to it.

For this purpose, I have used

class myServerCallback : public BLEServerCallbacks {
  void onConnect(BLEServer* pServer, esp_ble_gatts_cb_param_t *param) {
      newDevice = true;
      clientId = param->connect.conn_id;
      memcpy(&clientMAC, param->connect.remote_bda, 6);
  }
};

The problem I have faced is that I am getting different MACs for the same device.

From what I know, BLE uses dynamic MACs for security. If that is the case, is there any way to always get one static MAC for one device? My goal is to identify whether the same device is connected or a new one and I do not want to use any application on a device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant