Hi all,
I am currently trying to run Android client and server in different Android
devices, but Ocplatfrom.findResource() in client side couldn't find the
resource in server side.
Everything works well when I run both server and client in the same Android
emulator.
Now I am running client in Android emulator and server in Android Things
OS. I tried to access server using COAP plugin on firefox, and accessing
"coap://10.0.0.98/iot/light" with put method did invoke some actions on the
server.
I then tried to access the server by
OcPlatform.findResource("10.0.0.98",
"/oic/res?core.light",
EnumSet.of(OcConnectivityType.CT_DEFAULT),
this
);
But it simply gave no response and got stuck with no further actions and
logs as follows:
05-30 02:57:25.513 20999-21062/com.iotapp.iotclientapp I/JNI_CA_INTERFACE:
CaInterface_initialize
05-30 02:57:25.513 20999-21062/com.iotapp.iotclientapp I/JNI_CA_INTERFACE:
CaInterface_initialize
05-30 02:57:25.513 20999-21062/com.iotapp.iotclientapp I/OIC-JNI:
OcPlatform_configure
05-30 02:57:25.514 20999-21062/com.iotapp.iotclientapp I/MainActivity:
------------------------------------------------------------------------
05-30 02:57:25.514 20999-21062/com.iotapp.iotclientapp I/MainActivity:
Finding all resources of type "core.oven".
05-30 02:57:25.514 20999-21062/com.iotapp.iotclientapp I/MainActivity:
Connect to URI: /oic/res?rt=core.oven
05-30 02:57:25.514 20999-21062/com.iotapp.iotclientapp D/OIC-JNI:
OcPlatform_findResource
05-30 02:57:25.514 20999-21062/com.iotapp.iotclientapp D/OIC-JNI:
OnResourceFoundListener: new listener
The IP address for my server is 10.0.0.98.
And I am using
Scons TARGET_OS=ANDROID for client
and
Scons TARGET_OS=ANDROID TARGET_ARCH=armeabi-v7a for the server.
Any ideas for solving it?
Thanks,
Kaitao
Thanks,
Kaitao
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20170530/54ab8524/attachment.html>