Hi Guys I'm a bit new to Californium librery .So please bare with me..
Here is my problem..
I have the device running on some ip and port , and my coap server is running on different IP address. Device Starts communicating with the server by sending POST request to the server. the code is--
CoapClient client = new CoapClient("coap://myipAddress:myPortNumber/URI");
So i'm recieving the post request on the server side . Problem is i need to send the GET request to the device. so i'm creating a coap client on the server side and sending the request to the device.
String devIP = exchange.getSourceAddress();
Integer devPort = exchange.getSourcePort();
i'm building a new client and sending the get request as below:
CoapClent serverSideClient = new CoapClient("coap://"+devIP+":"+devPort);
Response res = serverSideClient .get();
but device is not recieving any request. In server side after some time i get the info that the "Retransmission limit reached .... "
I dont understand what went wrong .. i would appreciate any help . Thaks in advance.
PS: from server i'm able to send the piggy-backed response back to device by exchange.respond();
but the response is ACK-2.05 .