Brief ESP12 MQTT Update

After a little conversation back and forth, the MQTT code now works and the Really Small Message Broker is running just fine as a service, no surprises with the ESP-12 and tomorrow if time permits I’ll import some port control into the package and use a couple of those handy port bits to give out status information.  Tackling input into the serial port is another matter – no idea how to do that yet but how card can it be.

It really would help if Espressif would release the SDK technical docs as I asked. You’d think they didn’t want to sell any chips!


6 thoughts on “Brief ESP12 MQTT Update

  1. Hi Peter,
    Had a little time this weekend to get back into the esp and the wealth of info you provide. Amazing that you find the time and are so free with your help, knowledge and ability to source problem fixes. Very few guys like you around!
    The MQTT looks the definite way to go, looking at things like IBM and the military use etc.etc.
    I got the windows sdk up and flashed the latest mqtt up ( thanks to your guidance again), Although android to RPi mosquito works fine, I’ve tried for hours to get the esp locked in, but no way.
    Removed the security side in calls and it then tells me it actually has associated with topics etc,
    (mosquito sees it … although registers it as a null)
    but just seems to lock up the broker, then connect/disconnect.

    Just thought I’d ask if you have had any issues like this?
    I’ll keep plugging away, but if you had any clues it would certainly relieve some frustrations!


    • Hi

      Well, my time is running out – I start endless meetings again tomorrow – I spent way too long over the Christmas on this but by some of the kind comments it was worthwhile to help others struggling with the same problems. That connect/disconnect sounds familiar – I got that when I had the wrong constant for security… in file user_main.c – function user_init… ensure the line ends with this..

      sysCfg.mqtt_port, SEC_NONSSL);

      At that point it all started working fine – but only late last night – the code is now fully functional as far as I can tell.

      I’m sitting here feeling like an idiot – the fellow who wrote MQTT-SPY has modified his latest beta (it works) to make the XML readable (ie line feeds!!) and he’s even done a little time script for me – very helpful – but I just cannot fathom out what the hell you’re supposed to do with the publication scripts. Essentially the idea is to have one running constantly along with the broker, spitting out a time channel at regular intervals. My little effort with Really Small Message broker and the tool to make it a service has paid off – several reboots later it’s still sitting there working reliably. I want to make a couple of publiction channels – one which updates the time every minute and spits that out, another which merely reports on request the time and date the program started up – so I can (a) have my gadgets know what time it is without having to call yet another service – and another so I can keep an eye on any power cuts or reboots for any reason.

      • sysCfg.mqtt_port, SEC_NONSSL); Yup…… worked a treat, really appreciated.
        Now it starts to get interesting! Lots to learn, but it looks like it is in a very worthwhile direction now.


  2. For documentation, I haven’t found anything on a platter yet, like a nice US-style evaluation kit would have, but I have found bits and pieces, including stuff from Tensilica, the architects of the xtensa processor. Most of these show up in a google search for “esp8266 filetype:pdf”, and “xtensa filetype:pdf”.

    I’m not that experienced yet with C on bigger microcontrollers, but between these docs and the abundance of implementation examples from Espressif and others, I’m finding lots to learn from.

    “You’d think they didn’t want to sell any chips!”

    The truth is that China’s technical capabilities are rapidly maturing, and they have a huge emerging Asian market to satisfy. I suspect they’re already selling lots, and these chips may have already found their way into many commercial products (that may or may not make it to the West), and we tinkerers are just an afterthought.

    My other thought is that maybe local adoption hasn’t been as strong as they’d hoped, so they’ve put this IC “out there” to gain some publicity and buzz, to get some free development from the open-source and hacker community, to have the IC find its way into commercial products via this route.

    And the whole situation around dirt-cheap parts AND free/cheap postage from China! I don’t get it, and it seems a real kick in the cobblers to our local businesses… but as an independent developer and hobbyist, it’s been a boon. In the comments around Hackaday’s article on another Chinese “gem”, the whole situation gets discussed. Interesting times…

  3. Pete,
    I found two ESP8266 SDK documents from a Chinese Web Sites. The documents are: Espressif IoT Programing Manual and Espressif SDK User’s Manual. Unfortunately, both of them are written in Chinese. The programing manual has a complete description of system functions. The user’s manual provides instruction on installation of virtual ESP8266, development tool instructions, and SDK package structure. If you are interested in these documents, please send me an e-mail. I will forward them to you. Thank!

    • A thanks for that, really appreciated but now I have the docs. I put a link up elsewhere to the 0.9.2 SDK docs in English. Also subject to an NDA Espressif will (may) part with up to date 0.9.4 SDK docs and other material. Also in the IOT demo code they use many of the functions. Even armed with docs I am not sure how to integrate comma input to the MQQT code… Things like what flash is left available and dram use are still escaping me. Will return to this later in the week.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s