Is there some code somewhere for an AT command interpreter? Like for MKR 1010 or any other Wifi Arduino. I struggle with getting an ESP8266 module (LoLin NodeMcu V3) working. No matter what I do, I can't get the right firmware flashed. I need it to respond to AT commands. One binary I tested almost did it right, but it somehow had a reduced set of commands. Another binary might be complete, but it doesn't work over USB serial, but on some other UART pins.
But since I can program this ESP8266 thing myself, using Arduino IDE, I thought I could flash an Arduino program instead, a program working as an AT command interpreter over any serial, either over USB or over any pair of pins. And instead of writing it myself, I'd like to use a wheel not invented by myself.
I'm working on a project, where I use a 2560 like pin monster (an STM32U575-Nucleo), which is what I want to put my whole programming effort on. So I just wish to get the ESP8266 thing in a state, where it would act to any standard AT commands the other board is sending it.
There are several open source AT command intepreters, but it is pretty difficult to separate the code that interprets the command string from all of the device specific actions.
You can take a look at this one (derived from someone else's work): GitHub - jremington/Bell-103-modem-demodulator: 300 Baud FSK tone demodulator (Fourier Transform)
The AT parser is hayes.cpp and hayes.h in the Arabell300_59.zip folder, but I'm sure it is not standalone, and you will need other dependencies.
AT-Commander: GitHub - openxc/AT-commander: A C library to control a device via UART that responds to an AT command set (like an RN-42)
A lot of the AT codes were based on Hayes modems. Check into them for some old user manuals.
what do you mean by that:
- Something that issues AT commands to a modem-like device, and interprets the responses?
- Something that is a modem-like device, receiving AT commands, and sending responses?
Here are some examples of code doing the former:
https://www.avrfreaks.net/s/topic/a5C3l000000UYptEAG/t147703?comment=P-1410260
These have now been formalised by the ITU into V.250, "Serial asynchronous automatic dialling and control":
https://www.itu.int/rec/T-REC-V.250/en
It's a free download, and well worth studying if you're going to be getting deep into AT Commands.
The standard GSM AT Command set is 3GPP Specification # 27.007:
https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1515
and 27.005 for SMS via AT Commands:
https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=1514
Esp site on the AT command set
If you want to write new, I have a fast on Uno, flexible word match function+dataset that walks through a word list as serial data arrives char by char.
It does not buffer-then-match. It matches or no-matches by the time the sent data has arrived word by word.
It's a code tool I've stuck in examples. The code isn't big and the support data not great. The match words can be varied lengths. AT codes tend to be short.
Something that is a modem-like device. The ESP8266 is a modem like device. And there are lots of binaries one can install on it, which makes it respond to AT commands over UART. I need it to respond over USB.
I don't understand what you wan do. How is the MKR 1010 involved?
but: My WiFiEspAT library is a WiFi library over esp8266 AT commands. If that is what you want to make,
and here is a 'fake' AT firmware for the esp8266. it is an Arduino sketch for the esp8266.
It's not. I only mentioned it, because it's an Arduino with built in wifi. I use a NodeMcu ESP8266 instead, but it can be programmed with Arduino IDE. Therefore I thought that there might be some generic code that works for Arduinos with wifi as well as for NodeMcu ESP8266.
That is exactly what I want to make, thanks for that!
So it's not really the command interpreter part that you need - that would be the same irrespective of what transport (USB, UART, whatever) is used.
What you need is the transport layer.
Can you take a look at some of the UART-based ones, and just separate-out the transport handling.
Then replace the UART-based transport with a USB-based one.
Basically, AT command handling (at either end) is just about sending an receiving characters - so you'd be looking for something like a getchar()
/putchar()
interface, and "retargetting" that to use USB instead of UART as its transport ...
A finite state machine with lots of cases?
There are USB-AVR's like the one used in the Micro and Leonardo. They do HID too.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.