3 Replies Latest reply on Aug 4, 2015 10:06 PM by shyoc_2185486

    A way to list bonded devices

      Hello,

      I know that lesmpkeys_numOfBondedDevice() returns number of bonded devices. but is there a way to get a list of those devices addresses ?

       

      Thanks

        • 1. Re: A way to list bonded devices
          #if 0
          //This will override BondedInfo with last index.
          //This should not be called unless debugging purpose
                  {
                      LESMPKEYS_BOND_IDX *bondedIndexBlock;
          
                      extern UINT8 lesmpkeys_maxBondedDevices;
          
                      //lesmp_logBytes("\rFind Bonded Info:", bdAddr, 6);
                      bondedIndexBlock = (LESMPKEYS_BOND_IDX*)lesmpkeys_getBondedInfoIdx();
          
                      if (bondedIndexBlock)
                      {
                          LESMPKEYS_BOND_IDX *curPtr = bondedIndexBlock;
          
                          for (i = 0;i < lesmpkeys_maxBondedDevices; i++)
                          {
                              ble_trace3("index:%d, adrType:%d, idx :%02x", i, curPtr->adrType, curPtr->idx);
                              ble_tracen(curPtr->address, 6);
          
                              // move to next block.
                              curPtr ++;
                          }
          
                          //
                          cfa_mm_Free(bondedIndexBlock);
                      }
                  }
          #endif
          

          Please take a look at this code.  it can be found wiced-smart->bleapp->app->blebgm.c->L1340

           

          -Kevin

          1 of 1 people found this helpful
          • 2. Re: A way to list bonded devices

            Hi shyoc_2185486

             

            Have you had a chance to try the code?

             

            -Kevin

            • 3. Re: A way to list bonded devices

              Hello kwang,

              Well,  actually I didn't try it. seeing the warning in the comment and since my code will be a production code delivered to customers I didn't want to add any unknown side effects.