# ESP8266 example issues

**URL:** <https://forums.losant.com/t/esp8266-example-issues/1257>\
**Category:** Help\
**Created:** [November 20, 2018, 3:04am UTC](https://forums.losant.com/t/esp8266-example-issues/1257 "2018-11-20T03:04:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cassiano\_Martin](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/cassiano_martin/32/744_2.png) [@Cassiano\_Martin](https://forums.losant.com/u/Cassiano_Martin)\
**Post date:** [November 20, 2018, 3:04am UTC](https://forums.losant.com/t/esp8266-example-issues/1257/1 "2018-11-20T03:04:26Z")

</div>

Following losant examples ( [https://www.losant.com/blog/getting-started-with-the-esp8266-and-dht22-sensor](https://www.losant.com/blog/getting-started-with-the-esp8266-and-dht22-sensor) ) does not work out-of-the-box.

I had to change two macros in PubSubClient.h to get it working.

#define MQTT\_VERSION MQTT\_VERSION\_3\_1  
#define MQTT\_MAX\_PACKET\_SIZE 256

After that, I could connect normally.

Thanks.

---

<div class="post-metadata">

**Author:** ![Erin\_Thompson](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/erin_thompson/32/501_2.png) [@Erin\_Thompson](https://forums.losant.com/u/Erin_Thompson)\
**Post date:** [November 20, 2018, 3:18pm UTC](https://forums.losant.com/t/esp8266-example-issues/1257/2 "2018-11-20T15:18:01Z")

</div>

Great catch! We will be sure to update that blog post so other people don’t run into the same issue.

Thanks for using Losant!  
Erin
