Hello,
we successfully ported the mosquitto *library* to Genode (we used version 15.05 and 16.08 for testing), which may be interesting for some on the mailing list - it is a library, implementing the MQTT protocol.
https://github.com/argos-research/genode/pull/12
Every option is enabled apart from 'WITH_SRV' which would enable SRV lookup support. We didn't test the SSL support, but it is linked and compiled into the library.
Additionally a simple publisher application is implemented (mpct), which publishes to a given server a hello world message with an increasing iterator and makes use of the callback functionality.
One point which took a huge amount of time to find, was that 'lwip_tcpip_init()' function leads to freezes for us (https://github.com/argos-research/genode/pull/12/files#diff-48dce339109d6267...). On real hardware (pandaboard / raspberry pi) it freezes before even receiving an ip address and on the pbxa9 qemu instance it froze after publishing a few messages, leading to the error message 'Assertion "tcp_write: pbufs on queue => at least one queue non-empty"'. To work around this, by simply removing it, everything seems to work and we are not exactly sure why, maybe someone can explain it to us?
Regards, Alexander
Hello Alexander,
I'm glad to hear that our networking options are expanding!
The 'lwip_tcpip_init()' should be called implicitly by the 'libc_lwip' library, so I believe your problems come from double initialization:
https://github.com/genodelabs/genode/blob/16.08/repos/libports/src/lib/libc_...
The 'lwip_libc' library will disappear in the near future, so to build against the current and upcoming release you would remove this dependency and let the the built-in socket support in libc take over. The TCP/IP stack would then be selected and configured at runtime via the VFS. For now you would be restricted to the Lxip stack but there is a LwIP plugin for the VFS that is nearly ready.
For an example of runtime network configuration see https://github.com/genodelabs/genode/blob/17.02/repos/libports/run/netty.run Note that you can use the VFS plugins internally or shared between components using the vfs server.
Cheers, Emery
Hello Emery,
thanks for the explanation and the additional information.
Regards, Alexander
On 2017-05-30 20:01, Emery Hemingway wrote:
Hello Alexander,
I'm glad to hear that our networking options are expanding!
The 'lwip_tcpip_init()' should be called implicitly by the 'libc_lwip' library, so I believe your problems come from double initialization:
https://github.com/genodelabs/genode/blob/16.08/repos/libports/src/lib/libc_...
The 'lwip_libc' library will disappear in the near future, so to build against the current and upcoming release you would remove this dependency and let the the built-in socket support in libc take over. The TCP/IP stack would then be selected and configured at runtime via the VFS. For now you would be restricted to the Lxip stack but there is a LwIP plugin for the VFS that is nearly ready.
For an example of runtime network configuration see https://github.com/genodelabs/genode/blob/17.02/repos/libports/run/netty.run Note that you can use the VFS plugins internally or shared between components using the vfs server.
Cheers, Emery
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main
Hi Alexander,
thank you for announcing your work on the mailing list. This is greatly appreciated!
Have you considered to submit your port to the genode-world repository [1]? This would make it easy to find by other community members and the future maintenance (e.g., the adaptation to new Genode versions) could become a joint effort.
[1] https://github.com/genodelabs/genode-world
Cheers Norman
On 31.05.2017 10:45, Alexander Weidinger wrote:
Hello Emery,
thanks for the explanation and the additional information.
Regards, Alexander
On 2017-05-30 20:01, Emery Hemingway wrote:
Hello Alexander,
I'm glad to hear that our networking options are expanding!
The 'lwip_tcpip_init()' should be called implicitly by the 'libc_lwip' library, so I believe your problems come from double initialization:
https://github.com/genodelabs/genode/blob/16.08/repos/libports/src/lib/libc_...
The 'lwip_libc' library will disappear in the near future, so to build against the current and upcoming release you would remove this dependency and let the the built-in socket support in libc take over. The TCP/IP stack would then be selected and configured at runtime via the VFS. For now you would be restricted to the Lxip stack but there is a LwIP plugin for the VFS that is nearly ready.
For an example of runtime network configuration see https://github.com/genodelabs/genode/blob/17.02/repos/libports/run/netty.run Note that you can use the VFS plugins internally or shared between components using the vfs server.
Cheers, Emery
Hi Norman,
we are currently "playing" with integrating the provided example(s) as test(s). When everything is set on our side, I'll make sure it is compatible with Genode 17.05 and supply a pull request for the genode/genode-world repository.
Regards, Alexander
On 2017-06-01 16:04, Norman Feske wrote:
Hi Alexander,
thank you for announcing your work on the mailing list. This is greatly appreciated!
Have you considered to submit your port to the genode-world repository [1]? This would make it easy to find by other community members and the future maintenance (e.g., the adaptation to new Genode versions) could become a joint effort.
[1] https://github.com/genodelabs/genode-world
Cheers Norman
On 31.05.2017 10:45, Alexander Weidinger wrote:
Hello Emery,
thanks for the explanation and the additional information.
Regards, Alexander
On 2017-05-30 20:01, Emery Hemingway wrote:
Hello Alexander,
I'm glad to hear that our networking options are expanding!
The 'lwip_tcpip_init()' should be called implicitly by the 'libc_lwip' library, so I believe your problems come from double initialization:
https://github.com/genodelabs/genode/blob/16.08/repos/libports/src/lib/libc_...
The 'lwip_libc' library will disappear in the near future, so to build against the current and upcoming release you would remove this dependency and let the the built-in socket support in libc take over. The TCP/IP stack would then be selected and configured at runtime via the VFS. For now you would be restricted to the Lxip stack but there is a LwIP plugin for the VFS that is nearly ready.
For an example of runtime network configuration see https://github.com/genodelabs/genode/blob/17.02/repos/libports/run/netty.run Note that you can use the VFS plugins internally or shared between components using the vfs server.
Cheers, Emery