This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

GSM Modem Sample Project on nRF 5340 App

Hi. I am trying to get the gsm modem sample project to work with an nRF 5340 app and a Nimbelink LTE modem, NL-SW-LTE-TC4NAG. The only change I made to the project was to add a new file in the boards directory for the 5340. The nrf5340dk_nrf5340_cpuapp.overlay file is below.

The problem is that `uart_dev` is null. The console output I get is below.

I'm not sure if this is a configuration issue or if the modem is not up when `device_get_binding()` is called. What am I missing?

sample_gsm_ppp: Board 'nrf5340dk_nrf5340_cpuapp' APN 'internet' UART 'UART_1' device (nil) (modem_gsm)

&uart0 {
    compatible = "zephyr,gsm-ppp"; // also tried: gsm_ppp,MODEM_GSM_PPP,modem_gsm
    label = "UART_1";
	status = "okay";
	current-speed = <115200>;

	gsm: gsm-modem {
		compatible = "zephyr,gsm-ppp";
		label = "gsm_ppp";
	};
};

Parents
  • Hello Justin,

    I'm not sure if this is a configuration issue or if the modem is not up when `device_get_binding()` is called. What am I missing?

    First of all, you might not want to change the compatible of the UART since that will make the peripheral non-functional.

    The sample uses UART_1, which is disabled for nrf5340_cpuapp by default.

    uart1: arduino_serial: uart@9000 {
    				compatible = "nordic,nrf-uarte";
    				reg = < 0x9000 0x1000 >;
    				interrupts = < 0x9 0x1 >;
    				status = "disabled";
    				label = "UART_1";
    				current-speed = < 0x1c200 >;
    				tx-pin = < 0x21 >;
    				rx-pin = < 0x20 >;
    			};

    To enable it, you have to enable the periperhal in your overlay file:

    &uart1 {
        status = "okay";
    };

    With this change, the samples provides the following output on my nRF5340 DK, which looks correct to me:

    Velkommen til minicom 2.8
    
    MULIGHETER: I18n 
    Port /dev/ttyACM2, 16:10:55
    
    Trykk CTRL-A Z for hjelp om spesialtaster
    
    *** Booting Zephyr OS build v2.6.99-ncs1  ***
    
    
    [00:00:00.434,051] <inf> sample_gsm_ppp: Board 'nrf5340dk_nrf5340_cpuapp' APN 'internet' UART 'UART_1' device 0x1631c (modem_gsm)
    uart:~$ 

    I hope this will help you.

    Regards,

    Markus

Reply
  • Hello Justin,

    I'm not sure if this is a configuration issue or if the modem is not up when `device_get_binding()` is called. What am I missing?

    First of all, you might not want to change the compatible of the UART since that will make the peripheral non-functional.

    The sample uses UART_1, which is disabled for nrf5340_cpuapp by default.

    uart1: arduino_serial: uart@9000 {
    				compatible = "nordic,nrf-uarte";
    				reg = < 0x9000 0x1000 >;
    				interrupts = < 0x9 0x1 >;
    				status = "disabled";
    				label = "UART_1";
    				current-speed = < 0x1c200 >;
    				tx-pin = < 0x21 >;
    				rx-pin = < 0x20 >;
    			};

    To enable it, you have to enable the periperhal in your overlay file:

    &uart1 {
        status = "okay";
    };

    With this change, the samples provides the following output on my nRF5340 DK, which looks correct to me:

    Velkommen til minicom 2.8
    
    MULIGHETER: I18n 
    Port /dev/ttyACM2, 16:10:55
    
    Trykk CTRL-A Z for hjelp om spesialtaster
    
    *** Booting Zephyr OS build v2.6.99-ncs1  ***
    
    
    [00:00:00.434,051] <inf> sample_gsm_ppp: Board 'nrf5340dk_nrf5340_cpuapp' APN 'internet' UART 'UART_1' device 0x1631c (modem_gsm)
    uart:~$ 

    I hope this will help you.

    Regards,

    Markus

Children
  • Thank you, this helps some. I have new found information if you can help me out with this. The modem will be ran from the net core on non standard pins for TX, RX, RTS, & CTS. Given this, do I need to only need to set the pins in my overlay file for UART 0. Or will setting this for UART1 on net core be ok?

    Custom Pins:

    • TX: P 0.03
    • RX: P0.08
    • RTS: P0.02
    • CTS: P0.07

    The default config for UART 0 is below, nrf5340dk_nrf5340_cpunet.dts. Note, I'm not sure how to get the `<` & `>` in the code below. 

    Is this correct for the pin number for TX: `tx-pin = <3>;`?

    From Zephyr:

    &uart0 {
    	status = "okay";
    	current-speed = <  115200  >;
    	tx-pin = <33>;
    	rx-pin = <32>;
    	rx-pull-up;
    	rts-pin = <11>;
    	cts-pin = <10>;
    	cts-pull-up;
    };

    Custom Overlay:

    &uart0 {
    	status = "okay";
    	tx-pin = 3;
    	rx-pin = 8;
    	rts-pin = 2;
    	cts-pin = 7;
    };

Related