The title says it all
Forgive my ignorance, but what would this do that a normal off-on operation doesnât? Or are you simply asking for a 1-action restart?
Isnât âRestart network connectionsâ enough?
Take a look here for details
you may read whole thread but from here should say allâŚ
So, if this is a problem with Koli, shouldnât we highlight the bug report rather than asking for a feature that sounds like sidestepping the problem?
There is a bug report already for longer time. See (similar or same?) e.g.
https://together.jolla.com/question/218868/bluetooth-icon-is-showing-even-when-bluetooth-is-off/.
So I this request as a valid one. Why else do we have these âutilitiesâ at all?
I think there are two things here:
- Bluetooth (and other radio devices) ought to be restarted with a Network restart, which we already have; if this isnât happening for Bluetooth, then:
- If Bluetooth gets âstuckâ - that I know has happened to me before, there may be an issue with the hardware adaptation if not hardware itself
If (1) doesnât work as expected, that should be fixed/considered as a feature request, for sure; if (2) is the problem, then bug reports for the issue will surely be welcome (with device model, etc. etc.).
Sadly, however, the solution of âswitching it off and on againâ will probably be the most popular here, as mobile devices are not exactly the best engineered things in the world. SFOS does a good job at making them feel like a âreal computerâ, but sometimes you really need to cut the power for things to resume work as normal.
I read someone saying the same thing as to fix the underlying problem and I agree. In the meantime, some users found out that you can fix it temporarily by restarting some services with a single command line. Thatâs why Iâm asking if this âsimpleâ command line could be added to the utilities app.
Which services? This would be much useful information than just asking for a blanket bluetooth restart button.
Already posted:
Right, was looking for a summary - if we are asking for a feature request. Anyway, I think my views are all here. Good luck
While I havenât tried it, it would seem that sailfish-utilities
comes with /usr/share/sailfish-utilities/restart_network.sh
which includes a simple list of services to restart.
One could edit that script and add the bluetooth-related services, and then use the Restart Network utility as usual.
In fact, I have made this on the fly, please test if you have patchmanager:
https://coderus.openrepos.net/pm2/project/patch-restart-bt-with-network
@nephros you are the hero of the day \o/
I just made a test round:
turn on BT Headset and use it with some music. Works.
turn off BT, wait a few seconds, turn it back on and turn on headset. Does not connect.
modifiy /usr/share/sailfish-utilities/restart_network.sh as follow
service_do stop connman.service
service_do stop wpa_supplicant.service
service_do stop bluetooth-rfkill-event.service
service_do restart wlan-module-load.service
service_do restart bluetooth.service
service_do start wpa_supplicant.service
service_do start connman.service
service_do start bluetooth-rfkill-event.service
use the utilities app to restart network
try again bluetooth pairing and it works \o/
Thank you so much for pointing out where to add these simple command lines. I hope Jolla will add these in the app as there are many BT problems to be found among SF users.
Glad it works for you.
Sailfish Utilities is open source, and itâs quite trivial to add the functionality separarely from the Network version.
I have a version that does that here, would Jolla be interested in a Pull Request?
If anyone is interested, I have created a separate Restart BT option for Sailfish Utilities:
- Feature branch: https://github.com/nephros/sailfish-utilities/tree/bt-restart
- Compare to main branch: https://github.com/sailfishos/sailfish-utilities/compare/master...nephros:bt-restart
- RPM Packages: https://github.com/nephros/sailfish-utilities/tree/bt-restart-pkg/RPMS/4.0.1.45
Please test and report back.
Remember to unapply the patch above before installing.
nephros, thank you so much.
Your add on to restart bluetooth for to the sailfish utilities works for me on my Xperia 10 Plus DS
The magic line for me to reactivate BT is: systemctl restart bluetooth-rfkill-event.service
or systemctl restart bluetooth-rfkill-event
Strangely enough, reactivation does not work here with the extended sailfish-utilities from nephros and only via the command line.