Please select To the mobile version | Continue to access the desktop computer version

OrangePi

 Login            
 Register            
Search
Hot search: orangepi
View: 903|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
Post time 2020-11-20 11:30:15 | Show all posts |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| Post time 2020-11-22 08:29:45 | Show all posts
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 have to log in before you can reply Login | Register

Points Rules

Archiver|Mobile edition|Darkroom|OrangePi En ( 粤ICP备14086627号-2

2021-4-22 01:33 GMT+8 , Processed in 0.030689 second(s), 22 queries .

Powered by Discuz! X3.2

© 2014-2015 orangepibbs en.

Quick Reply To Top Return to the list