-->
Page 1 of 1

Receive single characters over TCP (AT Firmware)

PostPosted: Thu Feb 25, 2016 11:43 am
by JR Miller
Using the stock firmware on my ESP-07 module, I've setup a TCP Server. When I telnet to the server, I can send text both ways successfully. However, I do not receive the incoming keystrokes until the client hits the return key. I would like to receive each keystroke as they occur, so I can provide an interactive telnet console.

I believe the telnet client on my PC is sending each keypress as a separate TCP packet but the ESP8266 is buffering the incoming packets until it sees the RETURN, then it gives me the "+IPD" line. Is there any way to get the AT firmware to give me the data as it arrives?

I've read thru the AT command document, but did not find anything. Is it possible to do? Or do I have to install a different firmware to get the keys as they arrive?

Thank you for any suggestions.

Re: Receive single characters over TCP (AT Firmware)

PostPosted: Thu Feb 25, 2016 11:47 am
by martinayotte
That is the way the AT firmware has been written.
You will need to use custom firmware for doing that.
Take a look at Arduino example :
https://github.com/esp8266/Arduino/blob ... Serial.ino

Re: Receive single characters over TCP (AT Firmware)

PostPosted: Thu Feb 25, 2016 4:37 pm
by JR Miller
Thanks for your quick reply. That's a shame, it seems like a "normal" thing to do ... I was hoping to avoid changing the firmware.

Do you know if there are any firmware uploading code which is intended to run on a microcontroller? My esp-07 modules are buried inside a system, so I can't easily hook them up to a linux or windows PC to flash it. So I would like to re-flash it from my own system. I do have control of the processor the board is attached to.

The closest(simplest) I have found is the esptool.py code. I can probably rewrite the few needed functions from this into C code for my system. I think I just need to be able to write a .bin file to a particular address in flash. Are you aware of any simple code which does this in C?

Thanks again for the info ... I appreciate it.

Re: Receive single characters over TCP (AT Firmware)

PostPosted: Thu Feb 25, 2016 6:30 pm
by martinayotte
It seems to be chicken and eggs issue ... :-)
The following is the esptool.py equivalent in C which is used by Arduino ESP framework, but it is a bit more complex :

https://github.com/igrr/esptool-ck