Ah Ha, I figured you of all possible people might have :-)
I like the look of the library and have been scratching my head after reading as many examples as I could find; would you have an example you could share?
Me No Dev
@me-no-dev
what do you want to achieve?
Douglas Pearless
@DouglasPearless
I want to convert my sketch to use your async buffering library to solve a problem where the block TCP libraries that come with ESP8266/Arduino are causing me to lose characters; this is to add a telnet WiFi connection to Smoothie and other 3D printers / lasercutters
(I have spend a lot of hours tracing the problem down to the TCP end of the equation)
brutzler
@brutzler
let me hook up: what is the advantage of a async-TCP-connection?
Me No Dev
@me-no-dev
why buffering?
@brutzler it does not hold the loop
@DouglasPearless there is an example for Async telnet in github
i think...
if you are going to push the telnet to the serial, you do not need to buffer
Douglas Pearless
@DouglasPearless
I have LaserWeb send data to the Smoothie via a telnet connection via an ESP8266; the replies lose characters etc. By logging to Serial1 I can see the data flowing to the Smoothie UART and back to the ESP8266 but sometimes not all the characters get back over WiFi to LaswerWeb
I did not see an Async telnet example, I will check again, just a moment
Is that a complete sketch as I get "'AsyncClient' has not been declared"
Me No Dev
@me-no-dev
missing the include it seems
Douglas Pearless
@DouglasPearless
:-)
Douglas Pearless
@DouglasPearless
I added the following includes and it now compiles:
include <ESPAsyncTCPbuffer.h>
include <ESP8266WiFi.h>
include <ArduinoOTA.h>
_
Me No Dev
@me-no-dev
you need ESPAsyncTCP not the buffer
Douglas Pearless
@DouglasPearless
oops, that wasn't supposed to be so big, I guess the "#" is some kind of markup
Me No Dev
@me-no-dev
yeah...
read on github markup :)
Douglas Pearless
@DouglasPearless
Interesting, if I remove that include I get: AsyncTelnetServer:28: error: 'AsyncClient' has not been declared void onPoll(void obj, AsyncClient c){
and a lot of other erro
Me No Dev
@me-no-dev
#include <ESPAsyncTCP.h>
Douglas Pearless
@DouglasPearless
your sketch requires either: ESPAsyncTCP.h or ESPAsyncTCPbuffer.h in order to compile
Me No Dev
@me-no-dev
do not remove it... use the non-buffer one
Douglas Pearless
@DouglasPearless
Ah, ok
now using the non buffer one; going to try in a minute; compiling and uploading now :-)
Douglas Pearless
@DouglasPearless
A couple of quick questions, where does os_printf send its output, can I get it to write to Serial1 ?
or does that actually go to the UART0 which I think it does
Douglas Pearless
@DouglasPearless
I will need to sit down and better understand how this works as I seen to be getting strange data back; it seems to be chopping lines (Strings) up ie. send "X250.80 S0.1516" expecting back an "ok" but Smoothie replies: "error: unsupported command - X:124" so it appears something is going wrong send data across the ESP to Smoothies UART :-(
Me No Dev
@me-no-dev
well check the code :) probably sending new lines somwhere
I gave you an example, not a eworking code for your need
Douglas Pearless
@DouglasPearless
I am reading the code right now, I appreciate the example, certainly something to work on :-)