This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF9160 DK PSM current too high after opening and closing a TCP socket

Hi,

I tried the following AT settings on the nRF9160 DK board:

AT+CPSMS=1,,,"00111000","00011110"

AT+CFUN=1

After this the modem enters PSM mode and the current is about 6uA. So far so good.

When I do the same, but open a (valid) TCP socket and close the socket after the AT+CFUN=1 like:

sock = nrf_socket(NRF_AF_INETNRF_SOCK_STREAMNRF_IPPROTO_TCP)

nrf_connect(sock,...)

nrf_close( sock)

Then the following thing happens:

1) The floor current in PSM mode reaches 6uA

2) At a one second interval, the current increases to 14mA for a short time and falls back to 6uA. This leads to an average current of about 125uA.

What Can I do to stop the 1 second interval action during the PSM interval?

  • We are using our own ide, using the supplied libraries of Nordic Semiconductor.
  • bsd lib: v0.2.1
  • trace interrupt enabled, Interrupt calls bsd_os_trace_irq_handler(), no trace printout
  • The TCP connection is functional (open, send, recv...)

Best regards,

Houwer de Geus

Parents
  • Hi,

    At a one second interval, the current increases to 14mA for a short time and falls back to 6uA.

    I think it could be the idle time after the PSM TAU you are seeing. Before entering PSM, the device will be in idle mode DRX for a short while. See the images here, here and here:

  • Hi,

    To be more specific, the T3324 active timer is set to 60 seconds, the T3412 timer is set to 24 hours. After performing AT+CFUN=1, the device enters PSM mode (6uA) after 74 seconds, so slightly more than the 60 seconds active time. This is ok.

    After performing AT+CFUN=1 and opening a valid TCP socket (valid URL,port) and after closing that port without exchanging data, the device enters a state after 74 seconds in which it draws an average current of 580uA. 51 seconds later the average current drops to 125uA average, see my picture. So I waited even longer, about 30 minutes and the average current remains the same 125uA. It does not enter PSM mode with the expected 6uA. So my conclusion is, that I never reach the PSM mode.

    So a single TCP open and close is enough to NOT enter PSM mode.It looks like the device is polling every second for something. Can you tell me what happens during the polling? And how I can reach PSM mode without polling?

    Best regards,

    Houwer de Geus

  • Hi Sigurd,

    1) I will prepare this example. This will take some time. I will inform you when ready

    2) No, with UDP I see the same 74 seconds active time (average current about 3mA) followed by PSM mode of 6uA. One time I did see the 125uA active current for a few seconds after active time, but it ended in PSM mode with 6uA active current.

    3) With AT+CPSMS? I get the same values as requested (after registration succeeded, before opening the socket):

    +CPSMS: 1,,,"00111000","00011110"

    4) With AT+CGMR I get:

    mfw-m1_nrf9160_0.6.8-30.alpha

    I checked TCP again and I noticed once that the PSM mode was reached after 30 minutes, but  most of the time it did not get into PSM mode.

  • Hi Sigurd,

    Hereby I send you the example. The order is:

    • AT+CPSMS=1,,,"00111000","00011110"
    • AT+CFUN=1
    • Wait for registration using the iBasis SIM. It indicates roaming
    • Open TCP socket: socket_fd = nrf_socket(NRF_AF_INETNRF_SOCK_STREAMNRF_IPPROTO_TCP);
    • use nrf_getaddrinfo() to retrieve the IP adress.
    • Perform TCP connect: nrf_connect(socket_fd, &ipv4Address, sizeof(nrf_sockaddr_in_t))
      
    • Close the Socket: ret = nrf_close(pContext->socket_fd);
    • And wait until PSM mode is activated after about 60 seconds active time.

    nRF91NordicExample.zip

    Best Regards,

    Houwer de Geus

  • Hi,

    Thank you for the example. We have reproduced the issue with the unexpected 1s interval wakeups. We will fix this issue in a future release of the modem fw.

    Best regards,

    Sigurd

  • Is this issue fixed in version 1.2 of the modem firmware? I'm seeing the same 1 second wake ups after closing the socket and powering down the modem (AT+CFUN=0).

  • Thomas said:
    Is this issue fixed in version 1.2 of the modem firmware?

     Yes

    Thomas said:
    I'm seeing the same 1 second wake ups after closing the socket and powering down the modem (AT+CFUN=0).

    This is most likely not related to the modem firmware then, but a thread used in your application code.

    Please create a new case for your issue: https://devzone.nordicsemi.com/support/add

Reply Children
Related