discussion: which library wrapper to use AT commands with ESP8266

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

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.

I agree with Per.

And even better is not to use the AT firmware.

pert:
....
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

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

Hi,

I'm interested to know if anyone came closer to a solution on this issue ?

I have an Arduino Uno and an ESP8266 board connected via a serial interface ( AltSoftSerial and pins 8/9 ). I am able to connect to the internet etc via AT commands sent to the ESP8266, which is fine as far as it goes.

What I'd like to do is use and MQTT library but as far as I can see the libraries available are not suited to a serially connected ESP board.

Is there a suitbable library out there or do I replace my hardware with an Arduino with integrated WiFi ?

Thanks in advance for you comments :slight_smile:

Mart1411:
Hi,

I'm interested to know if anyone came closer to a solution on this issue ?

I have an Arduino Uno and an ESP8266 board connected via a serial interface ( AltSoftSerial and pins 8/9 ). I am able to connect to the internet etc via AT commands sent to the ESP8266, which is fine as far as it goes.

What I'd like to do is use and MQTT library but as far as I can see the libraries available are not suited to a serially connected ESP board.

Is there a suitbable library out there or do I replace my hardware with an Arduino with integrated WiFi ?

Thanks in advance for you comments :slight_smile:

nothing new, yet. my comment still applies. I work on a new library over AT firmware with SDK 3.0.0. But it doesn't have priority for me, so the progress is slow.

Mart1411:
What I'd like to do is use and MQTT library but as far as I can see the libraries available are not suited to a serially connected ESP board.

Did you try it with the WiFiEsp library?