hi i have a problem with ble app uart.i used nRF5_SDK_12.3.0_d7731ad and Eclipse Mars 2. I had build main.c in hex ble_app_uart\pca10040\s132 . And after that a maked mergehex with s132_nrf52_3.0.0_softdevice.hex.i flashed into my BLE nitrogen. i can conect to BLE. But any messages what i sended on Bluetooth from my Phone Do not return in my phone but function can do it.And more when i put in condition code for togle blinky i had not any bkinky when i sended mesage from my phone
void uart_event_handle(app_uart_evt_t * p_event)
{
static uint8_t data_array[BLE_NUS_MAX_DATA_LEN];
static uint8_t index = 0;
uint32_t err_code;
switch (p_event->evt_type)
{
case APP_UART_DATA_READY:
UNUSED_VARIABLE(app_uart_get(&data_array[index]));
index++;
if ((data_array[index - 1] == 'q') || (index >= (BLE_NUS_MAX_DATA_LEN)))
{
//send mesage as resived
err_code = ble_nus_string_send(&m_nus, data_array, index);
if (err_code != NRF_ERROR_INVALID_STATE)
{
APP_ERROR_CHECK(err_code);
}
index = 0;
}
break;
case APP_UART_COMMUNICATION_ERROR:
APP_ERROR_HANDLER(p_event->data.error_communication);
break;
case APP_UART_FIFO_ERROR:
APP_ERROR_HANDLER(p_event->data.error_code);
break;
default:
break;
}
}