ESP8266 Testing Harness/Utility for .Net 5

Thread Starter

ApacheKid

Joined Jan 12, 2015
165
I've just made available a small public repo that you can find here in GitHub.

This is a work in progress but it is not trivial or crude, I've just done a bunch of refactoring and cleanup too making it easier to understand.

It is a .Net 5 (which is what .Net Core is now called) test app that exercises a .Net 5 class library that represents an ESP8266 connected to a PC's USB Port. Because its .Net 5 it should run on Linux as well as Windows.

There is an associated second app that is a simple TCP server, it listens for connections and then sends random blocks of random length data.

The point of all this is to enable me to fully understand the behavior of the ESP8266 as a WiFi module, by being able to execute and test it using Visual Studio 2019 which makes debugging and unravelling stuff much easier than doing this from a MCU.

The test app is named CoreTestApp, so long as you have one of these connected to a USB port:

1607970132666.png

or (even better because you can update firmware with this)

1607970110052.png

Then you can run the app.

Although the C# code in the class library is not usable on an MCU and is not intended to be, it can be converted or used as a guide when writing stuff in C or C++, because we can test and get stability on a PC with VS 2019 which is a very robust development environment.

The code at this stage builds cleanly and enables you to create an instance of an ESP8266 object from a COM Port, and then invoke various operations like reset, enable/disable echo, query access points, connect to your wifi system, get version info and create a socket to received data on from some other app connected to the network,

The code uses async serial IO with the COM port and leverages a well designed fast ring buffer class that underpins much of the IO, such code can be used to develop comparable C or C++ code with the knowledge most of the debugging of the algorithms has already been done.

I'm happy to answer questions on this and I am adding to this as I get time.
 
Top