Giter Club home page Giter Club logo

tcpserial's Introduction

TCPserial

Python script to create a TCP server on the specified port to expose a serial port to the network.

Dependencies

Listed in requirements.txt
Currently requires pyserial (locked on version 3.5 since it's what I tested it against)
In the project directory, install with pip:

pip install -r requirements.txt

Personally, I'm using this as a workaround to Windows serial ports in Windows Subsystem for Linux (WSL) to flash chips with ESP-IDF. Connection to a socket can be achieved by specifying a URI instead of the port name/path like so:

idf.py flash -p socket://192.168.1.71:8080 -b 921600

ESP-IDF Flashing Speed Support

When using the ESP-IDF build system to flash chips (idf.py, esptool.py, etc...) communication always starts off at a baud rate of 115200 but, by default, after retrieving initial information about the chip, the baud rate is changed to higher values (or to one that you specify) before the "large" binaries are sent over.

Since esptool is connected to the socket of this script and not a serial port, it can't signal the change of baudrate to the port TCPSerial is exposing so this script looks for the flaher's change baud command in every message and uppon detection parses the requested value changes and updates the serial port's baud rate after delivering the response from the esp chip back to the build system.

The fastest I've managed was around 980000, bytes start dropping. 921600 behaves rock stable for me (long cable).

tcpserial's People

Contributors

manuel-covas avatar redsmith-dev avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.