Community discussions

MikroTik App
 
User avatar
noyo
Member Candidate
Member Candidate
Topic Author
Posts: 120
Joined: Sat Jan 28, 2012 12:25 am
Location: Mazury - Poland
Contact:

[how] Script sending an AT command to a GSM modem

Sat Apr 27, 2024 8:52 pm

How can I send an AT command to a GSM modem using a script (and a serial terminal)?
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3625
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: [how] Script sending an AT command to a GSM modem

Sat Apr 27, 2024 9:35 pm

Use can use /interface/ppp-out/at-chat input=ATI for a serial-based or modem may appear as /interface/lte, and that too has the /interface/lte/at-chat input=ATI.

The /system/serial-terminal is only for interactive use, no scripting.
 
User avatar
noyo
Member Candidate
Member Candidate
Topic Author
Posts: 120
Joined: Sat Jan 28, 2012 12:25 am
Location: Mazury - Poland
Contact:

Re: [how] Script sending an AT command to a GSM modem

Sat Apr 27, 2024 10:35 pm

Use can use /interface/ppp-out/at-chat input=ATI for a serial-based or modem may appear as /interface/lte, and that too has the /interface/lte/at-chat input=ATI.

The /system/serial-terminal is only for interactive use, no scripting.
Do I need to configure the PPP interface in any special way for chat-at to work? It doesn't work for me with default settings
You do not have the required permissions to view the files attached to this post.
 
User avatar
Amm0
Forum Guru
Forum Guru
Posts: 3625
Joined: Sun May 01, 2016 7:12 pm
Location: California

Re: [how] Script sending an AT command to a GSM modem

Sat Apr 27, 2024 10:39 pm

USB modem typically have several ports, /port/print will show how many.

And on the /interface/ppp-client interface, it's the info-channel= that's used for AT commands. So it using the 2nd port (zero index), you might try making info-channel=0 or info-channel=2...

Also may want to disable/uncheck dial-on-demand while testing this too.
 
User avatar
noyo
Member Candidate
Member Candidate
Topic Author
Posts: 120
Joined: Sat Jan 28, 2012 12:25 am
Location: Mazury - Poland
Contact:

Re: [how] Script sending an AT command to a GSM modem

Sun Apr 28, 2024 8:08 am

It works! Thanks!

Who is online

Users browsing this forum: ELKABILLA and 4 guests