Custom driver offload socket creation failing #46161
-
I'm trying to set up a UDP socket connection for a driver I'm creating (Ublox SARA N310) that's similar to Ublox R4 (that makes use of socket offloading), but it fails. Running GDB and stepping through the Backtrace:
Error:
|
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 9 replies
-
I'm afraid I can't help if you don't share any details on how is your offloaded socket implementation written (specifically how it's registered in the system). From the gdb output it's clear tha the native socket implementation is called. |
Beta Was this translation helpful? Give feedback.
-
I converted this to a discussion since it is not clear at all that this is an issue with Zephyr. @alissakruiniger please provide additional details on the driver you are writing (ideally please provide a branch with the driver) so we can reproduce the issue you describe. |
Beta Was this translation helpful? Give feedback.
-
We work inside an organization and I'm not sure we can share the branch.
This could be at fault but the function is never called:
Init modem socket:
Driver socket offloading code:
main.c:
prj.conf:
Let us know if we missed anything. |
Beta Was this translation helpful? Give feedback.
-
This is wrong, if you set the same priority as the native socket implementation, then the native socket implementation will most likely be processed first, as the alphabetic order applies. If you want Optionally, if you want the native socket implementation to remain the default choice, you can enable |
Beta Was this translation helpful? Give feedback.
This is wrong, if you set the same priority as the native socket implementation, then the native socket implementation will most likely be processed first, as the alphabetic order applies. If you want
ublox_sara_n310
to be the default choice, then it should have lower priority thanCONFIG_NET_SOCKETS_PRIORITY_DEFAULT
, ideally useCONFIG_NET_SOCKETS_OFFLOAD_PRIORITY
which has lower prioirty by default (lower priority == earlier processing).Optionally, if you want the native socket implementation to remain the default choice, you can enable
CONFIG_NET_SOCKETS_OFFLOAD_DISPATCHER
…