Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [leshan-dev] Receive Observe notifications

Hi Chris,

 

can you provide the packet captures?

 

I’m really wondering, what’s going on …

 

Yesterday I retested the observe/notify for californium issue #772.

https://github.com/eclipse/californium/issues/772#issuecomment-432192214

and it works out of the box.

 

Simon wrote a very good summary of “pain-point” of that observe/notify.

https://github.com/eclipse/leshan/wiki/LWM2M-Observe

 

Did you read that?

 

Without the capture or additional information, it will be hard to help you.

May be you better open an issue in the californium github, it’s easier to

follow up / track  such an issue there than in an e-mail list.

 

https://github.com/eclipse/californium

 

If you open the issue, please really provide the infos requested:

LWM2M-server leshan version?

LWM2M-client implementation and version?

Plain UDP (coap) or DTLS (coaps)?

 

Mit freundlichen Grüßen / Best regards

Achim Kraus

(INST/ECS4)
Bosch Software Innovations GmbH | Stuttgarter Straße 130 | 71332 Waiblingen | GERMANY
| www.bosch-si.com

Sitz: Berlin, Registergericht: Amtsgericht Charlottenburg; HRB 148411 B
Aufsichtsratsvorsitzender: Dr.-Ing. Thorsten Lücke; Geschäftsführung: Dr. Stefan Ferber, Michael Hahn, Dr. Aleksandar Mitrovic



From: leshan-dev-bounces@xxxxxxxxxxx <leshan-dev-bounces@xxxxxxxxxxx> On Behalf Of Chris Russo
Sent: Dienstag, 23. Oktober 2018 19:57
To: leshan-dev@xxxxxxxxxxx
Subject: [leshan-dev] Receive Observe notifications

 

I am building a simple prototype based upon the leshan-server-demo included with the repo.  I'm attempting to receive updates from objects that have been observed.  Packet captures show that the updates are making their way to the server, but I'm receiving no notice of them.

 

Seemingly, the best answers I've googled for are from 2015 - but subsequently changes to the Leshan codebase have made the same technique unworkable.

 

I've tried using the ObservationService to add an ObservationListener, but that only seems to alert me when the Observe has been requested, not when the endpoint sends up changed values.

 

    static private void attachListener(final LeshanServer server) {

        System.out.println("Attaching Listener");

        server.getObservationService().addListener(new ObservationListener() {

            @Override

            public void newObservation(Observation observation, Registration registration) {

                System.out.println("New Observation");

            }

            @Override

            public void cancelled(Observation observation) {

                System.out.println("Observation cancellation");

            }

            @Override

            public void onResponse(Observation observation, Registration registration, ObserveResponse response) {

                System.out.println("Observation Response");

            }

            @Override

            public void onError(Observation observation, Registration registration, Exception error) {

                System.out.println("Observation Error");

            }

        });

    }

 

How should I be listening for observed objects on the Leshan server?

 

Thank you.


Back to the top