Aller au contenu
Infogérance Linux Debian en France

Infogérance Linux Debian en France

Kogitae : Ingéniérie de l'hébergement Internet

  • Accueil
  • Parcours
  • Presse
  • Portfolio
  • Blog

Sending text message using AT command « Mezgani blog

  • Accueil » Blog » Sending text message using AT command « Mezgani blog
DansGénéralités

Sending text message using AT command « Mezgani blog

Playing with my USB dongle that is a 3g modem, i felt the need to send message using this modem.

but i saw that it has no support to send message using AT command, well to check this use the AT+CSMS command before any shake.

In the case when you have a GSM/GPRS modem/mobile phone with full support of what we talk about before :

You can easily sending message using the great Kannel, or from scratch:

In this article we will focus on how to send message using AT command and we can resume this in five steps :

1. Initializing the modem

2. Setting SMSC

3. Storing the message into storage

4. Sending

5. Delete the message from storage

First of all, to interact with the device you need a serial tools like screen or may be minicom.

Well i recommend the use of screen when you work on pseudo devices :

Let’s connect to the device (ttyUSB0) using screen with a baud of 9600 :

$ screen /dev/ttyUSB0 9600

1. Send the initialize strings :

AT

OK

ATZ

OK

2. Define the service center address as follow and verify that it is correct:

AT+CSCA=”+85290000000″,145

145 means that we deal with formatted address using typical ISDN/telephony numbering plan

(ITU E.164/E.163) and it is an international number.

3. In the fact if you may send a text messages to +85291234567, write the message first to storage area, as like as:

AT+CMGW=”+85291234567″,145,”STO UNSENT”Hello world

4. And finally you can now send the message, referenced with it index:

AT+CMSS=3

You can also do this if you rather to send it to mutli destinations:

AT+CMSS=3,”91234567″

AT+CMSS=3,”97777777″

AT+CMSS=3,”96666666″

Lastly, delete the message from storage area.

5. AT+CMGD=3

To read the first message indexed with 1 :

AT+CMGR=1

Also if you need to play or list all the message in the storage

AT+CMGL=”ALL”

viaSending text message using AT command « Mezgani blog.

atcmss atcmss3next_mobile_no- sending-message-to-ttyusb ttyusb-3g-modem-text-message ubuntu-at-command-csms

Étiquettes

administrateur-systeme-freelance (9) amazon (3) apache (14) asterisk (9) auth (3) bash (6) blog-administrateur-systeme (14) blog-administration-systeme (4) collectd (5) cpu (3) debian (30) dovecot (4) duplicate (3) f (6) freelance-asterisk (3) google (3) infogerance-linux (5) infogérance (4) ipv6 (7) kernel (4) kogitae (30) kogitae-com (3) kogitae-fr (6) lamp-or-linux-or-developpement-web-and-apache-or-php-or-mysql-or-adobe-or-eclipse-or-zend-or-mozilla-or-firefox (17) lenny (4) lighttpd (5) limit (4) linux (26) mail (7) mdadm (6) mysql (14) openvz (9) optimiser (4) php (5) postfix (11) privvmpages-openvz (3) pxe (3) raid (3) SEO (5) ssh (8) ssl (3) test (3) voip (4) wordpress (6) www-kogitae-fr (7)