{"id":16239629,"url":"https://github.com/nopnop2002/Arduino-ESPAT-NETWORK","last_synced_at":"2025-03-16T12:32:41.384Z","repository":{"id":108987919,"uuid":"117293453","full_name":"nopnop2002/Arduino-ESPAT-NETWORK","owner":"nopnop2002","description":"MQTT/NTP/SMTP/SNTP/TCP/UDP Applicaton for Arduino using ESP8266's AT firmware.","archived":false,"fork":false,"pushed_at":"2024-12-16T03:19:17.000Z","size":474,"stargazers_count":37,"open_issues_count":0,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-27T09:12:39.889Z","etag":null,"topics":["arduino","at-firmware","esp8266","mqtt","ntp","smtp","sntp","stm32","tcp-client","tcp-server","udp-client","udp-server","wifi"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nopnop2002.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-12T22:22:12.000Z","updated_at":"2024-12-16T03:19:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"5db5d3e9-a4a9-4b5e-af50-1544edfd2b37","html_url":"https://github.com/nopnop2002/Arduino-ESPAT-NETWORK","commit_stats":null,"previous_names":["nopnop2002/mqtt_via_esp01","nopnop2002/arduino-espat-network"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nopnop2002%2FArduino-ESPAT-NETWORK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nopnop2002%2FArduino-ESPAT-NETWORK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nopnop2002%2FArduino-ESPAT-NETWORK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nopnop2002%2FArduino-ESPAT-NETWORK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nopnop2002","download_url":"https://codeload.github.com/nopnop2002/Arduino-ESPAT-NETWORK/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243814867,"owners_count":20352051,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","at-firmware","esp8266","mqtt","ntp","smtp","sntp","stm32","tcp-client","tcp-server","udp-client","udp-server","wifi"],"created_at":"2024-10-10T13:44:27.113Z","updated_at":"2025-03-16T12:32:41.367Z","avatar_url":"https://github.com/nopnop2002.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Arduino-ESPAT-NETWORK   \nMQTT/NTP/SMTP/SNTP/TCP/UDP Applicaton for Arduino using ESP8266's AT firmware.   \nYou don't need Ethernet card.   \nYou need only ESP8266 module.   \n\n# Memory usage\n__Saves Flash and SRAM__   \n\n_UNO+ENC28J60+UIPEthernet+PubSubClient_\n\n```\nSketch uses 25090 bytes (77%) of program storage space. Maximum is 32256 bytes.\nGlobal variables use 1736 bytes (84%) of dynamic memory, leaving 312 bytes for local variables. Maximum is 2048 bytes.\nLow memory available, stability problems may occur.\n```\n\n_UNO+W5100+Ethernet+PubSubClient_\n\n```\nSketch uses 19582 bytes (60%) of program storage space. Maximum is 32256 bytes.\nGlobal variables use 1101 bytes (53%) of dynamic memory, leaving 947 bytes for local variables. Maximum is 2048 bytes.\n```\n\n_UNO+ESP01+Software Serial+AT firmware_\n\n```\nSketch uses 9938 bytes (30%) of program storage space. Maximum is 32256 bytes.\nGlobal variables use 897 bytes (43%) of dynamic memory, leaving 1151 bytes for local variables. Maximum is 2048 bytes.\n```\n\n# Hardware requirements   \n- ESP8266 module like ESP01   \n ESP8266 has 1MB FLASH and 4MB FLASH (or more) SoCs, but it doesn't matter.\n\n- ATmega328/ATmega2560/STM32\n\n- UART-USB converter\n\n# Software requirements   \n- Arduino Environment   \n Core library is required when using STM32.   \n It supports Maple cores and ST cores.   \n\n- ESP8266 AT Firmware   \n AT firmware version can be identified by AT version and SDK version.   \n AT version V2 added MQTT and HTTP commands.   \n However, AT version V2 does not support 1M SoCs like ESP01.   \n When using 1M SoCs like ESP01, it is necessary to use AT version V1.   \n This repository works with both V1 and V2.   \n You can download AT version V1 from [here](https://github.com/espressif/ESP8266_NONOS_SDK/tags).   \n __Note__   \n Some firmware here does not support 1M SoC such as ESP01.   \n I used this.\n```\nAT+GMR\nAT version:1.7.5.0(Oct 20 2021 19:14:04)\nSDK version:3.0.5(b29dcd3)\ncompile time:Oct 20 2021 20:13:50\nBin version(Wroom 02):1.7.5\n```\n\n- Terminal software such as CoolTerm   \n I use TeraTrem.   \n You can down load from [here](https://download.cnet.com/tera-term/3000-2094_4-75766675.html).\n\n# Applications   \n\n**MQTT_Publish_ESP01**   \nSimple MQTT Pubish Application.   \n\n**MQTT_Subscribe_ESP01**   \nSimple MQTT Subscribe Application.   \n\n![slide1](https://user-images.githubusercontent.com/6020549/35101108-a13451d8-fca1-11e7-8cfd-37d71f18f880.JPG)\n\n**TCP_Client_ESP01**   \nSimple TCP Socket Client Application.   \n\n**TCP_Server_ESP01**   \nSimple TCP Socket Server Application.   \n\n**UDP_Broadcast_Client_ESP01**   \nSimple UDP Socket Client Application using UDP Broadcast.   \n\n**UDP_Broadcast_Server_ESP01**   \nSimple UDP Socket Server Application using UDP Broadcast.   \n\n\n![slide2](https://user-images.githubusercontent.com/6020549/35101341-9019e394-fca2-11e7-9edd-0aa9086fd5db.JPG)\n\n**NTP_Client_ESP01**   \nSimple NTP Client Application.   \nIt require [this](https://github.com/PaulStoffregen/Time) library.   \n\n**SNTP_Client_ESP01**   \nSimple SNTP Client Application.   \n\n![slide3](https://user-images.githubusercontent.com/6020549/35101499-241b1950-fca3-11e7-9876-0a22008ebc5a.JPG)\n\n**SMTP_Client_gmail_ESP01**   \nSimple SMTP Client Application.   \nYou need gmail account.   \n\n![slide4](https://user-images.githubusercontent.com/6020549/35125598-90e2a360-fced-11e7-89ed-045cd6c49984.JPG)\n\n\n# Flash AT firmware to ESP01.   \nThe 3.3V output of the UART-USB converter has too little current to be used.   \nPower is supplied using 5V from the UART-USB converter and 3.3V from the regulator.   \n- GPIO2 must be pulled up.   \n- GPIO0 must be connected to GND.   \n- CH_PD must be pulled up.   \n- RESET must be pulled up.   \n\nSee [here](https://github.com/nopnop2002/Arduino-ESPAT-TCP/tree/master/Flash_AT_firmware) for details..   \n\n![esp01-flash](https://user-images.githubusercontent.com/6020549/33159146-b8456238-d053-11e7-8202-a86cca2f8a3d.jpg)\n\n# Setup ESP01 using terminal software such as CoolTerm.   \n- GPIO2 must be pulled up.   \n- GPIO0 must be pulled up.   \n- CH_PD must be pulled up.   \n- RESET must be pulled up.   \n\n![esp01-setup](https://user-images.githubusercontent.com/6020549/33159150-bdade984-d053-11e7-9b93-bbbf05573441.jpg)\n\nConnect to ESP01 at 115200 bps using terminal software.   \n\n```\nAT+GMR\nAT version:1.6.2.0(Apr 13 2018 11:10:59)\nSDK version:2.2.1(6ab97e9)\ncompile time:Jun  7 2018 19:34:26\nBin version(Wroom 02):1.6.2\nOK\n\nAT+CWMODE=1\n\nOK\nAT+CWLAP\n+CWLAP:(3,\"Picking\",-86,\"34:12:98:08:4b:4a\",1,-4)\n+CWLAP:(4,\"ctc-g-fa4a2e\",-92,\"c0:25:a2:b1:8c:2e\",2,3)\n+CWLAP:(4,\"aterm-e625c0-g\",-49,\"c0:25:a2:ac:cb:ba\",3,15)\n+CWLAP:(1,\"aterm-e625c0-gw\",-48,\"c2:25:a2:ac:cb:ba\",3,15)\n\nOK\n\nAT+CWJAP=\"Your AP's SSID\",\"Your AP's password\"\nWIFI CONNECTED\nWIFI GOT IP\n\nOK\n\nAT+CIPSTA?\n+CIPSTA:ip:\"192.168.10.142\"\n+CIPSTA:gateway:\"192.168.10.1\"\n+CIPSTA:netmask:\"255.255.255.0\"\n\nOK\nAT+CWQAP\n\nOK\n\nWIFI DISCONNECT\n```\n\n_*** UNO ONLY ***_   \n_*** Change baudrate to 4800bps ***_   \n_*** Because there is no the 2nd UART in UNO ***_   \n_*** So UNO use Software Serial with low speed ***_\n\n```\nAT+UART_DEF=4800,8,1,0,0\n```\n\nRe-Connect to ESP01 with 4800 bps.   \n\nAT firmware has a function that automatically connects to the last connected AP when the module is reset.   \nUsing this function, you can omit the SSID and password.   \n\n```\nAT+RST\nWIFI CONNECTED\nWIFI GOT IP\nAT+CIPSTA?\n+CIPSTA:ip:\"192.168.10.142\"\n+CIPSTA:gateway:\"192.168.10.1\"\n+CIPSTA:netmask:\"255.255.255.0\"\n\nOK\n```\n\nIf you want to change the AP, execute the following command again.   \n```\nAT+CWJAP=\"New AP's SSID\",\"New AP's password\"\nWIFI CONNECTED\nWIFI GOT IP\n```\n\n# How to Firmware Upate\n\n1.Make sure TE(terminal equipment) is in sta mode   \n```\nAT+CWMODE=1\n\nOK\n```\n\n2.Make sure TE got ip address   \n```\nAT+CIPSTA?\n+CIPSTA:ip:\"192.168.10.115\"\n+CIPSTA:gateway:\"192.168.10.1\"\n+CIPSTA:netmask:\"255.255.255.0\"\n\nOK\n```\n\n3.Let's update   \n```\nAT+CIUPDATE\n+CIPUPDATE:1    found server\n+CIPUPDATE:2    connect server\n+CIPUPDATE:3    got edition\n+CIPUPDATE:4    start start\n\nOK\n```\n\n4.Check firmware version   \n```\nAT+GMR\nAT version:1.7.5.0(Oct 20 2021 19:14:04)\nSDK version:3.0.5(b29dcd3)\ncompile time:Oct 20 2021 20:13:50\nBin version(Wroom 02):1.7.5\nOK\n```\n\n# Connect ESP01 to UNO.\n\nESP01(Tx) - UNO(D4)   \nESP01(Rx) - UNO(D5)   \n\n![ESP01-MQTT-UNO](https://user-images.githubusercontent.com/6020549/55268764-656f9f00-52d0-11e9-9120-360e397ffae0.jpg)\n\nYou can't use on-board 3.3V.    \nAn electric current is insufficient.   \n\n# Connect ESP01 to MEGA2560.\n\nESP01(Tx) - MEGA(D19)   \nESP01(Rx) - MEGA(D18)   \n\n![ESP01-MQTT-MEGA](https://user-images.githubusercontent.com/6020549/55268794-9fd93c00-52d0-11e9-8cca-4f4bd202d745.jpg)\n\nYou can't use on-board 3.3V.    \nAn electric current is insufficient.   \n\n# Connect ESP01 to STM32F103(MAPLE Core).\n\nESP01(Tx) - STM32F103(PA3)   \nESP01(Rx) - STM32F103(PA2)   \n\n![ESP01-MQTT-STM32F103_MAPLE-Core](https://user-images.githubusercontent.com/6020549/55272404-869bb400-52ff-11e9-97aa-1ff31090f925.jpg)\n\nMAPLE Core.    \nhttps://github.com/rogerclarkmelbourne/Arduino_STM32   \n\n# Connect ESP01 to STM32 NUCLEO(ST Core).\n\nESP01(Tx) - STM32F103(PA10)   \nESP01(Rx) - STM32F103(PA9)   \n\n![ESP01-MQTT-STM32F103_ST-Core](https://user-images.githubusercontent.com/6020549/55272409-94e9d000-52ff-11e9-9f4b-61386ed3e656.jpg)\n\nST Core.    \nhttps://github.com/stm32duino/Arduino_Core_STM32   \n\n# Connect ESP01 to STM32 F103 BluePill(ST Core).\n\nESP01(Tx) - STM32F103(PA3)   \nESP01(Rx) - STM32F103(PA2)   \n\n![ESP01-MQTT-BLUEPILL_STM32F103_ST-Core](https://user-images.githubusercontent.com/6020549/62212468-c1ac1200-b3db-11e9-9fa2-9460d29b46cb.jpg)\n\nSerial printing goes to PA9.   \n\n# Connect ESP01 to STM32 F103 MapleMini(ST Core).\n\nESP01(Tx) - STM32F103(PA3)   \nESP01(Rx) - STM32F103(PA2)   \n\n![ESP01-MQTT-MAPLEMINI_STM32F103_ST-Core](https://user-images.githubusercontent.com/6020549/62213727-88c16c80-b3de-11e9-9f10-54a274908c4c.jpg)\n\nSerial printing goes to PA9.   \n\n# STM32F103 development board on which ESP01 can be mounted(ST Core).\n\nESP01(Tx) - STM32F103(PA3)   \nESP01(Rx) - STM32F103(PA2)   \n\n![ESP01-STM32](https://user-images.githubusercontent.com/6020549/103254648-7c718280-49c9-11eb-9bd0-c89cb686335e.JPG)\n\nSerial printing goes to PA9.   \n\n# Connect ESP01 to STM32 F303 BlackPill(ST Core).\n\nESP01(Tx) - STM32F303(PA3)   \nESP01(Rx) - STM32F303(PA2)   \n\nSerial printing goes to PA9.   \n\n# Connect ESP01 to STM32 F401 BlackPill(ST Core).\n\nESP01(Tx) - STM32F401(PA3)   \nESP01(Rx) - STM32F401(PA2)   \n\nSerial printing goes to PA9.   \n\n# Connect ESP01 to STM32 F4DISC1(ST Core).\n\nESP01(Tx) - STM32F4DISC1(PD9)   \nESP01(Rx) - STM32F4DISC1(PD8)   \n\nI want to Fritzing Part of this board.   \nSerial printing goes to PA2.   \n\n# Connect ESP01 to STM32 F407 development board that like DIYMORE F407VGT.\n\nESP01(Tx) - STM32F407(PA3)   \nESP01(Rx) - STM32F407(PA2)   \n\nhttps://stm32-base.org/boards/STM32F407VGT6-diymore   \nSerial printing goes to PA9.   \n\n# UART to WiFi module   \nWe can get a module for UART communication.   \nWe can write AT firmware to this.   \nAlthough it supplies 5V power, the TTL level of UART is 3.3V.   \n![ESP-UART-MODULE-1](https://user-images.githubusercontent.com/6020549/104827197-b504cd80-589e-11eb-95a8-f12c75670ced.JPG)\n\n![ESP-UART-MODULE-2](https://user-images.githubusercontent.com/6020549/104827200-b8985480-589e-11eb-9a01-e70d4fbd55cc.JPG)\n\n# ESP01 Adapter board\nOnly $1 for AliExpress/eBay.   \nExternal pin header is 5V,GND,TXD,RXD.   \nIt has a 5V-\u003e3.3V regulator and can supply power directly from UNO's 5V.   \nAlthough it supplies 5V power, the TTL level of UART is 3.3V.   \n![ESP01-Adapter-3](https://user-images.githubusercontent.com/6020549/120063987-f3a86100-c0a4-11eb-95e4-c87164812af4.JPG)\n\n# Use with TFT Shield   \nUNO compatibles can have a pin header inside the pin socket.   \nIf you do not use SD-CARD, you can freely use digital pins # 10 to # 13 of the TFT shield.   \nThese pins can be used for UART communication with the ESP01.   \n\n![ESP01-MQTT-UNO-TFT-2](https://user-images.githubusercontent.com/6020549/83363044-2277f280-a3d1-11ea-8688-76521819f1db.JPG)\n\n![esp01-mqtt-uno-tft](https://user-images.githubusercontent.com/6020549/33193265-cbbd2618-d10a-11e7-9dba-dd60643c27bb.JPG)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnopnop2002%2FArduino-ESPAT-NETWORK","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnopnop2002%2FArduino-ESPAT-NETWORK","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnopnop2002%2FArduino-ESPAT-NETWORK/lists"}