0x08 Disconnections - Android

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

cross mob
Anonymous
Not applicable

Hi

Im using Wiced Sense Tag (BCM920737TAG - BCM20737S), controlled by Android (4.4.2 or 5.0.1). I often get disconnections with reason 0x08 (sometimes after minute, sometimes after 10 minutes).

After connection is up i change connection parameters to:

lel2cap_sendConnParamUpdateReq(64, 96, 0, 500);

I have tried also

lel2cap_sendConnParamUpdateReq(80, 400, 0, 700);

lel2cap_sendConnParamUpdateReq(6, 6, 0, 500);

Disconnections always exist (I have checked that Samsung and LG devices respect this configuration, but Sony always set 32,0,700). I have tried running app in a few places, but it was always the same.

After disconnection my Android app try to reconnect, but it usually cannot download characteristics.

How can i prevent this random disconnections?

Here is sample log:

14:50:39 - connection_up()

14:50:39 -

14:50:39 - connection_up() ok exit

14:50:39 -

14:50:39   Connection is UP.

14:50:39   connUp

14:50:39   noAdv

15:02:57 - connection_down()

15:02:57 -

15:02:57 - connection_down() disc reason 8

15:02:57 -

15:02:57 - connection_down() ok exit

15:02:57 -

15:02:57   SMP Conn Down

15:02:57   connDown

15:02:57   ConnDnStopIdlTmr

15:02:57   blecen_connDown[5:2]: 00 04 81 bb

15:02:57   blecen_connDown[1:0]: 00 04, handle: 0000

15:02:57   ScanOn

15:02:57   ScanTimer stopped: 0

15:02:57   BLE_high_scan:timer(0)

0 Likes
1 Solution
6 Replies
Anonymous
Not applicable

Hello Lukasz,

Have you tried the latest SDK 2.2.1?

WICED-Smart-SDK-2.2.1-IDE-Installer (Windows)

Thanks

JT

0 Likes
Anonymous
Not applicable

Hi,

Yes, i am already using SDK 2.2.1. I have tested software on BCM9WICED_SENSE (BCM20737S) and BCM92073X_LE_KIT(BCM20737) and LE_KIT works much better. Disconeconnections are not frequent (one on a few hours or even a day).

0 Likes

Note that BLE devices in general will not stay connected indefinitely.  For instance, Wi-Fi is known to interfere with BLE and cause semi-frequent disconnections.  It's also important to understand that within your application you need to build in a mechanism to reconnect when this happens.

0 Likes
Anonymous
Not applicable
0 Likes

luktym

Is this still an issue?

0 Likes
Anonymous
Not applicable

FYI - Disconnect 08 is a timeout error - I believe it means that some number of connection events have been missed (slave latency) or that the supervisory timeout has occurred without successful connection events.  This condition is quite sensitive to the connection parameters so it is important to request good and valid connection parameters.  Some of the settings given above do not look valid, at least I know they are not for iOS.

But even still, after optimizing parameters, I believe you will still get occasional 08 disconnects.  Disconnects may be an unavoidable fact of life when competing with other wiFi or BLE devices in a noisy environment.  After 'optimizing' our connection parameters we still get disconnects, and it also seems to be somewhat hardware dependent.  Some of our boards seem to have more disconnects than others.

Apple iOS has very strict rules about what connection parameter requests it will honor, and if it doesn't like the ones you request it will just ignore your request.  I don't know about Android, but I suspect the rules are looser than iOS.   iOS will default to a connection interval of 30 milliseconds.  With this interval your BCM device will use more power because it cannot go into low power mode if it knows it has to be fully awake again in 30 milliseconds.  Try for 100 millisecond intervals for lower power draw during connection.

What I have found that works best for me is:

Slave latency 4

Min Interval 80 ms (depends on the needs of your app)

Max Interval 180 ms  (depends on your app)

Supervisor Timeout - 3 seconds

Also I recommend you do not make your connection interval equal to your fine timer - I have a suspicion that overlap of these tasks can increase frequency of timeout disconnects and there is no way to serialize the two and they appear to run off different clocks.