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.

CC2640R2F: Function SimplePeripheral_passcodeCB, parameter numComparison

Part Number: CC2640R2F
Other Parts Discussed in Thread: BLE-STACK

Unfortunately, still bonding / pairing does not work on my device. I started from scratch from the simple_peripheral_cc2640r2lp project and compare to my project.

One question arises:

During definition of GAP Bond Manager Callbacks there is a function SimplePeripheral_passcodeCB. Its signature in the code looks like this:

static void SimplePeripheral_passcodeCB(uint8_t *deviceAddr, uint16_t connHandle,
                                           uint8_t uiInputs, uint8_t uiOutputs)

The signature in gapbondmgr.h looks like this

typedef void (*pfnPasscodeCB_t)
(
  uint8  *deviceAddr,
  uint16 connectionHandle,
  uint8  uiInputs,
  uint8  uiOutputs,
  uint32 numComparison
 );

Isn't the parameter numComparison missing in the function definition?

Harald

  • Hi Harald,

    From a C point of view, I don't think casting this function pointer to a function with the wrong number of arguments will break the pass code pairing process, but I agree that it's very bad coding practice and we will fix it in our sample apps.

    If you want to implement an example that supports numeric comparison you can see some code snippets in the BLE-Stack User's Guide ( dev.ti.com/.../gapbondmngr.html )