zephyr: Cellular modem sample using Boron - Timeouts

Describe the bug Built cellular modem sample using a Particle Boron board that has SARA R4 modem. Application built and ran with timeouts. Modem powered up ok, and network interface seems to be fine. However, unable to get a L4 connection.

AT commands retrieved modem IMEI, type successfully. AT Commands respond with OK but get timeouts on a few, resulting in “L4 was not connected in time” message. Unsure if this is a regression, a new bug or a misconfiguration.

The cellular modem sample hasn’t been modified, only added the Boron devicetree/config changes as suggested in the README file.

Prior to flashing the Particle Boron with Zephyr, verified that the modem connectivity was working with original Particle Device OS and their Cloud services

To Reproduce Steps to reproduce the behavior:

  1. Add configuration for particle_boron in the cellular_modem project.

    cellular_modem/boards/particle_boron.conf:

       CONFIG_UART_ASYNC_API=y
       CONFIG_MODEM_CELLULAR_APN="internet"
       CONFIG_MODEM_UBLOX_SARA=n
  1. Also either enable RTT or use UART to view debug messages.

  2. Connect J-Link probe if using RTT.

  3. Add particle_boron.overlay in the the cellular_modem project.

    cellular_modem/boards/particle_boron.overlay:

/ {
	aliases {
		modem-uart = &uart1;
		modem = &sara_r4;
	};
};

&uart1 { /* u-blox SARA-U2 or SARA-R4 */
	current-speed = <115200>;
	status = "okay";

	hw-flow-control;

	pinctrl-0 = <&uart1_default>;
	pinctrl-1 = <&uart1_sleep>;
	pinctrl-names = "default", "sleep";
	sara_r4: sara_r4 {
			compatible = "u-blox,sara-r4";
			status = "okay";
	
			mdm-power-gpios = <&gpio0 16 0>;
			mdm-reset-gpios = <&gpio0 12 0>;
			mdm-vint-gpios = <&gpio0 2 0>;
	};
};

  1. Build project from CLI and “west flash”.

  2. Build should be successful and be able to run with debug messages on RTT or UART console.

Expected behavior On startup, application should power on the modem, bring up the net interface and L4 connection and then send a packet with pseudo random data to the specified test endpoint.

Impact It’s a showstopper, as unable to get a LTE connection.

Logs and console output

In the RTT output below, AT+CGSN displayed the correct IMEI. It’s shown as “IMEI hidden out”.

00> rtt:~$ *** Booting Zephyr OS build v3.7.0-4713-g091c6664c51b ***
00> rtt:~$ Powering on modem
00> rtt:~$ Bring up network interface
00> rtt:~$ Waiting for L4 connected
00> rtt:~$ rtt:~$ [00:00:11.753,936] <dbg> modem_chat: modem_chat_script_start: running script: u_blox_sara_r4_init_chat_script
00> rtt:~$ [00:00:11.753,967] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 0
00> rtt:~$ [00:00:11.753,997] <dbg> modem_chat: modem_chat_script_next: sending: AT
00> rtt:~$ [00:00:11.854,156] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 1
00> rtt:~$ [00:00:11.854,187] <dbg> modem_chat: modem_chat_script_next: sending: AT
00> rtt:~$ [00:00:11.954,315] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 2
00> rtt:~$ [00:00:11.954,345] <dbg> modem_chat: modem_chat_script_next: sending: AT
00> rtt:~$ [00:00:12.054,473] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 3
00> rtt:~$ [00:00:12.054,504] <dbg> modem_chat: modem_chat_script_next: sending: AT
00> rtt:~$ [00:00:12.154,632] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 4
00> rtt:~$ [00:00:12.154,693] <dbg> modem_chat: modem_chat_script_next: sending: ATE0
00> rtt:~$ rtt:~$ [00:00:12.213,226] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT
00> rtt:~$ [00:00:12.213,287] <dbg> modem_chat: modem_chat_log_received_command: OK
00> rtt:~$ [00:00:12.213,287] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 5
00> rtt:~$ [00:00:12.213,317] <dbg> modem_chat: modem_chat_script_next: sending: AT+CFUN=4
00> rtt:~$ [00:00:12.235,900] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT+CFUN=4
00> rtt:~$ [00:00:12.235,961] <dbg> modem_chat: modem_chat_log_received_command: OK
00> rtt:~$ [00:00:12.235,961] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 6
00> rtt:~$ [00:00:12.235,992] <dbg> modem_chat: modem_chat_script_next: sending: AT+CMEE=1
00> rtt:~$ [00:00:12.258,697] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT+CMEE=1
00> rtt:~$ [00:00:12.258,758] <dbg> modem_chat: modem_chat_log_received_command: OK
00> rtt:~$ [00:00:12.258,789] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 7
00> rtt:~$ [00:00:12.258,819] <dbg> modem_chat: modem_chat_script_next: sending: AT+CREG=1
00> rtt:~$ rtt:~$ [00:00:12.280,700] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT+CREG=1
00> rtt:~$ [00:00:12.280,822] <dbg> modem_chat: modem_chat_on_unknown_command_received: +CME ERROR: 13
00> rtt:~$ rtt:~$ [00:00:21.754,089] <wrn> modem_chat: u_blox_sara_r4_init_chat_script: timed out
00> rtt:~$ rtt:~$ [00:00:33.254,394] <dbg> modem_chat: modem_chat_script_start: running script: u_blox_sara_r4_init_chat_script
00> rtt:~$ [00:00:33.254,455] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 0
00> rtt:~$ [00:00:33.254,486] <dbg> modem_chat: modem_chat_script_next: sending: AT
00> rtt:~$ [00:00:33.354,614] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 1
00> rtt:~$ [00:00:33.354,644] <dbg> modem_chat: modem_chat_script_next: sending: AT
00> rtt:~$ [00:00:33.454,772] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 2
00> rtt:~$ [00:00:33.454,803] <dbg> modem_chat: modem_chat_script_next: sending: AT
00> rtt:~$ [00:00:33.554,931] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 3
00> rtt:~$ [00:00:33.554,962] <dbg> modem_chat: modem_chat_script_next: sending: AT
00> rtt:~$ [00:00:33.655,090] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 4
00> rtt:~$ [00:00:33.655,151] <dbg> modem_chat: modem_chat_script_next: sending: ATE0
00> rtt:~$ rtt:~$ [00:00:43.254,547] <wrn> modem_chat: u_blox_sara_r4_init_chat_script: timed out
00> rtt:~$ rtt:~$ [00:00:54.754,852] <dbg> modem_chat: modem_chat_script_start: running script: u_blox_sara_r4_init_chat_script
00> rtt:~$ [00:00:54.754,913] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 0
00> rtt:~$ [00:00:54.754,943] <dbg> modem_chat: modem_chat_script_next: sending: AT
00> rtt:~$ [00:00:54.779,205] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT
00> rtt:~$ [00:00:54.779,235] <dbg> modem_chat: modem_chat_on_unknown_command_received: OK
00> rtt:~$ [00:00:54.855,072] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 1
00> rtt:~$ [00:00:54.855,102] <dbg> modem_chat: modem_chat_script_next: sending: AT
00> rtt:~$ [00:00:54.879,180] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT
00> rtt:~$ [00:00:54.879,211] <dbg> modem_chat: modem_chat_on_unknown_command_received: OK
00> rtt:~$ [00:00:54.955,230] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 2
00> rtt:~$ [00:00:54.955,291] <dbg> modem_chat: modem_chat_script_next: sending: AT
00> rtt:~$ rtt:~$ [00:00:54.979,339] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT
00> rtt:~$ [00:00:54.979,370] <dbg> modem_chat: modem_chat_on_unknown_command_received: OK
00> rtt:~$ [00:00:55.055,389] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 3
00> rtt:~$ [00:00:55.055,419] <dbg> modem_chat: modem_chat_script_next: sending: AT
00> rtt:~$ [00:00:55.079,467] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT
00> rtt:~$ [00:00:55.079,498] <dbg> modem_chat: modem_chat_on_unknown_command_received: OK
00> rtt:~$ [00:00:55.155,548] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 4
00> rtt:~$ [00:00:55.155,578] <dbg> modem_chat: modem_chat_script_next: sending: ATE0
00> rtt:~$ [00:00:55.179,840] <dbg> modem_chat: modem_chat_on_unknown_command_received: ATE0
00> rtt:~$ [00:00:55.179,901] <dbg> modem_chat: modem_chat_log_received_command: OK
00> rtt:~$ [00:00:55.179,931] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 5
00> rtt:~$ [00:00:55.179,962] <dbg> modem_chat: modem_chat_script_next: sending: AT+CFUN=4
00> rtt:~$ rtt:~$ [00:00:55.205,200] <dbg> modem_chat: modem_chat_log_received_command: OK
00> rtt:~$ [00:00:55.205,230] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 6
00> rtt:~$ [00:00:55.205,261] <dbg> modem_chat: modem_chat_script_next: sending: AT+CMEE=1
00> rtt:~$ [00:00:55.230,102] <dbg> modem_chat: modem_chat_log_received_command: OK
00> rtt:~$ [00:00:55.230,133] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 7
00> rtt:~$ [00:00:55.230,163] <dbg> modem_chat: modem_chat_script_next: sending: AT+CREG=1
00> rtt:~$ [00:00:55.254,760] <dbg> modem_chat: modem_chat_log_received_command: OK
00> rtt:~$ [00:00:55.254,791] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 8
00> rtt:~$ [00:00:55.254,821] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGREG=1
00> rtt:~$ [00:00:55.279,632] <dbg> modem_chat: modem_chat_log_received_command: OK
00> rtt:~$ [00:00:55.279,663] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 9
00> rtt:~$ [00:00:55.279,693] <dbg> modem_chat: modem_chat_script_next: sending: AT+CEREG=1
00> rtt:~$ rtt:~$ [00:00:55.304,260] <dbg> modem_chat: modem_chat_log_received_command: OK
00> rtt:~$ [00:00:55.304,290] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 10
00> rtt:~$ [00:00:55.304,321] <dbg> modem_chat: modem_chat_script_next: sending: AT+CREG?
00> rtt:~$ [00:00:55.328,704] <dbg> modem_chat: modem_chat_log_received_command: +CREG:  1 0
00> rtt:~$ [00:00:55.328,765] <dbg> modem_chat: modem_chat_log_received_command: OK
00> rtt:~$ [00:00:55.328,796] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 11
00> rtt:~$ [00:00:55.328,826] <dbg> modem_chat: modem_chat_script_next: sending: AT+CEREG?
00> rtt:~$ [00:00:55.353,363] <dbg> modem_chat: modem_chat_log_received_command: +CEREG:  1 0
00> rtt:~$ [00:00:55.353,454] <dbg> modem_chat: modem_chat_log_received_command: OK
00> rtt:~$ [00:00:55.353,454] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 12
00> rtt:~$ [00:00:55.353,515] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGREG?
00> rtt:~$ rtt:~$ [00:00:55.378,051] <dbg> modem_chat: modem_chat_log_received_command: +CGREG:  1 4
00> rtt:~$ [00:00:55.378,112] <dbg> modem_chat: modem_chat_log_received_command: OK
00> rtt:~$ [00:00:55.378,143] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 13
00> rtt:~$ [00:00:55.378,173] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGSN
00> rtt:~$ [00:00:55.402,801] <dbg> modem_chat: modem_chat_log_received_command:  <IMEI hidden out>
00> rtt:~$ [00:00:55.402,832] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 14
00> rtt:~$ [00:00:55.402,893] <dbg> modem_chat: modem_chat_log_received_command: OK
00> rtt:~$ [00:00:55.402,923] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 15
00> rtt:~$ [00:00:55.402,954] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGMM
00> rtt:~$ [00:00:55.427,307] <dbg> modem_chat: modem_chat_log_received_command:  SARA-R410M-02B
00> rtt:~$ [00:00:55.427,337] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 16
00> rtt:~$ rtt:~$ [00:00:55.427,398] <dbg> modem_chat: modem_chat_log_received_command: OK
00> rtt:~$ [00:00:55.427,429] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_init_chat_script: step: 17
00> rtt:~$ [00:00:55.427,459] <dbg> modem_chat: modem_chat_script_next: sending: AT+CMUX=0,0,5,127
00> rtt:~$ rtt:~$ [00:00:55.455,902] <dbg> modem_chat: modem_chat_log_received_command: OK
00> rtt:~$ [00:00:55.455,932] <dbg> modem_chat: modem_chat_script_stop: u_blox_sara_r4_init_chat_script: complete
00> rtt:~$ [00:00:55.579,010] <inf> modem_at_shell: pipe connected
00> rtt:~$ [00:00:55.579,071] <inf> modem_at_shell: opening pipe
00> rtt:~$ [00:00:55.725,952] <dbg> modem_chat: modem_chat_script_start: running script: u_blox_sara_r4_dial_chat_script
00> rtt:~$ [00:00:55.725,982] <dbg> modem_chat: modem_chat_script_next: u_blox_sara_r4_dial_chat_script: step: 0
00> rtt:~$ [00:00:55.726,013] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGACT=0,1
00> rtt:~$ rtt:~$ [00:01:05.726,104] <wrn> modem_chat: u_blox_sara_r4_dial_chat_script: timed out
00> rtt:~$ rtt:~$ L4 was not connected in time
00> rtt:~$ rtt:~$

Environment (please complete the following information):

  • OS: macOS Sonoma 14.7.1
  • Toolchain: Zephyr SDK
  • Zephyr v3.7.0

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 32 (9 by maintainers)

Most upvoted comments

It is not the PSM I have confirmed that it is disabled.

I’d like to re-open this issue, as I plan to work on it this week. Thanks.