CYBLE-012011-00 CYSPP mode control

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

cross mob
embeddedsoftwar
Level 1
Level 1
First reply posted First question asked Welcome!

We are using CYSPP mode and struggling with supporting transfer of binary data, and handling disconnect/reconnect along with entering/exiting command mode vs CYSPP mode.

We are using binary mode with hardware flow control

issue 1:

The ezserial parser looks for non-ascii code bytes to detect the start of a binary packet, and passes through bytes that are ascii but not part of an ongoing packet. This works fine if data over CYSPP is ASCII, but how can we handle binary data? We can use GPIO pins, to detect connection state I suppose, but then our data is buffered so if the GPIO pin changes state we could still be reading data out of the buffer from before the connection state changed, and mis-interpret incoming data based on the present GPIO state at time of reading the buffer.

issue 2:

We have configured the module so that from boot up CYSPP mode is disabled, this ensures that connections are not made during the configuration process at startup, and also ensures connections can't be made until they are enabled by pressing a physical button. When enabling a connection we send the ezs_cmd_p_cyspp_start() command. This works and allows use to connect, when we are not using the CYSPP pin. However, we want to be in control of when the UART interface is sending commands or data, so that we don't end up in a situation where we are trying to configure the module, but the commands are being sent as data to the terminal on the client device. However, when we take control of the CYSPP pin, by deasserting it during configuration of the module and then releasing (tristate) it after we have sent the ezs_cmd_p_cyspp_start() command, it seems to stop the connection taking place.

0 Likes
2 Replies
embeddedsoftwar
Level 1
Level 1
First reply posted First question asked Welcome!

I am seeing 2 problems also:

1. The module is still visible on a tablet's bluetooth settings page, even though CYSPP mode and GAT discovery have been disabled with the following commands:

result = ezs_fcmd_gap_set_adv_parameters(0,3,0x30, 0x7, 0,0,0 );
result = ezs_fcmd_p_cyspp_set_parameters(0, 0, 0x0131,0,0,0,2, 0, 0x2);

2. The CYSPP pin when asserted LOW does not cause the bluetooth module to be visible from our android C# app. However, if I leave the CYSPP pin floating and send the ezs_cmd_p_cyspp_start() command then it is visible in the C# app and can be connected to.

 

So how can I ensure that the module is not broadcasting or visible until desired?

Also how can I get the CYSPP pin to work and enable broadcasting with it?

0 Likes
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

1. Could you try to use the API command through the UART port directly?

2. The CYSPP pin only control the CYSPP mode. It doesn't start the adv.

0 Likes