How to measure DL/UL throughput with Thingy:91 ( no debbuger )

I would like to measure some basic parameters using Thingy:91.  Modem shell (MoSh) provides all the necessary tools. However, I was not able to build an image with iperf ( egion `FLASH' overflowed by 868 bytes) . Do I understand correctly that there is no other way to create such image when developing using USB flash ?

BR

Parents
  • Hi, 

    However, I was not able to build an image with iperf ( egion `FLASH' overflowed by 868 bytes)

    How do you build the Modem Shell sample? How do you modify the sample?

    In the Modem Shell sample, it already enables Iperf3 by CONFIG_MOSH_IPERF3=y

    Regards,
    Amanda H.

  • Hi ,

    I've modified prj.conf

    CONFIG_MOSH_IPERF3=y
    CONFIG_MOSH_SOCK=n
    CONFIG_MOSH_PING=n
    CONFIG_MOSH_CURL=n
    CONFIG_MOSH_LINK=y
    CONFIG_MOSH_SMS=n
    CONFIG_MOSH_GNSS=n
    CONFIG_MOSH_LOCATION=n

    and build failed with error

    region `FLASH' overflowed by 868 bytes

  • I intended to create a smaller image. Looks like I still have to learn a lot. I've prepared a clean build with following configuration

    CONFIG_MOSH_IPERF3=y
    CONFIG_MOSH_SOCK=y
    CONFIG_MOSH_PING=y
    CONFIG_MOSH_CURL=n
    CONFIG_MOSH_LINK=y
    CONFIG_MOSH_SMS=y
    CONFIG_MOSH_GNSS=n
    CONFIG_MOSH_LOCATION=n

    however iperf command is not visible

    Available commands:
      at                 :Execute an AT command.
      clear              :Clear screen.
      cloud_rest         :Send nRF Cloud command over REST
      date               :Date commands
      flash              :Flash shell commands
      heap               :Print heap usage statistics.
      help               :Prints the help message.
      history            :Command history.
      i2c                :I2C commands
      kernel             :Kernel commands
      link               :Commands for LTE link controlling and status information.
      log                :Commands for controlling logger
      nrf_clock_control  :Clock control commands
      ping               :For ping usage, just type "ping"
      print              :Commands for shell output formatting.
      regulator          :Regulator playground
      resize             :Console gets terminal screen size or assumes default in
                          case the readout fails. It must be executed after each
                          terminal width change to ensure correct text display.
      retval             :Print return value of most recent command
      shell              :Useful, not Unix-like shell commands.
      sleep              :Sleep for n seconds.
      startup_cmd        :Command to store MoSH commands to be run sequentially
                          after a bootup.
      uart               :Commands for disabling UARTs for power measurement.

  • finch said:
    I intended to create a smaller image.

    You could try to build with overlay-non-offloading.conf. 

    -Amanda H.

  • I did clean build

    overlay-non-offloading.conf

    CONFIG_MOSH_NRF91_NON_OFFLOADING_DEV=y

    CONFIG_MOSH_PPP=n
    CONFIG_MOSH_IPERF3=y
    CONFIG_MOSH_WORKER_THREADS=n
    CONFIG_MOSH_SOCK=n
    CONFIG_MOSH_PING=y
    CONFIG_MOSH_CURL=n
    CONFIG_MOSH_LINK=y
    CONFIG_MOSH_GNSS=n
    CONFIG_MOSH_SMS=n
    CONFIG_MOSH_LOCATION=n
    CONFIG_MOSH_REST=n
    CONFIG_MOSH_CLOUD_REST=n
    CONFIG_MOSH_AT_CMD_MODE=n
    CONFIG_MOSH_STARTUP_CMDS=n
    CONFIG_MOSH_FOTA=n

    Error :

    FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map
    cmd.exe /C "cd . && C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe  -gdwarf-4 @CMakeFiles\zephyr_pre0.rsp -o zephyr\zephyr_pre0.elf  && cmd.exe /C "cd /D C:\ncs\v2.5.0\nrf\samples\cellular\modem_shell\build_1\zephyr && C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.exe -E true""
    c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr\zephyr_pre0.elf section `rodata' will not fit in region `FLASH'
    c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: region `FLASH' overflowed by 15092 bytes
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' --build 'c:\ncs\v2.5.0\nrf\samples\cellular\modem_shell\build_1'

  • Do you only modify overlay-non-offloading.conf by CONFIG_MOSH_PING=y? 

    Are you able to build without issue with unmodified overlay-non-offloading.conf? 

  • same issue

    FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map
    cmd.exe /C "cd . && C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe  -gdwarf-4 @CMakeFiles\zephyr_pre0.rsp -o zephyr\zephyr_pre0.elf  && cmd.exe /C "cd /D C:\ncs\v2.5.0\nrf\samples\cellular\modem_shell\build\zephyr && C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.exe -E true""
    c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr\zephyr_pre0.elf section `rodata' will not fit in region `FLASH'
    c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: region `FLASH' overflowed by 21024 bytes
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' --build 'c:\ncs\v2.5.0\nrf\samples\cellular\modem_shell\build'

     *  The terminal process terminated with exit code: 1.
     *  Terminal will be reused by tasks, press any key to close it. 

    Is there modem_shell available for download with iperf ?

Reply
  • same issue

    FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map
    cmd.exe /C "cd . && C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe  -gdwarf-4 @CMakeFiles\zephyr_pre0.rsp -o zephyr\zephyr_pre0.elf  && cmd.exe /C "cd /D C:\ncs\v2.5.0\nrf\samples\cellular\modem_shell\build\zephyr && C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.exe -E true""
    c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: zephyr\zephyr_pre0.elf section `rodata' will not fit in region `FLASH'
    c:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd.exe: region `FLASH' overflowed by 21024 bytes
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' --build 'c:\ncs\v2.5.0\nrf\samples\cellular\modem_shell\build'

     *  The terminal process terminated with exit code: 1.
     *  Terminal will be reused by tasks, press any key to close it. 

    Is there modem_shell available for download with iperf ?

Children
  • Hi, 

    Forget overlay-non-offloading.conf. Try to modify prj.conf with

    CONFIG_MOSH_IPERF3=y
    CONFIG_MOSH_SOCK=n
    CONFIG_MOSH_PING=n
    CONFIG_MOSH_CURL=n
    CONFIG_MOSH_LINK=y
    CONFIG_MOSH_SMS=n
    CONFIG_MOSH_GNSS=n
    CONFIG_MOSH_LOCATION=n
    CONFIG_MOSH_CLOUD_REST=n
    CONFIG_MOSH_AT_CMD_MODE=n
    CONFIG_MOSH_STARTUP_CMDS=y # This is needed by iperf3

    This set seems to compile for me and ~30kB (10%) free flash. 

    -Amanda H.

  • some symbols are missing

    FAILED: CMakeFiles/app.dir/src/fota/fota.c.obj
    C:\ncs\toolchains\c57af46cb7\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DAPP_VERSION=v2.5.0 -DEXT_API_MAGIC=0x281ee6de,0xb845acea,23298 -DFIRMWARE_INFO_MAGIC=0x281ee6de,0x8fcebb4c,23298 -DKERNEL -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DMBEDTLS_USER_CONFIG_FILE=\"nrf-config-user.h\" -DNRF9160_XXAA -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DNRF_TRUSTZONE_NONSECURE -DPROJECT_NAME=MOSH -DTFM_PSA_API -DUSE_PARTITION_MANAGER=1 -D_ANSI_SOURCE -D_FORTIFY_SOURCE=1 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I../src -I../iperf -I../ping -I../utils -I../src/utils/. -I../src/uart/. -I../src/at/. -I../src/link/. -I../src/fota/. -I../src/rest/. -I../src/startup_cmd/. -I../src/cloud/. -IC:/ncs/v2.5.0/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/nrf91 -IC:/ncs/v2.5.0/zephyr/lib/libc/newlib/include -IC:/ncs/v2.5.0/zephyr/include/zephyr/posix -IC:/ncs/v2.5.0/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.5.0/zephyr/subsys/net/lib/sockets/. -IC:/ncs/v2.5.0/zephyr/subsys/net/ip -IC:/ncs/v2.5.0/zephyr/subsys/settings/include -IC:/ncs/v2.5.0/nrf/include -IC:/ncs/v2.5.0/nrf/ext/freebsd-getopt/. -IC:/ncs/v2.5.0/nrf/lib/at_cmd_parser/include -Itfm/install/interface/include -IC:/ncs/v2.5.0/nrf/subsys/net/lib/nrf_cloud/./include -IC:/ncs/v2.5.0/nrf/subsys/net/lib/fota_download/./include -IC:/ncs/v2.5.0/nrf/include/tfm -IC:/ncs/v2.5.0/nrf/tests/include -Itfm/generated/interface/include -IC:/ncs/v2.5.0/modules/lib/cjson -IC:/ncs/v2.5.0/nrf/modules/cjson/include -IC:/ncs/v2.5.0/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.5.0/zephyr/modules/cmsis/. -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.5.0/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.5.0/zephyr/modules/hal_nordic/nrfx/. -IC:/ncs/v2.5.0/nrfxlib/nrf_modem/include -I../src/print/. -I../src/th/. -Imodules/nrf/subsys/nrf_security/src/include/generated -IC:/ncs/v2.5.0/nrf/subsys/nrf_security/include -IC:/ncs/v2.5.0/nrf/ext/oberon/psa/core/include -IC:/ncs/v2.5.0/nrf/ext/oberon/psa/core/library -IC:/ncs/v2.5.0/modules/crypto/mbedtls/include -IC:/ncs/v2.5.0/modules/crypto/mbedtls/library -IC:/ncs/v2.5.0/nrfxlib/crypto/nrf_oberon/include/mbedtls -IC:/ncs/v2.5.0/nrfxlib/crypto/nrf_oberon/include -IC:/ncs/v2.5.0/nrf/ext/iperf3/. -fno-strict-aliasing -Os -imacros C:/ncs/v2.5.0/nrf/samples/cellular/modem_shell/build/zephyr/include/generated/autoconf.h -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mfp16-format=ieee --sysroot=C:/ncs/toolchains/c57af46cb7/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.5.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=C:/ncs/v2.5.0/nrf/samples/cellular/modem_shell=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.5.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.5.0=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -D_POSIX_THREADS -std=c99 -MD -MT CMakeFiles/app.dir/src/fota/fota.c.obj -MF CMakeFiles\app.dir\src\fota\fota.c.obj.d -o CMakeFiles/app.dir/src/fota/fota.c.obj -c ../src/fota/fota.c
    ../src/fota/fota.c: In function 'fota_start':
    ../src/fota/fota.c:113:48: error: 'CONFIG_NRF_CLOUD_SEC_TAG' undeclared (first use in this function); did you mean 'CONFIG_NRF_CLOUD_AGNSS'?
      113 |         return fota_download_start(host, file, CONFIG_NRF_CLOUD_SEC_TAG, 0, 0);
          |                                                ^~~~~~~~~~~~~~~~~~~~~~~~
          |                                                CONFIG_NRF_CLOUD_AGNSS
    ../src/fota/fota.c:113:48: note: each undeclared identifier is reported only once for each function it appears in
    ../src/fota/fota.c:114:1: warning: control reaches end of non-void function [-Wreturn-type]
      114 | }
          | ^
    [77/401] Building C object CMakeFiles/app.dir/src/link/link_shell.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\c57af46cb7\opt\bin\cmake.EXE' --build 'c:\ncs\v2.5.0\nrf\samples\cellular\modem_shell\build'

     *  The terminal process terminated with exit code: 1.
     *  Terminal will be reused by tasks, press any key to close it.

  • Hi, 

    Could you try to build this modem_shell.7z sample with overlay-iperf3.conf?
    The west command:

    west build -p -b thingy91_nrf9160_ns -d build_thingy91_nrf9160_ns -- -DOVERLAY_CONFIG=overlay-iperf3.conf

    -Amanda H.

  • Thanks . Now it works. It looks like I need to study more toolchains.

    > iperf3 --client paris.testdebit.info --port 9200 -l 3540 --time 30 -V -R
    mosh:~$ iperf3 540 --t -R
    iperf 3.9-nrf
    nrf9160
    RRC mode: Connected
    Control connection MSS: using modem default
    Time: Wed, 06 Dec 2023 09:18:15 GMT
    Connecting to host paris.testdebit.info, port 9200
    Reverse mode, remote host paris.testdebit.info is sending
          Cookie: nrf9160.1701854294.831542.70a3a52b28
          TCP MSS: 0 (default)
    [  4] local 0.0.0.0 port 0 connected to 89.84.1.194 port 9200
    stream [0]: socket: 4 read: 1 write: 0
    Starting Test: protocol: TCP, 1 streams, 3540 byte blocks, omitting 0 seconds, 30 second test, tos 0
    [ ID] Interval           Transfer     Bitrate
    [  4]   0.00-1.01   sec  3.46 KBytes  28.1 Kbits/sec                  
    [  4]   1.01-2.01   sec  4.15 KBytes  34.0 Kbits/sec                  
    [  4]   2.01-3.01   sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]   3.01-4.01   sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]   4.01-5.01   sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]   5.01-6.01   sec  4.15 KBytes  34.0 Kbits/sec                  
    [  4]   6.01-7.01   sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]   7.01-8.01   sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]   8.01-9.01   sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]   9.01-10.01  sec  4.15 KBytes  34.0 Kbits/sec                  
    [  4]  10.01-11.01  sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]  11.01-12.01  sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]  12.01-13.01  sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]  13.01-14.01  sec  4.15 KBytes  34.0 Kbits/sec                  
    [  4]  14.01-15.01  sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]  15.01-16.01  sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]  16.01-17.01  sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]  17.01-18.01  sec  4.15 KBytes  34.0 Kbits/sec                  
    [  4]  18.01-19.01  sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]  19.01-20.01  sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]  20.01-21.01  sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]  21.01-22.01  sec  4.15 KBytes  34.0 Kbits/sec                  
    [  4]  22.01-23.01  sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]  23.01-24.01  sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]  24.01-25.01  sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]  25.01-26.01  sec  4.15 KBytes  34.0 Kbits/sec                  
    [  4]  26.01-27.01  sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]  27.01-28.01  sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]  28.01-29.01  sec  3.46 KBytes  28.3 Kbits/sec                  
    [  4]  29.01-30.01  sec  4.15 KBytes  34.0 Kbits/sec                  
    - - - - - - - - - - - - - - - - - - - - - - - - -
    Test Complete. Summary Results:
    [ ID] Interval           Transfer     Bitrate         Retr
    [  4]   0.00-31.68  sec   177 KBytes  45.8 Kbits/sec    0             sender
    [  4]   0.00-30.01  sec   109 KBytes  29.8 Kbits/sec                  receiver
    snd_tcp_congestion bbr
    iperf Done.
    RRC mode: Idle

Related