I've got a problem with some MQTT code whereby it ONLY works when the nodeMCU is connected via USB, and ESPlorer (v0.2.0-rc2) is connected. If I leave the board connected to the laptop, but close the ESPlorer connection, again, it won't connect to the MQTT broker (nodeMCU actually crashes and restarts). If I plug the board into an external power supply, again, it doesn't connect to the broker (again nodeMCU crashes and restarts).
Things I've tried include:
1. ensuring init.lua runs (after an initial 5 second pause)
2. removing all non-essential code which could somehow have an effect on the code (even down to basic print statements)
3. ensuring there is a wireless connection before making the connect call
The nodeMCU is flashed with: nodemcu_float_0.9.6-dev_20150704.bin - I presume this is the latest one to use?
Its just so strange because the exact same code runs completely fine when the board is connected and ESPlorer is running (and connected).
Has anyone come across this before?