I was going through the bluedroid architecture and how it works and all those stuffs here. I wanted to know whether we can use bluedroid stack instead of bluez in raspbian. If its possible how can it be done since bluedroid does not support dbus?

  • Presumably bluedroid is an android application, what makes you think it would be a drop in replacement on Linux? Are you running Android on your Pi? Jul 12 '17 at 6:03
  • Hi @Steve. I'm not using android in my Pi. From what I understood from this article, Java is used near the application layer and JNI is used to convert the calls to native C function calls. Hence the lower layers are implemented in C. That's why I was curious to know whether somehow it can be used in Pi/Linux. Please correct me if I'm wrong. Jul 13 '17 at 4:11
  • 3
    We have ported the complete bluedroid to Linux. It requires customizing the HCI layer for Linux, customizing the thread's. It is quite a big work. We have spent few months to get it working in Linux. Let me know if you are interested still, I can share you the details further
    – Ashok Babu
    May 22 '18 at 15:17

Yes it can be used but not easily...

You have to have little expertise in C Programming .

Check ESP32 , they are using Bluedroid in FReeRTOS.

You have to go in similar way .. so basically You have to write your own application layer routines to drive the API of Bluedroid.

ESP32 people have used snipped version of bluedroid .i.e. All the Java Codes has been dropped from bluedroid .. and they have written simple basic application which talks to the top layer of Bluedroid C Files.

Short Answer to your question is: Yes it is achievable and if you follow the ESP32 way , You can have bluedroid running all in User Space.


It is quite different between those two bluetooth stacks I don't see anyone porting bluedroid to raspberry even someone porting it to rpi you still need applications to let it work

There is a new version of bluedroid, called fluoride, and it could be compiled on a linux/ubuntu distro. But it does not fully ready for end-user usage (maybe for chromebook?) event you compile it on ubuntu, you still need bluetooth applications to use those bluetooth features They can NOT run with bluedroid/fluroide bluetooth stack https://android.googlesource.com/platform/system/bt/

android and linux are different. although android uses the linux-kernel and it changes a lot things. application and standard libraries are different android has java blueooth application to some feature, like radio-on, file-sending... it use a lot android framework feature and it is not effective to porting whole android framework to rpi It needs a lot of work to re-write those application/GUI

bluedroid does not use dbus, it use apache license, donated to google by broadcom company

if you are a end-user, you may buy a cheaper cellphone or use a android-x86 to use bluedroid if you are interesting with bluedroid as a developer, you may start to check bluetooth stack specification as a start

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.