Automatic Connection of the BLE to Android

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

cross mob
Anonymous
Not applicable

Hi All

   

I am extremely new to BLE so please bear with me ! I am using the CY8CKIT-042-BLE PSoC 4/PRoC Pioneer Kit and I tried a few code examples given in PSoC Creator 3.3 and got them to work successfully on my Android phone with the CySmart application installed on the phone. 

   

Now my aim to design a custom android application which has access to all the Services, Characteristics and Descriptors that I have in my custom profile. My main question is that is there a way that the chip automatically connects to the phone as soon as the chip powers up. Right now, one has to manually connect it each time and pair. Can that process be automated so that the connection is established automatically as soon as the chip gets power ?

   

Any help will be much appreciated. Thanks a lot in advance.

   

Aviraj

0 Likes
1 Solution
Anonymous
Not applicable

Additionally, connection in BLE is initiated by the BLE Central device which in this case is your Android Application. The firmware on device side (PSoC 4 BLE/PRoC BLE) has nothing to do with auto connection, except keep advertising.

View solution in original post

0 Likes
4 Replies
Anonymous
Not applicable

If you want automatic connection then Android must scan 100% of time for new Bluetooth devices! The battery will be quickly discharged! You can try periodical scan (every 5-10s) and upon discovery of BLE advertisement packets connect-pair with your device.

0 Likes
Anonymous
Not applicable

Additionally, connection in BLE is initiated by the BLE Central device which in this case is your Android Application. The firmware on device side (PSoC 4 BLE/PRoC BLE) has nothing to do with auto connection, except keep advertising.

0 Likes
Anonymous
Not applicable

Hi, Have you already develop an android app with Custom BLE profile ?

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

Please, when you have a new question open a new thread. No one will suspect your question in a thread about automatic connections, so less people will be able to answer you.

   

You can ask the Cypress support for the source code the CySmart Android app - this is a good starting point for your own app (but search google for Android BLE tutorials also help tremendously)

0 Likes