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

LTE-M Release assistance indication (RAI): How to indicate?

Regarding the new modem command AT%RAI, the documentation here says:

In addition to using the %RAI command, the application must tell when the data connection is not needed anymore through the application domain data socket interface. With the interface, the information can be given with the last data packet that is sent or after the application has received the data packet that ends the need for the connection. Each socket client tells their own need for the connection, and the information is combined in the modem domain.

How is this accomplished?  Is there an example somewhere of how I should get my application to tell when the data connection is not needed anymore through the application domain data socket interface?

Thanks

Parents
  • Hi,

    In nrf_modem v1.1.0 we introduced a set of socket options for this purpose.

    You can find the options and their documentation in nrf_socket.h.

    Note that they currently are only available on the master branch.

    Best regards,

    Didrik

  • Ok, I've tried out using various permutations of the RAI socket options without luck.  To give some perspective, here's a typical current profile wave form of an HTTPS send and receive:

    There's ~20 seconds of RRC connected mode that I'm trying to get rid of.  My assumption is that RAI should eliminate this.

    I'm enabling REL14FEAT and RAI with the following AT commands before LTE connection:

    AT%REL14FEAT=0,1,0,0,0

    AT%RAI=1

    I then:

    lte_lc_psm_req()

    lte_lc_init()

    lte_lc_connect()

    I then create a socket and configure with options:

    nrf_setsockopt(https_socket_fd, NRF_SOL_SOCKET, NRF_SO_RAI_LAST, NULL, 0)

    nrf_setsockopt(https_socket_fd, NRF_SOL_SOCKET, NRF_SO_RAI_ONE_RESP, NULL, 0)

    // tls configuration...

    // connect

    I then send a packet and block for response, and finally free memory and close the socket.

    Should I see the 20s RRC connected mode stuff disappear?  It's still there.  I have also tried:

    nrf_setsockopt(https_socket_fd, NRF_SOL_SOCKET, NRF_SO_RAI_NO_DATA, NULL, 0)

    Immediately after receiving response and before closing the socket, and there's no change.

    Am I doing this right?  Also, should I expect the 20s of RRC connected mode to be removed using RAI? At the moment, fully disconnecting and turning off the modem, and then turning it on again (avoiding the 20s impulses) has a lower average current by about 35%.

Reply
  • Ok, I've tried out using various permutations of the RAI socket options without luck.  To give some perspective, here's a typical current profile wave form of an HTTPS send and receive:

    There's ~20 seconds of RRC connected mode that I'm trying to get rid of.  My assumption is that RAI should eliminate this.

    I'm enabling REL14FEAT and RAI with the following AT commands before LTE connection:

    AT%REL14FEAT=0,1,0,0,0

    AT%RAI=1

    I then:

    lte_lc_psm_req()

    lte_lc_init()

    lte_lc_connect()

    I then create a socket and configure with options:

    nrf_setsockopt(https_socket_fd, NRF_SOL_SOCKET, NRF_SO_RAI_LAST, NULL, 0)

    nrf_setsockopt(https_socket_fd, NRF_SOL_SOCKET, NRF_SO_RAI_ONE_RESP, NULL, 0)

    // tls configuration...

    // connect

    I then send a packet and block for response, and finally free memory and close the socket.

    Should I see the 20s RRC connected mode stuff disappear?  It's still there.  I have also tried:

    nrf_setsockopt(https_socket_fd, NRF_SOL_SOCKET, NRF_SO_RAI_NO_DATA, NULL, 0)

    Immediately after receiving response and before closing the socket, and there's no change.

    Am I doing this right?  Also, should I expect the 20s of RRC connected mode to be removed using RAI? At the moment, fully disconnecting and turning off the modem, and then turning it on again (avoiding the 20s impulses) has a lower average current by about 35%.

Children
Related