Closed Citrullin closed 3 years ago
I'm curious if this problem is caused by my code or the library used for CoAP (https://mvnrepository.com/artifact/org.eclipse.californium/californium-core/1.0.7).
I have extracted the underlying library coap calls. Can you please check if the error occurs here as well?
import org.eclipse.californium.core.CoapClient;
import org.eclipse.californium.core.CoapHandler;
import org.eclipse.californium.core.CoapResponse;
import org.eclipse.californium.core.coap.CoAP;
import org.eclipse.californium.core.coap.Request;
import java.net.URI;
import java.net.URISyntaxException;
public class CoapDebugTest {
public static void main(String[] args) throws URISyntaxException {
CoapClient client = new CoapClient(new URI("coap://[fe80::9c7c:12ff:fe70:8f55%tapbr0]/.well-known/wot-thing-description")).setTimeout(10 * 1000L);
Request request = new Request(CoAP.Code.GET);
client.advanced(new CoapHandler() {
@Override
public void onLoad(CoapResponse coapResponse) {
System.out.println("CoapDebugTest.onLoad");
System.out.println("coapResponse = " + coapResponse);
}
@Override
public void onError() {
System.out.println("CoapDebugTest.onError");
}
}, request);
}
}
@heikobornholdt I had to remove the @Override
because it is an interface and overrides nothing.
I get a CoapDebugTest.onError
in the terminal. In Wireshark I see Neighbor Neighbor Solicitations.
75 77.357915417 fe80::8029:2fff:fe69:6cc4 ff02::1:ff70:8f55 ICMPv6 86 Neighbor Solicitation for fe80::9c7c:12ff:fe70:8f55 from 82:29:2f:69:6c:c4
What version of wot-servient did you use? I have created an Ubuntu VM with RIOT server, and I cannot reproduce the error with the current SNAPSHOT version.
What version of wot-servient did you use? I have created an Ubuntu VM with RIOT server, and I cannot reproduce the error with the current SNAPSHOT version.
You are right. Happens on 1.13, but not on 1.15-SNAPSHOT. So, I close it :)
I wrote a simple boilerplate project in scala. The CoAP server is a RIOT process in Linux. An explanation how to run it can be found here. Instead of the branch
wot_plugfest_09_2020
usewot_gcoap
. Another more simple server probably also does the job. The CoAP server is accessible. I tested this with the coap-client in libcoap.When I don't catch the exception, I get the following exception:
I also ran it with a link-local address for the server, defined in the application.conf
I checked the
tapbr0
interface with Wireshark. There is, in both cases, no traffic at all. I guess the zone Id in the IPv6 gets ignored. I haven't checked, if this is just a parsing error, or if the underlying client is responsible for this error.