This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2650: Questions for characteristics write and read

Part Number: CC2650

Hi,

I have some questions from my customer for SNP API usage.
Customer refers to “CC26x0 Simple Network Processor API Guide.pdf” in SDK.
They want to write data(Long Attribute Values) from smartphone(client) to CC2650(server) using “ATT_PREPARE_WRITE” and “ATT_EXECUTE_WRITE”.

API Guide section 9.6.8, Additional Notes, it says;
“Once a remote GATT client starts to write a characteristic value with offset 0, this means it will write the entire value (see the BT Spec [1] 4.9.4, Part G, Vol3). If the remote GATT Client starts to write with an offset different than 0, this means it is a partial write.”

Q1: What does “starts to write a characteristic value with offset 0” exactly mean?
Is this “ATT_EXECUTE_WRITE_REQ”?

Q2: Does “write with an offset different than 0” mean “ATT_PREPARE_WRITE with offset different than 0”?

Q3: Is there any way to inform the smartphone that SNP receives “SNP Characteristic Write Confirmation (0x88)”?

Q4: Customer understands the sequence for “write characteristics value” or “write long characteristics values” as attached(page#1).
Are they correct?
Sequence.pptx
Q5: Customer understands the sequence for “read characteristics value” or “read long characteristics values” as attached(page#2).
Are they correct?

Q6: API guide section 5.3 Limitation says;
“the SNP will only be configured as a GATT server; it cannot be a GATT client. The standard use case is for the SNP (peripheral GATT client) to connect to a central GATT server such as a smartphone.”
So customer understood SNP is GATT server. But “the standard use case” seems SNP is “peripheral GATT client”. What does this “the standard use case” mean here? It is confusing.

Thanks and regards,
Koichiro Tashiro

  • Hi Tashiro-san,


    I've assigned your post to an expert on the team. 

  • Hello Tashiro-san,

    I'm sorry for the delay. I'm gathering answers to all your questions. 

    I'll provide you an update on 7/10/2020.

    -Luis

  • Tashiro-san,

    I have answers to some of your quesions.

    Q1. No. As you see, one of the parameters of a Write Request is "Offset".  So, the statement “starts to write a characteristic value with offset 0” simply means that the parameter "Offset" is set to zero.

    Q2. Not necessarily. Same as Q1, it simply means that the offset parameter in any write request is set to something different than zero.

    Q3. Pending

    Q4. The sequence for "Write Long Characteristic" is incorrect. The AP does not perform the actual write upon the reception of a "Prepare Write Request". Instead, the data is simply buffered and the write occurs only when the "Execute Write Request" is received.

    Q5. Pending.

    Q6. The "standard use case" refers to the SNP acting as a peripheral role will typically connect to a central device such as a smartphone. However, the SNP may also act in the broadcaster role, where no connections are formed. In any case, as the paragraph mentions, the SNP only advertises, but does not discover devices.

    I hope this helps. I'll try to get you the answers to the pending questions.

    -Luis

  • Hi Luis,

    Thanks for your answers.
    Please find feedback from customer to Q1 and Q4 below.

    Q1)
    It seems there is no “Offset” parameter for “Write Request” according to Bluetooth Core Spec Vol 3, Part F 3.4.5.1.

    Instead, there is “Value Offset” for “Prepare Write Request”.
    Do you mean “Prepare Write Request” with “Value Offset” = 0?

    Q4)
    Updated sequence is attached. Red parts are updated. Please correct this figure if customer misunderstood.
    Sequence(updated).pptx
    And customer wonders if SNP needs to tell AP that “Execute Write Request” is received.
    If yes, which Event should be used?

    Thanks and regards,
    Koichiro Tashiro

  • Hi Luis,

    This item has been left untouched for two weeks.
    Customer is waiting for your answers.

    Could you provide the status and target date for remaining questions(Q3, Q5 and additional questions to Q1/Q4)?

    Thanks and regards,
    Koichiro Tashiro

  • Tashiro-san,

    I'll provide you a response by 8/9.

    -Luis

  • Tashiro-san,

    Please see below:

    Q1) It seems there is no “Offset” parameter for “Write Request” according to Bluetooth Core Spec Vol 3, Part F 3.4.5.1. Do you mean “Prepare Write Request” with “Value Offset” = 0?

    Yes, sorry for not being clear. I meant the Prepare Write Request with value offset zero. We're discussing here the Write Long Characteristic Values, according to the Bluetooth specification. See Core_4.2.pdf, Vol.3, Part G, section 4.9.4.

    Q3) Is there any way to inform the smartphone that SNP receives “SNP Characteristic Write Confirmation (0x88)”?

    Yes, according to your own diagram, the ATT Prepare Write Response constitutes the way to inform the smartphone.

    Q4) Updated sequence is attached. Red parts are updated. Please correct this figure if customer misunderstood.

    Looks great.

    And customer wonders if SNP needs to tell AP that “Execute Write Request” is received.
    If yes, which Event should be used?

    I don't have the answer to that yet. It seems that the AP might use SNP Get Status (0x06) command in order to find out if the SNP is performing ATT Prepare Write and ATT Execute Write (status 0x16-0x19). See sections 9.1.4 and 9.2.6 in the API Guide.

    Q5) Customer understands the sequence for “read characteristics value” or “read long characteristics values” as attached(page#2).
    Are they correct?

    Yes.

    Please review my answers and let me know if this solves your issues.

    -Luis