5 Replies Latest reply on Jun 8, 2017 9:22 PM by JeGu_2199941

    [BLE] Unknown GATT event 0x5


      After using the BLE stack for a while, I get a GATT event callback with the code 0x5. This is not documented.


      When looking at the header wiced_bt_gatt.h, I see a structure related to the GATT_CONGESTION_EVT, this event is not in the enumeration wiced_bt_gatt_evt_t but I guess this is the 0x5 event ?

        • 1. Re: [BLE] Unknown GATT event 0x5

          This event means that you're running low in tx buffers. BLE transmissions wait for connection events which occur every 7.5ms to 4000ms. Standard BLE can only send 20 bytes per connection event. If you transmit data in between connection events, it goes into a buffer until the next connection event can push it out. If you try to push too much in between connection events, you'll overflow this buffer.



          3 of 3 people found this helpful
          • 2. Re: [BLE] Unknown GATT event 0x5

            Thank you for the answer.  What would be the limit for the TX queue?

            • 3. Re: [BLE] Unknown GATT event 0x5

              There are a couple variables associated with the tx queue size. Your MTU size, defined buffer count, size, etc. I'll have to get back to you once I find an exact number.


              For now, the best solution is timing your data pushes to synchronize with connection events i.e. start a timer on the same interval as (or a multiple of) the connection events and push data once per loop into the queue. That should avoid this error.



              1 of 1 people found this helpful
              • 4. Re: [BLE] Unknown GATT event 0x5

                This sounds more like a workaround, I guess that could work but my question is: how could I change the TX buffer size to be sure never to exceed it ? I always send BLE commands one after another, e.g. I will only send a Request after a Response has been received, so it should not be congested. Of course I am connected to multiple devices (8) but the TX queue cannot be so small. Waiting for your findings :-)

                • 5. Re: [BLE] Unknown GATT event 0x5

                  I'm also receiving wiced_bt_gatt_evt_t event == 0x5 from GATT callback. (SDK 4.0.1)
                  Is there any update?