{"id":13802069,"url":"https://github.com/tiagocoutinho/us2n","last_synced_at":"2025-07-05T21:38:09.975Z","repository":{"id":77343427,"uuid":"112123043","full_name":"tiagocoutinho/us2n","owner":"tiagocoutinho","description":"micropython bridge between UART and TCP for the ESP32","archived":false,"fork":false,"pushed_at":"2017-12-16T16:50:14.000Z","size":29,"stargazers_count":20,"open_issues_count":1,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-22T12:33:34.650Z","etag":null,"topics":["bridge","esp32","micropython","tcp","uart","wifi"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tiagocoutinho.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}},"created_at":"2017-11-26T22:49:11.000Z","updated_at":"2023-09-08T17:33:11.000Z","dependencies_parsed_at":"2024-01-07T21:53:20.070Z","dependency_job_id":"7b8d48b8-939f-4f92-9bd7-411b568aeeb4","html_url":"https://github.com/tiagocoutinho/us2n","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/tiagocoutinho%2Fus2n","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocoutinho%2Fus2n/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocoutinho%2Fus2n/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiagocoutinho%2Fus2n/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tiagocoutinho","download_url":"https://codeload.github.com/tiagocoutinho/us2n/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244350946,"owners_count":20439290,"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":["bridge","esp32","micropython","tcp","uart","wifi"],"created_at":"2024-08-04T00:01:34.819Z","updated_at":"2025-03-19T03:30:57.950Z","avatar_url":"https://github.com/tiagocoutinho.png","language":"Python","funding_links":[],"categories":["Libraries"],"sub_categories":["Communications"],"readme":"# micropython ESP32 UART to TCP bridge\n\nA micropython server running on an ESP32 which acts as a bridge\nbetween UART and TCP (LAN/WLAN).\n\n## Installation\n\nFollow steps to install *esptool* and *micropython for ESP32*.\n\nThen...\n\n* clone me, oh please, clone me!\n\n```bash\n$ git clone git@github.com/tiagocoutinho/us2n\n```\n\n* Create a file called `us2n.json` with a json configuration:\n\n```python\n\nimport json\n\nconfig = {\n    \"name\": \"SuperESP32\",\n    \"verbose\": False,\n    \"wlan\": {\n        \"sta\": {\n            \"essid\": \"\u003cname of your access point\u003e\",\n            \"password\": \"\u003cpassword of your access point\u003e\",\n        },\n    },\n    \"bridges\": [\n        {\n            \"tcp\": {\n                \"bind\": [\"\", 8000],\n            },\n            \"uart\": {\n                \"port\": 1,\n                \"baudrate\": 9600,\n                \"bits\": 8,\n                \"parity\": None,\n                \"stop\": 1,\n            },\n        },\n    ],\n}\n\nwith open('us2n.json', 'w') as f:\n    json.dump(config, f)\n\n```\n\n* Include in your `main.py`:\n\n```python\nimport us2n\nserver = us2n.server()\nserver.serve_forever()\n```\n\n* Load the newly created `us2n.json` to your ESP32\n\n* Load `us2n.py` to your ESP32\n\n* Load `main.py` to your ESP32\n\n* Press reset\n\nThe server board should be ready to accept requests in a few seconds.\n\n\n## Usage\n\nNow, if, for example, your ESP32 UART is connected to a SCPI device,\nyou can, from any PC:\n\n```bash\n$ nc \u003cESP32 Wifi IP\u003e 8000\n*IDN?\nACME Instruments, C4, 122393-2, 10-0-1\n\n```\n\nThat's all folks!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiagocoutinho%2Fus2n","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiagocoutinho%2Fus2n","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiagocoutinho%2Fus2n/lists"}