I want to send as much serviceData as possible in ble advertisement , but when I set it into ServiceData, if data length is more than 18bytes, it did not send out any serviceData, and noting wrong occured, I am puzzled.
I can not find any infomation from MircosoftDocs for max length for serviceData, is there any notice ?
code demo:
auto advParameters = ref new Bluetooth::GenericAttributeProfile::GattServiceProviderAdvertisingParameters();
advParameters->IsConnectable = true;
advParameters->IsDiscoverable = true;
auto writer = ref new Windows::Storage::Streams::DataWriter();
writer->WriteString("123456789012345678"); // success
//writer->WriteString("12345678901234567890"); // fail to send out servicedata, but noting wrong occured
advParameters->ServiceData = writer->DetachBuffer();