You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've observed the following issue while testing awa_clientd.
The bootstrap server and OMA server (leshan) are launched on a single host on different ports as follows:
after bootstraping & registration process I see the following logs for requests from the OMA server:
[DEBUG] [coap_abstraction_erbium.c:249] Coap PUT for /1001/0/0
[DEBUG] [lwm2m_client_core.c:1893] BOOTSTRAP WRITE: /1001/0/0
[DEBUG] [lwm2m_client_core.c:163] Deserialise resource 1001/0/0:
[DEBUG] [lwm2m_observers.c:209] All attributes checked out for server 0, Will notify change to /1001/0/0 when possible.
[DEBUG] [coap_abstraction_erbium.c:265] Coap Response code 204
[DEBUG] [lwm2m_xml_interface.c:76] Send 317 bytes on IPC
BOOTSTRAP WRITE seemed suspicious for me since the bootstraping process was already finished and the source of requests was OMA server only (BS server was even killed).
After some investigation I've found the problem in core\src\client\lwm2m_client_core.c while looking for a position in the Security Object (representing a server endpoint):
Lwm2mCore_CompareAddresses() uses only an IP4/6 address while searching for a position. Port is completly ignored. E.g. for the Linux implementation we have:
This causes the servers installed on the same host as indistinguishable (as occurred in my case - the OMA server was identified as BS server).
Investigating further the issue I've found that in the client's device management handler DeviceManagmentEndpointHandler() in lwm2m_client_core.c the AddressType * addr arg contains (probably?) garbage data in the port field (that is addr->Addr.Sin.sin_port for the Linux abstraction) but I didn't have time to investigate what was a root-cause of this.
The text was updated successfully, but these errors were encountered:
I think ports were not garbage just in network byte order.
I have pushed in a fix which seem to work from by own testing as pre-change I was also getting "BOOTSTRAP WRITE: ". but now works but note resource needs to exist first before doing PUT.
Looking good, thanks for the quick fix. Impressive as usually.
What I taken as the garbage was in fact a port of a local client connecting locally via UDP every time using different local port. I was hurry I didn't check carefully. Sorry.
I've observed the following issue while testing awa_clientd.
The bootstrap server and OMA server (leshan) are launched on a single host on different ports as follows:
after bootstraping & registration process I see the following logs for requests from the OMA server:
BOOTSTRAP WRITE seemed suspicious for me since the bootstraping process was already finished and the source of requests was OMA server only (BS server was even killed).
After some investigation I've found the problem in
core\src\client\lwm2m_client_core.c
while looking for a position in the Security Object (representing a server endpoint):Lwm2mCore_CompareAddresses()
uses only an IP4/6 address while searching for a position. Port is completly ignored. E.g. for the Linux implementation we have:This causes the servers installed on the same host as indistinguishable (as occurred in my case - the OMA server was identified as BS server).
Investigating further the issue I've found that in the client's device management handler
DeviceManagmentEndpointHandler()
inlwm2m_client_core.c
theAddressType * addr
arg contains (probably?) garbage data in the port field (that isaddr->Addr.Sin.sin_port
for the Linux abstraction) but I didn't have time to investigate what was a root-cause of this.The text was updated successfully, but these errors were encountered: