I\'m having trouble connecting my smartphone to my raspberry pi over bluetooth using an app.
My situation:
I\'m developing a bluetooth controlla
I had faced a similar problem while connecting to a raspberrypi3 bluetooth via my android app. First execute the following commands one by one on your pi command prompt:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install bluetooth blueman bluez
sudo reboot
sudo apt-get install python-bluetooth
After the execution of the above commands pair your app's bluetooth with pi's bluetooth. Now you need to add the SP profile to the Pi. Edit this file:
Execute the following command on the pi command prompt:
sudo nano /etc/systemd/system/dbus-org.bluez.service
A file will open and add the compatibility flag, ' -C', at the end of the 'ExecStart=' line. Add a new line after that to add the SP profile. The two lines should look like this:
ExecStart=/usr/lib/bluetooth/bluetoothd -C
ExecStartPost=/usr/bin/sdptool add SP
Save and reboot your pi and this should work.