Hello everyone,

I want to create a java application that will use COAP to communicate with
an IoTivity server (the server and the client are on different devices and
networks). I am using for the COAP communication the Californium library
and so far I have managed to make GET, POST, PUT and DELETE requests.
Moreover, I have managed to subscribe an observer and receive
notifications. The above functionalities are working if the Iotivity port
for unicast calls is known (I actually run once the simpleserver. The port
is printed on the console )


The only functionality that I am unable to implement is the device
discovery, needed in order to retrieve the Iotivity unicast port.
Specifically, according to RFC 7049 the client has to make a GET request to
"coap://server-ip:5683/.well-known/core" for device discovery, but for the
iotivity case the url is "coap://server-ip:5683/oic/res". No matter what
minor modifications I make to the request (e.g change the request type, add
further options etc), I never get an answer. I tried this using copper and
it seems to work!! I sniffed the packet transmitted by copper using
wireshark and tried to create an identical packet through californium, but
still no answer!!

1) Has anyone implemented something like this?? Californium supports a
discover method in the CoapClient class, where I made my modifications (e.g
replace the uri path)

2) If something like this is not possible, is it possible to somehow
configure the iotivity server to have a specific unicast port?? To my best
knowledge, the unicast port is selected randomly. Although there is a
configuration class supported by the iotivity sdk, using a specific port
does not work.


Any ideas??


Kind regards,

Stefanos Stavrotheodoros
_______________________________________________
iotivity-dev mailing list
[email protected]
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

Reply via email to