View: 7360|Reply: 1

[SOLVED] Strange Problem with Bluetooth OPI 4B related to hostname change

[Copy link]

2

threads

7

posts

30

credits

Novice

Rank: 1

credits
30
Published in 2020-11-20 11:27:43 | Show all floors |Read mode
Edited by mandresve at 2020-11-23 14:57

Hello, I would like to expose a strange problem I have with the bluetooth adapter of my brand new Orange Pi 4B.

Background:
-I'm using Debian Buster / Ubuntu Bionic / Ubuntu Xenial (all in version 1.4 of 9 Oct 2020)
-I installed Bluez (sudo apt-get install bluez*)
-I installed Blueman (sudo apt-get install blueman)

Problem:
When I make the hostname change through nmtui or editing it directly in /etc/hosts & /etc/hostname, the bluetooth adapter stops working. It only works if the hostname is "orangepi4".

Additional information:
-I check the operation with bluetoothctl. Again, if the hostname is exactly "orangepi4" the adapter is listed with bluetoothctl.
-If the hostname is any other, the adapter is not recognized, neither by blueman, nor by bluetoothctl.
-Bluetooth service is always active and running (checked with systemd)
-Commands such as lsusb, lspci show no change. The bluetooth adapter is not shown by any of them.

Anyone can help me to solve the problem? I would like to use another hostname (not only "orangepi4") and work with the bluetooth adapter normally.
The problem is reproductible in the mentioned operating system images.
Thanks for the help.


2

threads

7

posts

30

credits

Novice

Rank: 1

credits
30
 Author| Published in 2020-11-22 08:05:28 from mobile | Show all floors
Edited by mandresve at 2020-11-22 08:29

I solved it!!

The problem is that there is a script destined to patch the bluetooth firmware at each system startup, and this script has the hostname hardcoded for the execution of a conditional. If the hostname is changed, then the conditional in the script is not met, and therefore the bluetooth is not patched and stops working.

Workaround:
1. Go to /usr/local/sbin and locate the bt.sh file
2. Edit the file /usr/local/sbin/bt.sh using your hostname instead of "orangepi4".
3. restart.

Problem Solved.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list