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

Long Attributes

Hi, I need to have long attributes. So I need 'Read Blob' operation for read and Queued writes ('Prepare Write' and 'Execute Write'). Does Soft Device for nrf51822 support mentioned commands?

Best regards, Artem Zemlyanukhin

Parents
  • Hi,

    Last post is mine, forgot login.

    I understood my 1 and 2 questions. Those BLE_GATTS_EVT_WRITE/BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST events with len = 0, data = 0 were 'BLE_GATTS_OP_EXEC_WRITE_REQ_NOW'.

    And I want to expand 4 question. Not only 'BLE_EVT_USER_MEM_REQUEST' event stack generates after 'Execute Write Request'. If I use Authorization for attribute, stack generates BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST(BLE_GATTS_OP_EXEC_WRITE_REQ) events also only after 'Execute Write Request'.

    But in your documentation I saw Message Sequence Charts, where was following sequence:

    -client send PrepWriteReq1 -stack generates BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST -server send PrepWriteResp1 -client send PrepWriteReq2 -stack generates BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST -server send PrepWriteResp2 -client send PrepWriteReq3 -stack generates BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST -server send PrepWriteResp3 -client send ExecWriteReq -stack generates BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST -server send ExecWriteResp

    In fact I have following sequence:

    -client send PrepWriteReq1 -client send PrepWriteReq2 -client send PrepWriteReq3 -client send ExecWriteReq -stack generates BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST (BLE_GATTS_OP_PREP_WRITE_REQ) -stack generates BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST (BLE_GATTS_OP_PREP_WRITE_REQ) -stack generates BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST (BLE_GATTS_OP_PREP_WRITE_REQ) -stack generates BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST (BLE_GATTS_OP_EXEC_WRITE_REQ_NOW)

    And I don't know when stack send PrepWriteResps and ExecWriteResp

    Best Regards, Artem Zemlyanukhin

  • When testing with an iPhone, I don't have as fine-grained control as you have on when the different requests are sent, so I can unfortunately not duplicate your testing exactly.

    However, I can't understand how what you say about the sequence of events is possible, since the stack will have no memory or anywhere to store the queued writes if the application haven't provided a memory buffer.

    Are you sure that the TI tool you're using isn't buffering the writes somewhere and send them all at once when you do the execute? If you have access to a sniffer, can you see the packets going over the air, without the corresponding events on the nRF51 side?

    When I sniff a link while doing a long write, I can see that there are Prepare Write Responses sent for each Prepare Write Request, and then an Execute Write Response for the last Execute Request, but since all the events happen automatically, it isn't easily possible for me to correlate the time in the sniffer and the time on the serial interface.

Reply
  • When testing with an iPhone, I don't have as fine-grained control as you have on when the different requests are sent, so I can unfortunately not duplicate your testing exactly.

    However, I can't understand how what you say about the sequence of events is possible, since the stack will have no memory or anywhere to store the queued writes if the application haven't provided a memory buffer.

    Are you sure that the TI tool you're using isn't buffering the writes somewhere and send them all at once when you do the execute? If you have access to a sniffer, can you see the packets going over the air, without the corresponding events on the nRF51 side?

    When I sniff a link while doing a long write, I can see that there are Prepare Write Responses sent for each Prepare Write Request, and then an Execute Write Response for the last Execute Request, but since all the events happen automatically, it isn't easily possible for me to correlate the time in the sniffer and the time on the serial interface.

Children
No Data
Related