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

device could not be found due to changes in m_adv_uuids[]

Hi expert,

I'm working for my project that make a controller for drone, and that i need nus for as my service so i can exchange the data (send order via rx from smartphone) so i'm using ble_app_templat as my basis for esthablishing a connection, and it works and then i want to implement my NUS, theoritically I just should  change uuid and the service so the nus could be implemented

but as i change m_adv_uuids[] my device could not be found anymore.

I change it from

static ble_uuid_t m_adv_uuids[] =                                               /**< Universally unique service identifiers. */
{
    {BLE_UUID_DEVICE_INFORMATION_SERVICE, BLE_UUID_TYPE_BLE}
};

to

static ble_uuid_t m_adv_uuids[] =                                               /**< Universally unique service identifiers. */
{
		{BLE_UUID_NUS_SERVICE, NUS_SERVICE_UUID_TYPE }
};

I also try these

static ble_uuid_t m_adv_uuids[] =                                               /**< Universally unique service identifiers. */
{
		{BLE_UUID_NUS_SERVICE, BLE_UUID_TYPE_BLE}
};

it works, my device could be found but i got another problem it shows an error "the handle is invalid" in nrf toolbox app as i want to check the uart.

could anyone help me?

thanks in advance

Andhika

Parents Reply
  • Hi,

    sorry for the late reply, i placed the breakpoint in ble_nus_init() but the LED error show nothing

    void services_init(void)
    {
        uint32_t       err_code;
        ble_nus_init_t nus_init;
    
        memset(&nus_init, 0, sizeof(nus_init));
    
        nus_init.data_handler = nus_data_handler;
    
    
        err_code = ble_nus_init(&m_nus, &nus_init);
    	Err::signalWithCode(err_code,6);
    }
    

    problem is if i debug it the device can be found but the code goes direct to NRF_BREAKPOINT_COND;

    but if i only flash and run the device could not be found at all.

    best regards,

    Andhika

Children
Related