Use the hardware mac of a wifi usb dongle instead of the DUID
Problem description
On a Debian system the NetworkManger creates a random mac address (DUID) every time you plugin a wifi adapter and with that you can not say exactly that it is the same device based on the mac address. So we have to find a way to get the fixed address of the device and use this as the mac address.
Solution
After many dead ends I found a very simple solution. You only need to change the configuration file of the NetworkManger to disallow the creation of the random mac addresses.
Add at the end of the NetworkManger config file
(/etc/NetworkManager/NetworkManager.conf
) the following lines:
[device]
wifi.scan-rand-mac-address=no
After that you need to restart the NetworkManger or you can also simply restart
the whole device.
There you go!
If you don't like to edit the file then simply run:
echo "
[device]
wifi.scan-rand-mac-address=no
" >> /etc/NetworkManager/NetworkManager.conf ; reboot