A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By eriksl
#18238 https://github.com/eriksl/esp8266-basic-bridge

This transparent bridge is based on the transparent bridge by beckdac (also active here), but a complete rewrite from scratch, with all redundant code removed. That's what you get from copy&paste ;-). There is only one source code file left, which is only ~200 lines long and a simple WORKING makefile (i.e. dependencies work, as opposed to the frankenstein makefile that is used for many projects).

For an end-user there won't be much difference (albeit the beckdac version can be configured over wlan), but for guys who want to have a solid example to base their own project on, I'd definitely recommend this one.
Last edited by eriksl on Fri Jul 10, 2015 2:42 pm, edited 1 time in total.
User avatar
By eriksl
#18239 BTW I just added an optional "line buffered" mode where all data from the uart is "corked" until a line feed is seen. That way tcp segments will only have compete lines instead of parts of lines that need to be reassembled on the receiving side.
User avatar
By eriksl
#18240 This version will allow just one connection at a time. I feel that is more appropriate. If you have multiple clients connecting, they may interfere if they can connect at the same time. If a connection is setup to the esp while there is already a connection active, it will just ignore the request (nothing sent back, no TCP RST ("connection refused")). This is actually good because a tcp connect will try for some time, so the second connect will get connected as soon as the actual connection is finished.

For the best/most robust interaction I'd recommend this interface: https://github.com/eriksl/libespif (includes a standalone executable), but it works just as well with telnet, netcat, etc.

With above lib/exec I've managed to make around five connections per second (+ exchange data) from two "competing" clients, without problems and without mixup of the data.