void ConnectionSmEncryptionKeyRefreshTestExtra(
        uint8 type, 
        const bdaddr* bd_addr
        )
{
    typed_bdaddr    taddr;

    taddr.type      = type;
    taddr.addr      = *bd_addr;

    ConnectionSmEncryptionKeyRefresh(&taddr);
}
/****************************************************************************
NAME
    handleAppRefreshEncryptionReq
    
DESCRIPTION
    Handles the application refresh encryption key message.
    
*/
static void handleAppRefreshEncryptionReq(devInstanceTaskData *inst)
{        
    switch (the_app->app_state)
    {
        case AppStateIdle:
        {
            /* If we have a device active but not in call / streaming */
            ConnectionSmEncryptionKeyRefresh(&inst->bd_addr);
            break;
        }
        default:
        {
            break;
        }
    }           
    MessageSendLater(&inst->task, APP_REFRESH_ENCRYPTION_REQ, 0, D_MIN(EPR_TIMEOUT));
}