I wasn't able to run your LWM2M client example from the betwixt project - the client would connect sucessfully to a LWM2M server, but even the registration message did not get send out successfully.
I traced this down to an issue in canopus:
serveServer() in server.go starts listening to a local socket
run_basic_client.go then triggers sending out a registration message via Send()
Send() starts listening to another local socket and sends the registration message to the server from there
server then responds back to the socket opened by Send(), not the one by serveServer()
I wasn't able to run your LWM2M client example from the betwixt project - the client would connect sucessfully to a LWM2M server, but even the registration message did not get send out successfully.
I traced this down to an issue in canopus:
Actually, the LWM2M client should only ever need to listen to one socket. In this branch, I implemented a change where Send() reuses the already opened UDP socket, instead of opening another one: https://github.com/crenz/canopus/commit/6dc7ba1671f3e23c6af4ad05986b5a0a94a77dcc
Registration now suceeds, and requests are received successfully from Leshan and Wakaama LWM2M servers.