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!!!