Hi all,

I have a few beginner-leveled questions about secure mode in Android. Let
me explain the situation:

I have created two apps (one for Server/Controlee and the other for the
Client/Controller) and I'm able to FIND and GET/POST/OBSERVE them without
problems. As this is a simple example, I now want to do the same things but
with SECURED=1. I should note that I am usually running both apps in the
same device (not the emulator, but my cellphone).

So I started looking everywhere and discovered I could do this with a local
ACL and supposedly everything would be ok. Turns out it didn't, which is
why I am here. So my questions are:

- Do I need anything else to use the SECURED flag in Android apart from
registering resource as secure and passing the ACL to the PlatformConfig
and configure it?

- I read that when configuring the Platform with an ACL the DeviceID should
be set with the ID inside it. So as it failed I tried debugging the ID,
which led me to confusion about PlatformID and DeviceID. When loading the
ACL the DeviceID comes as a random byte[]. However, I can set the DeviceID
in the code and retrieve it just fine. The thing is, the ID recieved by the
Client (ServerID) isn't the same I set in the code. I'm not sure if it's
something about the encoding tricking me or if it's something else. Can
someone please shed me some light?

In short, the Client can find the resources (they are registered with
SECURE type) but can't make a correct GET/POST/OBSERVE request, returning
UNAUTHORIZED_REQ. Any tips about this flag and Android are welcome.

Sorry for the long post, thank you in advance!
_______________________________________________
iotivity-dev mailing list
iotivity-dev@lists.iotivity.org
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

Reply via email to