Hello,
I´m implementing a master bluetooth on development kit dongle based on SimpleBLEPeripheral code. My system will receive the commands from UART and it performs the tasks according commands. The uart communication is working fine and now I've been programming the code to request the Devices discovery when the command arrives from uart which generates a event that is processeced by the code showed below:
if ( events & ESCANEARDEVICES )
{
bStatus_t retorno;
gapDevDivReq.taskID = EMGsensor_TaskID;
gapDevDivReq.mode = DEVDISC_MODE_ALL;
gapDevDivReq.nameMode = TRUE;
gapDevDivReq.whiteList = FALSE;
return = GAP_DeviceDiscoveryRequest (&gapDevDivReq);
HalUARTWrite(HAL_UART_PORT_1,&return, 1);
return ( events ^ ESCANEARDEVICES );
}
The return variable always receive 0x12 that means : bleIncorrectMode (Not setup properly to perform that task.) . Would I have to do to use properly this function?
Note: The GAP layer was initialized at began of program.
Looking forward to reply,
Sincerely
Frederico