Quantcast
Channel: Wireless Connectivity
Viewing all articles
Browse latest Browse all 116964

Forum Post: RE: HCI_LE_Rand and HCI_LE_Encrypt support in HostTestRelease?

$
0
0

Hello Sign,

There is a simpler way for getting the random number.  You can use:

uint16 osal_rand( void );  // returns 16 bit random number.

So if you are using the processExMsgUTIL function for parsing then in a case statement you would have the NV_Read

static uint8 processExMsgUTIL( uint8 cmdID, hciExtCmd_t *pCmd, uint8 *pRspDataLen )
{

  uint8 *pBuf = pCmd->pData;
  bStatus_t stat = SUCCESS;

  *pRspDataLen = 0;

  switch( cmdID )
  {

....
     case HCI_EXT_UTIL_NV_READ:  

      {
           PIN = osal_rand(  );  // returns 16 bit random number.

           ....
       }
      break;
....

  }

Thanks,


Viewing all articles
Browse latest Browse all 116964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>