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

PSoC™ 4 Forum Discussions

MikeAustin
Level 4
Level 4
25 replies posted 25 sign-ins 10 replies posted

OK, I have a PSOC4 BLE Module set up as a Peripheral, running as a GATT Client and Server.

In Client mode, it connects with a Central and extracts the Current Time Service from the Central (which is an iOS device running LightBlue).  It subsequently uses this information to update the time in a Real Time Clock on my hardware.

In Server mode, it allows the Client to Read and Write data to the Custom Service (a bunch of variables that are used to control my hardware functionality).

My GAP connection is via an authenticated paired connection with bonding.

Once I exit out of Client mode in LightBlue, it should disconnect the Client from the Server, and my Server should restart advertising.

Everything is working as expected, expect when I exit out the connection in LightBlue (and go back to scanning).  At this point, it appears my Peripheral still thinks its connected, and sits there for 30 seconds until it times out and then disconnects.

Is there a way I can force my Peripheral to correctly disconnect and restart advertising once I have "disconnected" my Client device?  I thought this would happen automatically (and it has been when I didn't have the authenticated, bonded connection)

Cheers,

Mike

0 Likes
2 Replies
MikeAustin
Level 4
Level 4
25 replies posted 25 sign-ins 10 replies posted

Just a follow up on this - when I do a CyBle_GetState() call and send this out via UART so I can see what state the Peripheral is in, I can see its telling me that its CYBLE_STATE_CONNECTED even after I have disconnected (well, I assume that is what happens when I got back to scanning in LightBlue) my Central device.

What sort of information does a Central send to a Peripheral once its disconnected?  Perhaps I need to be actively checking for that in my BLE Call Back routine?

Cheers,Mike

0 Likes
Yugandhar
Moderator
Moderator
Moderator
1000 replies posted 5 likes given First comment on blog

Hello,

Could you please send the logs of LightBlue app ? Please let me know the observations on Cysmart app.

Also, please let me know the PSoC 4 BLE Module which you are using ?

Thanks,

P Yugandhar.

0 Likes