Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of AWS-test by
Revision 3:1ef624d94403, committed 2017-08-04
- Comitter:
- bcjun@aname.co.kr
- Date:
- Fri Aug 04 15:34:19 2017 +0900
- Parent:
- 2:db59f45ad3d3
- Commit message:
- add esp82660-driver for NUCLEO_F401RE target.
Changed in this revision
--- a/aws-iot/platform/mbed_os/mbedtls/net_socket.cpp Fri Aug 04 14:06:06 2017 +0900 +++ b/aws-iot/platform/mbed_os/mbedtls/net_socket.cpp Fri Aug 04 15:34:19 2017 +0900 @@ -1,12 +1,16 @@ #include "net_sockets.h" #include "network_interface.h" -#include "EthernetInterface.h" +//#include "EthernetInterface.h" +#include "TCPSocket.h" +#include "ESP8266Interface.h" TCPSocket * tcp_socket; void mbedtls_net_init(mbedtls_net_context *ctx) { - EthernetInterface eth_iface; - eth_iface.connect(); + //EthernetInterface eth_iface; + ESP8266Interface eth_iface(D1, D0); + //eth_iface.connect(); + eth_iface.connect(MBED_CONF_APP_WIFI_SSID, MBED_CONF_APP_WIFI_PASSWORD, NSAPI_SECURITY_WPA_WPA2); tcp_socket = new TCPSocket(ð_iface); return; }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/esp8266-driver.lib Fri Aug 04 15:34:19 2017 +0900 @@ -0,0 +1,1 @@ +https://github.com/ARMmbed/esp8266-driver/#44fb447c72a37fb397a413467e02208ffeddb88e
--- a/main.cpp Fri Aug 04 14:06:06 2017 +0900 +++ b/main.cpp Fri Aug 04 15:34:19 2017 +0900 @@ -15,7 +15,7 @@ * limitations under the License. */ #include "mbed.h" -#include "EthernetInterface.h" +//#include "EthernetInterface.h" #include "aws_iot_config.h" #include "aws_iot_mqtt_client_interface.h" @@ -57,11 +57,11 @@ } } -EthernetInterface net; +//EthernetInterface net; int main() { - net.connect(); + //net.connect(); AWS_IoT_Client client; /* @@ -106,7 +106,7 @@ /* * Set MQTT autoreconnect */ - + IoT_Error_t mqtt_autoreconnect_status = aws_iot_mqtt_autoreconnect_set_status(&client, true); if (mqtt_autoreconnect_status != IOT_SUCCESS) { printf("Unable to set Auto Reconnect to true - %d", mqtt_autoreconnect_status);