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

Sending more than 8bits of data over bluetooth

I'm looking into the service creation portion of BLE, and I've made it pretty far. But one problem that I'm running into is sending more than 8 bits of data at a time back to the board. The service example provided, Immediate Alert Service (IAS), can only send 8 bits at a time. I've dug fairly deep into how they send data, and I hit that 8 bit wall every time. Is this a restriction to all services or only the examples?

So in short, is there an easy way to send more data that I am missing?

Thanks in advance!

Parents
  • I found out how to send more data.

    In ble_gatts.h there is this struct:

    /@brief Event structure for BLE_GATTS_EVT_WRITE. */ typedef struct { uint16_t handle; /< Attribute Handle. */ uint8_t op; /< Type of write operation, see @ref BLE_GATTS_OPS. */ ble_gatts_attr_context_t context; /< Attribute Context. */ uint16_t offset; /< Offset for the write operation. */ uint16_t len; /< Length of the incoming data. / uint8_t data[8]; /< Incoming data, variable length. / } ble_gatts_evt_write_t;

    The bolded line is the line that I had to change in order to send more data. They initially had it set to a one element array(data[1]), but I needed to send more data. As far as I can tell you are free to change the size of that array to your needs.

    Hope this helps!

  • As Carles says above, this is wrong, and should not be done. The softdevice header files should never be modified. Please see my other answer for a better answer.

Reply Children
No Data
Related