Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Californium (Cf) CoAP Framework » How to send a get request to device from handlePOST(exchange ) method
icon1.gif  How to send a get request to device from handlePOST(exchange ) method [message #1472256] Thu, 13 November 2014 18:36 Go to next message
vijay kasina is currently offline vijay kasinaFriend
Messages: 1
Registered: November 2014
Junior Member
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");
client.post("");

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 .
Re: How to send a get request to device from handlePOST(exchange ) method [message #1690994 is a reply to message #1472256] Wed, 01 April 2015 13:09 Go to previous message
hardy hardy is currently offline hardy hardyFriend
Messages: 1
Registered: April 2015
Junior Member
hi Vijay

Can you please share same more details regarding your code and environment. My requirement is pretty similar.

Thanks in advance...
Previous Topic:californum.tools command line client unable to access coaps://vs0.inf.ethz.ch:5684/
Next Topic:Californium CoAP Framework - PUT and POST samples
Goto Forum:
  


Current Time: Mon Jun 18 02:28:13 GMT 2018

Powered by FUDForum. Page generated in 0.01903 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top