softdevice - Write custom BLE advertise with custom TYPE

Hello,

I am using the nRF52840 DK board and with Softdevice code nRF SDK 17.0.2. I am trying to write custom advertise data with custom type.

As you can see in the above screenshot. Like 0x16 and 0x09 I want to set my data to some other type for example 0x06 or 0x07. How can implement this? Earlier I have done the same in Zephyr in the same nRF52840 successfully, but I am not sure how to do this in Softdevice. Please let me know how can do this?

so as you can see in screenshot 0x16 was written due to the below statement:

uint8_t test[2] = {0x07,0x02};
ble_advdata_service_data_t obj;
obj.service_uuid = BLE_UUID_TX_POWER_SERVICE;

obj.data.p_data = test;
obj.data.size = 2;

init.advdata.p_service_data_array =&obj;
    init.advdata.service_data_count=1;

Thanks and regards,

Neeraj Dhekale

Parents Reply
  • Hello Priyanka,

    Thanks for your reply.

    I have checked both BLE services and the BLE advertising link. It is very informative and thank you so much for sharing it with me. But I guess what I am looking for, is not covered in the link. Could you please point it out for me from the above link? I have tried to implement ble_gap_privacy_params_t but it is different, in this I was able to change the MAC address of my BLE to RANDOM.

    I want to set BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_MORE_AVAILABLE or BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_COMPLETE type to advertising data.

    Thanks and regards,

    Neeraj Dhekale

Children
No Data
Related