Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Californium (Cf) CoAP Framework » client.put not working observe method(client.observe(new CoapHandler() { @Override onload monitor.put() not working.)
client.put not working observe method [message #1754156] Tue, 14 February 2017 19:23
jay weinstein is currently offline jay weinsteinFriend
Messages: 1
Registered: February 2017
Junior Member

I have created a resouce on localhost and a observe method to receive any updates to the resource. This seems to be working correctly in onLoad. However, when I try to send a message in onLoad to a resource at another ip address the put fails.

new CoapHandler() {
public void onLoad(CoapResponse response) {
final String content = response.getResponseText();
CoapClient monitor = new CoapClient("coap://");
CoapResponse resp = monitor.put(content, MediaTypeRegistry.TEXT_PLAIN);
if (resp != null)
System.out.println("monitor.put() timeout!!");

If I print out content I know I'm getting the correct response from the resource. However, monitor.put() fails. The local host address is
Previous Topic:cannot capture coap packets using rawcap
Next Topic:Need General tutorial on setting up DTLS certificates and stores
Goto Forum:

Current Time: Wed Nov 14 07:02:11 GMT 2018

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

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

Back to the top