https_client sample - configuration on README

Hello,

I am starting to test the sample "https_client" on nrf9160 and expected to see it working (through LTE modem)

The execution hangs on the line  k_sem_take(&network_connected_sem, K_FOREVER);  just before the call of   send_http_request();  so I tried to understand whether I missed some step.

I am using:   boards/nrf9160dk_nrf9160_ns.conf     proj.conf,  and overlay-tfm-nrf91.conf

I noticed there is an instruction on the README (figure below).  I am not sure I have understood the last lines (modem case).  Would it be something to be configured in the nrf91 previously?

I have found a similar file "modem_trace.rst" under a similar path "nrfxlib/nrf_modem/doc" and read it.   What a trace has to do with configuration?   Is there any step I am missing that could explain the hangout?

Many thanks,

Configuration
*************

.. include:: /includes/wifi_credentials_shell.txt

.. include:: /includes/wifi_credentials_static.txt

.. include:: /libraries/modem/nrf_modem_lib/nrf_modem_lib_trace.rst
:start-after: modem_lib_sending_traces_UART_start
:end-before: modem_lib_sending_traces_UART_end
Parents
  • Hi,

    Building HTTPS client sample for nRF9160DK should just work without any other config file.

    Can you confirm your SIM card can connect with local network? 

    You can use assert tracker V2 sample or SLM ping command.

    Best regards,

    Charlie

  • Hi Charlie

    I can see the log "Connecting to the network" and a log "Connection sucessful" I put as below

    err = conn_mgr_all_if_connect(true);
    if (err) {
    printk("conn_mgr_all_if_connect, error: %d\n", err);
    return 0;
    }
    else
    printk("Connection sucessful \n");

    I am going to test the ping command but before I need to confirm:

    - in the https_client/boards/nrf9151dk_nrf9151_ns.conf (used to build the https_client)  I cannot see the options below:

    # Modem Library
    CONFIG_NRF_MODEM_LIB=y

    CONFIG_MODEM_KEY_MGMT=y

    # LTE Link Control
    CONFIG_LTE_LINK_CONTROL=y

    These options are enabled for the sample lte_ble_gateway.   Would not them be needed for the https_client work through LTE as well?

    Thanks

  • Hi,

    I checked 2.7.0\nrf\samples\net\https_client\build\https_client\zephyr\.config, which is list all the configuration used by building process.

    The configurations you mentioned are enabled in ".config". They are configured either by default in Kconfig files or prj.conf and  nrf\samples\net\https_client\boards\nrf9151dk_nrf9151_ns.conf(which includes CONFIG_LTE_LINK_CONTROL=y).

    Following is a ping test sample to verify network connection. 

    > AT+CEREG=5
    
    OK
    > AT%XSYSTEMMODE=1,1,1,0
    
    OK
    > AT%XSYSTEMMODE?
    
    %XSYSTEMMODE: 1,1,1,0
    
    OK
    > AT+CFUN=1
    
    OK
    
    +CEREG: 2,"81A3","03238D0A",7
    
    +CEREG: 1,"81A3","03238D0A",7,0,2,"11100000","11100000"
    > AT+CGDCONT?
    
    +CGDCONT: 0,"IPV4V6","telenor.iot","10.241.198.xxxx 2A02:2121:0203:5892:0000:0066:CE82:xxxx",0,0
    
    OK
    > AT#XPING="www.google.com",45,5000,5,1000
    
    OK
    #XPING: 0.088 seconds
    #XPING: 0.198 seconds
    #XPING: 0.165 seconds
    #XPING: 0.136 seconds
    #XPING: 0.214 seconds
    #XPING: average 0.160 seconds

    Best regards,

    Charlie

  • Thanks for the explanation Charlie

    After updating to toolchain v2.7.0 I managed to get the results as expected for this sample:

    00> Looking up example.com
    00> Resolved 93.184.215.14 (AF_INET)
    00> Connecting to example.com:443
    00> Sent 61 bytes
    00> Received 372 bytes
    00>
    00> >   HTTP/1.1 200 OK

    Since I am using RTT to see the logs I just had to add these options to the prj.conf:

    # Logging
    CONFIG_LOG=y
    CONFIG_LOG_PRINTK=y
    CONFIG_USE_SEGGER_RTT=y
Reply
  • Thanks for the explanation Charlie

    After updating to toolchain v2.7.0 I managed to get the results as expected for this sample:

    00> Looking up example.com
    00> Resolved 93.184.215.14 (AF_INET)
    00> Connecting to example.com:443
    00> Sent 61 bytes
    00> Received 372 bytes
    00>
    00> >   HTTP/1.1 200 OK

    Since I am using RTT to see the logs I just had to add these options to the prj.conf:

    # Logging
    CONFIG_LOG=y
    CONFIG_LOG_PRINTK=y
    CONFIG_USE_SEGGER_RTT=y
Children
No Data
Related