Gainspan module evaluation with WIZwiki-W7500 using SerialPassthrough.
Dependencies: mbed
Fork of SerialPassthrough_GainspanModule_W7500 by
This is a serial-passthrough example using WIZwiki-W7500 and gainspan-WiFi-module.
With this example, I can issue at-command-sets to the WiFi module with WIZwiki-W7500's serial. UART data flow is shown as below.
[PC Serial Terminal] <=> [WIZwiki-W7500's UIART1/DAP] <=> [WIZwiki-W7500's UIART0] <=> [Gainspan WiFi module]
Connected pins between WIZwiki-W7500 and WiFi-module are only 4 pins. (3.3V, GND, UART-Tx, UART-Rx) And, here is a picture.
And here is a captures of test logs. Red box is what I issued.
[PS] ASYNC_DEBUG is for internal-debugging like ISR. You can ignore it.
Diff: main.cpp
- Revision:
- 1:95a26b8d2887
- Parent:
- 0:98000a7ccec5
--- a/main.cpp Fri Aug 21 05:53:34 2015 +0000 +++ b/main.cpp Fri Aug 21 06:57:06 2015 +0000 @@ -7,6 +7,9 @@ RawSerial pc(USBTX, USBRX); // tx, rx RawSerial dev(D1, D0); // tx, rx for WIZwiki-W75000 +#define ASYNC_DEBUG 0 + +#if ASYNC_DEBUG //////////////////////////////////////////////////////////////////////////////////////////////// // mbed Async Debug Timeout timer_buffer_debug; @@ -43,7 +46,7 @@ void (*dbg_f)(const char *format, ...); extern void (*dbg_f)(const char *format, ...); -//////////////////////////////////////////////////////////////////////////////////////////////// +#endif void dev_recv() { @@ -75,9 +78,11 @@ pc.printf("Serial Passthrough Started. \r\n"); +#if ASYNC_DEBUG dbg_f = &mbed_async_debug; timer_buffer_debug.attach(&print_debugbuffer, 0.1); - +#endif + pc.attach(&pc_recv, Serial::RxIrq); dev.attach(&dev_recv, Serial::RxIrq);