I am writing an AT commands firmware for esp8266 via connecting it to atmega2560. Now the question is how will I come to know the response time for AT commands for writing its firmware to read the response? in fact prior to this thought, the question comes why is their need of response time in AT commands? does response time concept is there in all modules where AT commands are used like gsm modules, HC05,etc.

  • what is what you call 'response time'? there is no such thing. do you mean the time while the AT firmware sends the response after sending the command. that of course can't be instant. there is the communication over Serial and some processing time to handle the command in the firmware – Juraj Aug 7 '20 at 8:23
  • 1
    If you're on about the prolific use of delay() after sending a command, is because back in the mists of time someone without a clue wrote a tutorial and did it wrong. People with even less of a clue copped it, and it grew from there. There is no call for any delay of you write your code properly with a send-expect model. – Majenko Aug 7 '20 at 9:12
  • Okay thanks for your valuable suggestions45 – Kunal Aug 7 '20 at 23:05

Your esp8266 firmware isn't required to wait before responding to the atmega2560, but the reality is that it simply can't respond in zero-time. The esp will take some processing to interpret the command that was sent to it and to create the reply to the atmega. And that is even if it doesn't have to wait for some distant server.

If the esp has to send a WiFi request to a server (which has the same constraints of processing time, plus other requests ahead of yours), that only adds to the esp's delay in responding to the atmega.

The bottom line is that the esp isn't required to wait any amount of time to respond; its just however much time it takes to acquire any data it needs, plus processing time to format it and send it back to the atmega.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.