Issue with BG95 PPP Mode on Zephyr - Stuck in Loop

Hello, I am trying to run a basic Cellular Modem example on an STM32H573I-DK board using a Quectel BG95 modem. The project is built using Zephyr 4.0.0. While the modem is detected and initialized successfully, it fails to fully enter PPP mode and gets stuck at “L4 connected”. Eventually, it starts continuously executing the periodic chat script without proceeding further.

Device tree overlay used:

/ {

aliases {

modem = &modem;

};

};

&usart3 {

current-speed = <115200>;

pinctrl-names = "default";

status = "okay";

pinctrl-0 = <&usart3_tx_pb10 &usart3_rx_pb11>;

modem: modem {

compatible = "quectel,bg95";

status = "okay";

mdm-power-gpios = <&gpiog 15 GPIO_ACTIVE_LOW>;

};

};

/ {

arduino_header: connector {

gpio-map = <>;

};

};

Configuration used:

CONFIG_UART_ASYNC_API=n

CONFIG_SERIAL=y

CONFIG_UART_INTERRUPT_DRIVEN=y

Logs:


[00:00:33.052,000] <dbg> modem_chat: modem_chat_script_start: running script: quectel_bg95_init_chat_script

[00:00:33.052,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 0

[00:00:33.052,000] <dbg> modem_chat: modem_chat_script_next: sending: ATE0

[00:00:33.074,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: ATE0

[00:00:33.074,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:33.074,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 1

[00:00:33.074,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CFUN=4

[00:00:33.806,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:33.806,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 2

[00:00:33.806,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CMEE=1

[00:00:33.828,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:33.828,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 3

[00:00:33.828,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CREG=1

[00:00:33.849,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:33.849,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 4

[00:00:33.849,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGREG=1

[00:00:33.871,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:33.871,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 5

[00:00:33.871,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CEREG=1

[00:00:33.893,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:33.893,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 6

[00:00:33.893,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CREG?

[00:00:33.915,000] <dbg> modem_chat: modem_chat_log_received_command: +CREG: 1 0

[00:00:33.915,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:33.915,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 7

[00:00:33.915,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CEREG?

[00:00:33.937,000] <dbg> modem_chat: modem_chat_log_received_command: +CEREG: 1 4

[00:00:33.937,000] <dbg> modem_chat: modem_chat_log_received_command: OK

--- 3 messages dropped ---

[00:00:33.937,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 8

[00:00:33.937,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGREG?

[00:00:33.959,000] <dbg> modem_chat: modem_chat_log_received_command: +CGREG: 1 0

[00:00:33.959,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:33.959,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 9

[00:00:33.959,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGSN

[00:00:33.983,000] <dbg> modem_chat: modem_chat_log_received_command: 864475041801522

[00:00:33.983,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 10

[00:00:33.983,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:33.983,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 11

[00:00:33.983,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGMM

[00:00:34.004,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 13

[00:00:34.004,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGMI

[00:00:34.026,000] <dbg> modem_chat: modem_chat_log_received_command: Quectel

[00:00:34.026,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 14

[00:00:34.026,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:34.026,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 15

[00:00:34.026,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGMR

[00:00:34.047,000] <dbg> modem_chat: modem_chat_log_received_command: BG95M3LAR02A03

[00:00:34.047,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 16

[00:00:34.047,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:34.047,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 17

[00:00:34.047,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CIMI

[00:00:34.071,000] <dbg> modem_chat: modem_chat_log_received_command: 255062095310961

[00:00:34.071,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 18

[00:00:34.071,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:34.071,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 19

[00:00:34.071,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+QCCID

[00:00:34.093,000] <dbg> modem_chat: modem_chat_log_received_command: +QCCID: 89380062300687995240

[00:00:34.093,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 20

[00:00:34.093,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:34.094,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_init_chat_script: step: 21

[00:00:34.094,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CMUX=0,0,5,127

[00:00:34.116,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: OK

[00:00:34.394,000] <dbg> modem_chat: modem_chat_script_stop: quectel_bg95_init_chat_script: complete

[00:00:34.517,000] <inf> modem_at_shell: pipe connected

[00:00:34.517,000] <inf> modem_at_shell: opening pipe

[00:00:34.539,000] <inf> modem_at_shell: pipe opened

[00:00:34.539,000] <inf> modem_at_shell: chat attached

[00:00:34.660,000] <dbg> modem_chat: modem_chat_script_start: running script: quectel_bg95_dial_chat_script

[00:00:34.660,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_dial_chat_script: step: 0

[00:00:34.660,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGACT=0,1

[00:00:34.686,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:34.686,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_dial_chat_script: step: 1

[00:00:34.686,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGDCONT=1,"IP","internet"

--- 3 messages dropped ---

[00:00:34.765,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:34.765,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_dial_chat_script: step: 3

[00:00:34.765,000] <dbg> modem_chat: modem_chat_script_next: sending: ATD*99***1#

[00:00:34.765,000] <dbg> modem_chat: modem_chat_script_stop: quectel_bg95_dial_chat_script: complete

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x0d because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x0a because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x43 because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x4f because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x4e because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x4e because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x45 because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x43 because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x54 because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x20 because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x31 because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x35 because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x30 because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x30 because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x30 because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x30 because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x30 because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x30 because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x30 because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x0d because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x0a because 0x7e was expected.

[00:00:36.766,000] <dbg> modem_chat: modem_chat_script_start: running script: quectel_bg95_periodic_chat_script

[00:00:36.766,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 0

[00:00:36.766,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CREG?

[00:00:36.789,000] <dbg> modem_chat: modem_chat_log_received_command: +CREG: 1 0

[00:00:36.789,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:36.789,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 1

[00:00:36.789,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CEREG?

[00:00:36.811,000] <dbg> modem_chat: modem_chat_log_received_command: +CEREG: 1 4

[00:00:36.811,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:36.811,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 2

[00:00:36.811,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGREG?

[00:00:36.834,000] <dbg> modem_chat: modem_chat_log_received_command: +CGREG: 1 0

[00:00:36.834,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:36.834,000] <dbg> modem_chat: modem_chat_script_stop: quectel_bg95_periodic_chat_script: complete

[00:00:38.834,000] <dbg> modem_chat: modem_chat_script_start: running script: quectel_bg95_periodic_chat_script

[00:00:38.834,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 0

[00:00:38.834,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CREG?

[00:00:38.857,000] <dbg> modem_chat: modem_chat_log_received_command: +CREG: 1 0

[00:00:38.857,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:38.857,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 1

[00:00:38.857,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CEREG?

[00:00:38.880,000] <dbg> modem_chat: modem_chat_log_received_command: +CEREG: 1 4

[00:00:38.880,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:38.880,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 2

[00:00:38.880,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGREG?

[00:00:38.903,000] <dbg> modem_chat: modem_chat_log_received_command: +CGREG: 1 0

[00:00:38.903,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:38.903,000] <dbg> modem_chat: modem_chat_script_stop: quectel_bg95_periodic_chat_script: complete

[00:00:39.068,000] <dbg> modem_chat: modem_chat_log_received_command: +CREG: 2

[00:00:39.068,000] <dbg> modem_chat: modem_chat_log_received_command: +CGREG: 2

[00:00:39.940,000] <dbg> modem_chat: modem_chat_log_received_command: +CGREG: 1

[00:00:39.965,000] <dbg> modem_ppp: modem_ppp_process_received_byte: Receiving PPP frame

[00:00:39.965,000] <dbg> modem_ppp: modem_ppp_process_received_byte: Received PPP frame (len 29)

[00:00:39.965,000] <dbg> modem_ppp: modem_ppp_process_received_byte: Receiving PPP frame

[00:00:39.965,000] <dbg> modem_ppp: modem_ppp_process_received_byte: Received PPP frame (len 12)

[00:00:39.991,000] <dbg> modem_ppp: modem_ppp_process_received_byte: Receiving PPP frame

[00:00:39.991,000] <dbg> modem_ppp: modem_ppp_process_received_byte: Received PPP frame (len 13)

[00:00:40.014,000] <dbg> modem_ppp: modem_ppp_process_received_byte: Receiving PPP frame

[00:00:40.014,000] <dbg> modem_ppp: modem_ppp_process_received_byte: Received PPP frame (len 12)

[00:00:40.042,000] <dbg> modem_ppp: modem_ppp_process_received_byte: Receiving PPP frame

[00:00:40.042,000] <dbg> modem_ppp: modem_ppp_process_received_byte: Received PPP frame (len 12)

[00:00:40.042,000] <dbg> modem_ppp: modem_ppp_process_received_byte: Receiving PPP frame

[00:00:40.042,000] <dbg> modem_ppp: modem_ppp_process_received_byte: Received PPP frame (len 9)

[00:00:40.093,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: +CTZE: "+08",0,"2025/03/20,11:44:09"

[00:00:40.257,000] <dbg> modem_ppp: modem_ppp_process_received_byte: Receiving PPP frame

[00:00:40.257,000] <dbg> modem_ppp: modem_ppp_process_received_byte: Received PPP frame (len 8)

[00:00:40.257,000] <dbg> modem_ppp: modem_ppp_process_received_byte: Receiving PPP frame

[00:00:40.258,000] <dbg> modem_ppp: modem_ppp_process_received_byte: Received PPP frame (len 26)

[00:00:40.286,000] <dbg> modem_ppp: modem_ppp_process_received_byte: Receiving PPP frame

[00:00:40.286,000] <dbg> modem_ppp: modem_ppp_process_received_byte: Received PPP frame (len 26)

[00:00:41.941,000] <dbg> modem_chat: modem_chat_script_start: running script: quectel_bg95_periodic_chat_script

[00:00:41.941,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 0

[00:00:41.941,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CREG?

[00:00:41.963,000] <dbg> modem_chat: modem_chat_log_received_command: +CREG: 1 2

[00:00:41.963,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:41.963,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 1

[00:00:41.963,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CEREG?

[00:00:41.986,000] <dbg> modem_chat: modem_chat_log_received_command: +CEREG: 1 4

[00:00:41.986,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:41.986,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 2

[00:00:41.986,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGREG?

[00:00:42.009,000] <dbg> modem_chat: modem_chat_log_received_command: +CGREG: 1 1

[00:00:42.009,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:42.009,000] <dbg> modem_chat: modem_chat_script_stop: quectel_bg95_periodic_chat_script: complete

[00:00:44.009,000] <dbg> modem_chat: modem_chat_script_start: running script: quectel_bg95_periodic_chat_script

[00:00:44.009,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 0

[00:00:44.009,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CREG?

[00:00:44.032,000] <dbg> modem_chat: modem_chat_log_received_command: +CREG: 1 2

[00:00:44.032,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:44.032,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 1

[00:00:44.032,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CEREG?

[00:00:44.055,000] <dbg> modem_chat: modem_chat_log_received_command: +CEREG: 1 4

[00:00:44.055,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:44.055,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 2

[00:00:44.055,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGREG?

[00:00:44.078,000] <dbg> modem_chat: modem_chat_log_received_command: +CGREG: 1 1

[00:00:44.078,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:44.078,000] <dbg> modem_chat: modem_chat_script_stop: quectel_bg95_periodic_chat_script: complete

[00:00:46.078,000] <dbg> modem_chat: modem_chat_script_start: running script: quectel_bg95_periodic_chat_script

[00:00:46.078,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 0

[00:00:46.078,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CREG?

[00:00:46.101,000] <dbg> modem_chat: modem_chat_log_received_command: +CREG: 1 2

[00:00:46.101,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:46.101,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 1

[00:00:46.101,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CEREG?

[00:00:46.124,000] <dbg> modem_chat: modem_chat_log_received_command: +CEREG: 1 4

[00:00:46.124,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:46.124,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 2

[00:00:46.124,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGREG?

[00:00:46.146,000] <dbg> modem_chat: modem_chat_log_received_command: +CGREG: 1 1

[00:00:46.146,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:46.146,000] <dbg> modem_chat: modem_chat_script_stop: quectel_bg95_periodic_chat_script: complete

[00:00:48.147,000] <dbg> modem_chat: modem_chat_script_start: running script: quectel_bg95_periodic_chat_script

[00:00:48.147,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 0

[00:00:48.147,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CREG?

[00:00:48.169,000] <dbg> modem_chat: modem_chat_log_received_command: +CREG: 1 2

[00:00:48.169,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:48.169,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 1

[00:00:48.169,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CEREG?

[00:00:48.192,000] <dbg> modem_chat: modem_chat_log_received_command: +CEREG: 1 4

[00:00:48.192,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:48.192,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 2

[00:00:48.192,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGREG?

[00:00:48.215,000] <dbg> modem_chat: modem_chat_log_received_command: +CGREG: 1 1

At some point, the modem starts continuously executing the periodic chat script in an endless loop:


[00:00:48.147,000] <dbg> modem_chat: modem_chat_script_start: running script: quectel_bg95_periodic_chat_script

[00:00:48.147,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 0

[00:00:48.147,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CREG?

[00:00:48.169,000] <dbg> modem_chat: modem_chat_log_received_command: +CREG: 1 2

[00:00:48.169,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:48.169,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 1

[00:00:48.169,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CEREG?

[00:00:48.192,000] <dbg> modem_chat: modem_chat_log_received_command: +CEREG: 1 4

[00:00:48.192,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:48.192,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 2

[00:00:48.192,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGREG?

[00:00:48.215,000] <dbg> modem_chat: modem_chat_log_received_command: +CGREG: 1 1

[00:00:48.215,000] <dbg> modem_chat: modem_chat_log_received_command: OK

[00:00:48.215,000] <dbg> modem_chat: modem_chat_script_stop: quectel_bg95_periodic_chat_script: complete

[00:00:50.215,000] <dbg> modem_chat: modem_chat_script_start: running script: quectel_bg95_periodic_chat_script

Any guidance or suggestions on what might be causing this issue would be greatly appreciated!

If you are familiar with Linux or Windows, I suggest you test it on such operating systems.

You shouldn’t receive +CTZE: “+08”,0,“2025/03/20,11:44:09”. But I don’t see you using CMUX.

1 Like
[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x30 because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x0d because 0x7e was expected.

[00:00:34.798,000] <dbg> modem_ppp: modem_ppp_is_byte_expected: Dropping byte 0x0a because 0x7e was expected.

[00:00:36.766,000] <dbg> modem_chat: modem_chat_script_start: running script: quectel_bg95_periodic_chat_script

[00:00:36.766,000] <dbg> modem_chat: modem_chat_script_next: quectel_bg95_periodic_chat_script: step: 0

[00:00:36.766,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CREG?

---->

Why are you still sending AT commands at this time?
But you have sent the AT*99#. I didn’t see you enable the CMUX and sent the AT command over the CMUX virtual channel.

1 Like

Thank you for your interest in the issue!

I’ve managed to resolve the problem.
Initially, I was using the default driver provided by Zephyr, so I assumed that the problem was with the BG95 module itself.
However, it turned out that both the module and the driver were working correctly. The periodic script output misled me into thinking that the modem was failing to connect to the network.

The CMUX session is actually initiated with the command AT+CMUX=0,0,5,127, which can be seen in the logs.
The real issue was a conflict between network interfaces. The STM32H573I-DK board has an Ethernet interface, and the network layer (L4) was expecting to use it instead of the modem.
Once I removed the Ethernet interface from the build configuration, the modem started working properly.