Introduction: Make Linux System Discoverable by Remote Bluetooth Devices
This instructable is based on my experience learning Bluetooth and Linux. Completion of this task is necessary for a Bluetooth Application that transfer photo from Android Device to Raspberry Pi using OBEX Push protocol.
This instructable will mostly benefit Linux users, especially Debian and its derivatives like Raspberry Pi running Raspbian OS.
A notebook PC with the following specification:
- Intel® Core™2 Duo Processor
- Debian 7.4
- Bluetooth Radio Built-in
Raspberry Pi with the following specification:
- Model B
- Debian 7.6
- Bluetooth Radio USB Adaptor
- Mains-Powered USB Hub
This instructable will show the following:
- Make the Raspberry Pi and notebook PC discoverable to remote bluetooth devices
- Test that the Raspberry Pi and notebook PC is discoverable by using a remote bluetooth device
Step 1: Turn Linux System Into a Bluetooth Device
Complete the steps in "Install Bluetooth Radio Hardware in Linux System" instructable if you have not done so.
Step 2: Configure Bluetooth Settings of Linux System
On the Linux System
Enable inquiry scan and page scan of RPi's Bluetooth Server
sudo hciconfig hci0 piscan
Check that the inquiry scan and page scan of RPi's Bluetooth Server is enabled
sudo hciconfig -a hci0 | grep -i 'PSCAN *ISCAN'
Output of Terminal Console
UP RUNNING PSCAN ISCAN
The bolded line in the output above indicates that the inquiry scan and page scan is enabled
Step 3: Test That the Linux System Is Discoverable by Remote Bluetooth Device
An Android Phone running KitKat is used to search for nearby Bluetooth Devices. The Raspberry is expected to appear in the Android Phones's list of available devices
On the Linux System
sudo hciconfig -a hci0 | grep -i Name
Output of terminal console
On the Android Phone
Go the Android Settings:
Swipe using 2 fingers from top of screen.
Tap on Settings button
Turn on Bluetooth:
Tap ON/OFF button until ON button turns bright blue
Go to Bluetooth Setting:
Tap on the left end of Bluetooth button
Locate Raspberry Pi:
Tap "SEARCH FOR DEVICES" button until the Raspberry Pi's Bluetooth public name is displayed under "AVAILABLE DEVICES"
You have successfully enabled your Linux system (eg. Raspberry Pi) to be discovered by remote Bluetooth device if the Raspberry Pi's Bluetooth public name is displayed under "AVAILABLE DEVICES".
4 People Made This Project!
We have a be nice policy.
Please be positive and constructive.