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

Invalid attribute value length (recvd error response)

Target : NRF52832 as Server

Description of the problem (seen in wireshark)

Client : write request (0x12)

Server: Rcvd Error Response - Invalide Attribute value length ,

I don't understand the problem because i think the answer is provided by the nrf framework.

I didn't write any code to answer to the write.

i only indicate the datas of the characteristics written by the client

with an indication

according to me the answer is in the specification (0xD)

how can i answer the code 0xD?

Is it provided by the framework?

thank you

  • You are developing the peripheral. Ok.

    So since the peripheral owns the characteristic with the indication, you don't need to reply to it. That is correct. The Zwift should reply to it, but let us assume it does. 

    What you are asking is how to reply to the write request? Do you get the event in your application?

    Please take a look at this sequence chart:

    https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v7.0.1/group___b_l_e___g_a_t_t_s___w_r_i_t_e___r_e_q___a_u_t_h___m_s_c.html

    So you need to call sd_ble_gatts_rw_authorize_reply() after you receive the write request event. Do you get this event?

  • Hi Edvin,

    Yes i catch a write request event.

    And i answer to it with an indication.

    But i don't see the indication on wireshark!

    so is it normal?

    Or should i see a line in wireshark with "indication" written ?

    added to that, i have an other question:

    how do you explain that with nRFconnect i see a correct sequence with wireshark but when it is zwift, in wireshark it seem to have some errors.

    but i think it cannot be a problem of radio because Zwift send only exactly the same write request and it is only shown in wireshark with an error:

    Here is the write request sent by zwift:

    and here is the write request sent by nRFConnect (me)

    And how do you explain that with nRFConnect there is a good UUID detection with wireshark but not when the write is sent by Zwift?

    I 'll see the sample you sent to me

    thank you

    Vincent

    and here is the write request sent by me with nRFConnect:

  • Can you show me how you answer to it with the indication? And where you call sd_ble_gatts_rw_authorize_reply? You can show me some snippets or something.

    The indication will appear as a separate line, and not just part of a packet. To be honest, I don't know what you are trying to show me with the screenshots. Perhaps you can send the sniffer trace as a pcapng file? (default file type that it is saved as). 

    Just to say something sensible about the latest screenshot, this is the packet from the central to the peripheral, containing the write request. The reply to that will not be in the same packet. This is only communication from central to peripheral. 

Related