This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

which program to choose to advertise data over BLE ?

Hello Everyone,

I have done I2C communication with Grid Eye sensor (AMG 8832) using twi_master_with_twis_slave (nRF5_SDK_12.3.0_d7731ad) example program. Now i want to transmit the Temperature data over BLE . I am not sure which ble_peripheral example to use to transmit the data ?

Thanks in advance.

  • Hi everyone,

    One of my colleague suggested me to use ble_app_beacon example to advertise the data of the Temperature using BLE . Now i can execute the program but there is no advertisement of the beacon when i see it in the nrf-connect app. What might be the problem ?

    Here is my main code ( main.c )

    Thanks in advance.

  • Thanks for the quick reply norin saiyed.

    I followed the link the code is working but there is still no advertisement . The break-point is not reaching the advertising_init(); in the debug mode . What might be the problem.

    Thanks in advance.

  • Hello,

    I was not able to compile your main.c file, because there was some external files. Does it run into the main() function, or does it not make it there? If it starts in main(), where does it stop? is it one of the functions resulting in an err_code != 0 (NRF_SUCCESS)? If the err_code is passed into APP_ERROR_CHECK when it is not 0, it will stop. Try to define "DEBUG" in your preprocessor defines, and set a breakpoint in app_error.c on line 76? Does it stop there? Does it say what line_num, p_file_name, and err_code that set the error? If it says "out of scope" disable optimization.

    Best regards,

    Edvin

  • Hello Edvin,

    Thanks for replying . 

    1. Does it run into the main() function                    -                       Yes it does runs in the main.
    2.  If it starts in main(), where does it stop?           -                       It stops in  uint8_t c = NRF_LOG_GETCHAR();(in line number 520) if i set a break point over the line and after running from the line 520 i have to open a putty window and enter the command to read the data or to print .When i run this it never stops .
    3. Does it say what line_num, p_file_name, and err_code that set the error? If it says "out of scope" disable optimization       -                 It shows me "not in scope" it goes to app_error_weak.c  and shows me app_error_fault _handler and id , pc & info (not in scope).

    If you want i can attach the entire file .

    Thank you once again. 

Related