# Modem AT commands

**URL:** <https://discourse.nodered.org/t/modem-at-commands/18203>\
**Category:** General\
**Created:** [20 November 2019 17:28 UTC](https://discourse.nodered.org/t/modem-at-commands/18203 "2019-11-20T17:28:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![New2Node](https://avatars.discourse-cdn.com/v4/letter/n/f1d935/32.png) [@New2Node](https://discourse.nodered.org/u/New2Node)\
**Post date:** [20 November 2019 17:28 UTC](https://discourse.nodered.org/t/modem-at-commands/18203/1 "2019-11-20T17:28:28Z")

</div>

Hi, I have a LTE CAT1 PI hat (Seeed) on my Rpi and I’m trying to use node-red to configure the APN using AT commands and the UART connection.  
If I send:  
\*\*msg.payload=“AT/r/n”; \*\*  
**return msg;**  
I get “OK” from the modem, if I want to set the APN I need to send AT+UPSD=0,1,”APN.name”  
Can anyone tell me how I put this command into a payload?

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [20 November 2019 17:55 UTC](https://discourse.nodered.org/t/modem-at-commands/18203/2 "2019-11-20T17:55:06Z")

</div>

With an inject node.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [20 November 2019 18:13 UTC](https://discourse.nodered.org/t/modem-at-commands/18203/3 "2019-11-20T18:13:33Z")

</div>

I think his/her problem is around the quotes.

> [@New2Node](#):
>
> AT+UPSD=0,1,”APN.name”

Inject node set to string:

```auto
AT+UPSD=0,1,\”APN.name\”/r/n

```

---

<div class="post-metadata">

**Author:** ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)\
**Post date:** [20 November 2019 18:14 UTC](https://discourse.nodered.org/t/modem-at-commands/18203/4 "2019-11-20T18:14:52Z")

</div>

Ah yes, sorry, I answered too quickly!

---

<div class="post-metadata">

**Author:** ![New2Node](https://avatars.discourse-cdn.com/v4/letter/n/f1d935/32.png) [@New2Node](https://discourse.nodered.org/u/New2Node)\
**Post date:** [20 November 2019 19:55 UTC](https://discourse.nodered.org/t/modem-at-commands/18203/5 "2019-11-20T19:55:39Z")

</div>

Hi all, sorted it! I needed to use single quotes  
Msg.payload = ‘AT+UPSD=0,1,”APN.name” \r\n’
