Advertising when connected in Peripheral role

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

cross mob
JaOs_4314736
Level 2
Level 2
First like received

Hi,

In a BLE project I was asked to change FW to start advertising while connected as a peripheral device, and then send information by advertising (to phone app). I have not been able to do this, when connected and I try to advertise the connection drops, and when advertising and I connect, it stops advertising. I'm fairly new to BLE but have learned a lot with this issue.

Details:

Using PSoC 4.3, BLE component version 3.4

The device is CYBLE-212019-00

Thanks, James Osborne

0 Likes
1 Solution

Hi,

With PSoC 4 BLE, you can connect as well as Broadcast at the same time. Please refer the Day 7 code example from the lonk below:

https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days

Also you can scan for the BLE devices (observe) once they are connected. Please refer the Day 11 project from the same link.

Thanks

Ganesh

View solution in original post

0 Likes
7 Replies
JaOs_4314736
Level 2
Level 2
First like received

Also, I want to start scanning while connected as a central device. Is this possible?

Thanks!

0 Likes

Hi,

With PSoC 4 BLE, you can connect as well as Broadcast at the same time. Please refer the Day 7 code example from the lonk below:

https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days

Also you can scan for the BLE devices (observe) once they are connected. Please refer the Day 11 project from the same link.

Thanks

Ganesh

0 Likes

Hi,

I tried this and when I'm connected and start scanning the connection drops (I get a CYBLE_EVT_GAP_DEVICE_DISCONNECTED event). The BLE state changes from CYBLE_STATE_CONNECTED to CYBLE_STATE_SCANNING.

Thanks, James

0 Likes

I was able to advertise while connected as a peripheral using the Day 7 example.It still gets a disconnected event when it starts advertising though (while connected).

0 Likes

Hello,

Could you please let me know the steps that you follow to recreate this issue with the Day 7 and Day 11 example projects?

Did you make any changes to these projects as per your requirement?

Thanks and Regards,

Sudheesh

0 Likes

I used current firmware and made modifications for testing. Actually I was able to scan while connected as a central device.. The ideal solution is to have two simultaneous connections but this does not appear possible with PSoC4 BLE devices. I wonder though, do you know if a central device can preempt a connection? Say an iPhone app connects to a PSoC4 BLE device and the device drops the connection and switches to central role, connects to another device, can the app (which has the device MAC), then re-connect, breaking the pairing?.

0 Likes

Hello,

Sorry for the delay in our response. Your understanding about number of simultaneous connection is correct. PSoC4 BLE supports only one connection at a time.

Regarding your query about preempting a connection, it is not possible for a central device to break the connection between another 2 devices. As per my understanding, your requirement is as below. Please correct me if I am wrong.

1. iPhone connects to PSoC4 BLE (Peripheral).

2. PSoC4 BLE disconnects the connection.

3. PSoC4 BLE changes to central role and connects to another peripheral device.

4. You need iPhone app to break the connection at step 3.

It is not possible for a central device to break the connection between another 2 devices.

Thanks and Regards,

Sudheesh

0 Likes