Biu~ Notes | Qualcomm Bluetooth ADK (32) — Can I have your name?

Biu~ Notes | Qualcomm Bluetooth ADK (32) -- Can I have your name?

Bui~ Bui~ Bui~

Can I have your name?

Of course

NO!!! [○・`Д´・ ○]

Don’t think I don’t know you will take me away after I answer that you call!!

We know that each device has its own name. When headphones connect to a phone, the phone retrieves the name of the headphones; conversely, the headphones do not retrieve the name of the phone because it is unnecessary~ even if they could (some products with displays may show the name of the connected device). So how can we implement this functionality when needed?

It’s simple; the default code is already available, just enable it.

However! The default code exists, but it has not been included in the project, sigh~ just for fun!

First, we need to find this code in the ADK path: \adk\src\domains\bt\remote_name

However, this part of the code also involves another piece of operational code that is responsible for storing the retrieved data, corresponding to the path /adk/src/domains/bt/device_pskey. First, add these two parts of the code to the project.

Biu~ Notes | Qualcomm Bluetooth ADK (32) -- Can I have your name?Biu~ Notes | Qualcomm Bluetooth ADK (32) -- Can I have your name?

In remote_name.c, there is an initialization function called RemoteName_Init. Place this initialization function in the initialization table.

Biu~ Notes | Qualcomm Bluetooth ADK (32) -- Can I have your name?

At this point, the functionality to read the name has been enabled. The system will retrieve the name upon connection completion and save it.

Next, we need to implement reading the saved name. In the remote_name.c file, there is an interface function for getting the name called RemoteName_Get. Below is a reference code for retrieving all paired phone names, as this function has built-in printing, so you can just check the log.

Biu~ Notes | Qualcomm Bluetooth ADK (32) -- Can I have your name?

This concludes the content of this blog post. If you have any questions, please do not leave comments below the post. If you have any inquiries or want to know more, just talk to me face-to-face (if you know who I am ( ̄▽ ̄)ノ), and I will try to accommodate you (o´ω`o)ノ. Thank you all for browsing, and see you next time.

Simple is the result of long-term effort, not the starting point.

—— Not my words.

Biu~ Notes | Qualcomm Bluetooth ADK (32) -- Can I have your name?

Click Read the original text to learn more details, unlock over 1000 IoT, automotive, and power solutions, and connect with over 700 technical experts from WPG.

Leave a Comment