{"id":13490444,"url":"https://github.com/jeelabs/esp-link","last_synced_at":"2025-05-15T01:09:27.359Z","repository":{"id":32156953,"uuid":"35730046","full_name":"jeelabs/esp-link","owner":"jeelabs","description":"esp8266 wifi-serial bridge, outbound TCP, and arduino/AVR/LPC/NXP programmer","archived":false,"fork":false,"pushed_at":"2021-07-18T23:32:05.000Z","size":3150,"stargazers_count":2900,"open_issues_count":238,"forks_count":728,"subscribers_count":235,"default_branch":"master","last_synced_at":"2025-04-13T23:53:57.914Z","etag":null,"topics":["esp-8266","esp8266","esp8266mqtt","mqtt","serial","serial-bridge"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeelabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-16T15:58:33.000Z","updated_at":"2025-04-09T09:44:32.000Z","dependencies_parsed_at":"2022-07-14T16:48:02.353Z","dependency_job_id":null,"html_url":"https://github.com/jeelabs/esp-link","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeelabs%2Fesp-link","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeelabs%2Fesp-link/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeelabs%2Fesp-link/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeelabs%2Fesp-link/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeelabs","download_url":"https://codeload.github.com/jeelabs/esp-link/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254254043,"owners_count":22039792,"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":["esp-8266","esp8266","esp8266mqtt","mqtt","serial","serial-bridge"],"created_at":"2024-07-31T19:00:46.682Z","updated_at":"2025-05-15T01:09:22.347Z","avatar_url":"https://github.com/jeelabs.png","language":"C","readme":"ESP-LINK: Wifi-Serial Bridge w/REST\u0026MQTT\n========================================\n\n\u003cimg src=\"https://cloud.githubusercontent.com/assets/39480/19333951/73fcdcbe-90ad-11e6-8572-5e654377275a.png\"\u003e\n\nThe esp-link firmware connects a micro-controller to the internet using an ESP8266 Wifi module.\nIt implements a number of features:\n\n- transparent bridge between Wifi and serial, useful for debugging or inputting into a uC\n- flash-programming attached Arduino/AVR microcontrollers and\n  LPC800-series and other ARM microcontrollers via Wifi\n- built-in stk500v1 programmer for AVR uC's: program using HTTP upload of hex file\n- outbound REST HTTP requests from the attached micro-controller to the internet\n- MQTT client pub/sub from the attached micro-controller to the internet\n- serve custom web pages containing data that is dynamically pulled from the attached uC and\n  that contain buttons and fields that are transmitted to the attached uC (feature not\n  fully ready yet)\n\nThe firmware includes a tiny HTTP server based on\n[esphttpd](http://www.esp8266.com/viewforum.php?f=34)\nwith a simple web interface, many thanks to Jeroen Domburg for making it available!\nThe REST and MQTT functionality are loosely based on [espduino](https://github.com/tuanpmt/espduino)\nbut significantly rewritten and no longer protocol compatible, thanks to tuanpmt for the\ninspiration!\n\nThe following people contributed significant functionality to esp-link:\n[brunnels](https://github.com/brunnels) (espduino integration),\n[cskarai](https://github.com/cskarai) (custom dynamic web pages),\n[beegee-tokyo](https://github.com/beegee-tokyo) (lots of code documentation),\n[susisstrolch](https://github.com/susisstrolch) (syslog feature),\n[bc547](https://github.com/bc547) and [katast](https://github.com/katast) (misc contributions).\nEsp-link is the work of many contributors!\n\nNote that http://github.com/jeelabs/esp-link is the original esp-link software which has\nnotably been forked by arduino.org as [Esp-Link](https://github.com/arduino-org/Esp-Link) and shipped\nwith the initial Arduino Uno Wifi. The JeeLabs esp-link has evolved significantly since the\nfork and added cool new features as well as bug fixes.\n\n### Quick links\n\nIn this document: [goals](#esp-link-goals), [uses](#esp-link-uses), [eye candy](#eye-candy),\n[getting-started](#getting-started), [serial-bridge](#serial-bridge), [contact](#contact).\n\nSeparate documents:\n- [hardware configuration](FLASHING.md), [serial flashing](FLASHING.md#initial-serial-flashing)\n- [wifi configuration](WIFI-CONFIG.md)\n- [troubleshooting](TROUBLESHOOTING.md), [LED indicators](TROUBLESHOOTING.md#led-indicators)\n- [flashing an attached uC](UC-FLASHING.md)\n- [MQTT and outbound REST requests](RESTMQTT.md)\n- [service web pages](WEB-SERVER.md)\n- [building esp-link](BUILDING.md), [over-the-air flashing](BUILDING.md#updating-the-firmware-over-the-air)\n- [flash layout](FLASH.md)\n\nFor quick support and questions chat at\n[![Chat at https://gitter.im/jeelabs/esp-link](https://badges.gitter.im/esp-link.svg)](https://gitter.im/jeelabs/esp-link)\nor (a little slower) open a github issue.\n\nReleases \u0026 Downloads\n--------------------\nEsp-link uses semantic versioning. The main change between versions 1.x and 2.x was the\naddition of MQTT and outbound REST requests from the attached uC. The main change between 2.x\nand 3.x will be the addition of custom web pages (this is not ready yet).\n\n- The master branch is currently unstable as we integrate a number of new features to get\n  to version 3.0. Please use v2.2.3 unless you want to hack up the latest code!\n  This being said, the older functionality seems to work fine on master, YMMV...\n- [V2.2.3](https://github.com/jeelabs/esp-link/releases/tag/v2.2.3) is the most recent release.\n  It has a built-in stk500v1 programmer (for AVRs), work on all modules, and supports mDNS,\n  sNTP, and syslog. It is built using the Espressif SDK 1.5.4.\n- [V2.1.7](https://github.com/jeelabs/esp-link/releases/tag/v2.1.7) is the previous release.\n- See [all releases](https://github.com/jeelabs/esp-link/releases).\n\n## Esp-link goals\n\nThe goal of the esp-link project is to create an advanced Wifi co-processor. Esp-link assumes that\nthere is a \"main processor\" (also referred to as \"attached uController\") and that esp-link's role\nis to facilitate communication over Wifi. This means that esp-link does not just connect TCP/UDP\nsockets through to the attached uC, rather it implements mostly higher-level functionality to\noffload the attached uC, which often has much less flash and memory than esp-link.\n\nWhere esp-link is a bit unusual is that it's not really\njust a Wifi interface or a slave co-processor. In some sense it's the master, because the main\nprocessor can be reset, controlled and reprogrammed through esp-link. The three main areas of\nfunctionality in esp-link are:\n\n- reprogramming and debugging the attached uC\n- letting the attached uC make outbound communication and offloading the protocol processing\n- forwarding inbound communication and offloading the protocol processing\n\nThe goal of the project is also to remain focused on the above mission. In particular, esp-link\nis not a platform for stand-alone applications and it does not support connecting sensors or\nactuators directly to it. A few users have taken esp-link as a starting point for doing these\nthings and that's great, but there's also value in keeping the mainline esp-link project\nfocused on a clear mission.\n\n## Esp-link uses\n\nThe simplest use of esp-link is as a transparent serial to wifi bridge. You can flash an attached\nuC over wifi and you can watch the uC's serial debug output by connecting to port 23 or looking\nat the uC Console web page.\n\nThe next level is to use the outbound connectivity of esp-link in the uC code. For example, the\nuC can use REST requests to services like thingspeak.com to send sensor values that then get\nstored and plotted by the external service.\nThe uC can also use REST requests to retrieve simple configuration\ninformation or push other forms of notifications. (MQTT functionality is forthcoming.)\n\nAn additional option is to add code to esp-link to customize it and put all the communication\ncode into esp-link and only keep simple sensor/actuator control in the attached uC. In this\nmode the attached uC sends custom commands to esp-link with sensor/acturator info and\nregisters a set of callbacks with esp-link that control sensors/actuators. This way, custom\ncommands in esp-link can receive MQTT messages, make simple callbacks into the uC to get sensor\nvalues or change actuators, and then respond back with MQTT. The way this is architected is that\nthe attached uC registers callbacks at start-up such that the code in the esp doesn't need to \nknow which exact sensors/actuators the attached uC has, it learns that through the initial\ncallback registration.\n\n## Eye Candy\n\nThese screen shots show the Home page, the Wifi configuration page, the console for the\nattached microcontroller, and the pin assignments card:\n\n\u003cimg width=\"45%\" src=\"https://cloud.githubusercontent.com/assets/39480/19334029/f8128c92-90ad-11e6-804e-9a4796035e9a.png\"\u003e\n\u003cimg width=\"45%\" src=\"https://cloud.githubusercontent.com/assets/39480/8261427/6caf7326-167f-11e5-8085-bc8b20159b2b.png\"\u003e\n\u003cimg width=\"45%\" src=\"https://cloud.githubusercontent.com/assets/39480/8261426/6ca7f75e-167f-11e5-827d-9a1c582ad05d.png\"\u003e\n\u003cimg width=\"30%\" src=\"https://cloud.githubusercontent.com/assets/39480/8261658/11e6c64a-1681-11e5-82d0-ea5ec90a6ddb.png\"\u003e\n\u003cimg width=\"45%\" src=\"https://cloud.githubusercontent.com/assets/39480/19334011/e0c3fe40-90ad-11e6-9893-847e805e7b89.png\"\u003e\n\u003cimg width=\"45%\" src=\"https://cloud.githubusercontent.com/assets/39480/19333988/c1858cec-90ad-11e6-8b1c-ffed516e1b7f.png\"\u003e\n\nGetting Started\n---------------\n\nTo get started you need to:\n 1. prepare your esp8266 module for serial flashing\n 2. download the latest esp-link release image (you can build your own later)\n 3. flash the firmware\n 4. configure the Wifi in esp-link for your network\n\nYou can then attach a uC and upload a sketch:\n 1. attach a uC (e.g. arduino) to your esp8266 module\n 2. connect via the serial port to see a pre-loaded sketch running\n 3. upload a fresh version of the sketch\n\nFrom there, more advanced steps are:\n- write a sketch that uses MQTT to communicate, or that makes outbound REST requests\n- create some web pages and write a sketch that populates data in them or reacts to buttons\n  and forms\n- make changes or enhancements to esp-link and build your own firmware\n\n### Serial bridge\n\nIn order to connect through the esp-link to a microcontroller use port 23. For example,\non linux you can use `nc esp-hostname 23` or `telnet esp-hostname 23`.\n\nThe connections on port 23 and 2323 have a 5 minute inactivity timeout. This is standard with\nEspressif's SDK and esp-link does not change it. The reason is that due to memory limitations only a\nfew connections can be open (4 per port) and it's easy for connections to get \"lost\" staying open\nforever, for example, due to wifi disconnects. That could easily make it impossible to connect to\nesp-link due to connection exhaustion. Something smarter is most likely possible...\n\nNote that multiple connections to port 23 and 2323 can be made simultaneously. Esp-link will\nintermix characters received on all these connections onto the serial TX and it will\nbroadcast incoming characters from the serial RX to all connections. Use with caution!\n\nIf you are using esp-link to connect to the console of a linux system, such as an rPi, you\nwill most likely see what you typed being echoed twice. If you are on a linux system use\ntelnet and issue a `mode char` command (in telnet, hit the escape char `^]` and type `mode\nchar` at the prompt). If you are using putty on Windows, open the connection settings and\nin the terminal settings set both `local echo` and `local line editing` to `off`.\n\nContact\n-------\n\nIf you find problems with esp-link, please create a github issue. If you have a question, please\nuse the gitter chat link at the top of this page.\n","funding_links":[],"categories":["Libraries","硬件_其他","C"],"sub_categories":["资源传输下载"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeelabs%2Fesp-link","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeelabs%2Fesp-link","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeelabs%2Fesp-link/lists"}