HL78 Modem Echoes AT Commands After CMUX Is Enabled (ATE0 Not Respected)

I’m observing unexpected behavior on the HL7812 modem sw release R6.1 when CMUX is enabled. Specifically, the modem starts echoing AT commands—even though ATE0 is set in the initialization script. This echoing begins only after CMUX is activated.

Prior to enabling CMUX, the modem behaves correctly and does not echo commands, as expected with ATE0. However, once CMUX is active, the modem consistently echoes every AT command sent, sometimes with additional junk characters. This suggests that the modem is not respecting the ATE0 command under CMUX operation.

Steps to reproduce:

  1. Boot the modem and initialize with ATE0.
  2. Enable CMUX.
  3. Send any AT command over a CMUX channel.

Observed result:
The modem echoes back the command, even though ATE0 was configured.

Expected result:
The modem should suppress command echoing in compliance with the ATE0 setting, regardless of CMUX state.

Could you confirm whether this is a known issue with the HL7812 R6.1 firmware? And is there any workaround or fix available?

i don’t see problem after typing ate0 in DLCI1 channel:

can you please try DLCI2?

have you tried DLCI1?

I am just testing zephyr modem_cellular example with cmux.

No, it is allocated for PPP comms, i cannot mess with that.

see log file:

before cmux

[00:00:10.003,000] <dbg> modem_chat: modem_chat_script_start: running script: swir_hl7800_init_chat_script
[00:00:10.003,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 0
[00:00:10.003,000] <dbg> modem_chat: modem_chat_script_next: sending: AT
[00:00:10.023,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: +KSUP: 0
[00:00:10.023,000] <dbg> modem_chat: modem_chat_log_received_command: +CEREG:  2
[00:00:10.023,000] <dbg> modem_chat: modem_chat_log_received_command: +CREG:  2
[00:00:10.023,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT
[00:00:10.023,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: OK
[00:00:11.003,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 1
[00:00:11.003,000] <dbg> modem_chat: modem_chat_script_next: sending: AT
[00:00:11.024,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT
[00:00:11.024,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: OK
[00:00:12.003,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 2
[00:00:12.003,000] <dbg> modem_chat: modem_chat_script_next: sending: AT
[00:00:12.024,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT
[00:00:12.024,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: OK
[00:00:13.003,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 3
[00:00:13.003,000] <dbg> modem_chat: modem_chat_script_next: sending: AT
[00:00:13.024,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT
[00:00:13.024,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: OK
[00:00:14.003,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 4
[00:00:14.003,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+KSLEEP=2
[00:00:14.025,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT+KSLEEP=2
[00:00:14.025,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.025,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 5
[00:00:14.025,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CPSMS=0
[00:00:14.046,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT+CPSMS=0
[00:00:14.046,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.046,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 6
[00:00:14.046,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CEDRXS=0
[00:00:14.068,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT+CEDRXS=0
[00:00:14.068,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.068,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 7
[00:00:14.068,000] <dbg> modem_chat: modem_chat_script_next: sending: ATE0
[00:00:14.089,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: ATE0
[00:00:14.261,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.261,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 8
[00:00:14.261,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CFUN=1
[00:00:14.285,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.285,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 9
[00:00:14.285,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGACT=0
[00:00:14.309,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.309,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 10
[00:00:14.309,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CFUN=4
[00:00:14.339,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.339,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 11
[00:00:14.339,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CMEE=1
[00:00:14.339,000] <dbg> modem_chat: modem_chat_log_received_command: +CEREG:  0
[00:00:14.339,000] <dbg> modem_chat: modem_chat_log_received_command: +CREG:  0
[00:00:14.364,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.364,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 12
[00:00:14.364,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CREG=1
[00:00:14.388,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.388,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 13
[00:00:14.388,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CEREG=1
[00:00:14.412,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.412,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 14
[00:00:14.412,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CREG?
[00:00:14.434,000] <dbg> modem_chat: modem_chat_log_received_command: +CREG:  1 0
[00:00:14.434,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.434,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 15
[00:00:14.434,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CEREG?
[00:00:14.458,000] <dbg> modem_chat: modem_chat_log_received_command: +CEREG:  1 0
[00:00:14.458,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.458,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 16
[00:00:14.458,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGSN
[00:00:14.480,000] <dbg> modem_chat: modem_chat_log_received_command:  351144441214500
[00:00:14.480,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 17
[00:00:14.480,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.480,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 18
[00:00:14.480,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGMM
[00:00:14.503,000] <dbg> modem_chat: modem_chat_log_received_command:  HL7812
[00:00:14.503,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 19
[00:00:14.503,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.503,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 20
[00:00:14.504,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGMI
[00:00:14.531,000] <dbg> modem_chat: modem_chat_log_received_command:  Sierra Wireless
[00:00:14.531,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 21
[00:00:14.531,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.532,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 22
[00:00:14.532,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGMR
[00:00:14.554,000] <dbg> modem_chat: modem_chat_log_received_command:  HL7812.5.7.3.0
[00:00:14.554,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 23
[00:00:14.554,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.554,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 24
[00:00:14.554,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CIMI
[00:00:14.577,000] <dbg> modem_chat: modem_chat_log_received_command:  901288820006476
[00:00:14.577,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 25
[00:00:14.577,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.577,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_init_chat_script: step: 26
[00:00:14.577,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CMUX=0,0,5,127
[00:00:14.601,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.601,000] <dbg> modem_chat: modem_chat_script_stop: swir_hl7800_init_chat_script: complete

after cmux:

[00:00:14.722,000] <inf> modem_at_shell: pipe connected
[00:00:14.722,000] <inf> modem_at_shell: opening pipe
[00:00:14.747,000] <inf> modem_at_shell: pipe opened
[00:00:14.747,000] <inf> modem_at_shell: chat attached
[00:00:14.873,000] <dbg> modem_chat: modem_chat_script_start: running script: swir_hl7800_dial_chat_script
[00:00:14.873,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_dial_chat_script: step: 0
[00:00:14.873,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CGDCONT=1,"IP","internet"
[00:00:14.898,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT+CGDCONT=1,"IP","internet"
[00:00:14.898,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.898,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_dial_chat_script: step: 1
[00:00:14.898,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+KCNXCFG=1,"GPRS","internet",,,"IPV4"
[00:00:14.944,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: CCCCCCCCFG=1,"GPRS","internet",,,"IPV4"
[00:00:14.944,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.944,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_dial_chat_script: step: 2
[00:00:14.944,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+WPPP=0
[00:00:14.966,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT+WPPP=0
[00:00:14.966,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.966,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_dial_chat_script: step: 3
[00:00:14.966,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CFUN=1
[00:00:14.989,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT+CFUN=1
[00:00:14.989,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:14.989,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_dial_chat_script: step: 4
[00:00:14.989,000] <dbg> modem_chat: modem_chat_script_next: sending: ATD*99***1#
[00:00:14.989,000] <dbg> modem_chat: modem_chat_log_received_command: +CEREG:  2
[00:00:14.989,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: +CEREG: 2
[00:00:14.989,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: +CREG: 2
[00:00:14.990,000] <dbg> modem_chat: modem_chat_log_received_command: +CREG:  2
[00:00:15.013,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: ATD*99***1#
[00:00:15.013,000] <dbg> modem_chat: modem_chat_log_received_command: CONNECT
[00:00:15.013,000] <dbg> modem_chat: modem_chat_script_stop: swir_hl7800_dial_chat_script: complete
[00:00:15.013,000] <dbg> modem_chat: modem_chat_log_received_command: +CEREG:  2
[00:00:15.013,000] <dbg> modem_chat: modem_chat_log_received_command: +CREG:  2
[00:00:17.013,000] <dbg> modem_chat: modem_chat_script_start: running script: swir_hl7800_periodic_chat_script
[00:00:17.013,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_periodic_chat_script: step: 0
[00:00:17.013,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CREG?
[00:00:17.036,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT+CREG?
[00:00:18.269,000] <dbg> modem_chat: modem_chat_log_received_command: +CREG:  1 2
[00:00:18.269,000] <dbg> modem_chat: modem_chat_log_received_command: OK
[00:00:18.269,000] <dbg> modem_chat: modem_chat_script_next: swir_hl7800_periodic_chat_script: step: 1
[00:00:18.269,000] <dbg> modem_chat: modem_chat_script_next: sending: AT+CEREG?
[00:00:18.292,000] <dbg> modem_chat: modem_chat_on_unknown_command_received: AT+CEREG?
[00:00:18.292,000] <dbg> modem_chat: modem_chat_log_received_command: +CEREG:  1 2

i guess you can swap DLCI channel for PPP and AT port, right?

thats really strange. I am still investigating…

I checked the profiles as well, and noticed every time the modem is restarted, ate becomes 1. so I saved the new profiles and tested them, but still the same.

after that, I tested one more thing. after CMUX enable I then ran ATE0 command again and it worked for a channel.

then have you tried just one DLCI1?

FYI, no problem is found for two DLCI channels:

@jyijyi

This appears to be an issue specific to the R6.1 modem firmware. I just tested the same application after downgrading the modem from R6.1 to R4.3, and everything worked as expected; no command echoing occurred.

see the log files


actually i also tested R6.1 (FW 5.7.3.0), no problem is found

Did you see my comment. here

I tested the same application with modem firmware version R4.3, and everything worked as expected. However, with R6.1, the same setup doesn’t work properly.

I understand that you’ve tested CMUX on R6.1 as well, and it seemed to work in your case, you enabled CMUX, created channels, and sent a few AT commands successfully. I performed a similar test on Linux using the GSM 0710 TTY multiplexer (n_gsm module), and like your test, I also didn’t observe any echo issues there on R6.1.

That said, in a more complete use case, using a dial or periodic chat script in an actual application, I’m consistently seeing echoed AT commands (and sometimes even junk characters) after CMUX is enabled. This issue does not occur on R4.3, so it seems to be specific to the R6.1 firmware when running more complex or scripted AT communication.

I don’t quite understand
then what is the problem?
Why don’t you just port the linux source to your MCU?

Is that we must start the ppp dial up to see the issue?

Yes, I think so; thats what I suspect.

Then can you reproduce in linux pc?

I have to finish up my cmux related task asap, at least for now, the R4.3 is working for me. Ill do it, but I dont know when.