- Fri Oct 24, 2014 3:35 pm
#1917
The AT command set has been developed by the Hayes Atlanta-based company back in 1981 for its Smartmodem 300 bps modems (
http://en.wikipedia.org/wiki/Hayes_command_set), 33 years ago! It has been used in "mission critical" situations all over the world, long before DSL and cable existed, over unreliable PSTN and satellites networks. I personally used it on a model 33 Teletype in the earlier 80s with such modems.
Its purpose was to to solve the problem of sending both data and commands over the same physical link, and is still heavily used today as a
de facto standard for this same purpose, including in the latest generation 3G or 4G modems.
Unlike what you pretend about its "mathematical incompleteness", the AT syntax is unambiguous and is one of the easiest to parse on low-end processors, please read carefully the
V.250 corresponding standard. It can work along with flow control, either hardware or software, so your argument about overruns does not stand.
AT command syntax is actually impressively compact and feature-rich: for example, the exact meaning of the required "AT" prefix is little known, but is in fact an extremely efficient way of performing
autobaud / auto parity determination.
The "rigidity of GPS sentences with their well defined start and end and a check sum" (let's call it with its proper name:
NMEA 0183) is absolutely not addressing the same problem: it is a one-way protocol whose sole purpose is to report information from one "talker" to several "listeners" and thus does not provide a way to send commands. Using it for at least 20 years, let me say it also has its own quirks, the jungle of proprietary commands and argument formats being the least.
Regarding your "high speed interface SPI with an established master slave relationship" proposal, what exactly is this beast? SPI is a synchronous serial protocol that requires at least 3 wires + 1 wire for each individual chip you want to access ("chip select"), with one single master and multiple slaves, so I don't understand what you mean by "established relationship". BTW, SPI is a hardware protocol like I2C or RS232 UART, not a software one like the AT or NMEA protocols mentioned above.
However, I fully agree with you that the Espressif implementation of the AT protocol is a total big mess: there are a lot of areas where it differs substantially from the V.250 standard and features some remarkably inconsistent behavior that shows the complete lack of knowledge of the AT syntax and its global flow of operation from its conceptors. There is no such thing as "busy" state in the V.250 standard (this is a terrible addition to the AT command set), as are the "chinglish" error messages and lack of the basic AT command sets for controlling status and error reporting, echo management, etc.
Now, if you want to get a "mission critical" reliable operation using the ESP8266, there are basically two paths you can go by:
- develop directly onto the ESP8266 chip itself
- use a sane AT command set implementation like @igrr wrote