Hello,

I m trying to create IoTivity Cloud clients, according to aircon_controlee and aircon_controller samples. Although I can successfully register my device (controlee) to cloud by giving "[host-ipaddress:port] [authprovider] [authcode]", when I try to run for the second time and give "[host-ipaddress:port] [uid] [accessToken] 1" arguments I receive:

/Publish resource response received, code: 46/.

I noticed that in the code already in the first run the device is both signed up and signed-in, so my question is why could it fail for the second time it tries to sign in (with the same uid and accessToken as the first one) and also why is the first "sign-in" and "publish to RD" not sufficient and we need to "sign-in" and "publish to RD" also the second time.

if (argc == 5)
    {
        accountMgr->signIn(argv[2], argv[3], &handleLoginoutCB);
        g_callbackLock.wait(lock);
    }
    else
    {
        accountMgr->signUp(argv[2], argv[3], &handleLoginoutCB);
        g_callbackLock.wait(lock);
        accountMgr->signIn(g_uid, g_accesstoken, &handleLoginoutCB);
        g_callbackLock.wait(lock);
    }


Thank you,
Maria


_______________________________________________
iotivity-dev mailing list
iotivity-dev@lists.iotivity.org
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

Reply via email to