First connection issue with Wiced device and Android/iOS app

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

cross mob
Anonymous
Not applicable

Hello,

When I try to connect for the first time a Wiced device (custom board) with an own App on Android/iOS I can not read UUID values.

After the first connection I must shut down the device and restart the App to get data.

That's a work around, but it is not so nice to tell every user that the first ever connection would not function.

Here is the callback where the issue started:

// Connection up callback function is called on every connection establishment

void mydevice_connection_up(void)

{

  mydevice_connection_handle = (UINT16)emconinfo_getConnHandle();

  UINT8 *bda = (UINT8 *)emconninfo_getPeerPubAddr();

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

    memcpy(mydevice_remote_addr, bda, sizeof(mydevice_remote_addr));

    // Stop advertising

    bleprofile_Discoverable(NO_DISCOVERABLE, NULL);

    bleprofile_StopConnIdleTimer();

    // as we require security for every connection, we will not send any notificationss until encryption is done.

    if (bleprofile_p_cfg->encr_required != 0)

    {

    if (emconninfo_deviceBonded()){

            ble_trace0("device bonded");

    }

    else{

       ble_trace0("device not bonded");

            lesmp_sendSecurityRequest();

    }

        return;

    }

}

I activated the encryption because I integrated the Secure OTA functionality, but the data for my device is not sensitive.

So my question: Can I ignore in some way the security request or is there another solution to get instantly data without restart my device ?????

By

0 Likes
1 Solution
JacobT_81
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Encryption is recommended but not required for Secure OTA implementation. You can disable security if you choose.

Jacob

View solution in original post

0 Likes
1 Reply
JacobT_81
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Encryption is recommended but not required for Secure OTA implementation. You can disable security if you choose.

Jacob

0 Likes