[X13s] Set unique bluetooth mac address

Bug #2037534 reported by Dimitri John Ledkov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
systemd
New
Unknown
ubuntu-concept
New
Undecided
Unassigned
linux-meta-laptop (Ubuntu)
New
Undecided
Unassigned

Bug Description

On windows side MAC address for WLAN and Bluetooth are similar - like off by 4 from each other. I am guessing that a range of MACs is used per device (i.e. sequentially for wlan, sim cards, bluetooth).

On linux side we do not currently have ability to find out the expected device MAC.

Currently setting to static one is ok, but will not work when all of us are in Riga with all of our X13s devices.

[Unit]
Description=Set Bluetooth Address
After=bluetooth.target
Requires=bluetooth.target

[Service]
Type=simple
ExecStartPre=/usr/bin/sleep 5
ExecStart=/bin/bash -c "/usr/bin/yes | /usr/bin/btmgmt public-addr AD:5A:00:F0:FD:8C"

[Install]
WantedBy=multi-user.target

Imho this should be impoved as follows:

1) make this wantedby individual bluetooth device, not bluetooth.target
2) make it bind to bluetooth device, such that it is stopped/started upon device poweroff/poweron (need to check if needed to set address every time)
3) make it conditional on btmgmt to be available
4) set or derive MAC from /etc/machine-id (maybe systemd should be able to do this for us?)
5) use btmgmt --timeout option for interactive use
6) Hopefully above will mean there is no need to do sleep 5 either

Tags: x13s
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Also systemd should just do this, but doesn't filed feature request https://github.com/systemd/systemd/issues/29346

Changed in systemd:
status: Unknown → New
summary: - set unique bluetooth mac address
+ [X13s] Set unique bluetooth mac address
tags: added: x13s
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.