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)

Revisions of ESP8266/ESP8266.cpp

Revision Date Message Actions
47:04632d22a723 2015-06-04 Merged rev 46/45 File  Diff  Annotate
46:4abb80f0a920 2015-06-04 Seperated sent messages into chunks to keep from overflowing the Lua buffer File  Diff  Annotate
45:3cfb7406d993 2015-06-04 Sanitized both transmitted and recieved strings File  Diff  Annotate
44:16da10e7b3f7 2015-06-03 Reimplemented ESP8266 driver using the Nodemcu firmware File  Diff  Annotate
43:2e326d95fe2c 2015-05-07 added warning about sending messages > 2048 bytes File  Diff  Annotate
42:3f62103a4f3c 2015-05-07 enabled TCPConnection debug messages, made tcpconnection and socket messages more verbose (file and line number included in output) File  Diff  Annotate
41:264902b160ea 2015-05-07 cleaned up DBG printf messages, made print pretty File  Diff  Annotate
40:0a83315aea0a 2015-05-04 Update so close exits transparent mode without depending on state from the application File  Diff  Annotate
38:86e75901efc1 2015-05-02 trying to merge things together... File  Diff  Annotate
37:6887e61cf674 2015-05-02 Updated UDP LIbrary sentto command to initialize endpoint flag. was lost in a previous commit on accident. File  Diff  Annotate
36:e1545c6c2cb3 2015-05-02 updated debug command prints File  Diff  Annotate
34:7ccda5d68a00 2015-05-01 safety commit File  Diff  Annotate
32:cf071dc33972 2015-04-30 TCP Send / Recieve Working File  Diff  Annotate
30:c035696b9397 2015-04-29 Safety Save File  Diff  Annotate
29:939372104145 2015-04-28 Added IP Function, made all Serials RAWSerials; File  Diff  Annotate
28:91e65e22e63a 2015-04-28 aquiring IP Address correctly, but not returning it from inner call level. Safety commit before mucking around File  Diff  Annotate
26:0d5bcb3903e2 2014-12-30 set baud rate and remove printf from rx handler File  Diff  Annotate
25:8e2b04473830 2014-12-30 Starting AT v0.2 support for ESP8266 File  Diff  Annotate
24:03585a13ff3b 2014-12-11 Added hardware reset File  Diff  Annotate
23:de9221771e96 2014-12-08 Added CWMODE command to join() File  Diff  Annotate
22:c4360e61486a 2014-12-02 Add state.cmdMode and some cleanup File  Diff  Annotate
20:d764237405c2 2014-12-01 cleanup File  Diff  Annotate
19:fb8d5bff2076 2014-12-01 sync File  Diff  Annotate
18:60422852e99c 2014-12-01 sending stuff File  Diff  Annotate
17:d11fa4c3ac65 2014-12-01 working sort of File  Diff  Annotate
16:3f0efaa57a12 2014-12-01 sync File  Diff  Annotate
15:37a7a56a424f 2014-11-30 reorganize File  Diff  Annotate
14:4d1128f72e00 2014-11-30 Add getIPAddress File  Diff  Annotate
13:41098c907200 2014-11-30 First commit function templates for lightweight UDP client interface to ESP8266 File  Diff  Annotate | base