Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Development board nRF52832 with multilink + UART

Hello everybody !

Here I am designing a system with 3 development boards nrf52832, where a card called "central" is connected to the computer by USB and this board will then communicate with the other 2 boards "device" with the code from this this tutorial: github.com/.../custom_ble_service_example.

So, my current problem is that I would like to have my computer communicate with the "central" development board. I then used the code example of the sdk "ble_app_multilink_central" and I added to it the parts of the code "ble_app_uart_c" to initialize the UART. During initialization, I get error 8 with APP_ERROR_CHECK (err_code). As I use the traces NFR_LOG I think that the problem thus comes from that. I would like to know if there is a way to debug (by seeing traces on the COM port). And for example what does it take to use printf? (I use Segger with the Nordic SDK 14.2).

Thank you in advance for your assistance !

Parents Reply
  • Hi

    I've created a programm with your Tutorial and it worked, Thanks!

    Now I have the problem on the Central, when I try to compile your code, I've got this error:

      ..\..\..\main.c(130): error: #165: too few arguments in function call  
    ret = sd_ble_gap_scan_start(&m_scan_params);
    ..\..\..\main.c(191): error: #171: invalid type conversion
    adv_data.p_data = (uint8_t *)p_gap_evt->params.adv_report.data;
    ..\..\..\main.c(192): error: #136: struct "<unnamed>" has no field "dlen" 
    adv_data.size = p_gap_evt->params.adv_report.dlen;
    ..\..\..\main.c(220): warning: #181-D: argument is incompatible with corresponding format string conversion
    printf("\rFound peripheral %s", (uint32_t)dev_name.p_data);
    ..\..\..\main.c(261): warning: #224-D: the format string requires additional arguments
    printf("Connection 0x%x established, starting DB discovery.");
    ..\..\..\main.c(283): warning: #223-D: function "ble_conn_state_n_centrals" declared implicitly
    if (ble_conn_state_n_centrals() == NRF_SDH_BLE_CENTRAL_LINK_COUNT)
    ..\..\..\main.c(304): warning: #223-D: function "ble_conn_state_n_centrals" declared implicitly
    if (ble_conn_state_n_centrals() == 0)
    ..\..\..\main.c(590): warning: #177-D: variable "length" was declared but never referenced
    uint16_t length = (uint16_t)index;

    Do you know how I can fix it ? 

    And Thanks for your help Slight smile

Children
No Data
Related