How can i set the bluetooth pin number in linux C/C++

橙三吉。 提交于 2020-07-23 11:58:06

问题


Hi my name is yunsu lee from south korea

Because i have a just little bit english skill, i hope to your understanding about my awkward english

I have a one question.

I can not find a API of setting bluetooth pin number in bluez, when set a bluetooth connection in linux C/C++ environment


回答1:


Pins are handled by an Agent. If you want to implement your own agent read the doc in bluez/doc/agent-api.txt. In summary:

To register your agent:

void RegisterAgent(object agent, string capability)

Your agent object will need to implement some/all of the agent callbacks. For example:

string RequestPinCode(object device)

This method gets called when the service daemon needs to get the passkey for an authentication



来源:https://stackoverflow.com/questions/27632755/how-can-i-set-the-bluetooth-pin-number-in-linux-c-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!