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.

蓝牙cc2540可以在不配对的情况下读写特性的值吗?

Expert 1254 points
Other Parts Discussed in Thread: CC2540

蓝牙cc2540可以在不配对的情况下读写特性的值吗?

  • 具体哪些特性值?

  • 我自己定义的特征值,类似与例程中的 SIMPLEPROFILE_CHAR1

  • BLE一般都不配对连接,协议栈里的demo都没有配对限制,android由于系统设置会要求配对,可以通过从机修改 配对模式来跳过:

    // Setup the GAP Bond Manager
    {
    uint32 passkey = 0; // passkey "000000"
    uint8 pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ; //GAPBOND_PAIRING_MODE_NO_PAIRING;
    uint8 mitm = TRUE;
    uint8 ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY;
    uint8 bonding = TRUE;
    GAPBondMgr_SetParameter( GAPBOND_DEFAULT_PASSCODE, sizeof ( uint32 ), &passkey );
    GAPBondMgr_SetParameter( GAPBOND_PAIRING_MODE, sizeof ( uint8 ), &pairMode );
    GAPBondMgr_SetParameter( GAPBOND_MITM_PROTECTION, sizeof ( uint8 ), &mitm );
    GAPBondMgr_SetParameter( GAPBOND_IO_CAPABILITIES, sizeof ( uint8 ), &ioCap );
    GAPBondMgr_SetParameter( GAPBOND_BONDING_ENABLED, sizeof ( uint8 ), &bonding );
    }

  • 好的,谢谢