![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Example program for the LWIPInterface
Dependencies: LWIPInterface NetworkSocketAPI mbed-rtos mbed
Fork of HelloESP8266Interface by
Example for the NetworkSocketAPI. Attempts to get the device's public facing IP address from ifcfg.me.
Diff: main.cpp
- Revision:
- 19:03f1da306347
- Parent:
- 18:a5830a6d3e11
- Child:
- 20:4cb9ef3b0cc9
- Child:
- 21:979b1db5d7da
--- a/main.cpp Tue Jul 21 20:20:45 2015 +0000 +++ b/main.cpp Wed Jul 22 20:55:47 2015 +0000 @@ -35,9 +35,10 @@ else printf("No IP"); - SocketInterface* mySocket = wifi.allocateSocket(SOCK_TCP); + SocketInterface* mySocket = wifi.allocateSocket(SOCK_UDP); + - mySocket->setAddressPort("192.168.13.3", 7); + mySocket->setAddressPort("192.168.13.6", 7); mySocket->open(); mySocket->send("Hello",5, 10000);