Hi Chao Jie, > In the old stack, doing encode/decode PDU split with sending att protocol command to remote device. > However, in the new stack , bt_att_send do more things than old did including encode pdu with opcode. > Because Att pdu signed process include whole data pdu, so in my mind, if we keep consistent style in code, > we have to do sign att pdu in bt_att_send function. We have to expand bt_att struct to store CSRK and > so on stuff. So that's the only implementation make sense for signed write command. That's right, bt_att needs to extended to obtain and store the CSRK somehow. The signing should happen during bt_att_send as you said (probably in encode_pdu). > BTW, compared with signing the outgoing, verifying incoming ATT PDUs would be more complex. I am not > Sure which file to implement it. That would be in the incoming PDU handling inside bt_att. The can_read_data function obtains an incoming PDU and routes it to the appropriate handler. I think that would be the right place to do it. Cheers, Arman -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html