6

hcitool scan on my RPi reveals the other local Bluetooth devices, but they do not recognise the RPi Bluetooth. Can anyone tell me the command to make Bluetooth discoverable on the RPi, please.

Willian Paixao
  • 352
  • 4
  • 15
user7182
  • 61
  • 1
  • 1
  • 2

2 Answers2

8

I have answered a similar question here: Making Raspberry Pi Bluetooth slave

I will also paste the same answer below for reference.


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.

bosnjak
  • 251
  • 5
  • 6
  • How to solve error E: Unable to locate package bluez-test-device when trying to sudo apt-get install bluez-test-device? – J.Olufsen Jan 27 '16 at 20:56
  • It should be installed by simply: sudo apt-get install bluez. No need to specify the bluez-test-device. – bosnjak Jan 28 '16 at 01:12
1

I turned it on by running.

sudo bluez-test-adapter discoverable on
Macbeth
  • 21
  • 2