{"id":21223929,"url":"https://github.com/niklauslee/esp8266-driver","last_synced_at":"2026-02-28T01:38:59.113Z","repository":{"id":43178594,"uuid":"460373470","full_name":"niklauslee/esp8266-driver","owner":"niklauslee","description":"ESP8266 network device driver for Kaluma","archived":false,"fork":false,"pushed_at":"2022-03-15T10:19:41.000Z","size":321,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-15T01:36:12.554Z","etag":null,"topics":["esp8266","kaluma","network"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/niklauslee.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}},"created_at":"2022-02-17T09:50:37.000Z","updated_at":"2025-02-10T02:34:35.000Z","dependencies_parsed_at":"2022-09-10T06:20:24.350Z","dependency_job_id":null,"html_url":"https://github.com/niklauslee/esp8266-driver","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/niklauslee/esp8266-driver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklauslee%2Fesp8266-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklauslee%2Fesp8266-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklauslee%2Fesp8266-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklauslee%2Fesp8266-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niklauslee","download_url":"https://codeload.github.com/niklauslee/esp8266-driver/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklauslee%2Fesp8266-driver/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273784108,"owners_count":25167538,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["esp8266","kaluma","network"],"created_at":"2024-11-20T22:54:05.906Z","updated_at":"2026-02-28T01:38:54.072Z","avatar_url":"https://github.com/niklauslee.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e **THIS DRIVER IS EXPERIMENTAL**\n\u003e Currently this driver is not stable, so we recommend to use ESP8266 AT commands directly.\n\n# ESP8266-driver\n\nKaluma network device driver for ESP8266 module (AT command). This module implements [netdev](https://docs.kaluma.io/api-reference/device_driver#netdev) and [ieee80211dev](https://docs.kaluma.io/api-reference/device_driver#ieee-80211-dev) device drivers using ESP8266 AT commands. With this device drivers you can use following builtin modules:\n\n- [wifi](https://docs.kaluma.io/api-reference/wifi)\n- [net](https://docs.kaluma.io/api-reference/net)\n- [http](https://docs.kaluma.io/api-reference/http)\n\nTested firmware versions:\n\n| Module | Manufacturer                   | AT version | SDK version |\n| ------ | ------------------------------ | ---------- | ----------- |\n| ESP-01 | Ai-Thinker Technology Co. Ltd. | 1.2.0.0    | 1.5.4.1     |\n\n# Wiring\n\nHere is a wiring example for UART0.\n\n| Raspberry Pi Pico | ESP8266    |\n| ----------------- | ---------- |\n| 3V3               | VCC, CH_PD |\n| GND               | GND        |\n| GP0 (UART0 TX)    | RXD        |\n| GP1 (UART0 RX)    | TXD        |\n\n![wiring](https://github.com/niklauslee/esp8266-driver/blob/main/images/wiring.png?raw=true)\n\n# Install\n\n```sh\nnpm install https://github.com/niklauslee/esp8266-driver\n```\n\n# Usage\n\nIf you wired ESP8266 module to UART0 you can setup simply as below:\n\n```js\nrequire(\"esp8266-driver\")\n  .setup()\n  .then(() =\u003e {\n    // ...\n  });\n```\n\nOtherwise you can setup with an UART instance as below.\n\n```js\nvar UART = require(\"uart\").UART;\nvar serial0 = new UART(0, { bufferSize: 4096 });\nvar esp8266 = require(\"esp8266-driver\");\nesp8266.setup(serial0).then(() =\u003e {\n  // ...\n});\n```\n\nYou can see all AT commands and response in **Terminal** if you pass `debug` parameter as `true`.\n\n```js\nrequire(\"esp8266-driver\")\n  .setup(null, { debug: true })\n  .then(() =\u003e {\n    // ...\n  });\n```\n\nThe classes in `wifi`, `net`, `http` builtin modules should be instantiated after `setup()`.\n\n```js\nvar WiFi = require(\"wifi\").WiFi;\nrequire(\"esp8266-driver\")\n  .setup()\n  .then(() =\u003e {\n    var wifi = new WiFi();\n    var connectInfo = { ssid: \"iptime\", password: \"12345678\" };\n    wifi.connect(connectInfo, (err) =\u003e {\n      // ...\n    });\n  });\n```\n\nWe recommend you do not place Wi-Fi SSID and password in the code. Instead, you can enter `WIFI_SSID` and `WIFI_PASSWORD` using [Storage API](https://docs.kaluma.io/api-reference/storage) as below in Terminal.\n\n```\n\u003e storage.setItem('WIFI_SSID', 'your_ssid');\n\u003e storage.setItem('WIFI_PASSWORD', 'your_password');\n```\n\nThen, you can connect Wi-Fi without connection info as below:\n\n```js\nvar WiFi = require(\"wifi\").WiFi;\nrequire(\"esp8266-driver\")\n  .setup()\n  .then(() =\u003e {\n    var wifi = new WiFi();\n    wifi.connect((err) =\u003e {\n      // ...\n    });\n  });\n```\n\n# API\n\n## esp8266.setup([serial[, options]])\n\n- **`serial`** `\u003cUART\u003e` A serial connected to ESP8266 module. If this parameter is omitted, UART0 is used as default. Default: UART0.\n- **`options`** `\u003cobject\u003e` Options to be passed to internal AT command class.\n- **Returns:** `\u003cPromise\u003e`\n\nInitialize ESP8266 module.\n\n# Limitations\n\n## Socket address and port\n\nSocket connection doesn't have `localAddress`, `localPort`, `removeAddress`, `removePort`. The reason is that the info is not provided at the time of connection using AT command. Extra AT command (`AT+CIPSTATUS`) is required to get the info.\n\n\u003e If you need the info necessarily, recommend to use AT command directly.\n\n## Half-close\n\nHalf-closing is not supported. Trying to half-close will cause just close.\n\n## Don't support keep-alive\n\nWeb browsers uses keep-alive connection by adding `Connection: keep-alive` in HTTP request headers.\n\n# Testing\n\nTo run test cases on the board.\n\n```bash\n$ kaluma flash ./test.js --bundle --shell\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklauslee%2Fesp8266-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniklauslee%2Fesp8266-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklauslee%2Fesp8266-driver/lists"}