I have a Raspberry Pi 2 running Raspbian kernel 4.1.15 and Bluez version 5.23.
I want to be able to connect a device (like an Android phone) to the rapsberry which shoul
First you have to configurate sspmode 0, for pin request: hciconfig hci0 sspmode 0
And using bt-agent aplicattion (you can run as deamon too):
bt-agent -c NoInputNoOutput -p /root/bluethooth.cfg
Edit the file configuration, you can put tha mac address and the pin: For example:
XX:XX:XX:XX:XX:XX 1234
Or if you want a pin to all the device the same pin code, for example 1234, edit the file like this: * 1234
This work for me!