4

I'm trying to setup my Raspberry Pi's bluetooth to listen and wait to be paired by a PC . I see most of the guides are the other way (Raspberry Pi scans, detects and pairs to other devices). How can this be done?

Thanks a lot

6

You need to activate the ISCAN service to achieve this:

sudo hciconfig hci0 piscan

after this, when you execute sudo hciconfig -a, you should see this line:

UP RUNNING PSCAN ISCAN

After that, just run bluez-simple-agent and when the Agent is started (don't kill the process), use the other device to scan and find the RPI. Start the pairing and you will get the PIN prompt in the console. When done, the devices are paired. You can stop the bluez-simple-agent with CTRL+C.

If you want to add the device as trusted, execute:

bluez-test-device trusted XX:XX:XX:XX:XX:XX yes

where XX:XX:XX:XX:XX:XX is the bluetooth device address.

  • 1
    bluez-test-adapter was replaced by bluetoothctl now – Hongbo Miao May 10 '17 at 0:39
-1

Check this may help you if you want to receive or send data..

https://unix.stackexchange.com/questions/92255/how-do-i-connect-and-send-data-to-a-bluetooth-serial-port-on-linux

  • Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – Steve Robillard Feb 15 '15 at 2:00

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.