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

some times UUID changes automatically.

Hello Everyone.. i am new to nrf52 and this community. i am using nrf52 and android master control pannel.

in my code i define my custom uuid base to ..

//430Cxxxx-E2E4-439D-A875-D534473C025E
#define NAME_UUID_BASE {0x5E, 0x02, 0x3C, 0x47, 0x34, 0xD5, 0x75, 0xA8, 0x9D, 0x43, 0xE4, 0xE2, 0x00, 0x00, 0x0C, 0x43}

but some times i am getting 430C0000-E2E4-439D-A875-D534473C025E or 430C1807-E2E4-439D-A875-D534473C025E UUID at master control pannel for android.

softdevice is 132.

can anyone help me to findout solution for this.. thankx.

Parents
  • Hello, pardon me for late reply. here it is..

    uint32_t my_service_init(void)
    {
    	uint32_t   err_code;
    	ble_uuid_t ble_uuid;
    	ble_uuid128_t base_uuid = {NAME_UUID_BASE};
    
    	//SEGGER_RTT_printf(0,"my service init\r\n");
    	// Add service
    	err_code = sd_ble_uuid_vs_add(&base_uuid, &ble_uuid.type);
    	if (err_code != NRF_SUCCESS)
    	{
    		return err_code;
    	}
    	err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &ble_uuid, &service_handle);
    	if (err_code != NRF_SUCCESS)
    	{
    		return err_code;
    	}
    
    	for(uint8_t i = 0; i < 9; i++)
    	{
    		err_code = add_char(name_chars[i], &ble_uuid);
    		if (err_code != NRF_SUCCESS)
    		{
    			return err_code;
    		}
    	}
    	return NRF_SUCCESS;
    }
    
Reply
  • Hello, pardon me for late reply. here it is..

    uint32_t my_service_init(void)
    {
    	uint32_t   err_code;
    	ble_uuid_t ble_uuid;
    	ble_uuid128_t base_uuid = {NAME_UUID_BASE};
    
    	//SEGGER_RTT_printf(0,"my service init\r\n");
    	// Add service
    	err_code = sd_ble_uuid_vs_add(&base_uuid, &ble_uuid.type);
    	if (err_code != NRF_SUCCESS)
    	{
    		return err_code;
    	}
    	err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY, &ble_uuid, &service_handle);
    	if (err_code != NRF_SUCCESS)
    	{
    		return err_code;
    	}
    
    	for(uint8_t i = 0; i < 9; i++)
    	{
    		err_code = add_char(name_chars[i], &ble_uuid);
    		if (err_code != NRF_SUCCESS)
    		{
    			return err_code;
    		}
    	}
    	return NRF_SUCCESS;
    }
    
Children
No Data
Related