LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-01-2021, 06:09 AM   #1
JamesNorris
LQ Newbie
 
Registered: Jan 2006
Distribution: Debian Testing
Posts: 23

Rep: Reputation: 0
Bluetooth BLE mouse keeps changing MAC, so won't automatically pair


I have a Logitech MX Anywhere 2 BLE Mouse and an (I know!) Intel ax200 Wi-Fi/Bluetooth adaptor. I'm not sure which of them has the problem, but it means that at every boot, I need to Alf+F2, fire up Konsole and reconnect. It seems to be cycling through addresses, so in my trusted list after four days I have:
Code:
E6:7B:D0:31:D8:7A
E6:7B:D0:31:D8:7B
E6:7B:D0:31:D8:7C
E6:7B:D0:31:D8:7D
all of which are the same device.

Bluetoothctl info shows this:
Code:
Device E6:7B:D0:31:D8:7D (random)
        Name: MX Anywhere 2
        Alias: MX Anywhere 2
        Appearance: 0x03c2
        Icon: input-mouse
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: yes
        WakeAllowed: yes
        LegacyPairing: no
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
        UUID: Battery Service           (0000180f-0000-1000-8000-00805f9b34fb)
        UUID: Human Interface Device    (00001812-0000-1000-8000-00805f9b34fb)
        UUID: Vendor specific           (00010000-0000-1000-8000-011f2000046d)
        Modalias: usb:v046DpB01Fd0003
        Battery Percentage: 0x32 (50)
I have searched around and not seen this problem elsewhere (aside from reference to this being a security feature of the BLE protocol, which means I am presuming that it is solvable...

TIA
 
Old 01-01-2021, 04:23 PM   #2
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Random mac address is good for the laptop, if you bought it with a credit/debit card that identifies you, the Gestapo can find you when you are using it's embedded mac address tapping into places you should not be etc. Bluetooth is seen as wireless nowadays and anything connecting is an unknown potential risk...I'm guessing. And worst part about this mouse, well there's lots to be concerned about based on the quote below from it's advertising page.
Quote:
MX Anywhere 2S works wherever you do – coffee shops, airplane seats, hotel rooms and off-site meetings – and works seamlessly across three computers including navigating and copy-pasting between them.
Based on it's capabilities, there may be reason for the random mac. That dongle is likely the culprit that randomizes the mac address so the computer always sees a new device.
 
Old 01-02-2021, 02:48 AM   #3
JamesNorris
LQ Newbie
 
Registered: Jan 2006
Distribution: Debian Testing
Posts: 23

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Brains View Post
Random mac address is good for the laptop, if you bought it with a credit/debit card that identifies you, the Gestapo can find you when you are using it's embedded mac address tapping into places you should not be etc. Bluetooth is seen as wireless nowadays and anything connecting is an unknown potential risk...I'm guessing. And worst part about this mouse, well there's lots to be concerned about based on the quote below from it's advertising page.

Based on it's capabilities, there may be reason for the random mac. That dongle is likely the culprit that randomizes the mac address so the computer always sees a new device.
Luckily, this is a living room PVR, not a laptop in a coffee shop, so I just need it to stop! To complicate things, I'm not using the dongle, as I'm trying to connect by Bluetooth. From what I can guess, I might need to write a udev rule for it, but I don't actually know what I'd need to write, and how/why it would work, so I might actually be wrong there.

Tossing the mouse and starting over isn't an option; I can't afford a (good) new bluetooth mouse.
 
Old 01-02-2021, 09:23 AM   #4
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Originally Posted by JamesNorris View Post
Tossing the mouse and starting over isn't an option; I can't afford a (good) new bluetooth mouse.
I bought this Dell PU705 Wireless Mouse in 2005 with new computers, flawlessly perfect to this day. No cord to charge, just replace/charge the batteries. No damn dongle, it links directly to the computer's bluetooth adapter. And half the price you paid for that fancy mouse giving you headaches.
Yup... flawlessly perfect 15 year old BT mouse.
 
Old 01-03-2021, 05:37 AM   #5
JamesNorris
LQ Newbie
 
Registered: Jan 2006
Distribution: Debian Testing
Posts: 23

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Brains View Post
I bought this Dell PU705 Wireless Mouse in 2005 with new computers, flawlessly perfect to this day. No cord to charge, just replace/charge the batteries. No damn dongle, it links directly to the computer's bluetooth adapter. And half the price you paid for that fancy mouse giving you headaches.
Yup... flawlessly perfect 15 year old BT mouse.
I don't mean to be rude, but I clearly said that buying a new mouse isn't an option... this is the mouse I have, I need to get this working. Besides, your Amazon USA link is useless to me.

What I need is a way to either stop the mouse cycling MAC addresses every wake, or for the Linux system to recognise it some other way (would the modalias be useful here?)
 
Old 01-03-2021, 06:00 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,641

Rep: Reputation: 7814Reputation: 7814Reputation: 7814Reputation: 7814Reputation: 7814Reputation: 7814Reputation: 7814Reputation: 7814Reputation: 7814Reputation: 7814Reputation: 7814
I think this E6:7B:D0:31:whatever is the bluetooth adaptor, not the mouse itself. But you can check it with bluetoothctl if the device was connected.
I would check hcid and hcid.conf to see how can the system automatically connect to a mac address (of the mouse). Also you can configure auto pairing/trusting ...

Last edited by pan64; 01-04-2021 at 11:51 AM.
 
Old 01-03-2021, 04:02 PM   #7
JamesNorris
LQ Newbie
 
Registered: Jan 2006
Distribution: Debian Testing
Posts: 23

Original Poster
Rep: Reputation: 0
I think the bluetooth adaptor MAC is C8:E2:652:3C:9A (this is what hcitool reports,) so the other one is almost definitely the mouse. I did wonder if adding the HID and Device Information UUIDs to the ReconnectUUIDs section of /etc/bluetooth/main.conf (I don't have a hcid.conf) but I'm unsure if this would actually work, if the sleep/wake stops the mouse announcing itself? I don't mind firing up the terminal every time, but my wife insists we sort it out and I'm not adding my daughter to sudoers!
 
Old 01-03-2021, 04:55 PM   #8
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Originally Posted by JamesNorris View Post
I'm not using the dongle, as I'm trying to connect by Bluetooth. From what I can guess, I might need to write a udev rule for it
Code:
# udevadm info --attribute-walk /sys/class/bluetooth/hci0:1
I only have my bluetooth mouse paired, the command above gives me absolutely nothing regarding the mouse itself, only the bus and controller for the computer's bluetooth adapter. So....
The only rule one could possibly go for would be towards /sys/class/bluetooth/hci0:1, providing the mouse is always assigned this designation. If you have other bluetooth devices, that might affect designation similar to /dev/sdb /dev/sdc for removable drives depending on which one is connected first.

I wonder if a macchanger startup script might work
Have macchanger assign the same mac every boot?
As far as a udev rule goes, might be easier to conjure up a rule for the dongle as it is hardware.

Last edited by Brains; 01-03-2021 at 05:08 PM.
 
Old 01-26-2021, 09:27 AM   #9
JamesNorris
LQ Newbie
 
Registered: Jan 2006
Distribution: Debian Testing
Posts: 23

Original Poster
Rep: Reputation: 0
After all of this (I have learnt a lot about udev and know bluetoothctl like the back of my hand.) It turns out that it's a kernel bug. Thanks for the help; I'll be back if the fix in Debian kernel 5.10.4 doesn't work! :')

Last edited by JamesNorris; 01-26-2021 at 09:48 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: A new Steam Client Beta adds Bluetooth Low Energy (BLE) support to the Steam Controller LXer Syndicated Linux News 0 05-13-2018 09:33 AM
LXer: Linux-based COMs gain WiFi AP and BLE 4.1 functions LXer Syndicated Linux News 0 03-24-2015 02:33 PM
LXer: Linux-friendly Sitara COM adds MIMO WiFi, BLE 4.0 LXer Syndicated Linux News 0 07-31-2014 08:50 PM
RHEL6 won't pair with Lenovo bluetooth trackpoint keyboard "Permission denied (13)" mdhennessy Linux - Software 5 12-20-2013 10:58 AM
Samsung SGH-D840 won't Bluetooth pair to server? Simmo512 Linux - Software 1 06-27-2008 03:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration