# Read and Send SMS

**URL:** <https://forum.gl-inet.com/t/read-and-send-sms/1539>\
**Category:** Router\
**Created:** [July 25, 2016, 2:51am UTC](https://forum.gl-inet.com/t/read-and-send-sms/1539 "2016-07-25T02:51:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![daniel-pixley](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/d/3d9bf3/32.png) [@daniel-pixley](https://forum.gl-inet.com/u/daniel-pixley)\
**Post date:** [July 25, 2016, 2:51am UTC](https://forum.gl-inet.com/t/read-and-send-sms/1539/1 "2016-07-25T02:51:32Z")

</div>

I really love my new MiFi, it works just great! To make the world perfect, there is one feature (that commercial MiFi’s often have) I’d still need: the ability to read and send SMS and USSD codes through the WebGUI. For registration purposes and also activating an internet day package I often need to send or receive an SMS. This would of course also be true for any other gl-inet router with OpenWRT and a 3G-USB-dongle.

Does anybody have a solution or experience with this?

Thanks, Daniel

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [July 25, 2016, 2:14pm UTC](https://forum.gl-inet.com/t/read-and-send-sms/1539/2 "2016-07-25T14:14:44Z")

</div>

Not sure when we have this in the UI. But you can use AT command to send and receive SMS. These things are very strange.

Which module do you have?

---

<div class="post-metadata">

**Author:** ![daniel-pixley](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/d/3d9bf3/32.png) [@daniel-pixley](https://forum.gl-inet.com/u/daniel-pixley)\
**Post date:** [July 25, 2016, 3:59pm UTC](https://forum.gl-inet.com/t/read-and-send-sms/1539/3 "2016-07-25T15:59:53Z")

</div>

Thanks for your reply! I have an EC20-E. Using the AT commands will have to be my fallback for now. But of course it would be a lot more convenient and usable to have it in the GUI. I’ve seen some mention of smstools3 (\<span class=“st”\>http://_smstools3_.kekekasvi.com) for openwrt, but getting that to work doesn’t look trivial to me.  
\</span\>

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [July 28, 2016, 10:16am UTC](https://forum.gl-inet.com/t/read-and-send-sms/1539/4 "2016-07-28T10:16:50Z")

</div>

@daniel, I’m putting some guide here, just in case if you want to try.

First, you can refer to the AT command guide of EC20 here: [http://www.gl-inet.com/download/mifi/](http://www.gl-inet.com/download/mifi/)

send message:

```
echo -e -n "AT+CPMS=\"ME\",\"ME\",\"ME\"\015\012" >/dev/ttyUSB2
echo -e -n "AT+CPMS?\015\012" >/dev/ttyUSB2
echo -e -n "AT+CMGF=1\015\012" >/dev/ttyUSB2 
echo -e -n "AT+CMGF?\015\012" >/dev/ttyUSB2 
echo -e -n "AT+CSCS=\"GSM\"\015\012" >/dev/ttyUSB2
echo -e -n "AT+CSCS?\015\012" >/dev/ttyUSB2
echo -e -n "AT+CMGS=\"this is my message\"\015\012" >/dev/ttyUSB2
```

read message:

```
echo -e -n "AT+CMGL=\"ALL\"\015\012" >/dev/ttyUSB2
cat /dev/ttyUSB2
```

delete message:

```
echo -e -n "AT+CMGD=0\015\012" >/dev/ttyUSB2
```

---

<div class="post-metadata">

**Author:** ![daniel-pixley](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/d/3d9bf3/32.png) [@daniel-pixley](https://forum.gl-inet.com/u/daniel-pixley)\
**Post date:** [July 30, 2016, 3:01pm UTC](https://forum.gl-inet.com/t/read-and-send-sms/1539/5 "2016-07-30T15:01:51Z")

</div>

@alzhao: thx for putting these command together for me!

&nbsp;

I’ve managed to send and receive my first SMS from the shell. For anybody else trying this, I needed to do some slight adjustments:

&nbsp;

\*\*\* first connect to the network:

```
comgt
```

&nbsp;

\*\*\* send message:

```
echo -e "AT+CPMS=\"ME\",\"ME\",\"ME\"\r" >/dev/ttyUSB2
sleep 1
echo -e "AT+CMGF=1\r" >/dev/ttyUSB2 
sleep 1 
echo -e "AT+CSCS=\"GSM\"\r" >/dev/ttyUSB2
sleep 1
echo -e "AT+CMGS=\"destination-number\"\r" >/dev/ttyUSB2
sleep 1
echo -e "this is my message\x1A" >/dev/ttyUSB2
```

&nbsp;

\*\*\* read message:

```
echo -e "AT+CMGL=\"ALL\"\r" >/dev/ttyUSB2
cat /dev/ttyUSB2
```

&nbsp;

\*\*\* delete message:

```
echo -e "AT+CMGD=0\r" >/dev/ttyUSB2
```

&nbsp;

\*\*\* send USSD:

```
echo -e "AT+CUSD=1,\"*121#\"\r" >/dev/ttyUSB2
cat /dev/ttyUSB2
```

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [July 30, 2016, 6:06pm UTC](https://forum.gl-inet.com/t/read-and-send-sms/1539/6 "2016-07-30T18:06:55Z")

</div>

I am very glad that this works at your side!

If you can share your carrier information that will be helpful.

---

<div class="post-metadata">

**Author:** ![daniel-pixley](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/d/3d9bf3/32.png) [@daniel-pixley](https://forum.gl-inet.com/u/daniel-pixley)\
**Post date:** [July 30, 2016, 7:20pm UTC](https://forum.gl-inet.com/t/read-and-send-sms/1539/7 "2016-07-30T19:20:09Z")

</div>

I’m happy to provide additional info. comgt returns:

Registered on Home network: “Sunrise Sunrise”,7  
Signal Quality: 20,99

Is that the info you’re interested in?

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [July 30, 2016, 7:23pm UTC](https://forum.gl-inet.com/t/read-and-send-sms/1539/8 "2016-07-30T19:23:58Z")

</div>

So this is Swiss carrier? This is useful enough. We just confirm it works in your country with this carrier.  
Thanks very much!

---

<div class="post-metadata">

**Author:** ![daniel-pixley](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/d/3d9bf3/32.png) [@daniel-pixley](https://forum.gl-inet.com/u/daniel-pixley)\
**Post date:** [July 30, 2016, 7:28pm UTC](https://forum.gl-inet.com/t/read-and-send-sms/1539/9 "2016-07-30T19:28:27Z")

</div>

You’re welcome!

---

<div class="post-metadata">

**Author:** ![justin](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/justin/32/38_2.png) [@justin](https://forum.gl-inet.com/u/justin)\
**Post date:** [August 24, 2016, 12:56pm UTC](https://forum.gl-inet.com/t/read-and-send-sms/1539/10 "2016-08-24T12:56:42Z")

</div>

This is very useful information!!

&nbsp;

+1 To having an SMS option built into the WebUI, would be an awesome addition!

---

<div class="post-metadata">

**Author:** ![bruce](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/bruce/32/35649_2.png) [@bruce](https://forum.gl-inet.com/u/bruce)\
**Post date:** [October 29, 2025, 4:13am UTC](https://forum.gl-inet.com/t/read-and-send-sms/1539/12 "2025-10-29T04:13:41Z")

</div>


