Open dkhayes117 opened 1 year ago
I added the ffi::get_last_error()
function after I socket.send(...)
and it shows error code 127. Based on the Nordic SDK the error means Key has expired
. However, some of my payloads successfully made it to the cloud, and my PSK info is correct.
So this is kinda weird. The error comes from the place where we turn off the sim card. Somebody noticed that the power draw was a bit higher than expected and turning off the sim would fix that. All was well, but there's now (since 4 days ago!) a v2.2 of the nrf9160 at commands specification.
It added a new note to the cereg
set command:
• The response for CFUN=40 is ERROR if the modem has been activated with CFUN=1 or CFUN=21.
This is new! Are you using the new 1.3.4
modem firmware? They released that one in tandem with the v2.2 at commands.
The annoying thing though is that the new note is kinda ambiguous. We do activate the LTE modem with CFUN=21
. However, we also deactivate it with CFUN=20
before we do CFUN=40
. There are three meanings to be found:
21
?21
the LAST TIME?21
the last time AND is it still active?I would find the last one most reasonable. But who knows.
@dkhayes117 can you do these two things for me? It might give some clarification.
nrf-modem
. Going back shouldn't give any compilation errors if you don't use the new SMS feature. This version doesn't use the command where it goes wrong here. This is just a sanity check to see if this is really a regression in the new version.deactivate
function in version 0.2.0 instead of using the normal drop. I want to see if there's a difference between the APIs. Doing that, btw, makes an error be returned instead of unwrapped.Using nrf-modem v0.1.1
, everything worked without any errors and did not panic. I couldn't try deactivate()
as the socket is being held in a struct and this would move the socket.
I think the modem firmware is v1.3.2, but I will have to double check that later.
I've asked for clarification on their forum: https://devzone.nordicsemi.com/f/nordic-q-a/96170/ambiguous-new-note-for-cfun-at-command-nrf9160
I'm using the DTLS Socket with LTE-M. It seems to connect to the cloud fine and send the data, but right after I see the
drop()
function called, I get an unwrap error.