Open TinHead opened 1 month ago
OK, sorry for taking so long to get back to you. There seems to be a bug in your code for starters. Calling SetDeadline
will eventuall cause the connection to fail. Here is where you call it: https://github.com/TinHead/tinygo-playground/blob/67527d1910c0c0796213bbd9b498c627b79a892f/rfm-wifi-gw/mqttops.go#L78
On success you should reset the deadline by setting a zero time time.Time{}
with the same function.
I understand this might not solve your issue, but it will narrow down causes.
Well ok it's all copy pasted from your stuff as much as I were able to understand it, unfortunately it's very confusing for me how seqs, net, and natiu-mqtt and the cyw43439 driver are supposed to interact. As much as I would like for this to work I'm not that well versed to help fix whatever is wrong :/
I guess your time is as limited as mine so I won't pursue this any further at this time it's easier to just move on to a Raspberry Pi Zero and use normal go instead, as I need to finish this before the cold starts (project is integrating heating with Homeassistant as you might have guessed).
Thanks for looking into it and all the hard work, I'll watch this space.
Cheers! TH
Hello,
As per our discussion on Slack I updated natiu-mqtt to latest main:
github.com/soypat/natiu-mqtt v0.5.2-0.20241009154510-7c992f5072e3
Tinygo version:tinygo version tinygo version 0.32.0 linux/amd64 (using go version go1.21.5 and LLVM version 18.1.2)
Code I'm using in the repo here: https://github.com/TinHead/tinygo-playground/tree/main/rfm-wifi-gw Debug output: