Hi Jihun, I assume that you have built it with the transport flag set to BLE: scons TARGET_OS=android TARGET_ARCH=<your arch> TARGET_TRANSPORT=BLE RELEASE=1 After this, it should be sufficient enough to use the SimpleClient app in its current form (without any modifications) to discover a ?light? resource over BLE. Thanks, Tim
From: iotivity-dev-bounces at lists.iotivity.org [mailto:[email protected]] On Behalf Of ??? Sent: Wednesday, September 30, 2015 4:58 AM To: iotivity-dev at lists.iotivity.org Subject: [dev] Discovery of resource server on BLE using findResource() Hi. All, I'm trying to implement an Android sample application to control a BLE device (Arduino mega + BLE shield) I just want to know how to discover a "light" resource on the BLE device with findResource() function. What I've got to know is that BLE does not support multicast discovery. Thus, I'm going to use a unicast discovery with BLE MAC address. But, I don't know how to specify paramemters in calling findResource() function. I've tried to the following parameters but failed (in Android): String requestUri = OcPlatform.WELL_KNOWN_QUERY + "?rt=core.light"; OcPlatform.findResource("d9:db:98:64:e5:cc", requestUri, EnumSet.of(OcConnectivityType.CT_ADAPTER_GATT_BTLE), this); OcPlatform.findResource("coap://d9:db:98:64:e5:cc", requestUri, EnumSet.of(OcConnectivityType.CT_ADAPTER_GATT_BTLE), this); OcPlatform.findResource("coap://[d9:db:98:64:e5:cc]", requestUri, EnumSet.of(OcConnectivityType.CT_ADAPTER_GATT_BTLE), this); Is there anyone who know the proper way to call the function to discover BLE device? ?????. ??? ??. Best Regards, Jihun Ha (???/???, Ph.D.) IoT, IoTivity, OIC | IoT Solution Lab Software R&D Center | Samsung Electronics Co., Ltd Mobile +82 10 2533 7947 jihun.ha at samsung.com | jhha85 at gmail.com [cid:image001.gif at 01D0FB61.1CDBF100] [Image removed by sender.] -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150930/ac94856c/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: ~WRD293.jpg Type: image/jpeg Size: 823 bytes Desc: ~WRD293.jpg URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150930/ac94856c/attachment.jpg> -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 13168 bytes Desc: image001.gif URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150930/ac94856c/attachment.gif>
