Today I would like to introduce application I have created to tests and learn how to control ESP8266 using AT commands. It is software tool written in C#.
I called it “AtManager”.
Based on AtManager I have created two basic tools PCoordinator and PEndDevice both are basically AtManager with new sequence of first commands send to ESP8266.
What is cool about this application what I tried to achieve is having really basic application which simply sends AT commands and after that is waiting for response. Response which returns as enumerate within response string.
I called it AtCommandService class. It contains SendCommand() command which sends AT command string we want to send and has a timeoutPeriod in which will wait for response.
What could be interesting for you instead of registering SerialDataReceivedEventHandler function I used Reactive Observable to which later I am Subscribing ProcessIncomingData() function which is processing the incoming data. It could be done in classic easy C# way but I have decided it would be cool doing it with reactive a bit simplifying the source code.
private IObservable<object> _dataReceivedSubscription
.FromEventPattern<SerialDataReceivedEventHandler, SerialDataReceivedEventArgs>(x => _serialPort.DataReceived += x, x => _serialPort.DataReceived -= x)
.Select(x => x.Sender);
Have fun with it. It should make your testing and learning ESP8266 module much easier.
Whole project you can find on my github repository.
Github repository: https://goo.gl/ii9xsz
Be positive and stay calm!