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.

2541作为从机,当主机和2541断开连接之后,如何自动关闭广播?

2541作为从机,当主机和2541断开连接之后,如何自动关闭广播?如果可以,需要设置哪些参数,谢谢。

  • GuoLin,

    你可以断开连接后调用:

    uint8 advertEnabled = FALSE; // Turn on Advertising

    // Disable connectable advertising.
    GAPRole_SetParameter(GAPROLE_ADVERT_ENABLED, sizeof(uint8),
    &advertEnabled);

    这样就停止广播了。

  • 谢谢 Yan.

    目前我就是采用这种方法。

    从机和主机断线之后,会首先走的Waiting.然后再走advertising,我在Waiting的时候就调用这个函数关闭广播。我现在想知道,是否可以设置某一个参数,

    断开连接就直接自己关闭广播,除非我们再关闭广播。

  • 请问是否可以设置某个参数,2541在和主机断开连接之后,不进入广播流程。当然还是可以响应串口指令,用串口指令打开广播的?