# Send and receive SMS with GSM and raspberry pi 3

**URL:** <https://discourse.nodered.org/t/send-and-receive-sms-with-gsm-and-raspberry-pi-3/19226>\
**Category:** General\
**Created:** [16 December 2019 14:52 UTC](https://discourse.nodered.org/t/send-and-receive-sms-with-gsm-and-raspberry-pi-3/19226 "2019-12-16T14:52:57Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![pooyatavan](https://avatars.discourse-cdn.com/v4/letter/p/c2a13f/32.png) [@pooyatavan](https://discourse.nodered.org/u/pooyatavan)\
**Post date:** [16 December 2019 14:52 UTC](https://discourse.nodered.org/t/send-and-receive-sms-with-gsm-and-raspberry-pi-3/19226/1 "2019-12-16T14:52:57Z")

</div>

hi how can i send and receive on module GSM sim 800l.  
i put TX/RX pins from module to TX/RX raspberry pi.  
but i receive nothing from module.  
actually i don't know how its works.  
can someone help me to figure it out ?  
i searching for it: [How to send temperature data using GSM SIM900 Module to Node-RED](https://discourse.nodered.org/t/how-to-send-temperature-data-using-gsm-sim900-module-to-node-red/12337)

---

<div class="post-metadata">

**Author:** ![pooyatavan](https://avatars.discourse-cdn.com/v4/letter/p/c2a13f/32.png) [@pooyatavan](https://discourse.nodered.org/u/pooyatavan)\
**Post date:** [17 December 2019 09:59 UTC](https://discourse.nodered.org/t/send-and-receive-sms-with-gsm-and-raspberry-pi-3/19226/2 "2019-12-17T09:59:13Z")

</div>

call pin in my gsm module work fine but my serial connection did not work.  
when i call or send sms to my sim show 0 or 1 in debug.

---

<div class="post-metadata">

**Author:** ![pooyatavan](https://avatars.discourse-cdn.com/v4/letter/p/c2a13f/32.png) [@pooyatavan](https://discourse.nodered.org/u/pooyatavan)\
**Post date:** [17 December 2019 19:47 UTC](https://discourse.nodered.org/t/send-and-receive-sms-with-gsm-and-raspberry-pi-3/19226/3 "2019-12-17T19:47:17Z")

</div>

no one can help me in here ?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [17 December 2019 21:41 UTC](https://discourse.nodered.org/t/send-and-receive-sms-with-gsm-and-raspberry-pi-3/19226/4 "2019-12-17T21:41:05Z")

</div>

Can you talk to the module without using node-red ? Eg using picocom terminal ? Have you got to and Rex crossed correctly ?

---

<div class="post-metadata">

**Author:** ![pooyatavan](https://avatars.discourse-cdn.com/v4/letter/p/c2a13f/32.png) [@pooyatavan](https://discourse.nodered.org/u/pooyatavan)\
**Post date:** [18 December 2019 18:52 UTC](https://discourse.nodered.org/t/send-and-receive-sms-with-gsm-and-raspberry-pi-3/19226/5 "2019-12-18T18:52:47Z")

</div>

as i have rapberry pi 3 i must enbale: aurt and ttys0 serial port  
in picocom it say:

pi@raspberrypi:~ $ sudo picocom --baud 1200 /dev/ttyS0  
picocom v3.1  
port is : /dev/ttyS0  
flowcontrol : none  
baudrate is : 1200  
parity is : none  
databits are : 8  
stopbits are : 1  
escape is : C-a  
local echo is : no  
noinit is : no  
noreset is : no  
hangup is : no  
nolock is : no  
send\_cmd is : sz -vv  
receive\_cmd is : rz -vv -E  
imap is :  
omap is :  
emap is : crcrlf,delbs,  
logfile is : none  
initstring : none  
exit\_after is : not set  
exit is : no  
Type [C-a] [C-h] to see available commands  
Terminal ready

but i cant type command AT in terminal. why ?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [18 December 2019 20:03 UTC](https://discourse.nodered.org/t/send-and-receive-sms-with-gsm-and-raspberry-pi-3/19226/6 "2019-12-18T20:03:20Z")

</div>

the terminal will show what comes back from the modem - if echo isn't turned on you may not see what you send. If you type ATZ then you should get something back. If not then either the baud rate is wrong or you have the wrong port, or you have wired it up incorrectly. I'm afraid you will have to debug it - it's not really a Node-RED issue.

---

<div class="post-metadata">

**Author:** ![pooyatavan](https://avatars.discourse-cdn.com/v4/letter/p/c2a13f/32.png) [@pooyatavan](https://discourse.nodered.org/u/pooyatavan)\
**Post date:** [23 December 2019 12:23 UTC](https://discourse.nodered.org/t/send-and-receive-sms-with-gsm-and-raspberry-pi-3/19226/7 "2019-12-23T12:23:41Z")

</div>

ok its work right now with USB serial Module. and its responding.  
now, how can i send command to it, like picocom in node-red?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [23 December 2019 18:07 UTC](https://discourse.nodered.org/t/send-and-receive-sms-with-gsm-and-raspberry-pi-3/19226/8 "2019-12-23T18:07:31Z")

</div>

Yes - probably easiest to start with the serial-request node - that will send a command and wait for an answer. Make sure picocom isn't running at the same time.

---

<div class="post-metadata">

**Author:** ![pooyatavan](https://avatars.discourse-cdn.com/v4/letter/p/c2a13f/32.png) [@pooyatavan](https://discourse.nodered.org/u/pooyatavan)\
**Post date:** [23 December 2019 20:32 UTC](https://discourse.nodered.org/t/send-and-receive-sms-with-gsm-and-raspberry-pi-3/19226/9 "2019-12-23T20:32:46Z")

</div>

TY. one more question.  
how to perform ctrl+z in node-red ?  
is that have a command or any method for ESC from typing MSG ?  
as you know after type msg, you must perform CTRL + Z to send that msg.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [23 December 2019 22:51 UTC](https://discourse.nodered.org/t/send-and-receive-sms-with-gsm-and-raspberry-pi-3/19226/10 "2019-12-23T22:51:50Z")

</div>

If you really need to add ctrl-z to everything then set the output to add character 0x1a - which is ctrl-z (char 26)  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/9/96250b8141b495384a96ccd27e2ce26cbc50bdb8.png)

---

<div class="post-metadata">

**Author:** ![pooyatavan](https://avatars.discourse-cdn.com/v4/letter/p/c2a13f/32.png) [@pooyatavan](https://discourse.nodered.org/u/pooyatavan)\
**Post date:** [25 December 2019 06:58 UTC](https://discourse.nodered.org/t/send-and-receive-sms-with-gsm-and-raspberry-pi-3/19226/11 "2019-12-25T06:58:13Z")

</div>

this character will drop all commands in module.  
can i send it as msg.payload to serial in function node ?

---

<div class="post-metadata">

**Author:** ![pooyatavan](https://avatars.discourse-cdn.com/v4/letter/p/c2a13f/32.png) [@pooyatavan](https://discourse.nodered.org/u/pooyatavan)\
**Post date:** [25 December 2019 09:21 UTC](https://discourse.nodered.org/t/send-and-receive-sms-with-gsm-and-raspberry-pi-3/19226/13 "2019-12-25T09:21:10Z")

</div>

did you read my question ? its not my answer.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [25 December 2019 09:42 UTC](https://discourse.nodered.org/t/send-and-receive-sms-with-gsm-and-raspberry-pi-3/19226/14 "2019-12-25T09:42:36Z")

</div>

Yes of course you can.

```auto
msg.payload = msg.payload + "\u001a";
return msg;

```

---

<div class="post-metadata">

**Author:** ![pooyatavan](https://avatars.discourse-cdn.com/v4/letter/p/c2a13f/32.png) [@pooyatavan](https://discourse.nodered.org/u/pooyatavan)\
**Post date:** [26 December 2019 19:53 UTC](https://discourse.nodered.org/t/send-and-receive-sms-with-gsm-and-raspberry-pi-3/19226/15 "2019-12-26T19:53:11Z")

</div>

thank you @dceejay. its worked.

 ![11](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/d/d608ef5e98eb4815295c5bdd95759101ee048ac6.jpeg)

---

<div class="post-metadata">

**Author:** ![Mateiuc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mateiuc/32/33054_2.png) [@Mateiuc](https://discourse.nodered.org/u/Mateiuc)\
**Post date:** [25 January 2021 22:52 UTC](https://discourse.nodered.org/t/send-and-receive-sms-with-gsm-and-raspberry-pi-3/19226/16 "2021-01-25T22:52:42Z")

</div>

Hi, sir can you share the flow???? its look something very useful for my project, or its the same...Thanks in advance.
