Moode Forum
Bluetooth Passcode/Passkey/PIN - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: Bluetooth Passcode/Passkey/PIN (/showthread.php?tid=2873)

Pages: 1 2


Bluetooth Passcode/Passkey/PIN - Cipheros - 08-10-2020

Hello!

I'm playing with Moode and I absolutely LOVE it! Heart  However, I'm missing one feature here – setting password to protect me from unwanted bluetooth connections.
This is quite important for me because while I personally use and prefer AirPlay, my girlfriend use Android and is forced to connect via BT to stream her music to Moode Player. On the other hand I have neighbours which may come into great idea of hijacking my player... Wink
I hoped that pairing bluetooth device once will be enough, but it seems that BlueZ need to be run each time someone needs to connect.

Having in mind the simplicity and the fact that my girlfriend is not a technical person, it would be great to have one of above mentioned features (passkey or auto-allowing only known devices).
Can you help me to achieve ether of that?

Thanks! Smile


RE: Bluetooth Passcode/Passkey/PIN - Cipheros - 08-13-2020

Anyone? Isn't that achievable by some CLI magic?


RE: Bluetooth Passcode/Passkey/PIN - TheOldPresbyope - 08-13-2020

@Cipheros

Don't enable the Pairing Agent: it's convenient but allows anyone to connect if the Bluetooth Renderer is enabled.

Now you have to go through the connection process the old fashioned way.

- on the moOde player go to the BluezConfig screen and submit "SCAN for devices"

- immediately tell your Bluetooth phone to "Pair new device" (that's what it's called on my Android Pixel3a phone) or whatever it's called in your OS.

- After a period of time, your phone should show "Moode Bluetooth" (or whatever you've customized the name to be) in its list of available devices

- Pair your phone with this new device. 

-Now your phone should show up in the moOde player when you submit "LIST paired".

-In the moOde player's BluezConfig screen, CONNECT to your paired phone.

This is tedious but doesn't allow unwanted connections.

n.B. - I have a vague memory it's possible to use command line functions like bluetoothctl to accept some connections and reject others but I've used it only for accepting them and don't know the details of rejecting. Google is your friend.

Regards,
Kent


RE: Bluetooth Passcode/Passkey/PIN - Cipheros - 08-20-2020

@TheOldPresbyope

Sorry for a late reply. Thanks for this security tip.
However, this does not solve what I want to achieve. I want to be able to connect paired ("known") devices with Moode without any interaction on Moodes side.

So if I have already paired e.g. my phone in the past – I want to be able to just select Moode bluetooth device on the phone and then Moode should automatically accept the incoming connection. It shouldn't be required to open web app to accept the connection or send any commands.
Right now it seems to behave counter-intuitive and not much useful – a lot of users interaction is required to just connect already paired BT device.


RE: Bluetooth Passcode/Passkey/PIN - TookaFace - 08-20-2020

Once your device is paired (without Pairing Agent), then u can initiate connection from ur phone, no interaction with moOde UI, at least its how it works in my case


RE: Bluetooth Passcode/Passkey/PIN - Cipheros - 08-20-2020

@TookaFace Ok, I removed all paired devices and followed the steps posted by @TheOldPresbyope. It seems that that helped. It seems that pairing using Pairing Agent "stops working" when PA is turned off.
It turns out that when PA is turned off, all devices paired via PA option can connect only when BlueZ panel is open in web app. Devices pared old-fashioned way (via BlueZ) can connect without any interaction. Maybe that should be pointed out somewhere next to Pairing Agent setting.

I will be testing that out and will let you know if any further problems will occur. However, for now, this issue seems to be resolved.
Thanks!


RE: Bluetooth Passcode/Passkey/PIN - Tim Curtis - 08-20-2020

I'm not able to repro "when PA is turned off, all devices paired via PA option can connect only when BlueZ panel is open".

My devices that were previously paired via the Pairing Agent connect perfectly when PA is OFF and regardless of which screen is displayed in moOde UI or even when not connected to moOde UI.

I'm not sure what's happening in your case.


RE: Bluetooth Passcode/Passkey/PIN - TookaFace - 08-20-2020

For me, i have the same behavior as @Cipheros, for example, with my phone, if i pair with PA on, then turn PA off, i can't initiate connexion from my phone, only from Bluez config, that why i never used PA. It's not new, i think ive encounter this behavior since PA integrating. Maybe an Android thing.


RE: Bluetooth Passcode/Passkey/PIN - TheOldPresbyope - 08-20-2020

I haven't had many competing vendors' Android phones to play with, but from my limited experience Bluetooth connection management and supported features can differ not just with the Android release (8, 9, 10, ...) but also with specific vendor implementations of it. Meh.

There's lots to complain about with iOS but at least it's just Apple iOS without the confounding presence of Samsung iOS, Huawei iOS, Moto iOS, etc., each with vendor-specific mods and customizations.

Regards,
Kent


RE: Bluetooth Passcode/Passkey/PIN - Cipheros - 08-26-2020

@TookaFace @TheOldPresbyope
That was not an Android thing as I experienced this issue with: iPhone 8, Samsung Galaxy S10e and with Samsung Smart TV. All of them were using newest OS available.

Maybe the host device is to be blamed? I use RPi Zero W.