Hi!
I am using the Serial LTE Modem application from the nRF Connect SDK v.2.0.0
In the source code for this app, every call to:
Hi!
I am using the Serial LTE Modem application from the nRF Connect SDK v.2.0.0
In the source code for this app, every call to:
Hi !
It seems that the same hardcoded cid is present in calls to :
void util_get_ip_addr(int cid, char *addr4, char *addr6)
Running AT#XBIND will result in:
<err> slm_sock: Get local IPv4 address failed
If I tweak the SLM source code and pass the correct cid, then AT#XBIND and AT#XRECVFROM behaves as expected.
Regards
Hans Jørgen
Hi Hans Jørgen,
Currently, multiple PDP contexts are supported only by ICMP echo request #XPING and socket #XSOCKET. For socket send and receive, previously mentioned socket option can be used to bind secondary PDP context.
Best regards,
Dejan
Hi Hans Jørgen,
Currently, multiple PDP contexts are supported only by ICMP echo request #XPING and socket #XSOCKET. For socket send and receive, previously mentioned socket option can be used to bind secondary PDP context.
Best regards,
Dejan
Hi !
I am not trying to use multiple PDP contexts.
I created a new one using +CGDCONT and then deactivated the default context with +CGACT. I then ended up with a single active context with a context id == 1. The non-zero id breaks any attempts to use the context to transfer data in the SLM code.
The SLM code works just fine for AT#XSENDTO and AT#XRECVFROM if the correct (non-zero) cid is transferred in the calls to util_get_ip_addr and util_resolve_host, so I don't quite understand why it isn't supported.
The source code documentation for these two functions is also clear about this:
If it's the case that only a single context with an id of 0 is permitted in this version of SLM, maybe it would have been better to:
> For socket send and receive, previously mentioned socket option can be used to bind secondary PDP context.
Which socket option are you referring to ?
Best Regards
Hans Jørgen
Hi Hans Jørgen,
You could apply these changes. This should work regardless if your network allows non-zero primary context or not. Cid 0 is assumed as primary context (in init state), but it can be overridden with <cid> parameter in AT command.
Best regards,
Dejan