
Page 1 Table of Contents Introduction................................................................................................................................19 Overview....................................................................................................................................21 The ESP8266........................................................................................................................22 Maturity.................................................................................................................................23 The specification...................................................................................................................23 ESP8266 Modules.................................................................................................................24 ESP-12.............................................................................................................................24 ESP-1...............................................................................................................................28 Adafruit HUZZAH..............................................................................................................34 NodeMCU devKit..............................................................................................................34 node.IT (aka ESP-210).....................................................................................................36 SparkFun WiFi Shield – ESP8266....................................................................................36 Oak by digistump..............................................................................................................36 Connecting to the ESP8266.......................................................................................................36 WiFi Theory...............................................................................................................................38 AT Command Programming.......................................................................................................39 Commands............................................................................................................................40 Installing the latest AT command processor..........................................................................47 Assembling circuits....................................................................................................................47 USB to UART converters.......................................................................................................47 Breadboards..........................................................................................................................49 Power....................................................................................................................................49 Multi-meter / Logic probe / Logic Analyzer.............................................................................50 Sundry components..............................................................................................................50 Physical construction.............................................................................................................50 Recommended setup for programming ESP8266.................................................................51 Configuration for flashing the device.....................................................................................53 Programming.............................................................................................................................54 Boot mode.............................................................................................................................54 The ESP8266 SDK................................................................................................................55 Include directories.............................................................................................................55 Compiling..............................................................................................................................56 Loading a program into the ESP8266...............................................................................63 Programming environments..............................................................................................67 Compilation tools..............................................................................................................67 ar..................................................................................................................................67 esptool.py.....................................................................................................................67 esptool-ck.....................................................................................................................69 gcc...............................................................................................................................71 gen_appbin.py..............................................................................................................72 Page 2 make............................................................................................................................73 nodemcu-flasher..........................................................................................................73 nm................................................................................................................................75 objcopy.........................................................................................................................75 objdump.......................................................................................................................76 xxd...............................................................................................................................76 Linking...................................................................................................................................76 Debugging.............................................................................................................................77 Logging to UART1............................................................................................................78 Run a Blinky.....................................................................................................................78 Dumping IP Addresses.....................................................................................................79 Exception handling...........................................................................................................79 Using a debugger (GDB)..................................................................................................81 Debugging and testing TCP and UDP connections...........................................................81 Android – Socket Protocol............................................................................................81 Android – UDP Sender/Receiver..................................................................................81 Windows – Hercules....................................................................................................82 Curl..............................................................................................................................82 Eclipse – TCP/MON.....................................................................................................82 httpbin.org....................................................................................................................84 Architecture...........................................................................................................................84 Custom programs.............................................................................................................84 WiFi at startup.......................................................................................................................85 Working with WiFi..................................................................................................................85 Scanning for access points...............................................................................................85 Defining the operating mode.............................................................................................86 Handling WiFi events........................................................................................................87 Station configuration.........................................................................................................88 Connecting to an access point..........................................................................................89 Control and data flows when connecting as a station.......................................................89 Being an access point.......................................................................................................90 The DHCP server.............................................................................................................92 Current IP Address, netmask and gateway.......................................................................92 WiFi Protected Setup – WPS............................................................................................93 Working with TCP/IP.............................................................................................................93
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages338 Page
-
File Size-