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

How shall i define Service Data in BLE Scan Response Data ?

This is the implemenatation spec for GATT server database (reader) firmware i am working on.

I have implemented advertisement packet using nRF Connect SDK latest.

Not sure how to declare 8-byte Service Data ? 

I have the 8-byte value with me.

This is how i have implemented

            uint8_t reader_serial_number[8] = some value;
            const struct bt_data service_sd[] =
            {
                BT_DATA_SVC_DATA16, 8, reader_serial_number
            };
But in the mobile app it shows like
Service Data: UUID: first two bytes (flipped bytes) and Data: Last 6 bytes correct order
Not sure what is wrong. Please explain and correct my implementation.
Thanks.
Parents
  • Are you configuring this in the ad data or scan response data? 

    Looking at other samples the could be something like this

     uint8_t reader_serial_number[8] = some value;
                const struct bt_data service_sd[] =
                {
                    BT_DATA_BYTES(BT_DATA_SVC_DATA168reader_serial_number);
                };
Reply
  • Are you configuring this in the ad data or scan response data? 

    Looking at other samples the could be something like this

     uint8_t reader_serial_number[8] = some value;
                const struct bt_data service_sd[] =
                {
                    BT_DATA_BYTES(BT_DATA_SVC_DATA168reader_serial_number);
                };
Children
No Data
Related