[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
linux-meta-laptop (Ubuntu)
Invalid
Undecided
Unassigned
Mantic
Fix Released
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
Revision history for this message
Juerg Haefliger (juergh) wrote :
Juerg Haefliger (juergh)
Changed in ubuntu-concept:
status: New → Invalid
no longer affects: ubuntu-concept
affects: systemd → ubuntu
no longer affects: Ubuntu Mantic
no longer affects: ubuntu
Changed in linux-meta-laptop (Ubuntu):
status: New → Invalid
Juerg Haefliger (juergh)
Changed in linux-meta-laptop (Ubuntu Mantic):
status: New → Fix Committed
Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (linux-meta-laptop/6.5.0.1007.10)

All autopkgtests for the newly accepted linux-meta-laptop (6.5.0.1007.10) for mantic have finished running.
The following regressions have been reported in tests triggered by the package:

systemd/253.5-1ubuntu6.1 (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/mantic/update_excuses.html#linux-meta-laptop

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux-meta-laptop - 6.5.0.1007.10

---------------
linux-meta-laptop (6.5.0.1007.10) mantic; urgency=medium

  * Bump ABI 6.5.0-1007

  * Packaging resync (LP: #1786013)
    - [Packaging] resync git-ubuntu-log
    - [Packaging] resync debian/dkms-versions from main package

  * [X13s] Set unique wifi mac address (LP: #2039144)
    - Set persistent wifi MAC address

  * [X13s] Set unique bluetooth mac address (LP: #2037534) // [X13s] Bluetooth
    not enabled (LP: #2041000)
    - Fix bluetooth public address

 -- Juerg Haefliger <email address hidden> Wed, 22 Nov 2023 17:41:49 +0100

Changed in linux-meta-laptop (Ubuntu Mantic):
status: Fix Committed → Fix Released
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.