I'm able to successful connect to the dweet.io HTTP server and send the light sensor readings. To do so, I use the following code:
AT+CIPMUX=1
AT+CIPSTART=0,"TCP","dweet.io",80
AT+CIPSEND=0,76
GET /dweet/for/arduino-lighttest?sensorValue=95 HTTP/1.1
Host: dweet.io
AT+CIPCLOSE=0
However, when it comes to MQTT, I don't know how to send similar TCP commands to post Analog sensor values to a MQTT sever... Nevertheless I saw this in a site:
So my question, is it possible to use ESP8266 ESP-01 with an Arduino Uno board to connect to a MQTT server like you do with an HTTP server, or when it comes to MQTT you simple can't use an ESP8266 with an Arduino Uno Board to send data?
Like I told, are AT commands used in a sketch that uses the library <SoftwareSerial.h>. It is code in the sense that was quoted as code... Forum interface!
PaulS:
Something happens when you try that, with appropriate substitutions of course. We can't see what that is, or what your problem really is.
I find these AT commands, I never try them, because I see no logic in them!
The question is very simple, which AT commands to use to communicate with a MQTT server in the same way you communicate with an HTTP server? I read somewhere that the MQTT protocol is a binary protocol and the header is not ASCII text like in HTTP protocol... This is the problem, MQTT protocol is a more complicate one and I don't know how to solve this question, and it looks like no one else does!
I m also trying to find solution for this, i couldnt connect to cloudmqtt using wifiesp and pubsubclient library. i get the -2 connection failed error on serial monitor and in the cloudmqtt log it says socket error on client. If you were successfully able to send data to mqtt server , then please help.