# Message Payload Limitations

**URL:** <https://discourse.nodered.org/t/message-payload-limitations/59711>\
**Category:** General\
**Created:** [11 March 2022 13:06 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711 "2022-03-11T13:06:44Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![StevenMurray2022](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevenmurray2022/32/58300_2.png) [@StevenMurray2022](https://discourse.nodered.org/u/StevenMurray2022)\
**Post date:** [11 March 2022 13:06 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/1 "2022-03-11T13:06:44Z")

</div>

I'm trying to pass a message from a mobile using 'SMS Receiver'--\>--'String'--\>--'Serial Output' nodes, but Node red seems to truncate the message after 153 Characters..

The below message is what I'm trying to pass, but Node Red isn't happy with everything past 'BOX\_L='..

Can anyone help with this? Am I missing something?

EGXX 03111200 05 5/5/2 75/75/50 NR/NR/4 WET/WET/SLUSH : BOX\_H="40" BOX\_I="RWY 05 REDUCED TO 2800" BOX\_J="DRIFTING SNOW" BOX\_K="RWY 05 LOOSE SAND" BOX\_L="RWY 05 CHEMICALLY TREATED" BOX\_M="RWY 05 SNOW BANK L12 FM CL" BOX\_N="TWY B SNOW BANK" BOX\_O="RWY 05 ADJ SNOW BANKS" BOX\_P="TWY C POOR" BOX\_R="APRON 1 POOR" BOX\_T="DONT DELAY DIVERT TODAY"

---

<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:** [11 March 2022 13:28 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/2 "2022-03-11T13:28:53Z")

</div>

Welcome to the forum!  
Is this from the debug panel?

---

<div class="post-metadata">

**Author:** ![StevenMurray2022](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevenmurray2022/32/58300_2.png) [@StevenMurray2022](https://discourse.nodered.org/u/StevenMurray2022)\
**Post date:** [11 March 2022 13:40 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/3 "2022-03-11T13:40:47Z")

</div>

No, I don't appear to get anything in the Debug Window.. I do get a snapshot in the Context tab that seems to show characters being added to the start of the string.

 ![nodeRed](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/d/dd0a98a141db1a17a1839a3be692218612ed3e89.jpeg)

---

<div class="post-metadata">

**Author:** ![StevenMurray2022](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevenmurray2022/32/58300_2.png) [@StevenMurray2022](https://discourse.nodered.org/u/StevenMurray2022)\
**Post date:** [11 March 2022 13:43 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/4 "2022-03-11T13:43:26Z")

</div>

I'm also prepending the message with a \* and ending it with a # so my software can recognise the start and end of the string..

---

<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:** [11 March 2022 13:59 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/5 "2022-03-11T13:59:02Z")

</div>

Try outputting the payload to a debug node and see what you get.

---

<div class="post-metadata">

**Author:** ![StevenMurray2022](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevenmurray2022/32/58300_2.png) [@StevenMurray2022](https://discourse.nodered.org/u/StevenMurray2022)\
**Post date:** [11 March 2022 14:00 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/6 "2022-03-11T14:00:13Z")

</div>

Could you walk me through that? I'm a proper noob on NodeRed..? 🙂

---

<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:** [11 March 2022 14:06 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/7 "2022-03-11T14:06:29Z")

</div>

Can you post your flow here. Payload should not be in Global context, unless you created a global context variable called "payload". If you export your flow from the editor menu, then press  
the "\</\>" button in the post dialogue and insert the exported flow.  
where it tells you to.

---

<div class="post-metadata">

**Author:** ![StevenMurray2022](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevenmurray2022/32/58300_2.png) [@StevenMurray2022](https://discourse.nodered.org/u/StevenMurray2022)\
**Post date:** [11 March 2022 14:15 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/8 "2022-03-11T14:15:28Z")

</div>

Ok. I've added a debug node directly after the SMS Receiver node and it appears that the SMS Node is limiting the output to 160 characters..

```auto
[{"id":"6da2a39b.2ca16c","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"e47c75a8.b06d08","type":"sms_receiver","z":"6da2a39b.2ca16c","filter":"+447710678310","name":"SMS1(SMU)","x":130,"y":120,"wires":[["3d633216.6f141e","7180301c.45ba","ef70fc12.a5587"]]},{"id":"396bb7e9.cafc48","type":"serial out","z":"6da2a39b.2ca16c","name":"Serial Out","serial":"935696bb.966468","x":800,"y":120,"wires":[]},{"id":"1037b10d.84135f","type":"sms_sender","z":"6da2a39b.2ca16c","number":"+44","prepend":"","name":"SMS1(SMU)","x":590,"y":360,"wires":[]},{"id":"3d633216.6f141e","type":"trigger","z":"6da2a39b.2ca16c","op1":"","op2":"SMU Report has been received","op1type":"nul","op2type":"str","duration":"250","extend":false,"units":"ms","reset":"","bytopic":"all","name":"SMU RX Message","x":370,"y":360,"wires":[["1037b10d.84135f"]]},{"id":"7180301c.45ba","type":"debug","z":"6da2a39b.2ca16c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":460,"y":200,"wires":[]},{"id":"ef70fc12.a5587","type":"string","z":"6da2a39b.2ca16c","name":"Prepend Message","methods":[{"name":"prepend","params":[{"type":"str","value":"*"}]}],"prop":"payload","propout":"payload","object":"msg","objectout":"msg","x":490,"y":120,"wires":[["396bb7e9.cafc48"]]},{"id":"935696bb.966468","type":"serial-port","z":"","serialport":"/dev/ttyS0","serialbaud":"9600","databits":"8","parity":"none","stopbits":"1","waitfor":"","newline":"","bin":"false","out":"char","addchar":"#","responsetimeout":"10000"}]

```

---

<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:** [11 March 2022 14:16 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/9 "2022-03-11T14:16:24Z")

</div>

Which is the normal limit for an SMS message.

---

<div class="post-metadata">

**Author:** ![StevenMurray2022](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevenmurray2022/32/58300_2.png) [@StevenMurray2022](https://discourse.nodered.org/u/StevenMurray2022)\
**Post date:** [11 March 2022 14:19 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/10 "2022-03-11T14:19:15Z")

</div>

But if I send the full message directly to my colleagues mobile, they get the full 362 Characters... I guess it could be down to the ASDA Sim I'm using in the modem...

---

<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:** [11 March 2022 14:21 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/11 "2022-03-11T14:21:17Z")

</div>

I cannot try anything here as I don't have SMS nodes installed.

---

<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:** [11 March 2022 14:21 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/12 "2022-03-11T14:21:54Z")

</div>

> [@StevenMurray2022](#):
>
> I guess it could be down to the ASDA Sim I'm using in the modem...

Possible!

---

<div class="post-metadata">

**Author:** ![StevenMurray2022](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevenmurray2022/32/58300_2.png) [@StevenMurray2022](https://discourse.nodered.org/u/StevenMurray2022)\
**Post date:** [11 March 2022 14:27 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/13 "2022-03-11T14:27:17Z")

</div>

> [@ghayne](#):
>
> Possible!

 ![sms](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/9/f9fcccfb7c212354c0cc4c21bbb376d14a1d3d8c.png)

---

<div class="post-metadata">

**Author:** ![StevenMurray2022](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevenmurray2022/32/58300_2.png) [@StevenMurray2022](https://discourse.nodered.org/u/StevenMurray2022)\
**Post date:** [11 March 2022 14:28 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/14 "2022-03-11T14:28:35Z")

</div>

BOO!... Thanks very much for your assistance with this @ghayne. 🙂

---

<div class="post-metadata">

**Author:** ![StevenMurray2022](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevenmurray2022/32/58300_2.png) [@StevenMurray2022](https://discourse.nodered.org/u/StevenMurray2022)\
**Post date:** [11 March 2022 14:45 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/15 "2022-03-11T14:45:04Z")

</div>

Is there a function that you know of within NodeRed that could take the split messages and reconstitute them into a single message prior to sending them out as a serial string?

---

<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:** [11 March 2022 15:00 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/16 "2022-03-11T15:00:53Z")

</div>

Have a look at the Join node!

---

<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:** [11 March 2022 15:05 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/17 "2022-03-11T15:05:33Z")

</div>

Like this:

```auto
[
    {
        "id": "2f55b30644be1197",
        "type": "tab",
        "label": "Flow 2",
        "disabled": false,
        "info": "",
        "env": []
    },
    {
        "id": "10b71daa4f1b1bb0",
        "type": "inject",
        "z": "2f55b30644be1197",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "Message1",
        "payloadType": "str",
        "x": 100,
        "y": 100,
        "wires": [
            [
                "9e773d118fa24bdc"
            ]
        ]
    },
    {
        "id": "9e773d118fa24bdc",
        "type": "join",
        "z": "2f55b30644be1197",
        "name": "",
        "mode": "custom",
        "build": "string",
        "property": "payload",
        "propertyType": "msg",
        "key": "topic",
        "joiner": "",
        "joinerType": "str",
        "accumulate": false,
        "timeout": "",
        "count": "2",
        "reduceRight": false,
        "reduceExp": "",
        "reduceInit": "",
        "reduceInitType": "",
        "reduceFixup": "",
        "x": 330,
        "y": 100,
        "wires": [
            [
                "521b3db1a5d220e2"
            ]
        ]
    },
    {
        "id": "fbe2a05264d45f1f",
        "type": "inject",
        "z": "2f55b30644be1197",
        "name": "",
        "props": [
            {
                "p": "payload"
            }
        ],
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "topic": "",
        "payload": "Message2",
        "payloadType": "str",
        "x": 100,
        "y": 140,
        "wires": [
            [
                "9e773d118fa24bdc"
            ]
        ]
    },
    {
        "id": "521b3db1a5d220e2",
        "type": "debug",
        "z": "2f55b30644be1197",
        "name": "",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "false",
        "statusVal": "",
        "statusType": "auto",
        "x": 610,
        "y": 100,
        "wires": []
    }
]

```

---

<div class="post-metadata">

**Author:** ![StevenMurray2022](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevenmurray2022/32/58300_2.png) [@StevenMurray2022](https://discourse.nodered.org/u/StevenMurray2022)\
**Post date:** [11 March 2022 15:44 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/18 "2022-03-11T15:44:16Z")

</div>

Will do. Thank you very much for your help with this. 👏 🙂

---

<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:** [11 March 2022 17:18 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/19 "2022-03-11T17:18:39Z")

</div>

No problem!

---

<div class="post-metadata">

**Author:** ![StevenMurray2022](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/stevenmurray2022/32/58300_2.png) [@StevenMurray2022](https://discourse.nodered.org/u/StevenMurray2022)\
**Post date:** [14 March 2022 15:13 UTC](https://discourse.nodered.org/t/message-payload-limitations/59711/20 "2022-03-14T15:13:33Z")

</div>

Hi Garry, would you know of a method to remove the User Data Header from the individual SMS strings prior to them being reconstituted into a single message? I thought there may be a function where I can remove 'x' number of characters from the start of the string, thereby removing the header..? The length of the header is explained here:

> **[User Data Header](https://en.wikipedia.org/wiki/User_Data_Header)**
>
> User Data Header (UDH) is a binary structure which may be present at the start of a short message in the Short Message Service in GSM. It does not contain any text, but it specifies how the message should be formatted and processed.
> UDH can be used to form Concatenated SMS, to enrich the content of the message with colors, text formatting, small pictures and animations and simple music which are used in Enhanced Messaging Service (EMS), to convey port numbers which may cause start of an applicat...

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/9/4918bb72a4d36155491dd1bac2af6f3a3d3ffdd2.png)

[Next page](https://discourse.nodered.org/t/message-payload-limitations/59711.md?page=2)
