Bluetooth Support in Android

Is it possible to add full support for bluetooth for android apps (e.g. for connectivity to 3rd party devices, file transfers, etc). I read somewhere that it is currently not supported. If there is some setting/tweak to enable full android bluetooth that I missed, please let me know!

I find the limited bluetooth support the only limitation to the android stack on SFOS. It seems android can only connect to bluetooth music players, which means apps for file/image transfer or other purposes won’t work. As nice as it would be to have all native apps, some 3rd party android apps are useful.

58 Likes

+1

I have the same feature request: Please add SPP (Serial Port Profile) to the bluetooth stack. I’m missing a way to connect to external hardware like OBD-dongles in Android mode.

I asked Jolla support about whether it’s technically possible and planned to add SPP. Although this was a simple question, they did not find it necessary to answer it. Instead they suggested that i create a feature request. Good support works differently…

6 Likes

As a matter of fact, I was pleasantly surprised when my Sony SBH-20 headset connected to an Android podcast application under 3.4.0.24 and had sound, after I kept hearing how Bluetooth media support was broken in Aliendalvik.
BUT, there’s no way of controlling the app - the media buttons (play/stop, FF/RW) don’t work, neither the ones on the SBH-20 nor an external BT Remote Shutter (that identifies itself as a keyboard).
Testing with native gPodder, the media controls on the SBH-20 also do not work, but the play/stop of the Remote Shutter works; however, the FF/RW don’t work.
It seems that as far as BT media control, it’s something in Sailfish itself and not in Aliendalvik.

Honestly, this would save me so much trouble if it were implemented…

3 Likes

Any way a user can do this by themselves?

1 Like

Unfortunately not. I installed Sailfish OS 4.0.1.48 and Bluetooth SPP seems to be still not implemented.

1 Like

This is really something that should be remedied!

I have several devices (e.g. cameras), that offer extended functionality via an Android app connecting via Bluetooth. And although these apps mostly run great under SFOS 4 (Sailfish X), they cannot connect, so they’re useless to me.
And I guess forcing sailors to buy an Android device because of this situation is not the kind of service, the great folks at Jolla are aiming at, right? :wink:

4 Likes

The best option would be to dual-boot the phone

Or have a LineageOS phone

Add me to the list of people needing Bluetooth connectivity on Android devices. I have several devices which I’d like to connect to my phone via their various Android apps.

5 Likes

It’d make me be able to leave Android 100%… I’d be able to use my watch, my crypto wallet, and a few other things. NFC Passthough and Bluetooth Passthrough are musts… With these implemented ((even as a patch with patchmanager 4 (if it ever exists)) then I could guarantee that I’d never use Android by itself again. I’d be only using FOSS apps and such

3 Likes

If you could toggle bluetooth passthrough as well, it’d be perfect.

1 Like

I also miss Bluetooth (LE) Support. I would use the German Corona tracing app. In f-droid there is a version who don’t need the Google play service to run. One problem less. But without Bluetooth (LE) Support the app not work.

1 Like

As a replacement of the official German CoronaWarnApp you could use Contrac by @flypig et.al. https://openrepos.net/content/flypig/contrac which is an implementation of the tracing in Sailfish. It has its glitches but works more or less reliably.

2 Likes

Thank you,

I Test it.

My girlfriend does have a gene-defect (Cystrical Fibrosis) which causes several chronical defects. One of them is diabetes and she does have an small hardware token on her arm that scans her blood sugar and gives an alarm if its too high or low.

This Hardware Pushes its Alarms using Bluetooth and uses NFC for Scanning the Blood Sugar Level. It comes with an very very crappy and limited hardware device as the recommended way to use it, is an smartphone app.

But this Smartphone App, sadly, does not work on SailfishOS because neither the Bluetooth, nor the NFC Features are there. :frowning:

2 Likes

3 weeks ago I got myself a Lego remote-controlled through an Android application. The latter communicates with the model using Bluetooth which in turn means I can’t use my Sailfish to play with it. I’d be forced to use an Android device which makes me extremely sad and disappointed and would totally ruin my pleasure. Please add Bluetooth support for Android, it’s been years now since you’ve started offering Sailfish for external devices.
What are the technical problems preventing you from doing so anyway?

5 Likes

Hi @ddobrev. Following the community meeting, I just had a quick play around with pylgbst which provides a python interface for PoweredUp devices, which you mentioned might apply to your LEGO model. I was able to get pylgbst installed to my Sailfish XA2 using the following steps from the console:

devel-su zypper install bluez5-libs-devel make gcc glib2-devel
python3 -m venv venv
source venv/bin/activate
pip install bluepy
pip install -U pylgbst

I then created this file (following the readme on github):

from pylgbst.hub import MoveHub
from pylgbst import get_connection_bluepy
conn = get_connection_bluepy(hub_mac='AA:BB:CC:DD:EE:FF')
hub = MoveHub(conn)
for device in hub.peripherals:
    print(device)

Which seemed to work when I execute it with devel-su python3 listdevs.py. I say “seemed” because unfortunately I don’t have a LEGO PoweredUp device to test it with, but I could see it scanning for Bluetooth devices, which is encouraging.

I want to be clear that I understand this isn’t a solution to the original question posed about Bluetooth, and I can understand your desire to use the official LEGO app, but I just thought you might like to know in case this gives you something to at least play with (I understand how disappointing it must be not to be able to). I’d be happy to discuss further, but if so we should probably create a separate topic.

7 Likes

I don’t know if this still works, but it may be worth a try:

https://openrepos.net/content/pisarz1958/glukometr-diabetes-diary

Also, if someone is up to taking on the development/maintenance. :slight_smile:

I don’t really know if this is applicable but there was some news VirtIO Bluetooth Driver On The Way To The Linux Kernel - Phoronix would this be a possible way in the future?

3 Likes