Closed JavaProgrammerLB closed 6 years ago
What is your client implementation?
The ACK (first response) contains a OBSERVE 0, response code 2.05 Content, but no payload !!!!
The fist NON (MID: 7510) also contains OBSERVE 0, response code 2.05 Content, an payload
The second NON (MID: 7513) also contains OBSERVE 3, response code 2.05 Content, an payload
According https://tools.ietf.org/html/rfc7641#section-3.4, the first NON is not newer than the ACK. Therefore the NON is filtered out!
FMPOV, your client implementation is not proper working (I hope, it's not californium .-) ) It doesn't prepare the observe option of the ACK response proper not does it send the proper first payload in the response.
See also https://tools.ietf.org/html/rfc7641#appendix-A.1
The response to GET has observe 0 and payload, the next notification has observe 9 (and payload), and then 16 (and payload). So that observe option sequence will work. It takes the first payload from the response and then the payload of the following notifies.
@boaks thanks for your answer,
What is your client implementation?
Sorry, I was wrong, the coap server implementation is important, it generates the suspicious ACK. If it is also californium 2.0.0-M6, I would appreciate, if you could provide some informations about the examples your using.
Can you give me some suggestion to fix the issue: ignore the ack, handle the notification
Fix the server to sent proper ACK responses, or really just a plain ACK. But this depends on your servers possibilities.
@boaks thank you very much. The Observe server is run in our customer's IoT device, maybe implement in C.
@boaks thank you a lot.
In my case, I can't modify the Observe server's code logic.
I try to add an if block in ObserveNotificationOrderer.java and modify some code to pass the unit test, which is an informality method to solved my problem.
ObserveNotificationOrderer.java:
My first notification was dropped
I want to know how can I catch the first notification
My Observe:
After My code run:
Californium log:
tcpdump packages:
I use:2.0.0-M6
tcpdump cap file: devicebus-nbiot-access4.cap.zip