This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Creating a Central device

Hallo Community,

I am new with Nordic chips, now Im trying to develop a BLE central, then i took the BLE_CENTRAL BLE_APP_UART example to start doing it, the SDK is the SDK13, the boards PCA10040 and using Eclipse neon. But when I flash the board with the project, it 's any connectiong with my BLE peripheral.

I am printing some some, during the code in order to figure out if the code is working, I know is not the best debugging, I got problem in ble_stack_uint, more precise here:

    NRF_LOG_INFO("Clock_.\r\n");
nrf_clock_lf_cfg_t clock_lf_cfg = NRF_CLOCK_LFCLKSRC;

NRF_LOG_INFO("SD handler_.\r\n");
// Initialize the SoftDevice handler module.
NRF_LOG_INFO("SD handler_1.\r\n");
SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL);
NRF_LOG_INFO("SD handler_2.\r\n");

Something is happening with SOFTDEVICE_HANDLER_INIT becuase the next log_info is not dispaying anything in the RTT windown.

Do you have any idea what is going on?

Regards, David Caraveo

  • Hi David,

    Have you made sure you flashed the softdevice ?

    Please try to follow the getting started guide and test with some peripheral example first, before you test with the central. Please start here.

  • Hallo Hung,

    My Softdevice is already flashed and im still not having a solution, I debugged my promgram and i got this

    No source avaiable for "SVC_Handler() at 0x2ff2" and No source avaiable for " () at 0xffffff9"

    And this happend when the next code is // Initialize the SoftDevice handler module. SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL);

    Regards, David

  • Have you tried to follow the Getting started guide ? If you flash the precompiled hex file, would it work ?

    Could you provide your hex file ? Which exactly Softdevice did you flash ?

    I would suggest you to compile and test using GCC and make first, before you test on Eclipse. "No source available for" suggest the the project was not configure properly in Eclipse.

    Please try to test with normal ble_peripheral first , it's easier to verify if the board work properly with peripheral code. The device should advertise after programming.

  • Hung Bui, thanks for you help, I can know do my scan in the central example. Now I have a 128-UUID from a costum service: 0x0000000000001000800000805F9B34FB;

    According to the example of central uart, they use a 16-UUID but when I change the uuid in the reference .uiid of ble_uuid_t. I have a problem. I cheked it out in other questions and the said i should use ble_uuid128_t const * p_vs_uuid and sd_ble_uuid_vs_add(); I did, ble_uuid128_t const * p_vs_uuid = 0x0000000000001000800000805F9B34FB; sd_ble_uuid_vs_add(p_vs_uuid, uint8_t *quatServ);

    but I have problems with the uuid: integer constant is too large for its type.

    I counted and it is the 16 bytes.

    Where am I wrong?

    Regards, David

Related