is stopping advertising required at call back of connection up?

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

cross mob
Anonymous
Not applicable

Hi,

  One question about the sample code at hello_sensor.c.

void hello_sensor_connection_up(void)

{

    UINT8 writtenbyte;

    UINT8 *bda;

    hello_sensor_connection_handle = (UINT16)emconinfo_getConnHandle();

    // save address of the connected device and print it out.

    memcpy(hello_sensor_remote_addr, (UINT8 *)emconninfo_getPeerAddr(), sizeof(hello_sensor_remote_addr));

    ble_trace3("hello_sensor_connection_up: %08x%04x %d\n",

                (hello_sensor_remote_addr[5] << 24) + (hello_sensor_remote_addr[4] << 16) +

                (hello_sensor_remote_addr[3] << 😎 + hello_sensor_remote_addr[2],

                (hello_sensor_remote_addr[1] << 😎 + hello_sensor_remote_addr[0],

                hello_sensor_connection_handle);

    // Stop advertising

    //bleprofile_Discoverable(NO_DISCOVERABLE, NULL);

  Is function call 'bleprofile_Discoverable(NO_DISCOVERABLE, NULL)' required at this call back?

  I suppose that no additional connection is allowed when one connection has been made. So is this just to stop advertising event or to prevent 20732S2 from malfunction when multiple initiating request arrived?

  Thanks in advance.

0 Likes
1 Solution
Anonymous
Not applicable

Hello dunk.chen,

Multiple connections are not supported in 1.1 SDK. 

So you are correct: This is the reason not to send advertisements if a connection is already up.

JT

View solution in original post

2 Replies
Anonymous
Not applicable

Hello dunk.chen,

Multiple connections are not supported in 1.1 SDK. 

So you are correct: This is the reason not to send advertisements if a connection is already up.

JT

Anonymous
Not applicable

Hi JT,

  Thanks for this information.

Dunk

0 Likes