Ignoring unparsable message from ('::IPv6', 56608, 0, 0)
python3 -m aiocoap.cli.defaults
Python version: 3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0]
aiocoap version: 0.4.16
Modules missing for subsystems:
dtls: everything there
oscore: everything there
linkheader: everything there
prettyprint: everything there
ws: everything there
Python platform: linux
Default server transports: oscore:tinydtls_server:tinydtls:tcpserver:tcpclient:tlsserver:tlsclient:ws:udp6
Selected server transports: oscore:tinydtls_server:tinydtls:tcpserver:tcpclient:tlsserver:tlsclient:ws:udp6
Default client transports: oscore:tinydtls:tcpclient:tlsclient:ws:udp6
Selected client transports: oscore:tinydtls:tcpclient:tlsclient:ws:udp6
SO_REUSEPORT available (default, selected): True, True
I have attached my server example (lwm2m_example.py) and credentials file. When I run server (python lwm2m_example.py) and then client with:
$ aiocoap-client -m POST --accept 40 --credentials=credentials.json --content-format 40 --payload "</3303/0>,</3/0>,<ep=temp_sensor_1>,<lt=86400>,<b=U>" coaps://10.20.67.212/rd
on server side I am getting:
Ignoring unparsable message from ('::IPv6', 56608, 0, 0)
$ echo $AIOCOAP_DTLSSERVER_ENABLED gives
1
Can you point what I am doing not right?
The trouble is that you set port to 5684 -- leave it at 5683.
This is from a big open to-do that the transports don't take individual binding configuration -- as a consequence, they bind by offset from the configured port, and if you set the "normal" port to 5684, DTLS will go to 5685. That's not pretty, but I haven't gotten around to fixing it (which would probably be by the context creators taking an extra object that describes per-transport settings).
Thank you very much. I will test it at 27.10.2025.
Now after your suggestion I am getting 4.00 Bad Request
$ aiocoap-client -m POST --accept 40 --credentials=credentials.json --content-format 40 --payload "</3303/0>,</3/0>,<ep=temp_sensor_1>,<lt=86400>,<b=U>" coaps://10.20.67.212/rd
4.00 Bad Request
# Invalid application/link-format content was not re-formatted
missing ep
On server side I am getting:
Unhandled alert level 1 code 0
Can you help?
After digging into code I managed to register temp_sensor_1.
$ aiocoap-client -m POST --accept 40 --credentials=credentials.json --content-format 40 --payload "ep=temp_sensor_1,</3303/0>,</3/0>,<lt=86400>" coaps://10.20.67.212/rd
On server side:
Registered temp_sensor_1,</3303/0>,</3/0>,<lt=86400> -> objects {3303: {}, 3: {}}
Unhandled alert level 1 code 0
Hm, level 1 are warnings, and I think that's all from the client's shutdown. I'll keep it open to look into next time I dig deeper into DTLS, but I think those warnings should do no harm. (I don't like to be vague about warnings, but as DTLS is not the security mechanism I mostly use, I mainly re-familiarize myself with all that part's details when there are larger changes pending).