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

NIDD testing with Modem Shell - nRF9160 (NB-IoT)

Hi 

the new nRF9160 Modem FW 1.3 supports Non Ip Data Delivery (NIDD)  on NB-IoT
In nRF Connect SDK, there is a new example that can be used to test some modem functionalities from a PC: Modem Shell (MoSh)

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/modem_shell/README.html 

Based on my understanding, to use NIDD, it is needed to set PDP context to Non IP, activate a connection(PDN?) and then use Raw sockets to send and receive data.

Which are the commands that needs to be used from the MoSH, in order to test the full functionality (including sending some Bytes of data)?

Thanks

Lorenzo

  • Hi Lorenzo, 

    As the Modem Shell is new to NCS in v1.6.0-rc2, I will need to talk to the developers on the usage. 

    In regards to NIDD, there was a question on this about a month ago. Please see more information here.

    Kind regards,
    Øyvind

  • Thanks. Yes, when more info available from developers on using it with Modem Shell, please share it here.

    Thanks

    Lorenzo

  • Hi Lorenzo, 

    Unfortunately, the NIDD functionality has not been tested in the current version of NCS due to HW issues in the developer team. But from earlier testing the team provides the following example which requires network support:


    #create and activate context (note: activation fails if not supported by the network)
    mosh:~$ link connect -a "nonip.apn" -f "non-ip"
    PDN event: PDP context 1 activated
    Created and activated a new PDP context: CID 1, PDN ID 1
    
    #create a packet/raw socket and bind to created PDN context
    mosh:~$ sock connect -f packet -t raw --cid 1
    Socket open and connect family=3, type=3, port=0, bind_port=0, pdn_cid=1, address=
    Socket created socket_id=0, fd=4
    #send data to a created socket
    
    mosh:~$ sock send -d foodata -i 0
    Socket data send:
            foodata
    RRC mode: Connected
    mosh:~$
    


    mosh:~$ link funmode --pwroff
    Network registration status: not registered
    
    mosh:~$ link defcont -e -a "non-ip.apn" -f "non-ip"
    link defcont enabled
    
    mosh:~$ link funmode --normal
    Functional mode set successfully: normal
    Network registration status: Connected - home network
    etc etc
    
    mosh:~$ sock connect -f packet -t raw
    Socket open and connect family=3, type=3, port=0, bind_port=0, pdn_cid=0, address=
    Socket created socket_id=0, fd=4
    
    mosh:~$ sock send -d foodata2 -i 0
    Socket data send:
            foodata2
    RRC mode: Connected
    RRC mode: Idle
    
    mosh:~$
    

    Kind regards, 
    Øyvind

  • Hi Øyvind,

    you sent two block of commands. What is the difference between the two? 

    Thanks

  • Hello Lorenzo, 

    nLorami said:
    What is the difference between the two? 

    I'm not sure, as this is fairly new and not tested extensively yet

    Without having tested this myself, I see that the first block connects to a given apn by creating and activating a new PDP context, then it connects a socket and send data on this socket.

    The last one powers of the device to set custom PDP context 

    defcont:      Set custom default PDP context config.
                    Persistent between the sessions.
                    Effective when going to normal mode.
    

    In the Modem Shell sample, you can type help to view available commands.

    Kind regards,
    Øyvind

Related