Last Episode Review:
Playing with Raspberry Pi 3+ A Small Test
Playing with Raspberry Pi 3+ To get the job done, one must sharpen their tools
The Raspberry Pi 3 meets the demands of many geeks, supporting WiFi and Bluetooth wireless communication technologies, providing more possibilities for IoT development. Today, we will test the Bluetooth functionality of the Raspberry Pi 3. After starting the Raspberry Pi 3 and entering the Raspbian desktop environment, a Bluetooth icon appears in the upper right corner of the desktop, as shown in the red box below.
Right-click on the Bluetooth icon to bring up a submenu with four options: “Turn Off Bluetooth”, “Make Discoverable”, “Add Device…”, “Remove Device…”.
Click on the “Add Device…” submenu option to enter the Bluetooth device search interface. Turn on the Bluetooth on your phone and enable the discoverability feature so that the Raspberry Pi can find it. Once the device is found, select the phone in the Add New Device interface and click the Pair button to pair.
A confirmation window will pop up during the pairing process; click OK to confirm.
After successful pairing, the window below will pop up, indicating that there may be an issue with SDP. Let’s capture the log for analysis. To analyze the Bluetooth packet protocol, we need software to assist in the analysis: Frontline. Download the Frontline installation package from the official website at http://www.fte.com/ and install it locally on Windows. Download link: http://www.fte.com/support/CPAS- … %20BPA%20600&iid=21.
Go to the developer options on your phone and enable the developer options, then open the Bluetooth packet log.
In the Bluetooth submenu on the Raspberry Pi, click Make Discoverable, then open the Bluetooth on your phone and scan. The Raspberry Pi Bluetooth device can be scanned, and the device name is raspberrypi(AD55).
Click to pair, and after pairing is complete, check the Bluetooth profiles supported by the Raspberry Pi. It was found that only the contact sharing service is supported, as shown in the image below.
Copy the btsnoop_hci.log file from the phone to the computer, change the extension to .cfa, and double-click the btsnoop_hci.cfa file to open it.
Analyze the packet; the BlueZ supported by the Raspbian operating system uses Bluetooth spec 4.1.
However, only the AVRCP and GAP profiles are supported in the inquiry result.
The result obtained in SDP also only supports the AVRCP and GAP profiles, leading to disconnection after SDP completion.
The built-in Bluetooth management software is not very powerful. To make it easier to use, install Blueman. Blueman is a GTK Bluetooth manager that efficiently manages the BlueZ API and simplifies device connections and operations. Use the command: sudo apt-get install blueman.
Testing file transfer, the Raspberry Pi can send to the phone, but the phone cannot send to the Raspberry Pi. The problem lies in the fact that the Raspberry Pi’s SDP does not contain the OPP profile service record.
Conclusion:
The Bluetooth functionality of the Raspberry Pi Raspbian operating system is not yet very complete; at least the user experience is poor, and there are still many issues. To support profiles such as OPP, A2DP, DUN, etc., one needs to configure it themselves, and the configuration process is also very complicated.
Feel free to click to read the original text to communicate and discuss with the author.
Follow EEWORLD (Electronic Engineering World) on WeChat: reply “contribution”, and your original work may have the opportunity to appear in our WeChat push.
To communicate with more industry peers, please click to read the original text to log into the EEWORLD forum.
![]()
WeChat ID: EEWORLD Forum Activities E 掌握
![]()
Follow EEWORLD Service Account EE Benefits At your fingertips
![]()
WeChat ID: EEXINRUI Chip News Sharp Interpretation