Android Question CC2541 disconnects immediately after connection with BLE

Tareq Khan

Member
Licensed User
Longtime User
I am using BLE2 library (1.36) and the example code 'BLE_Example' posted in the forum to connect my Android phone (central) with a CC2541 chip (peripheral). I am using B4A v8.3.

Initially, I was able to connect with CC2541. But, after a few tests, the CC2541 disconnects immediately after connection.

I tried the followings, but the problem is not solved yet.
1. I 'reset' the CC2541 chip.
2. Changed the chip (used another CC2541).
3. Changed and played with different timing parameters in the source code of CC2541 such as DEFAULT_DESIRED_MIN_CONN_INTERVAL, DEFAULT_DESIRED_MAX_CONN_INTERVAL, DEFAULT_DESIRED_SLAVE_LATENCY, DEFAULT_DESIRED_CONN_TIMEOUT, DEFAULT_ENABLE_UPDATE_REQUEST TRUE, DEFAULT_CONN_PAUSE_PERIPHERAL.
4. Used 'Bluetooth LE Scanner' app from Play Store to connect with the chip. But, the same problem.

From the forum of TI (http://e2e.ti.com/support/wireless_...isconnects-immediately-after-connected-to-iOS), I learnt that this timing issue is controlled by the Central device (the Android phone).

Is there anyway, I can change/play with the BLE timing parameters of the Android (central device)? Any suggestions/comment? Thanks.
 

Tareq Khan

Member
Licensed User
Longtime User
Yes, I am using Connect2 with AutoConnect set to False.

I am able to solve the "disconnects immediately after connection" problem by unparing the CC2541 chips from the Smartphone.

To do that:
Navigate to Settings
Click Bluetooth
Find the Bluetooth device
Click on the gear icon right next to it
Click Unpair

Now, everything is working. Thanks.
 
Upvote 0
Top