B4J Question [Solved] Raspberry Pi 3 with bluetooth

Mark Read

Well-Known Member
Licensed User
Longtime User
Has anyone managed to get the RPi3 working with B4J and the in-built bluetooth?

I have the #AdditionalJar's included but the code crashes at bt.listen with the error message


If there is no solution, can I disable the inbuilt adapter and use a dongle?
 

Mark Read

Well-Known Member
Licensed User
Longtime User
Thx Erel, had already seen that post but it didn't work.

Now I have it working.

Here are the steps I used, starting from the latest Noobs version.

1. Sudo apt-get update

2. Sudo apt-get upgrade

3. Reboot

4. sudo nano /usr/lib/systemd/system/bluetooth.service

5.
Look for ExecStart=/usr/libexec/bluetooth/bluetoothd. Put " -C" at the end of this line.

6.
ctrl + O to save and ctrl + x to quit

7. Reboot to restart the daemon and bluetooth services.

8. sudo sdptool browse local and check that it works (otherwise an error appears).

9. sudo apt-get install libbluetooth-dev

10. Reboot. Try your code.

I know that it is a lot of rebooting but otherwise certain services do not like to restart.

Now I can control my RPi3 with my tablet (B4A App). Yippie!!!
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…