[EZ-Serial Firmware for CYW2070x-based Modules] In Custom Local GATT, Write properties

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
KeTa_1341526
Level 5
Level 5
Distributor - TED (Japan)
10 likes given 10 likes received 5 likes given

Hello,

I'm trying [3.6.5 Detecting and Processing Written Data from a Remote Client] in the User Guide.

The following settings are made.

[Command]

/CAC,T=00,P=2,L=0012,D=002800B10C2000089A9EE21115A133333365

/CAC,T=00,P=2,L=0015,D=032808180001B10C2000089A9EE21115A133333365

/CAC,T=01,P=8A,L=0001,D=

/CAC,T=00,P=2,L=0012,D=002800B10C2000089A9EE21115A133333365

T = 00 : Type (0: structure)

P = 02 : Permission bit (0x02: Readable)

L = 0012 : Data Length (0x0012: 18Byte)

D = 002800B10C2000089A9EE21115A133333365 (18Byte)

            - 0028 : Attribute type (0x2800: Primary Service Declaration)

            - 00B10C2000089A9EE21115A133333365 : Service UUID (0x65333333A11511E29E9A0800200CB100)

/CAC,T=00,P=2,L=0015,D=032808180001B10C2000089A9EE21115A133333365

T = 00 : Type (0: structure)

P = 02 : Permission bit (0x02: Readable)

L = 0015 : Data Length (0x0015: 21Byte)

D = 032808180001B10C2000089A9EE21115A133333365 (21Byte)

            - 0328 : Attribute type (0x2803: Characteristic Declaration)

            - 08 : Characteristic properties bit (0x08: Write)

            - 1800 : Handle of value attribute (0x0018)

            - 01B10C2000089A9EE21115A133333365 : Characteristic UUID (0x65333333A11511E29E9A0800200CB101)

/CAC,T=01,P=8A,L=0001,D=

T = 01 : Type (1: characteristic value)

P = 8A : Permission bit (0x02: Readable | 0x08: Write request [acknowledged] | 0x80: UUID is 128 bits??)

L = 0001 : Data Length (0x0001: 1Byte)

D =

However, even with this setting, the "W" Event is not issued even if the Write command is issued from the Central App [CySmart etc] after Connection.

[Q1]

What could be the reason why the "W" Event (gatts_data_written ID = 5/2) is not issued?

On the app side, an "Invalid Offset (0x07)" Error will be returned.

Is this a problem?

[Q2]

What is "Invalid Offset (0x07)"?

Is the "/CAC" setting incorrect?

[Q3]

There is no description of "0x80" in the User Guide for the "P" option of "/CAC".

If you check gatts_db_entry_blob (DGATT, ID = 5/4), it says "Bit 7 (0x80) = UUID is 128 bits".

Can I think of "0x80" as a "UUID is 128 bits" permission bit?

Best regards,

Takahashi

0 Likes
1 Solution

For the following command:

“/CAC,T=01,P=8A,L=001,D=”

FW can not figure the length of D value length if we do not assigned value to D and trigger the internal writing offset checking.

Please fill some value to D=.

So use following command:

“/CAC,T=01,P=8A,L=001,D=00

View solution in original post

0 Likes
9 Replies
KeTa_1341526
Level 5
Level 5
Distributor - TED (Japan)
10 likes given 10 likes received 5 likes given

Hello,

Can anyone give me some advice?

Best regards,

Takahashi@TED

0 Likes

Which device are you using, CYBT-343026 or other?

0 Likes
KeTa_1341526
Level 5
Level 5
Distributor - TED (Japan)
10 likes given 10 likes received 5 likes given

I am trying it on the evaluation boards of CYBT-343026 and CYBT-353027.

Both behaviors are the same.

Best regards,

Takahashi

0 Likes
KeTa_1341526
Level 5
Level 5
Distributor - TED (Japan)
10 likes given 10 likes received 5 likes given

I tried [10.2 Adopted Bluetooth SIG GATT Profile Structure Snippets] described in the User Guide.

In the profile below, Write Without Response is set.

10.2.3 Immediate Alert Service (0x1802)

10.2.4 Link Loss Service (0x1803)

However, the "W" Event is not issued.

Best regards,

Takahashi

0 Likes
KeTa_1341526
Level 5
Level 5
Distributor - TED (Japan)
10 likes given 10 likes received 5 likes given

XinghaoZ_26,

Is there an answer to this?

Best regards,

Takahashi

0 Likes

For the following command:

“/CAC,T=01,P=8A,L=001,D=”

FW can not figure the length of D value length if we do not assigned value to D and trigger the internal writing offset checking.

Please fill some value to D=.

So use following command:

“/CAC,T=01,P=8A,L=001,D=00

0 Likes
KeTa_1341526
Level 5
Level 5
Distributor - TED (Japan)
10 likes given 10 likes received 5 likes given

Thank you for your response.

When I set it according to your answer, I was able to confirm the "W" event.

Please also tell us about the following.

[Q3]

There is no description of "0x80" in the User Guide for the "P" option of "/CAC".

If you check gatts_db_entry_blob (DGATT, ID = 5/4), it says "Bit 7 (0x80) = UUID is 128 bits".

Can I think of "0x80" as a "UUID is 128 bits" permission bit?

Best regards,

Takahashi

0 Likes

Yes, you are correct about it. And you also need to set bit 0 to 1.

0 Likes
KeTa_1341526
Level 5
Level 5
Distributor - TED (Japan)
10 likes given 10 likes received 5 likes given

Thank you.

0 Likes