Dear Sirs,
How to advertise with nRF52810 (peripheral mode) in order to be seen by BT4 devices (Smartphones)?
Is it necessary to make a special configuration (settings)? If yes, where can I find an example?
I try to use
Dear Sirs,
How to advertise with nRF52810 (peripheral mode) in order to be seen by BT4 devices (Smartphones)?
Is it necessary to make a special configuration (settings)? If yes, where can I find an example?
I try to use
Thank you very much for your reply.
Unfortunately, your SDK examples are very complex and hard to understand, using event handlers, LEDS, buttons etc.
On my PCB board I have not LEDS and buttons.
I have already tried with your SDK example, I have even began with it, but I could not understand it.
It is my reason to ask you a simpler one.
It MUST work on my custom board, not on your proprietary board...
I need a an example of advertising with a minimum initialization and without communication (no services), not depending of hardware.
Is it possible?
Cordially yours
Andre
Again, our tutorials is a good starting point for understanding how to use the Softdevice.
A custom board would require a new board file that maps the pins accordingly to your custom board. More info can found here.
Dear Jared,
I really do not understand your position.
Two times I asked you for simpler example. I KNOW and USE your current SDK examples.
Before ask you anything, I had already read your tutorials. Several times, but could not deeply understand them.
Or they are not good, or I am an imbecile...
I use custom board without LEDS and buttons, so your example from SDK is not adapted at all for me....
However, I try to use your SDK example, but I get run time errors.
Even if your example works with your board, it seems to bee very problematic with the custom board because of missing of LEDS, buttons and its event handlers.
In general, your examples use too much functionalities at the same time, so they are too hard to understand.
I repeat, I need a SIMPLE example of advertisement, without any communication, witout LED & button usage.
So, could you help me or not?
Could you have a look on my code?
BTW, what is happened with my code I had added to my post yesterday?
I will add it once more...
Cordially
Andre
My initialization sequence:
ble_stack_init();
gap_params_init();
gatt_init();
services_init();
advertising_init();
//conn_params_init();
// Start execution
advertising_start();
for (;;); // debug break
Unfortunately the conn_params_init() function gives an error (value 3, internal error).
I do not know what it means.
Is it possible to start advertisement without this initialization?
This function is copied from your SDK example, only with light modification of error management (no LEDS but UART)
/**@brief Function for initializing the Connection Parameters module.
*/
static void conn_params_init(void)
{
printf("nRF52: conn_params_init\r\n");
nrf_delay_ms(200);
ret_code_t err_code;
ble_conn_params_init_t cp_init;
memset(&cp_init, 0, sizeof(cp_init));
cp_init.p_conn_params = NULL;
cp_init.first_conn_params_update_delay = FIRST_CONN_PARAMS_UPDATE_DELAY;
cp_init.next_conn_params_update_delay = NEXT_CONN_PARAMS_UPDATE_DELAY;
cp_init.max_conn_params_update_count = MAX_CONN_PARAMS_UPDATE_COUNT;
cp_init.start_on_notify_cccd_handle = BLE_GATT_HANDLE_INVALID;
cp_init.disconnect_on_fail = false;
cp_init.evt_handler = on_conn_params_evt;
cp_init.error_handler = conn_params_error_handler;
err_code = ble_conn_params_init(&cp_init);
//APP_ERROR_CHECK(err_code);
if (err_code!=NRF_SUCCESS)
{
printf("nRF52: conn_params_init ERROR %d\r\n", err_code);
nrf_delay_ms(200);
return;
}
printf("nRF52: conn_params_init done\r\n");
nrf_delay_ms(200);
}
What is happened with my code I had added to my post yesterday?
I will add it once more...