---
title: "MQTTPUBSEND"
url: "https://maker.wiznet.io/forum/14997"
markdown_url: "https://maker.wiznet.io/forum/14997/md"
type: "Forum topic"
category: "Wireless"
author: "VICe95"
created: "2023-08-03T07:12:47+09:00"
last_activity: "2023-08-07T04:16:56+09:00"
language: "en"
views: 285
replies: 3
source: "WIZnet Makers forum (https://maker.wiznet.io/forum/)"
---

# MQTTPUBSEND

## Question

Asked by VICe95 on 2023-08-03 in Wireless.

I installed firmware 1.1.1.9 on my wizFi360. I’m trying to use AT+MQTTPUBSEND to send binary data but it always returns error. is this command handled by this firmware?

## Replies

### Reply 1 by scarlet, 2023-08-03

Hello, this is WIZnet. I am attaching the screen that I tested here.
![image](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/4/4cb63c5fde315b8ea597225845aa409efb546059.png)

Did you enter the length of the following data for [AT+MQTTPUBSEND=]?
(ex. AT+MQTTPUBSEND=5 > 12345)
You should enter the length in advance and then transmit data of that length.

Please refer to the command document for more details.

[docs.wiznet.io](https://docs.wiznet.io/img/products/wizfi360/wizfi360ds/wizfi360_atset_v1118_e.pdf)

<https://docs.wiznet.io/img/products/wizfi360/wizfi360ds/wizfi360_atset_v1118_e.pdf>

### [wizfi360_atset_v1118_e.pdf](https://docs.wiznet.io/img/products/wizfi360/wizfi360ds/wizfi360_atset_v1118_e.pdf)

1061.56 KB

[![image](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/d/d483c712826f516f26a3f8335859dba2c5c087a9.png) image735×637 41.3 KB](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/d/d483c712826f516f26a3f8335859dba2c5c087a9.png)

### Reply 2 by VICe95, 2023-08-04

![](https://avatars.discourse-cdn.com/v4/letter/s/7ab992/48.png) scarlet:

> AT+MQTTPUBSEND=5 > 12345

AT+MQTTPUBSEND return always error

```
AT+RESTORE

OK

ready
WIFI CONNECTED
WIFI GOT IP

OK
AT+CWMODE_CUR=1

OK
AT+CWDHCP_CUR=1,1

OK
AT+CWJAP_CUR="xxxxxxxxxx","xxxxxxxxxxxxxxxx"
WIFI DISCONNECT
WIFI CONNECTED
WIFI GOT IP

OK

AT+CIPSSLCCONF=0

OK
AT+CIPMUX=1

OK

AT+MQTTSET="xxxxxxxxxxxxxx","xxxxxxxxxxxxxx","xxxxxxxxxxxxxx",60

OK
AT+MQTTTOPIC="xxxxxxxxxxxxxx",""

OK

AT+MQTTCON=0,1,"xxxxxxxxxxxxxx",8883
0,CONNECT

OK
AT+MQTTPUB="0123456789"

OK
TESTIR1234567890 -> 0123456789


AT+MQTTPUBSEND=15

ERROR

AT+MQTTPUBSEND=5

ERROR

AT+GMRAT+GMR
AT version:1.1.2.0(Apr 12 2023 08:08:36)
SDK version:3.2.0(a0ffff9f)
compile time:Apr 12 2023 08:08:36

OK
```

### Reply 3 by scarlet, 2023-08-07 (in reply to reply 2)

You’re using MUXID, then the command is [AT+PUBSEND=ID,Legnth ].
The document doesn’t explain it well enough. We’ll fix that part.

example is here.
![image](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/5/5c92e9245ce0f39cc5bd3988ec1e91f02462b97a.png)

![image](https://maker.wiznet.io/forum_uploads/wiznet/original/2X/f/f96eb2b91edef81228179c665eeae32088a24760.png)

---

Source: https://maker.wiznet.io/forum/14997
