How to get mac addresses of all connected mesh devices

Hello

I need the code where i can get mac addresses of all mesh connected devices. Suppose  Error in getting the mac address of a microcontroller with available answer in forum <- this is the link to find only one connected device. Is it possible this code only to get all mesh connected devices mac addresses? I need help here

Regards

Parents
  • Hi,

    Devices in a Bluetooth mesh network are not "connected", and the Bluetooth mesh protocol uses its own set of addresses on the network, so the Bluetooth addresses don't really matter that much.

    The BLE address is used for sending the BLE advertisement packet that contains the mesh packet, but when a mesh packet is relayed it is always using the BLE address of the relay. (In other words, the BLE address of the original sender is not kept when packets are relayed.) Therefore the receiver of a packet may only see the BLE address of the last node in the chain of relays.

    All nodes having successfully sent messages to the node, will be in the node's Replay Protection List, which basically stores the sender address together with the highest sequence number received from that sender address thus far. In other words, the Replay Protection List contains addresses of the other nodes on the network. Maybe that is enough for your use case?

    If you really need the BLE addresses, then you must create a custom mesh model for sharing that data across the network.

    Regards,
    Terje

Reply
  • Hi,

    Devices in a Bluetooth mesh network are not "connected", and the Bluetooth mesh protocol uses its own set of addresses on the network, so the Bluetooth addresses don't really matter that much.

    The BLE address is used for sending the BLE advertisement packet that contains the mesh packet, but when a mesh packet is relayed it is always using the BLE address of the relay. (In other words, the BLE address of the original sender is not kept when packets are relayed.) Therefore the receiver of a packet may only see the BLE address of the last node in the chain of relays.

    All nodes having successfully sent messages to the node, will be in the node's Replay Protection List, which basically stores the sender address together with the highest sequence number received from that sender address thus far. In other words, the Replay Protection List contains addresses of the other nodes on the network. Maybe that is enough for your use case?

    If you really need the BLE addresses, then you must create a custom mesh model for sharing that data across the network.

    Regards,
    Terje

Children
Related