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

Custom 128 UUID and Service Data = unknown error

hi,

I have been reading some posts regarding similar issues, but I am not able to nail down this one. I am trying to create a custom 128 UUID and associate some Service Data to this service. I would like to broadcast only (connection less).

I am using the code recommended in this post .

Does not seems to be any issues during the assignment of the new 128 UUID, until I call ble_advdata_set(). Performing such call end up in my app_error_handler(), the error number seems mean less

error_code = 3735928559
line_num    = 1377
p_file_name	const uint8_t*	0x20001d4c "src\\rem.c"	
*p_file_name	const uint8_t	115 's'

The code:

#define BLE_CYC_SERVICE_UUID 0x5424 

uint32_t      err_code;
ble_advdata_t advdata;
uint8_t       flags = BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED;
ble_uuid_t    service_uuid; 

uint8_t battery_data = 0x24;
ble_advdata_service_data_t service_data;

service_uuid.type   = m_cy.uuid_type; 
service_uuid.uuid   = BLE_CY_SERVICE_UUID; 

service_data.service_uuid = BLE_CYC_SERVICE_UUID; 
service_data.data.size    = sizeof(battery_data);
service_data.data.p_data  = &battery_data;

memset(&advdata, 0, sizeof(advdata));

advdata.name_type            = BLE_ADVDATA_FULL_NAME;
advdata.include_appearance   = false;
advdata.flags.size           = sizeof(flags);
advdata.flags.p_data         = &flags;
advdata.service_data_count   = 1;
advdata.p_service_data_array = &service_data;
advdata.uuids_more_available.uuid_cnt = 1; // new
advdata.uuids_more_available.p_uuids  = &service_uuid; 

err_code = ble_advdata_set(&advdata, NULL);	

Second Try

Hi Petter,

First of all thank you for your help. Before going in to details let me list my full env.

  • Windows 8.1
  • SAGGER Jlink w/ SW version 4.92 and Jlink is using firmware v9 (This is the latest version)
  • Eclipse 4.4 (Luna) and CDT extensions for GNU ARM
  • GCC toolchain version 4.8 2014q2
  • S110 v7
  • SDK 6.1.0
  • Part # QFAAG00

Just for the record I have been running some test code like ble_app_beacon to test the S110 v7 and it works without any issues.

No lets go back to the main subject. I built ble_apps_bls, but fails when executes this part returning an error = 12289. I set advdata.name_type = BLE_ADVDATA_NO_NAME

gap_params_init:
   err_code = sd_ble_gap_device_name_set(&sec_mode,
                                          (const uint8_t *)DEVICE_NAME,
                                          strlen(DEVICE_NAME));

I tried your code as well, but it failed as well (I set advdata.name_type = BLE_ADVDATA_NO_NAME) :

gap_params_init:
   err_code = sd_ble_gap_ppcp_set(&gap_conn_params)

I am not sure what else to try. Do I need to use nRFgo or other tool to setup something else? Is there any known issues with the chip rev that I have?

Thanks for your support.

P.S I attached 2 zip (all the images and map files), 1x Sagger log, 1 x Makefile files.

ble_app_template_128UUID.zip

ble_app_lbs_s110.zip

ble_app_template_128UUID-Makefile

Cheers Dan

Related