cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong Characteristics Handle returned in the Event when Exchange MTU is used

Hi,

I have two devices, both working on BlueNRG-2 chips as Network Processors.

Just to extend their functionality by handling larger characteristics I added exchange MTU procedure.

The procedure is started after connection established between the devices.

Unfortunatelly, using exchange MTU spoiled my communication.

Some time spent on investigation provided following observations.

I see that incorrect characteristics handle is returned in the event function (aci_gatt_disc_read_char_by_uuid_resp_event) as the result of discovery the characteristics by its UUID (aci_gatt_disc_char_by_uuid ).

In the event function I receive Attribute_Handle=0x0000 instead of the correct one.

If I work without that exchange procedure, all is fine - correct value of characteristics handle is returned.

In the event function there is also Attribute Data that is the same for both cases and contains UUID as well as correct handle.

It looks like a bug in ST Bluetooth Stask [?].

Am I missing something?

Regards,

Piotr

1 REPLY 1

I also checked what is sent over SPI and there was:

1) without exchange MTU: ... 04 08 | 39 00 | 13 | ...

2) with exchange MTU: ... 04 08 | 00 00 | 13 | ...

Above shown fields corresponds to structure fields defined in ST Bluetooth Stack:

uint16_t Conn_Handle,

uint16_t Attr_Handle,

uint8_t Data_Length.

So the problem is in BlueNRG-2 chip working as DTM.

I noticed that the problem is specific to one characteristics that is on the end of the attribute list. It works for characteristics that are lower.

The difference is also in communication after connection when master gets infomation about slave attributes. Due to larger MTU (case with problem), attributes are sent only in 4 ATT messages, in 4, 7, 7, 3 attributes in one message correspondigly.

In correct case almost all attributes are sent as one per ATT message.

So these two cases are different by using fragmentation on LL when information is sent from Network Processor to the host processor.

Regards,

Piotr