ESP8266 driver using the NodeMCU interface

Dependencies:   BufferedSerial

Dependents:   esp8266_nodeMCU1 esp8266_2_thingspeak1 Solarator_0-0-2 IoTBurglar_and_Fire_AlarmSystem ... more

Fork of ESP8266Interface by ESP8266

This is an alternative implementation of the ESP8266 driver that uses the NodeMCU firmware. The NodeMCU firmware provides a slightly larger feature set than the default firmware through a Lua interpreter.

Note

This library is currently in Alpha. It is not feature complete and has some bugs, proceed with caution. Fixes and patches are welcome!

Interface changes

  • SSID and passphrase moved out of ESP8266Interface constructor and to ESP8266Interface::connect
  • ESP8266Interface constructor provides optional timeout parameter to specify how long to wait for network operations

Note

NodeMCU defaults to a baud rate of 9600 instead of 115200 used by the default firmware.

Firmware

To install the NodeMCU firmware, follow the instructions on the Firmware Update wiki page using the nodemcu_integer_0.9.6-dev_20150406.bin binary at address 0x00000 instead of boot_v1.1.bin and user1.bin.

Since the NodeMCU firmware defaults to a baud rate of 9600, the Serial Passthrough program can be used to get direct access to the Lua interpreter running on the ESP8266.

Status

Working features:

  • TCP Client
  • UDP Client Transmit (Currently only UDP Server can recieve messages)
  • Single Connection at a time
  • Station Mode (Connects to AP)
  • DNS Lookups

To be implemented:

  • TCP Server
  • UDP Server
  • UDP Client recieve
  • Multiple Connections tracked through Lua variables
  • AP Mode (Act as access point)
  • IPV6 support (Existing issue with NodeMCU)

History

Fix for not using full buffer in TCP recieve default tip

2015-06-04, by geky [Thu, 04 Jun 2015 20:45:00 +0000] rev 48

Fix for not using full buffer in TCP recieve


Merged rev 46/45

2015-06-04, by geky [Thu, 04 Jun 2015 20:18:39 +0000] rev 47

Merged rev 46/45


Seperated sent messages into chunks to keep from overflowing the Lua buffer

2015-06-04, by geky [Thu, 04 Jun 2015 20:14:52 +0000] rev 46

Seperated sent messages into chunks to keep from overflowing the Lua buffer


Sanitized both transmitted and recieved strings

2015-06-04, by geky [Thu, 04 Jun 2015 19:26:35 +0000] rev 45

Sanitized both transmitted and recieved strings


Reimplemented ESP8266 driver using the Nodemcu firmware

2015-06-03, by geky [Wed, 03 Jun 2015 21:44:20 +0000] rev 44

Reimplemented ESP8266 driver using the Nodemcu firmware


added warning about sending messages > 2048 bytes

2015-05-07, by mbedAustin [Thu, 07 May 2015 04:00:27 +0000] rev 43

added warning about sending messages > 2048 bytes


enabled TCPConnection debug messages, made tcpconnection and socket messages more verbose (file and line number included in output)

2015-05-07, by mbedAustin [Thu, 07 May 2015 03:51:02 +0000] rev 42

enabled TCPConnection debug messages, made tcpconnection and socket messages more verbose (file and line number included in output)


cleaned up DBG printf messages, made print pretty

2015-05-07, by mbedAustin [Thu, 07 May 2015 03:37:55 +0000] rev 41

cleaned up DBG printf messages, made print pretty


Update so close exits transparent mode without depending on state from the application

2015-05-04, by sam_grove [Mon, 04 May 2015 12:04:54 +0000] rev 40

Update so close exits transparent mode without depending on state from the application


trying to merge a previous rev

2015-05-02, by mbedAustin [Sat, 02 May 2015 04:08:30 +0000] rev 39

trying to merge a previous rev