To get work MQTT protocol on SIM800 module

Step1: Able to connect and publish the packet to cloudmqtt server in the command prompt using mqtt commands.
Step2: Trying out using the Hercules software, able to connect cloudmqtt server

Able to send the CONNECT packet to cloudmqtt.
user name: nrquyukd
passwrod: 5RdCqIC8RVyw
Topic: valetron
Client ID: nrquyukd(same as user name and its working, before I was trying with other client ID but not able to connect)
connect packet:
102F00064D514973647003C2003C000863796F677A77786100086e72717579756b64000C355264437149433852567977

publish packet:
3013000876616C6574726F6E68656C6C6F72617669

Problem facing:
At terminal side:
When I send the publish packet using terminal, show like this
TCP connection error :10054
Connection closed
Connection refused by remote host

At cloudmqtt side:
2018-08-07 05:51:21: New connection from 122.172.58.67 on port 13093.
2018-08-07 05:51:30: New client connected from 122.172.58.67 as nrquyukd (c1, k60, u’nrquyukd’).

Terminal snap
This text will be hiddenterminalside

Thanks,
Mahesh

Its because your publish packet is not formed correctly. Are you sending the packet in HEX/Binary mode?

I’m sending packet in HEX format. What data is incorrect in the packet?