{"id":20811183,"url":"https://github.com/eslam-abdo/ota","last_synced_at":"2025-05-07T09:21:39.273Z","repository":{"id":75513536,"uuid":"388812353","full_name":"Eslam-Abdo/OTA","owner":"Eslam-Abdo","description":"This project is implemented to program BlueBill Board (STM32 Micro-controller) over the air using a website with PHP and NodeMCU board.","archived":false,"fork":false,"pushed_at":"2021-08-05T15:08:26.000Z","size":4250,"stargazers_count":25,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-31T08:38:35.964Z","etag":null,"topics":["arduino","arm","at-command","embedded","embedded-c","embedded-systems","esp8266","internet-of-things","iot","microcontroller","ota","ota-firmware-updates","ota-update","php","stm32","stm32cubemx","stm32f103","stm32f103c8t6","wifi"],"latest_commit_sha":null,"homepage":"http://iot-arm.freevar.com/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Eslam-Abdo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2021-07-23T13:33:51.000Z","updated_at":"2025-03-10T17:38:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb36978e-40d5-4804-8d3f-6ef37e6b13ef","html_url":"https://github.com/Eslam-Abdo/OTA","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eslam-Abdo%2FOTA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eslam-Abdo%2FOTA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eslam-Abdo%2FOTA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Eslam-Abdo%2FOTA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Eslam-Abdo","download_url":"https://codeload.github.com/Eslam-Abdo/OTA/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252847796,"owners_count":21813507,"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","arm","at-command","embedded","embedded-c","embedded-systems","esp8266","internet-of-things","iot","microcontroller","ota","ota-firmware-updates","ota-update","php","stm32","stm32cubemx","stm32f103","stm32f103c8t6","wifi"],"created_at":"2024-11-17T20:37:26.552Z","updated_at":"2025-05-07T09:21:38.896Z","avatar_url":"https://github.com/Eslam-Abdo.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OTA (Upload Over The Air) for STM32F103\nThis project is implemented to program BlueBill Board (STM32 Micro-controller)\nover the air using a website with ```PHP``` and NodeMCU board to get the code\nfrom the internet and sending it to STM to write it into the Flash Memory\nusing the Bootloader flashed on the first 9 kB of Flash Memory.\n\n\n## project video [*(click here)*](https://youtu.be/M2U45CHqeEk)\n[![final-project](./OTA-video.png)](https://youtu.be/M2U45CHqeEk)\n\n\n## Hardware Required\n- STM32F103 BlueBill Board\n- NodeMCU V1.0 Board\n\n\n## Connection\n\n| nodemcu / Esp8266 | STM32F103      |\n| -------------     | -------------  |\n| TX                | PA10           |\n| RX                | PA9            |\n| GND               | GND            |\n\n\n\n## The project is divided into three mini-projects\n### 1. [Website](http://iot-arm.freevar.com/)\nThe website is responsible for letting the user upload a .hex file to Server to be ready to be received by NodeMCU.\nThe website only allows ```.hex``` to be uploaded.\n\n- **TODO:** before compiler the project remember to change the flash size to:\n  -  ```FLASH (rx) : ORIGIN = 0x08002400, LENGTH = 55K ``` .\n\n\n\n### 2. NodeMCU\nOnce a new ```.hex``` file is uploaded to Server, and reset STM , NodeMCU reads file content line by line to try sending it STM through UART.\n\n\n### 3. STM\nOn reset, STM Bootloader waits for 5 seconds if there is any code received from NodeMCU.\n If any, it will first erase the application area and then flash the code received.\nOnce it finished, it will run the application code after 5 seconds.\nIf no code received from NodeMCU for 5 seconds, it will jump to latest flashed application code.\n- **NOTE:**  \n  - you need to edit SSID \u0026 PASSWORD  (and if needed IPserver \u0026 Website) in ```main.h``` file.\n  - I used local PHP Server because the free online server take much time to flash the code.\n  - size of Bootloader changed in ```FPEC_config.h``` file.\n## AT-COMMAND for Esp8266/nodemcu\n1. ``` AT ``` \u003e\u003e\u003e TEST AT.\n2. ``` ATE0 ``` \u003e\u003e\u003e STOP ECHO.\n3. ``` AT+RST ``` \u003e\u003e\u003e SOFTWARE RESET.\n4. ``` AT+CWMODE=1 ``` \u003e\u003e\u003e SET STATION MODE.\n5. ``` AT+CWJAP=\"SSID\",\"PASSWORD\" ``` \u003e\u003e\u003e CONNECT TO WIFI (*set SSID \u0026 PASSWORD*).\n6. ``` AT+CIPSTART=\"TCP\",\"serverIP\",80 ``` \u003e\u003e\u003e (*replace serverIP with the website ip* ) to start connect on server ex: ```162.253.155.226```).\n7. ``` AT+CIPSEND=numOfBits+1 ``` \u003e\u003e\u003e send data length (*replace numOfBits with number of http link bits with ```GET``` word* ).\n8.  ```GET http://iot-arm.freevar.com/start_flash.php?config=ok ``` \u003e\u003e\u003e  put link of website.\n9. Rebeat again from line number ```7``` of  ```\"AT+CIPSTART\"``` because connection will closed after receive data.\n- **NOTE:** you receive data as form: ``` +IPD,LengthOfData:content....CLOSED ```.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feslam-abdo%2Fota","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feslam-abdo%2Fota","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feslam-abdo%2Fota/lists"}