ESP8266 test with W7500. You can monitor UART Tx/RX of ESP8266.

Dependencies:   ESP8266Interface

Fork of ESP8266_Test by ESP8266

I tested ESD-01(ESP8266 module) with WIZwiki-W7500 platform as below. /media/uploads/SteveKim/esd01.jpg

You can see the all log of this test as below. And with this ESP8266Interface class, you can monitor Tx/Rx of ESP8266 module UART.

WIZwiki-W7500 with ESP8266 Test. 
AT

OK
AT+RST

OK

 ets Jan  8 2013,rst cause:4, boot mode:(3,6)

wdt reset
load 0x40100000, len 612, room 16 
tail 4
chksum 0x12
load 0x3ffe8000, len 788, room 4 
tail 0
chksum 0x50
load 0x3ffe8314, len 264, room 8 
tail 0
chksum 0x4a
csum 0x4a

2nd boot version : 1.1
  SPI Speed      : 40MHz
  SPI Mode       : QIO
  SPI Flash Size : 4Mbit
jump to run user1

s
ready
AT+CWDHCP=1,1

OK
AT+CWMODE=1

OK
AT+CWJAP="WizFiDemoAP","12345678"

OK
AT+CIPSTART="TCP","192.168.3.64",8000
CONNECT

OK
AT+CIPMODE=1

OK
AT+CIPSEND

>AT+CIPCLOSE
CLOSED

OK
Committer:
SteveKim
Date:
Tue Jul 14 09:13:03 2015 +0000
Revision:
12:4e8842ddee84
Parent:
9:91fe783e1dd4
ESP8266 basic test with W7500.; And you can monitor UART Tx/Rx data of ESP8266.;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
michaeljkoster 0:6a891da014a3 1 #include "mbed.h"
michaeljkoster 0:6a891da014a3 2 #include "ESP8266Interface.h"
mbedAustin 9:91fe783e1dd4 3 #include "TCPSocketConnection.h"
SteveKim 12:4e8842ddee84 4
SteveKim 12:4e8842ddee84 5
SteveKim 12:4e8842ddee84 6 RawSerial pc(USBTX, USBRX); // tx, rx
SteveKim 12:4e8842ddee84 7
SteveKim 12:4e8842ddee84 8 DigitalOut led1(LED1);
SteveKim 12:4e8842ddee84 9 DigitalOut led2(LED2);
SteveKim 12:4e8842ddee84 10
SteveKim 12:4e8842ddee84 11 const char* TEST_SERVER_ADDRESS = "192.168.3.64";
SteveKim 12:4e8842ddee84 12 const int TEST_SERVER_PORT = 8000;
SteveKim 12:4e8842ddee84 13
SteveKim 12:4e8842ddee84 14 ESP8266Interface wifi(D1, D0, D2, "WizFiDemoAP","12345678",115200); // tx, rx
SteveKim 12:4e8842ddee84 15
SteveKim 12:4e8842ddee84 16
SteveKim 12:4e8842ddee84 17 // For monitoring data from ESP8266
SteveKim 12:4e8842ddee84 18 Timeout timer_buffer_debug;
SteveKim 12:4e8842ddee84 19 CircBuffer<char> buffer_ESP8266_recv(1024);
SteveKim 12:4e8842ddee84 20
SteveKim 12:4e8842ddee84 21 void print_buffer_ESP8266()
SteveKim 12:4e8842ddee84 22 {
SteveKim 12:4e8842ddee84 23 char c=0;
SteveKim 12:4e8842ddee84 24 while ( buffer_ESP8266_recv.available() ) {
SteveKim 12:4e8842ddee84 25 buffer_ESP8266_recv.dequeue(&c);
SteveKim 12:4e8842ddee84 26 pc.putc(c);
SteveKim 12:4e8842ddee84 27 }
SteveKim 12:4e8842ddee84 28 timer_buffer_debug.attach(&print_buffer_ESP8266, 0.1);
SteveKim 12:4e8842ddee84 29 }
SteveKim 12:4e8842ddee84 30
SteveKim 12:4e8842ddee84 31
SteveKim 12:4e8842ddee84 32 int main()
SteveKim 12:4e8842ddee84 33 {
SteveKim 12:4e8842ddee84 34 // LED Blink
SteveKim 12:4e8842ddee84 35 for (int i=0; i<5; i++) {
SteveKim 12:4e8842ddee84 36 led1 = 1;
SteveKim 12:4e8842ddee84 37 wait(0.1);
SteveKim 12:4e8842ddee84 38 led1 = 0;
SteveKim 12:4e8842ddee84 39 wait(0.1);
SteveKim 12:4e8842ddee84 40 }
SteveKim 12:4e8842ddee84 41
mbedAustin 3:5175e53017e4 42 pc.baud(115200);
SteveKim 12:4e8842ddee84 43 pc.printf("\r\nWIZwiki-W7500 with ESP8266 Test. \r\n");
SteveKim 12:4e8842ddee84 44
SteveKim 12:4e8842ddee84 45 timer_buffer_debug.attach(&print_buffer_ESP8266, 0.5);
mbedAustin 7:d2c97b20d237 46
SteveKim 12:4e8842ddee84 47 bool result;
SteveKim 12:4e8842ddee84 48 wifi.init();
SteveKim 12:4e8842ddee84 49 result = wifi.connect();
SteveKim 12:4e8842ddee84 50 if ( !result ) {
SteveKim 12:4e8842ddee84 51 pc.printf("wifi.connect error\r\n");
SteveKim 12:4e8842ddee84 52 return 0;
SteveKim 12:4e8842ddee84 53 }
SteveKim 12:4e8842ddee84 54
mbedAustin 9:91fe783e1dd4 55 TCPSocketConnection socket;
SteveKim 12:4e8842ddee84 56 while (socket.connect(TEST_SERVER_ADDRESS, TEST_SERVER_PORT) < 0) {
SteveKim 12:4e8842ddee84 57 pc.printf("Unable to connect to (%s) on port (%d)\n", TEST_SERVER_ADDRESS, TEST_SERVER_PORT);
mbedAustin 9:91fe783e1dd4 58 wait(1);
mbedAustin 9:91fe783e1dd4 59 }
SteveKim 12:4e8842ddee84 60
SteveKim 12:4e8842ddee84 61 char hello[] = "Hello World\r\n";
mbedAustin 9:91fe783e1dd4 62 socket.send_all(hello, sizeof(hello) - 1);
mbedAustin 9:91fe783e1dd4 63 socket.close();
SteveKim 12:4e8842ddee84 64
mbedAustin 9:91fe783e1dd4 65 while(true) {}
mbedAustin 9:91fe783e1dd4 66 }