12

I just started looking into MQTT protocol.

Situation

In my college project, currently, I use Arduino as main MCU and do every work in that and use Serial Comm. to send AT commands to esp8266 (for HTTP requests, to run scripts on server etc). I basically needed to push some data(from Arduino) on a webpage(hosted by a local server). I searched and found about MQTT protocol which enables to publish and subscribe data on clients(Exactly what I wanted). But most of the tutorials I am finding are either entirely on Arduino(with wifi shield) or entirely on esp8266.

What I want to know is that is there a possible way to use MQTT as with my current configuration? That is, using Arduino to do all the work and by using its serial comm. Publishing data just by AT commands on MQTT.

Additional Information about my project is mentioned here : Confused about which technology to use in Smart Home System

7
  • You can send MQTT over wifi between Arduino and ESP. No need to do the physical connection. Mar 8, 2017 at 13:04
  • for that I'd be needing wifi on Arduino too isn't it? I don't need to send data between Arduino and ESP. I am using esp for sending data from arduino to local server, my arduino doesnt have a wifi shield Mar 8, 2017 at 13:09
  • Aha, if you have the physical connection already done just look at the FW ESP Easy, which have a pretty solid MQTT integration out of the box. Mar 8, 2017 at 13:10
  • sonyarouje.com/2016/03/15/… I found this post, Is it what you were saying :P Is it the way to go ? Sorry I am just super newb :D Mar 8, 2017 at 13:18
  • 1
    I tried MQTT over UART(to send AT commands to esp8266) github.com/nopnop2002/MQTT_UNO
    – nopnop2002
    Nov 23, 2017 at 7:26

1 Answer 1

5

I finally found a tutorial by Sony Arouje. As it turns out I had to completely abandon manual sending of esp commands and had to use the library (WiFiEsp.h). Hint...It's better!

Though initially it didn't work with my esp8266 because it had an older firmware and reported error "firmware not supported". I had to flash a newer Firmware (works with version 1.54 in my case). Anyone having problem flashing firmware may find some help referring this topic: Can't Flash ESP8266 latest firmware, says "Fast Flashing error" and "Invalid head of packet(' ')"

Also, I have saved a copy of all download tools and the tutorial page itself, so if in the future, the post is removed or if anyone doesn't finds the tools to flash. Get to me in comments or something (not posting here because I don't know if it's ok to post someone else's content)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.