Whatever u have given looks to be correct.. look at the below code
from iotivity-master/resource/src/OCResource.cpp

std::string macAddr = host_token;



            // address validity check

            if (MAC_ADDR_STR_SIZE != macAddr.length())

            {

                throw ResourceInitException(m_uri.empty(),
m_resourceTypes.empty(),
                    m_interfaces.empty(), m_clientWrapper.expired(), false,
false);
            }



            for (size_t blockCnt = 0; blockCnt < MAC_ADDR_BLOCKS;
blockCnt++)
            {

                std::string block = macAddr.substr(blockCnt * 3, 2);



                if (std::string::npos != block.find_first_not_of("
*0123456789ABCDEFabcdef*"))
                {

                    throw ResourceInitException(m_uri.empty(),
m_resourceTypes.empty(),
                        m_interfaces.empty(), m_clientWrapper.expired(),
false, false);
                }



               * if (MAC_ADDR_BLOCKS - 1 > blockCnt)
                                    *
*                {
                                    *
*                    char delimiter = macAddr[blockCnt * 3 + 2];*



                    if (*':' != delimiter*)

                    {

                        throw ResourceInitException(m_uri.empty(),
m_resourceTypes.empty(),
                            m_interfaces.empty(),
m_clientWrapper.expired(), false, false);
                    }

                }

            }



            macAddr.copy(m_devAddr.addr, sizeof(m_devAddr.addr));

            m_devAddr.addr[MAC_ADDR_STR_SIZE] = '\0';


Is your simulator client is able to find resources from your arduino?

Thanks!
Prakash


On Tue, Aug 23, 2016 at 9:05 PM, <vikas.nr at accenture.com> wrote:

>
>
> *Hi Prakash,*
>
>
>
>
>
> we are not able to find resource with *coap+gatt://XX:XX:XX:XX:XX:XX* the 
> below mentioned. Please let us know what will the URL be if our MAC address 
> is *c3:58:0f:41:6e:f4*
>
> OcPlatform.findResource*("coap+gatt://XX:XX:XX:XX:XX:XX",   //
> XX:XX:XX:XX:XX:XX -> BLE mac address of the gatt server device*
>
>                               "/oic/res",
>
>                               EnumSet.of(OcConnectivityType.
> *CT_ADAPTER_GATT_BTLE*),
>
>                               listener,
>
>                               QualityOfService.LOW);
>
> Thanks
>
> -Vikas
>
>
>
> *From:* Devaraju, Rangaraju
> *Sent:* Tuesday, August 23, 2016 5:38 PM
> *To:* Nr, Vikas <vikas.nr at accenture.com>
> *Subject:* FW: [dev] BLE/Android
>
>
>
>
>
>
>
> *From:* Prakash Ks [mailto:pakkya1234 at gmail.com <pakkya1234 at gmail.com>]
> *Sent:* Tuesday, August 23, 2016 4:36 PM
> *To:* Devaraju, Rangaraju <rangaraju.devaraju at accenture.com>
> *Subject:* Fwd: [dev] BLE/Android
>
>
>
>
>
> ---------- Forwarded message ----------
> From: *JiHwan Seo* <jihwan.seo at samsung.com>
> Date: Tue, Aug 23, 2016 at 4:07 PM
> Subject: Re: [dev] BLE/Android
> To: EZAYEN Salim via iotivity-dev <iotivity-dev at lists.iotivity.org>
>
> Hi.
>
>
>
> If you want to ran Android to Android on BLE
>
> please use "FindResource on unicast" like below.
>
>
>
> and I recommend that Gatt Server(Resource Server) is worked on Android 5.0
> or 5.1.
>
> because BLE on Android 6.0 has dynamic random address.
>
>
>
> and Host information of the FindResource should be replaced with unicast
> format like upper.
>
>
>
> OcPlatform.findResource*("coap+gatt://XX:XX:XX:XX:XX:XX",   //
> XX:XX:XX:XX:XX:XX -> BLE mac address of the gatt server device*
>
>                               "/oic/res",
>
>                               EnumSet.of(OcConnectivityType.
> *CT_ADAPTER_GATT_BTLE*),
>
>                               listener,
>
>                               QualityOfService.LOW);
>
>
>
> Jihwan
>
>
>
> --------- *Original Message* ---------
>
> *Sender* : EZAYEN Salim via iotivity-dev <iotivity-dev at lists.iotivity.org>
>
> *Date* : 2016-08-23 19:14 (GMT+9)
>
> *Title* : [dev] BLE/Android
>
>
>
> Hi Iotivity,
>
> Can someone please help me to use simple client and simpleserver with
> android using the BLE mode ?
>
> Thank you all.
>
> *Cordialement,*
>
>
>
>
>
>
>
>
>
> *Salim Zayen*
>
> *?l?ve ing?nieur *
>
> *t?l?phone :+216 23 85 66 25*
>
>  *espr**it*?
>
> _______________________________________________
>
> iotivity-dev mailing list
>
> iotivity-dev at lists.iotivity.org
>
> https://lists.iotivity.org/mailman/listinfo/iotivity-dev 
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.iotivity.org_mailman_listinfo_iotivity-2Ddev&d=DQMFaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=7tMYnbONFLykRciNgwFIf75AXAw25ZLCc6RZRcjDEK4&m=4724wlfLwV1zcay2WTmPvuZRh4RJAv3O_fIjJiI2mMg&s=JJ5Fu99-96qgTZ7qTust-VB0cWcz0pzLFF17a5VSgNo&e=>
>
>
>
>
>
>
> _______________________________________________
> iotivity-dev mailing list
> iotivity-dev at lists.iotivity.org
> https://lists.iotivity.org/mailman/listinfo/iotivity-dev
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.iotivity.org_mailman_listinfo_iotivity-2Ddev&d=DQMFaQ&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=7tMYnbONFLykRciNgwFIf75AXAw25ZLCc6RZRcjDEK4&m=4724wlfLwV1zcay2WTmPvuZRh4RJAv3O_fIjJiI2mMg&s=JJ5Fu99-96qgTZ7qTust-VB0cWcz0pzLFF17a5VSgNo&e=>
>
>
>
>
>
> --
>
> With Regards
>
> Prakash K S
>
> 9743167347
>
> ------------------------------
>
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise confidential information. If you have
> received it in error, please notify the sender immediately and delete the
> original. Any other use of the e-mail by you is prohibited. Where allowed
> by local law, electronic communications with Accenture and its affiliates,
> including e-mail and instant messaging (including content), may be scanned
> by our systems for the purposes of information security and assessment of
> internal compliance with Accenture policy.
> ____________________________________________________________
> __________________________
>
> www.accenture.com
>



-- 
With Regards
Prakash K S
9743167347
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160823/5d32f720/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 80152 bytes
Desc: not available
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160823/5d32f720/attachment.png>

Reply via email to