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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-01-2021, 06:09 AM
|
#1
|
LQ Newbie
Registered: Jan 2006
Distribution: Debian Testing
Posts: 23
Rep:
|
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
|
|
|
01-01-2021, 04:23 PM
|
#2
|
Senior Member
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591
|
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.
|
|
|
01-02-2021, 02:48 AM
|
#3
|
LQ Newbie
Registered: Jan 2006
Distribution: Debian Testing
Posts: 23
Original Poster
Rep:
|
Quote:
Originally Posted by Brains
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.
|
|
|
01-02-2021, 09:23 AM
|
#4
|
Senior Member
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591
|
Quote:
Originally Posted by JamesNorris
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. 
|
|
|
01-03-2021, 05:37 AM
|
#5
|
LQ Newbie
Registered: Jan 2006
Distribution: Debian Testing
Posts: 23
Original Poster
Rep:
|
Quote:
Originally Posted by Brains
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?)
|
|
|
01-03-2021, 06:00 AM
|
#6
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 23,641
|
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.
|
|
|
01-03-2021, 04:02 PM
|
#7
|
LQ Newbie
Registered: Jan 2006
Distribution: Debian Testing
Posts: 23
Original Poster
Rep:
|
I think the bluetooth adaptor MAC is C8:E2:65  2: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!
|
|
|
01-03-2021, 04:55 PM
|
#8
|
Senior Member
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591
|
Quote:
Originally Posted by JamesNorris
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.
|
|
|
01-26-2021, 09:27 AM
|
#9
|
LQ Newbie
Registered: Jan 2006
Distribution: Debian Testing
Posts: 23
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 11:46 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|