[newbie] compilation chain on arduino IDE


First, I appologize as I wonder this will sound a very stupid question for most people here, but I already spend many days firuging out how to get OpenMQTTgw compiled, and I’m still stalled, and the online documentation assume the reader is comfortable with this, and this is not my case :frowning:

So, I want to use OpenMQTTgw on an ESP8266 device. My current HW setup is a single ESP8266 devicewith only IR emitter and receiver as described on the wiki here : IR with ESP8266

I cloned the github and tried to compile it with arduino IDE, but I got many dependencies issues. I then copied the “lib” content into my “Library” arduino homedir, then I got many compilation errors, like these:

/home/rico/Arduino/libraries/WiFiManager/WiFiManager.cpp: In member function 'void WiFiManager::setupConfigPortal()':
/home/rico/Arduino/libraries/WiFiManager/WiFiManager.cpp:146:71: error: no matching function for call to 'ESP8266WebServer::on(String, std::_Bind_helper<false, void (WiFiManager::*)(), WiFiManager* const>::type)'
server->on(String(F("/")), std::bind(&WiFiManager::handleRoot, this));


I also tried to compile v0.8 instead of MASTER, with the same results

I finally flashed the v0.8 binary image released, and it works… but the pin assignment is not compatible with my ESP8266, as it expects IR emitted drived by pin 1, but the ESP8266 have only GPIO from 0 to 15 !

So back to first step, I definitively need to compile successfully the code ! Would it be possible to get some explanation on how to proceed ? As you’ll probably understood, These are my first tries with Arduino IDE and I probably missed some steps…

Thanks for you support,



Hello Eric,

could you remove the libraries used by omg (list on Openmqttgateway/lib) from
and recopy the ones from

I suspect an issue with an already existing library at wrong version.

Regarding pins, per default here is the IR definition:
#ifdef ESP8266
#define IR_EMITTER_PIN 16 // replace by 0 if you use IR LOLIN controller shield

This corresponds to :

Meaning that you should be able to use the binary file with this pinout.

More info there:

Thanks for your very fast reply !
I finally removed all my existing Arduino environment (removing my ~/.arduino15 and ~/Arduino directories) then re-imported ESP8266 boards from ESP8266 github, and finally moved libs from omg lib directory into ~/Arduino/Libraries directory as suggested, and then I’m finally able to compile to upload openMQTTgw into my ESP directly from the Arduino IDE :champagne:

But I’m still confused by pin assignment: my board is an ESP12F as seen on this page ESP12-F
GPIO0 is not the best choice as it select the boot mode for the board. Ideally I would use GPIO4/5 for my application but you table is not clear on how to declare the pin assignment : should I use the GPIO numbers, or the pin numbers, or something else ?


I definitively don’t understand: when I flash your released binary, the ESP is working correctly, even if I can’t use the IR receiver port, but when I upload the code (v0.8) from Arduino IDE, the ESP cycle boot with these messages:

ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d

I can flash ESP example program, it work, but not your, even if I keep it with its default config !

I found posts that deals with powering issues, but I’m using a regulated 3.3V/5V power source, capable of delivering 2A so I wonder I can exclude this case…

My arduino env is 1.8.5, it’s stock except ESP8266 core boards (v2.4.2) and no libs except the ones included with OpenMQTTGateway I moved into ~/Arduino/libraries

Any idea ?

You can either use GPIO or pin, the difference is taken into account at build time (the compiler translate D0 to 16) but you can change pin assignment on config_IR.h

If you flash it and run it without any external components like led or ir receiver does it reset either?

I put a picture of my hw setup.

As you can see, the purple and white wires, which are respectively GPIO16 and GPIO2 are left unwired for the test, and yes, it still cycle boot :slight_smile:

ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d

 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d

The only connected wires are the one required for proper operational mode of the ESP:

  • to ground:
    • GND
  • to VCC (3.3v):
    • VCC
    • CHPC
    • GPIO0

Again, your released binary is working well only my compiled code provoke this behavior.

Do you have a nodemcu or other equivalent dev board to try with?

Excellent suggestion !

I loaded the code into a NodeMCU 1.0 board, and it worked prefectly !

So what the hell can be wrong with my ESP-12F board ??? I noticed the OpenMQTTgw parameters (SSID, MQTT address, user & pwd) are kept between flashes. So I assume the whole flash is not erased during the uploading sequence ? Maybe some piece of code is remaining somewhere and it shouldn’t ?

I tried to erase the flash with esptool.py utility, then flashed once again the ESP module, and guess what ? now it works !

I sincerly thank you for your availibility and good advices, and I appologize for the noise :slight_smile:
And of course, many thanks for your hard work to release this nice piece of code :clap:

Glad to hear that it works!
Bonne continuation avec OMG