This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

从机从广播状态到连接上状态,这些状态的改变会回调哪个函数



1、从机从广播状态到连接上状态,这些状态的改变会回调哪个函数。在连接上之后断开了,是否会回调什么函数。在哪里调用的。

2、从机和主机进行过配对操作后,断开连接后,主机再一次和从机连上,从机会回调哪些函数?

  • gang,

    以simpleBLEPeripheral 工程为例,

    一切尽在 peripheralStateNotificationCB() 中。。。。。。

  • peripheralStateNotificationCB()是连接状态改变时会调用的函数。那配对改变时simpleBLEPairStateCB()会被调用吧。那问下,配对过后,从机和手机断开连接,再次连接时,simpleBLEPairStateCB()还会被调用吗?若调用的话,执行的顺序是怎么样的。


    若配对后,手机把蓝牙关了,再次打开,配对过程又是怎么样的?