So i'm trying to use the PubSubClient Library on my arduino mini pro, but I'm connecting to the internet via wifi using an ESP8266.

Using a mini means I have to use software serial to connect to the ESP, but I've ran into a problem. I can't find anywhere such as ESPWiFiClient to use with the examples from the PubSubClient library where they use EthernetClient.

Is there any available libraries that can emulate EthernetClient with an ESP module over software serial?

  • Is there a specific reason for using the pubsubclient library? There are other mqtt libraries out there which do work with the esp8266... I do however completely agree with the answer below that ditching your Arduino and uploading the Arduino code to your ESP8266 is a much better approach.
    – larzz11
    Jan 19, 2016 at 9:01

1 Answer 1


Ditch the Pro Mini. Upload your Arduino code to the ESP directly. There's a GitHub repo with the details. ESP for Arduino IDE has a ton of libraries. I'm sure you'll find it there.

But if you're bent on using the Pro Mini, you'll have to use AT commands over serial to control it or flash a custom firmware into the ESP using Lua or something. And Pro Mini can use its hardware serial just like a Uno does.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.