# Installing `esptool` $ git clone https://github.com/themadinventor/esptool.git $ cd esptool $ python setup.py install -local # NodeMCU Uploader This tool uploads the Lua files. Requires that the device is runnig the Lua firmware. $ git clone https://github.com/kmpm/nodemcu-uploader.git $ cd nodemcu-uploader https://github.com/nodemcu/nodemcu-firmware # Talking to the Lua firmware On unix Screen is a useful tool to talk to serial ports. Usage: $ screen $ screen /dev/ttyUSB0 9600 After starting screen and pressing reset you should get some output similar to this: <��������������x� NodeMCU 0.9.6 build 20150704 powered by Lua 5.1.4 lua: cannot open init.lua > The first garbage output is expected and is from the bootloader trying to autodetect the baud rate. # First Code Open screen and paste this code: -- Get the current IP ip = wifi.sta.getip() -- This should print nil print(ip) -- Configure the device wifi.setmode(wifi.STATION) wifi.sta.config("...", "...") -- Now check that the IP is assigned. It might take some time so try again. ip = wifi.sta.getip() print(ip) # References * [Lua API](https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en)