Comments (5)
Hi,
I guess you are trying to connect to a server which is neither Leshan or wakaama.
You are right: the Update Registration message does not include the endpoint name. The location is enough to recognize the client.
It looks like your server dropped the client registration before your update message reched it.
Regards,
from wakaama.
Hi Ricky,
as always:
the more information you give about what your doing, the more feedback you will get :-).
Though the answer contains "text" (Client must specify an endpoint identifier), I would guess
you don’t use Wakaama as server. So which server do you use? Which version?
There was a change in the LWM2M TS at the beginning of 2015 ( 12. Feb. ) to map
the "update registration" not longer to "PUT" and use also "POST" instead.
So older server implementation may interpret a update with "POST" as registration
and therefore report an error.
Mit freundlichen Grüßen / Best regards
Achim Kraus
from wakaama.
Hi David and Achim,
Thanks for your information. You guys are kind. :)
Actually I don't know what the server is but I guess it's leshan server.
Search the key word can find in gitt hub.
Looks like the issue is caused by server. closed the issue.
if (endpoint == null || endpoint.isEmpty
exchange.respond(ResponseCode.BAD_REQUEST, "Client
must specify an endpoint identifier");
RickyLiu
from wakaama.
leshan 0.1.4, seems to be "very old", and the code shows the old TS (using POST/PUT for register and update). If it's possible, update the leshan to a more current version (0.1.11 ...).
Alternatively (not recommended) just for testing only:
Change core/registration.c, line 237 to use COAP_PUT (instead of the correct COAP_POST):
static int prv_update_registration(lwm2m_context_t * contextP,
lwm2m_server_t * server)
{
lwm2m_transaction_t * transaction;
/*237*/ transaction = transaction_new(COAP_TYPE_CON, COAP_POST, NULL, NULL, contextP->nextMID++, 4, NULL, ENDPOINT_SERVER, (void *)server);
if (transaction == NULL) return INTERNAL_SERVER_ERROR_5_00;
coap_set_header_uri_path(transaction->message, server->location);
from wakaama.
I'll try it. Thanks Achim :)
2016-03-09 16:04 GMT+08:00 Achim Kraus [email protected]:
leshan 0.1.4, seems to be "very old", and the code shows the old TS (using
POST/PUT for register and update). If it's possible, update the leshan to a
more current version (0.1.11 ...).Alternatively (not recommended) just for testing only:
Change core/registration.c, line 237 to use COAP_PUT (instead of the
correct COAP_POST):static int prv_update_registration(lwm2m_context_t * contextP,
lwm2m_server_t * server)
{
lwm2m_transaction_t * transaction;/237/ transaction = transaction_new(COAP_TYPE_CON, COAP_POST, NULL, NULL, contextP->nextMID++, 4, NULL, ENDPOINT_SERVER, (void *)server);
if (transaction == NULL) return INTERNAL_SERVER_ERROR_5_00;coap_set_header_uri_path(transaction->message, server->location);
—
Reply to this email directly or view it on GitHub
#102 (comment).
RickyLiu
from wakaama.
Related Issues (20)
- Documentation on how to use the library HOT 2
- SonarCloud and CodeQL jobs failed HOT 1
- Question: Why failed registration update goes into STATE_BOOTSTRAP_REQUIRED immediately? HOT 1
- [ANSWER] Which LWM2M version Wakaama Client supports? HOT 24
- Block-wise transfer on observe response? HOT 1
- How should we document Wakaama HOT 9
- server write operation , response COAP_400_BAD_REQUEST HOT 2
- Moving from Master to Main HOT 4
- Election of new committer HOT 9
- Option to transfer the Wakaama repository to its own organisation HOT 8
- How to use the wakaama library for Espressif HOT 5
- Question regarding the appropriate license for this project HOT 1
- Support of send operation for single resource data with TLV format ? HOT 10
- Is Leshan ready for production usage ? HOT 2
- Inquiry about CoAP Fetch Functionality Implementation HOT 3
- Client SEND operation does not use fragmentation leading to oversized CoAP packets
- Fixed buffer size in senml_json_serialize limits handling of multiple resources HOT 1
- Build Fails if LWM2M_RAW_BLOCK1_REQUESTS set HOT 4
- Compile server&client example with DTLS HOT 1
- Include other libraries in examples HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wakaama.