sparkfun NRF9160 thing plus Serial LTE Modem Help

I have the sparkfun NRF9160 thing plus, and using the NRF Connect SDK v1.8.0 in visual studio code I can load programs like Blinky and hello world and everything works great. When I try to upload the Serial LTE Modem Example, I will not build. I get the following error:

^~~~~~
c:\Users\David\Desktop\LTETHREE\SERmodem\src\slm_at_host.c:248:14: note: in expansion of macro 'DT_NODELABEL'
248 | DT_PROP(DT_NODELABEL(uart0), rts_pin),
| ^~~~~~~~~~~~
c:\Users\David\Desktop\LTETHREE\SERmodem\build\zephyr\include\generated\devicetree_unfixed.h:5386:38: error: 'DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_cts_pin' undeclared (first use in this function); did you mean 'DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_tx_pin'?
5386 | #define DT_N_NODELABEL_uart0 DT_N_S_soc_S_peripheral_40000000_S_uart_8000
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in definition of macro 'DT_CAT'
2641 | #define DT_CAT(a1, a2) a1 ## a2
| ^~
c:\Users\David\Desktop\LTETHREE\SERmodem\src\slm_at_host.c:249:6: note: in expansion of macro 'DT_PROP'
249 | DT_PROP(DT_NODELABEL(uart0), cts_pin));
| ^~~~~~~
C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in expansion of macro 'DT_N_NODELABEL_uart0'
2641 | #define DT_CAT(a1, a2) a1 ## a2
| ^~
C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:177:29: note: in expansion of macro 'DT_CAT'
177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
| ^~~~~~
c:\Users\David\Desktop\LTETHREE\SERmodem\src\slm_at_host.c:249:14: note: in expansion of macro 'DT_NODELABEL'
249 | DT_PROP(DT_NODELABEL(uart0), cts_pin));
| ^~~~~~~~~~~~
[113/319] Linking C static library modules\segger\libmodules__segger.a
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: 'c:\Users\David\ncs\v1.8.0\toolchain\opt\bin\cmake.EXE' --build 'c:\Users\David\Desktop\LTETHREE\SERmodem\build'
The terminal process terminated with exit code: 1.

I'm assuming I need to change something in a configuration file, is that correct?

Thanks in advance!

Parents
  • Hi,

     

    The log shows that rts and cts is undefined:

    DT_PROP(DT_NODELABEL(uart0), cts_pin));

    If you create a DTS overlay file for your board, holding this to basically set the RTS/CTS to "disconnected" (you can ofcourse set them to valid gpio numbers if you'd like):

    &uart0 {
    	cts-pin = <0xFFFFFFFF>;
    	rts-pin = <0xFFFFFFFF>;
    };
    

     

    and place this in boards/sparkfun_thing_plus_nrf9160_ns.overlay, then it should compile.

    PS: remember to re-configure the build after making changes to the DTS.

     

    Kind regards,

    Håkon

  • Thanks,

    Unfortunately this gave a very similar error:

    c:\Users\David\Desktop\acv\vca\build\zephyr\include\generated\devicetree_unfixed.h:5127:38: error: 'DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_rts_pin' undeclared (first use in this function); did you mean 'DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_tx_pin'?
    5127 | #define DT_N_NODELABEL_uart0 DT_N_S_soc_S_peripheral_40000000_S_uart_8000
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in definition of macro 'DT_CAT'
    2641 | #define DT_CAT(a1, a2) a1 ## a2
    | ^~
    c:\Users\David\Desktop\acv\vca\src\slm_at_host.c:248:6: note: in expansion of macro 'DT_PROP'
    248 | DT_PROP(DT_NODELABEL(uart0), rts_pin),
    | ^~~~~~~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in expansion of macro 'DT_N_NODELABEL_uart0'
    2641 | #define DT_CAT(a1, a2) a1 ## a2
    | ^~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:177:29: note: in expansion of macro 'DT_CAT'
    177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
    | ^~~~~~
    c:\Users\David\Desktop\acv\vca\src\slm_at_host.c:248:14: note: in expansion of macro 'DT_NODELABEL'
    248 | DT_PROP(DT_NODELABEL(uart0), rts_pin),
    | ^~~~~~~~~~~~
    c:\Users\David\Desktop\acv\vca\build\zephyr\include\generated\devicetree_unfixed.h:5127:38: note: each undeclared identifier is reported only once for each function it appears in
    5127 | #define DT_N_NODELABEL_uart0 DT_N_S_soc_S_peripheral_40000000_S_uart_8000
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in definition of macro 'DT_CAT'
    2641 | #define DT_CAT(a1, a2) a1 ## a2
    | ^~
    c:\Users\David\Desktop\acv\vca\src\slm_at_host.c:248:6: note: in expansion of macro 'DT_PROP'
    248 | DT_PROP(DT_NODELABEL(uart0), rts_pin),
    | ^~~~~~~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in expansion of macro 'DT_N_NODELABEL_uart0'
    2641 | #define DT_CAT(a1, a2) a1 ## a2
    | ^~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:177:29: note: in expansion of macro 'DT_CAT'
    177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
    | ^~~~~~
    c:\Users\David\Desktop\acv\vca\src\slm_at_host.c:248:14: note: in expansion of macro 'DT_NODELABEL'
    248 | DT_PROP(DT_NODELABEL(uart0), rts_pin),
    | ^~~~~~~~~~~~
    c:\Users\David\Desktop\acv\vca\build\zephyr\include\generated\devicetree_unfixed.h:5127:38: error: 'DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_cts_pin' undeclared (first use in this function); did you mean 'DT_N_S_soc_S_peripheral_40000000_S_uart_8000_P_tx_pin'?
    5127 | #define DT_N_NODELABEL_uart0 DT_N_S_soc_S_peripheral_40000000_S_uart_8000
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in definition of macro 'DT_CAT'
    2641 | #define DT_CAT(a1, a2) a1 ## a2
    | ^~
    c:\Users\David\Desktop\acv\vca\src\slm_at_host.c:249:6: note: in expansion of macro 'DT_PROP'
    249 | DT_PROP(DT_NODELABEL(uart0), cts_pin));
    | ^~~~~~~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:2641:24: note: in expansion of macro 'DT_N_NODELABEL_uart0'
    2641 | #define DT_CAT(a1, a2) a1 ## a2
    | ^~
    C:\Users\David\ncs\v1.8.0\zephyr\include\devicetree.h:177:29: note: in expansion of macro 'DT_CAT'
    177 | #define DT_NODELABEL(label) DT_CAT(DT_N_NODELABEL_, label)
    | ^~~~~~
    c:\Users\David\Desktop\acv\vca\src\slm_at_host.c:249:14: note: in expansion of macro 'DT_NODELABEL'
    249 | DT_PROP(DT_NODELABEL(uart0), cts_pin));
    | ^~~~~~~~~~~~
    [117/313] Building C object CMakeFiles/app.dir/src/slm_at_commands.c.obj
    [118/313] Building C object CMakeFiles/app.dir/src/slm_at_tcp_proxy.c.obj
    [119/313] Building C object CMakeFiles/app.dir/src/slm_at_udp_proxy.c.obj
    [120/313] Building C object CMakeFiles/app.dir/src/slm_at_icmp.c.obj
    [121/313] Building C object CMakeFiles/app.dir/src/slm_at_socket.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'c:\Users\David\ncs\v1.8.0\toolchain\opt\bin\cmake.EXE' --build 'c:\Users\David\Desktop\acv\vca\build'
    The terminal process terminated with exit code: 1. 

  • Hi,

     

    Did you reconfigure your build?

    Ie. delete the build folder and re-generate the project.

     

    Kind regards,

    Håkon

  • I did and it still didn't work. I was using the 1.8.0 version of the SDK. After rolling back to the 1.7.1 version, it did work! thanks for the help. I also ran into an issue where the documentation for the Serial LTE Modem was incorrect. I am using documentation from 1.6.0 and that is working. 

  • Hi,

     

    In case I did something wrong at my end, I re-tested with ncs v1.7.x and ncs v1.8.0.

    in ncs/nrf/applications/serial_lte_modem/boards catalog, I added the sparkfun thing board "sparkfun_thing_plus_nrf9160_ns.overlay", with this content:

    &uart0 {
    	cts-pin = <0xFFFFFFFF>;
    	rts-pin = <0xFFFFFFFF>;
    };

    Works on both versions at my end.

     

    DC Innovation said:
    I also ran into an issue where the documentation for the Serial LTE Modem was incorrect. I am using documentation from 1.6.0 and that is working. 

    Oh, that is not good! My apologies for this! Could you point me to where the docs were misleading?

     

    Kind regards,

    Håkon

Reply
  • Hi,

     

    In case I did something wrong at my end, I re-tested with ncs v1.7.x and ncs v1.8.0.

    in ncs/nrf/applications/serial_lte_modem/boards catalog, I added the sparkfun thing board "sparkfun_thing_plus_nrf9160_ns.overlay", with this content:

    &uart0 {
    	cts-pin = <0xFFFFFFFF>;
    	rts-pin = <0xFFFFFFFF>;
    };

    Works on both versions at my end.

     

    DC Innovation said:
    I also ran into an issue where the documentation for the Serial LTE Modem was incorrect. I am using documentation from 1.6.0 and that is working. 

    Oh, that is not good! My apologies for this! Could you point me to where the docs were misleading?

     

    Kind regards,

    Håkon

Children
  • The documentation for version 1.7.1 in the MQTT AT commands doesn't list the data type as an argument when publishing. Here is the example:

    AT#XMQTTPUB="nrf91/slm/mqtt/topic0","Test message with QoS 0",0,0

    After successfully uploading 1.7.1, I tried to publish data, but without the data type argument the modem would get stuck in a publish mode.

    When I tried the documentation from 1.6.1, I saw a data type mentioned and tried to publish data starting with this example:

    AT#XMQTTPUB="nrf91/slm/mqtt/topic0",1,"Test message with QoS 0",0,0

    At this point everything works as expected!
Related