{"id":13585128,"url":"https://github.com/nielsole/ecoflow-bt-reverse-engineering","last_synced_at":"2026-03-11T11:39:21.794Z","repository":{"id":63170878,"uuid":"562160035","full_name":"nielsole/ecoflow-bt-reverse-engineering","owner":"nielsole","description":"Reverse Engineering of Bluetooth interface of Ecoflow devices","archived":false,"fork":false,"pushed_at":"2023-01-02T10:25:15.000Z","size":13,"stargazers_count":54,"open_issues_count":1,"forks_count":4,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-07T06:35:33.404Z","etag":null,"topics":["ecoflow","esp32","homeassistant","solar"],"latest_commit_sha":null,"homepage":"","language":"Python","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/nielsole.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-05T13:49:56.000Z","updated_at":"2025-04-04T13:45:12.000Z","dependencies_parsed_at":"2023-02-01T02:30:14.810Z","dependency_job_id":null,"html_url":"https://github.com/nielsole/ecoflow-bt-reverse-engineering","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nielsole/ecoflow-bt-reverse-engineering","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nielsole%2Fecoflow-bt-reverse-engineering","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nielsole%2Fecoflow-bt-reverse-engineering/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nielsole%2Fecoflow-bt-reverse-engineering/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nielsole%2Fecoflow-bt-reverse-engineering/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nielsole","download_url":"https://codeload.github.com/nielsole/ecoflow-bt-reverse-engineering/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nielsole%2Fecoflow-bt-reverse-engineering/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30380090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T06:09:32.197Z","status":"ssl_error","status_checked_at":"2026-03-11T06:09:17.086Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ecoflow","esp32","homeassistant","solar"],"created_at":"2024-08-01T15:04:45.321Z","updated_at":"2026-03-11T11:39:21.777Z","avatar_url":"https://github.com/nielsole.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Delta 2 Bluetooth\n\nReverse engineering of Delta 2 Bluetooth interface.\nNo affiliation with Ecoflow.\n\nWhat currently works:\n* Turn on/off:\n  * USB\n  * AC\n  * 12VDC output\n\n## Demo\n\nThe `experimental/main.py` script connects to the Delta 2 and let's you toggle the outputs.\nFollow the installation instructions for pybluez.\nThe script must run as root.\nThis is experimental.\nThis might brick your device.\nI use linux, no other OS is tested, but it might just work for you.\n\n## Overview\n\nThe Delta 2 uses an Espressif bluetooth MAC Address (mine starts with 34:b4).\n\nThe Delta 2 offers up 3 attributes:\n\n```\nBluetooth Attribute Protocol\n    Opcode: Read By Group Type Response (0x11)\n    Length: 6\n    Attribute Data, Handle: 0x0001, Group End Handle: 0x0005, UUID: Generic Attribute Profile\n    Attribute Data, Handle: 0x0014, Group End Handle: 0x001c, UUID: Generic Access Profile\n    Attribute Data, Handle: 0x0028, Group End Handle: 0xffff, UUID: SDP\n    [UUID: GATT Primary Service Declaration (0x2800)]\n    [Request in Frame: 726]\n```\n\nIn my traces the following handles were used:\n* 0x002d SDP: RFCOMM Delta2-\u003ePhone\n* 0x002a SDP: UDP Phone -\u003e Delta2\n\n\n### RFCOMM status\n\nThe Delta 2 sends out a beacon every 500ms that likely contains all current information, such as charge, discharge, port states etc.\nI tried decoding this beacon in `states` and `states2` but haven't had much success yet.\n\n### UDP Commands\n\nEvery action on the Delta 2 sends a UDP packet.\nI started labelling sample packets in commands. I have gotten some of them wrong, focussing on the data points I care about most rn.\n\n## Contributing\n\nIf you want to reverse engineer the connection from your Android phone to your bluetooth device, use the following process:\n\nPrerequisites:\n* An android phone with the app installed\n* A way to record your screen\n* A computer ideally with linux with wireshark and adb installed\n\nProcess:\n* Connect phone via USB with Debugging turned on\n* Enable HCI snooping\n* (re-)enable Bluetooth\n* Film your actions e.g. with a second phone or screen recording\n* Open the app and do the thing you want to investigate\n* Optionally: turn off blueooth and HCI snooping\n* Retrieve the Blueooth snoop log\n    * Either it is on the sd_card (wasn't for me), then do `adb pull ...` from the device\n    * retrieve it via `adb bugreport`\n* open the file in wireshark\n* Try to establish a match between the video and the wireshark data. Tip: Jot down the times and their offsets on a piece of paper together with the performed action.\n\nIn rare cases the app is stuck for up to 3 seconds after pressing a button before sending the packet, introducing an offset.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnielsole%2Fecoflow-bt-reverse-engineering","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnielsole%2Fecoflow-bt-reverse-engineering","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnielsole%2Fecoflow-bt-reverse-engineering/lists"}