Go Down

Topic: discussion: which library wrapper to use AT commands with ESP8266 (Read 751 times) previous topic - next topic

aster94

hello,

please note that this is not something like "how do i have to use at commands, i am unable to google that"

I would like to start a discussion about using AT commands with ESP8266 BUT with a library which use the same API as the arduino WiFi library. This means that your code would compile and work the same way whichever board/combination you use
I mean that you will be able to do your wifi stuff with any arduino board + esp8266 with AT commands and directly on a esp8266 (like nodemcu ecc)

how is this possible? thanks to the work of some people who wrapped the AT commands into useful libraries

I am aware of these libraries:

sparkfun library - bad and outdated there are a lot of forks but i don't have any idea if them works

bportaluri library - i just downloaded it and it seems well done, i didn't made many test yet

ekstrand library - never tested but it looks that it works (not very clean code imho)

have you tested other?
the idea is to edit this post when we found a well done library

pert

The ekstrand library doesn't have a compatible API. I don't have any experience with the SparkFun library but it does seem like they have the attitude of "We need to slap together a library to sell this product but then we're not going to make any effort to improve or maintain the code after that".

I think the standardized API is very important and really it's surprising that the others didn't think of that from the start. For example, I was able to make a project using an ESP8266 shield on an Uno with the Temboo library even though the Temboo library has no special provision for that hardware simply because the WiFiEsp library inherits from the Arduino Client class. It's great to be able to easily adapt the tons of existing code written for the Ethernet or WiFi libraries.

My complaint about the WiFiEsp library is that they have the debug output turned on by default, which prints to Serial. This means that out of the box you can't use the library with the common cheap ESP8266 shields, since they also use Serial. I understand that this output is useful for getting things working when you have the ESP8266 connected on a different serial port but nowhere is it documented how to turn off debug output and the author of the library rejected my proposal to do so. Even if the initial debug output is useful, after getting it working it adds a lot of unnecessary overhead to the library.

Juraj

I agree with Per.

And even better is not to use the AT firmware.
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

aster94

....
I think the standardized API is very important and really it's surprising that the others didn't think of that from the start. For example, I was able to make a project using an ESP8266 shield on an Uno with the Temboo library even though the Temboo library has no special provision for that hardware simply because the WiFiEsp library inherits from the Arduino Client class. It's great to be able to easily adapt the tons of existing code written for the Ethernet or WiFi libraries.
....
i am happy to see that I am not the only here which think that this is of vital importance for the arduino philosophy

I was going to ask you if you changed _ESPLOGLEVEL_  in debug.h but i see you did it
https://github.com/bportaluri/WiFiEsp/issues/88

really i think that the best way would be to use a function to enable/disable the debug but this would brings to many code changes

Go Up