hi
i am using nrf51822. i used the radio tranceiver example and it works well. I am planning to advertise the received packets so that the range can also be increased and viewed in nRF connect android app
int main(void)
{
uint32_t err_code = NRF_SUCCESS;
clock_initialization();
APP_TIMER_INIT(APP_TIMER_PRESCALER, APP_TIMER_OP_QUEUE_SIZE, NULL);
err_code = NRF_LOG_INIT(NULL);
APP_ERROR_CHECK(err_code);
err_code = bsp_init(BSP_INIT_LED, APP_TIMER_TICKS(100, APP_TIMER_PRESCALER), NULL);
APP_ERROR_CHECK(err_code);
radio_configure();
NRF_RADIO->PACKETPTR = (uint32_t)&packet;
err_code = bsp_indication_set(BSP_INDICATE_USER_STATE_OFF);
NRF_LOG_INFO("Wait for first packet\r\n");
APP_ERROR_CHECK(err_code);
NRF_LOG_FLUSH();
uint32_t received = read_packet();
err_code = bsp_indication_set(BSP_INDICATE_RCV_OK);
NRF_LOG_INFO("Packet was received\r\n");
APP_ERROR_CHECK(err_code);
NRF_LOG_INFO("The contents of the package is %u\r\n", (unsigned int)received);
NRF_LOG_FLUSH();uint32_t err_code;
bool erase_bonds;
timers_init();
buttons_leds_init(&erase_bonds);
ble_stack_init();
gap_params_init();
advertising_init();
conn_params_init();
err_code = ble_advertising_start(BLE_ADV_MODE_FAST);
APP_ERROR_CHECK(err_code);
for (;;)
{
power_manage();
}
}
i tried this code but doesnt seem to work