-
Notifications
You must be signed in to change notification settings - Fork 2.1k
pkg/wolfmqtt: add wolfmqtt #15969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
pkg/wolfmqtt: add wolfmqtt #15969
Conversation
Awesome PR. Many thanks for working on that. It could be of interest to @javierfileiv. |
I can only join @aabadie in saying "Awesome PR!" :-)
I think a common |
This is great! Awesome job! I'll leave my PR aside for the moment 😉😉 |
@HendrikVE wolfSSL supports posix sockets when used in combination with lwIP. The Check |
@HendrikVE - This is looking great! Just wanted to add that you could create a RIOT section inside the network porting layer |
d62e64f
to
1ebf321
Compare
Good point thx, I moved the call out of the examples into
Thx, I updated the
I checked the sizes for the condition |
Hello @HendrikVE, Could you try to rebase the example on the LWIP BSD socket layer (via An example off-tree app with TLS sockets is now available here: Thanks, -- |
@danielinux Thank you very much for providing an example tor this! Unfortunatley I am not able to make a successful connection between server and client :( I followed the steps in the README and got the following output on the RIOT node:
I also added the
Executing the
The Is it possible that my changes with I added expand for the output
How were you able to check these messages? From my understanding there should be no MQTT message until the TLS connection is successful. Sorry for asking so many questions🙈 |
I decided to exclude the SSL part for now as I was not yet able to run it. Furthermore the PR is already big enough, so I will open another one for this. |
I did a major rework of this PR. Now with fewer hacks! #17493 is now a new dependency. |
Without initializing async_cb to NULL it might be a value != NULL, which leads to sock->async_cb.gen() being called mistakenly in _netconn_cb.
853c250
to
8b7105d
Compare
8b7105d
to
16ae459
Compare
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
This PR adds the new package wolfmqtt. WolfMQTT is somewhat of an all-inclusive MQTT Client.
Features (of the library)
I had to do some fixes/modifications on
posix_sockets
. The examplesn-client
requires support for MSG_PEEK, which was not supported before. Alsoposix_socket
did not even compile for TCP at all.Some examples were added by using the package's sourcecode. Necessary modifications to make them run on RIOT were added via patch. E.g. I had to modify the part that was using
getaddrinfo
which is missing in RIOT (see #7801).Because I don't know much about developing network stacks I just hacked some solutions for my problems right now. @miri64 can give me some hints I guess? :)
@danielinux I've got confused exactly the same way as @rugo about the state of support of wolfssl in RIOT. See #14915. Could you shed some light on this? Standard TLS support is essential for this library, because this would give us the option to connect to services which require a secured MQTT connection. And that is really missing in RIOT.
Also it would be great if someone could come up with a better way to determine whether the device is connected to a network or not. Currently the esp32 sleeps for a few seconds until it is connected to my Wifi, which does not feel like the optimal solution.
My setup
paho-mqtt
, because of TCP)user_settings.h
Open issues (help needed) are marked with a checkbox.
Options
Examples
mqttclient
sn-client
multithread
nbclient
TODOs:
mqttnet.c
(FD_ISSET(sock->fd, &errfds)
)xtimer_sleep
call in the examples by something more convenient when waiting for the network to connectDependencies