Re: modem context development documentation
It’s likely related to the socket priority assigned to your offloaded implementation in `NET_SOCKET_OFFLOAD_REGISTER`. Make sure the priority you use is higher (lower number) than the defaults socket priority, you could just use the `CONFIG_NET_SOCKETS_OFFLOAD_PRIORITY` default value. Please read https://docs.zephyrproject.org/latest/connectivity/networking/api/sockets.html#socket-offloading for more information.
From: devel@... <devel@...>
On Behalf Of Antoine via lists.zephyrproject.org
I’m looking to implement drivers for a modem not yet supported by Zephyr and was hoping to follow the modem context format to take advantage of pre-existing architecture. I have a rough start working with DNS offloading now functional by following the SARA-R4, Simcom7080, and BG9X drivers but am currently facing problems with the offload functions (offload_connect) where it doesn’t get called from an MQTT connect function.
The functions are loaded the same way with offload_socket_fd_op_vtable and modem_socket_init, and through debugging I see that zephyr tries to reference a connect function from the mqtt_client_tcp_connect() call however somewhere in between the association doesn’t get made between the zsock_connect() and the offload_function. Similar Kconfig variables are configured in the modem’s Kconfig including [MODEM_CONTEXT, MODEM_CMD_HANDLER, MODEM_IFACE_UART, MODEM_SOCKET, NET_SOCKETS_OFFLOAD].
Regarding future development with this modem driver, troubleshooting is the goal currently, but any documentation on development recommendations would be great so that I can try and learn and implement this as well as provide the best support possible. Most of what I’m finding so far on the topic are from 2018-2020 but haven’t seen concrete documentation either on the documentation website or such yet (the demo on AT based modem support presented by Michael Scott was good and has been the major basis of progress thus far).
Any advice, tips, recommendations, questions, and the like are appreciated.
The content of this email is confidential and intended for the recipient specified in message only. It is strictly forbidden to share any part of this message with any third party, without a written consent of the sender. If you have received this communication in error, please immediately notify the sender, delete the message and do not retain a copy.