View: 5712|Reply: 3

[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:30:15 | Show all floors |Read mode
Edited by mandresve at 2020-11-23 14:59

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:29:45 | Show all floors
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.

0

threads

12

posts

50

credits

Registered member

Rank: 2

credits
50
Published in 2023-6-26 17:05:57 | Show all floors
This post was finally edited by Marians at 2023-6-26 17:09

There are numerous online games that provide excellent entertainment, and I frequently play free games in my leisure time.

0

threads

32

posts

88

credits

Registered member

Rank: 2

credits
88
Published in 2024-12-5 14:56:48 | Show all floors
Gaming can inspire careers. Many people discover Geometry Dash Lite interests in game design, programming, or storytelling through playing games.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list