Restricting the BLE peripheral device to connect to only one Master

旧巷老猫 提交于 2019-12-12 06:26:57

问题


I want to restrict my BLE Peripheral device to connect with only one master always .IF i receive a connection request from some other master/central device, it should reject the connection request !

Thanks for your help !

Regards,

Senthil


回答1:


Your question is a bit vague so I break it into two cases:

(1) If it is connected to a master, it can't connect to another. This restriction is imposed by BLE standard.

(2) Probably you meant this one. If it was connected to a master, but due to some reason, the connection was lost and the peripheral is advertising again. You do not want this peripheral to connect to any other central devices in the earshot and still wait its original master, right? Well, your peripheral can only do connectable advertising and respond to whatever central device that initiates a connection request. But once both are connected, your peripheral could ask for whatever information from the master for identification. If the master can't respond with a correct answer, your peripheral could disconnect and do advertising again until the original central device connects to it.

Hope this helps.




回答2:


You have to edit the application on the slave then.

Do you have a BLE chip application layer source code? Do you have a BLE chip programmer? Development kit? What chip ar you using?



来源:https://stackoverflow.com/questions/11844873/restricting-the-ble-peripheral-device-to-connect-to-only-one-master

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