Commit c1f588fe authored by Ossama Othman's avatar Ossama Othman Committed by Erich Keane

Support BLE transport in casample program.

Change-Id: I5a78b5944b9a46a538969265fe9b2edc0e7ac6e1
Signed-off-by: default avatarOssama Othman <ossama.othman@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1039Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarjihwan seo <jihwan.seo@samsung.com>
Reviewed-by: default avatarErich Keane <erich.keane@intel.com>
parent c9f704c8
......@@ -911,8 +911,8 @@ void select_network()
printf("\n=============================================\n");
printf("\tselect network\n");
printf("IPv4 : 0\n");
printf("EDR : 2\n");
printf("LE : 3\n");
printf("EDR : 2\n");
printf("LE : 3\n");
printf("select : ");
char buf[MAX_BUF_LEN] = { 0 };
......@@ -1053,7 +1053,11 @@ void get_network_info()
{
printf("Address: %s\n", tempInfo[index].addressInfo.BT.btMacAddress);
}
printf("Secured: %d\n\n", tempInfo[index].isSecured);
else if (CA_LE == tempInfo[index].type)
{
printf("Address: %s\n", tempInfo[index].addressInfo.LE.leMacAddress);
}
printf("Secured: %s\n\n", tempInfo[index].isSecured ? "true" : "false");
if (tempInfo[index].isSecured)
{
......@@ -1093,6 +1097,10 @@ void request_handler(const CARemoteEndpoint_t *object, const CARequestInfo_t *re
{
printf("Remote Address: %s \n", object->addressInfo.BT.btMacAddress);
}
else if (CA_LE == object->transportType)
{
printf("Remote Address: %s \n", object->addressInfo.LE.leMacAddress);
}
printf("Data: %s\n", requestInfo->info.payload);
printf("Message type: %s\n", MESSAGE_TYPE[requestInfo->info.type]);
......@@ -1167,6 +1175,10 @@ void response_handler(const CARemoteEndpoint_t *object, const CAResponseInfo_t *
{
printf("Remote Address: %s \n", object->addressInfo.BT.btMacAddress);
}
else if (CA_LE == object->transportType)
{
printf("Remote Address: %s \n", object->addressInfo.LE.leMacAddress);
}
printf("response result : %d\n", responseInfo->result);
printf("Data: %s\n", responseInfo->info.payload);
printf("Message type: %s\n", MESSAGE_TYPE[responseInfo->info.type]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment