Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot handle update registration from a Wakaama client #106

Closed
pasear opened this issue Jul 26, 2016 · 3 comments
Closed

cannot handle update registration from a Wakaama client #106

pasear opened this issue Jul 26, 2016 · 3 comments

Comments

@pasear
Copy link

pasear commented Jul 26, 2016

Hi,

I am using lwm2m-node-lib as a server and Wakaama as the client.
It seems that the two implementations are not compatible for update registration.

It seems that the Wakaama client only sends /rd/1 and lacking parameters required by this library.

3   30.017473s  127.0.0.1   127.0.0.1   CoAP    45  CON, MID:2760, POST, TKN:c8 0a b4 2a, /rd/1

The log at server looks like:

time=2016-07-26T09:34:11.585Z | lvl=DEBUG | corr=n/a | trans=n/a | op=LWM2MLib.COAPRouter | msg=Handling request with method [POST] on url [/rd/1] with messageId [12353]
time=2016-07-26T09:34:11.585Z | lvl=DEBUG | corr=n/a | trans=n/a | op=LWM2MLib.COAPUtils | msg=Extracting query parameters from request
time=2016-07-26T09:34:11.585Z | lvl=DEBUG | corr=n/a | trans=n/a | op=LWM2MLib.Registration | msg=Handling registration request
time=2016-07-26T09:34:11.585Z | lvl=DEBUG | corr=n/a | trans=n/a | op=LWM2MLib.COAPUtils | msg=Checking for the existence of the following parameters [["ep"]]
time=2016-07-26T09:34:11.586Z | lvl=DEBUG | corr=n/a | trans=n/a | op=LWM2MLib.COAPUtils | msg=Missing parameters found [["ep"]]
time=2016-07-26T09:34:11.586Z | lvl=DEBUG | corr=n/a | trans=n/a | op=LWM2MLib.Registration | msg=Registration request ended up in error [BAD_REQUEST_ERROR] with code [4.00]
time=2016-07-26T09:34:11.904Z | lvl=DEBUG | corr=n/a | trans=n/a | op=LWM2MLib.MemoryDeviceRegistry | msg=Lifetime unregistration for device [testlwm2mclient] ended successfully

I do not know which implementation is correct, but I find a document here saying

This “Update” operation MUST contain only the parameters listed in table below which have changed compared to the last registration parameters sent to the LWM2M Server.

and it does not mention endpoint name. So, maybe this behavior should be fixed here?

Thank you.

@pasear
Copy link
Author

pasear commented Jul 26, 2016

I also tried Leshan demo client. Here are the logs.

  • the log from Leshan demo client
[2016-07-26 18:58:56,298 INFO LeshanClient] Leshan client started.
[2016-07-26 18:58:56,304 INFO RegistrationEngine] Trying to register to coap://localhost:5683 ...
[2016-07-26 18:58:56,335 INFO RegistrationEngine] Next registration update in 27.0s...
[2016-07-26 18:58:56,336 INFO RegistrationEngine] Registered with location '/rd/1'.
[2016-07-26 18:59:23,342 INFO RegistrationEngine] Trying to update registration to coap://localhost:5683 ...
[2016-07-26 18:59:23,351 ERROR RegistrationEngine] Registration update failed: BAD_REQUEST BAD_REQUEST_ERROR.
  • log from wiresharks
5   0.471016s   127.0.0.1   127.0.0.1   CoAP    118 CON, MID:38722, POST, TKN:0a 23 ba, /rd?b=U&lt=30&ep=hello.local
6   0.486226s   127.0.0.1   127.0.0.1   CoAP    44  ACK, MID:38722, 2.01 Created, TKN:0a 23 ba
7   27.498132s  127.0.0.1   127.0.0.1   CoAP    48  CON, MID:38723, POST, TKN:f5 4a cf 2c e4 49 0b, /rd/1
8   27.504795s  127.0.0.1   127.0.0.1   CoAP    61  ACK, MID:38723, 4.00 Bad Request, TKN:f5 4a cf 2c e4 49 0b (text/plain)

Hope this helps!

@dnav
Copy link

dnav commented Jul 26, 2016

Hi, wakaama maintainer here,

The registration update mapping was changed to a CoAP POST recently. Refer to chapter 8.2.3 of the latest LWM2M Technical Specification on the OMA FTP

Regards

dmoranj added a commit that referenced this issue Oct 6, 2016
@moleike
Copy link
Contributor

moleike commented Dec 22, 2016

@pasear this is already fixed in the development branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants