philbowles / PangolinMQTT

PangolinMQTT - ArduinoIDE client library for ESP8266, ESP32 and STM32-NUCLEO
Other
71 stars 21 forks source link

Trying to get started #12

Closed luebbe closed 4 years ago

luebbe commented 4 years ago

Yesterday evening I took the dive and started to port homie-esp8266 to pangolin. The good news is that it didn't crash, the bad news is that I never saw any message show up on the mqtt server and it went into an endless reboot loop, which looked like it was caused by an mqtt disconnect. So I went one step back and tried with Quickstart_P in platformio and -D PANGO_DEBUG.

This also goes into a reboot loop with the following output:

PangolinMQTT v0.0.7
Connecting to Wi-Fi...
Connected to Wi-Fi.
Connecting to MQTT...
CONNECT as esp8266-975401 FH=45072 session=1
We are now clean:)
----> SEND CONNECT 12 bytes on wire
TXQ=1 TCP ACK LENGTH=12
TXQ=0 TCP frag ACK LENGTH=12 acksize=69 amtleft=12
TCP CHOPPED US!
DISCONNECT FH=44472 r=0
Disconnected from MQTT reason=0
Connecting to MQTT...
CONNECT as esp8266-975401 FH=45224 session=1
We are now clean:)
----> SEND CONNECT 12 bytes on wire
TXQ=1 TCP ACK LENGTH=12
TXQ=0 TCP frag ACK LENGTH=12 acksize=69 amtleft=12
TCP CHOPPED US!
DISCONNECT FH=44472 r=0
Disconnected from MQTT reason=0

and so on ...

It is Pangolin version 0.0.8. The Quickstart outputs a hardwired 0.0.7.

I don't know where to go from here. What could be the reason? The broker is mosquitto 1.5.7 running happily on a raspberry 1.

luebbe commented 4 years ago

Wow, now that's weird. In the first try I copied Quickstart_P into the Homie src folder and compiled it there. This resulted in the reboot loop. Then I checked out a clean copy of Pangolin and compiled Quickstart_P there, which works fine. There are obviously some side effects in the first case... :( But since I still intend to port Homie to Pangolin, I have to find out, what's wrong in the first case.

philbowles commented 4 years ago

"Then I checked out a clean copy of Pangolin and compiled Quickstart_P there, which works fine" - Exactly. What you have is a PlatformIO build system problem.

" I have to find out, what's wrong in the first case." What is wrong is the broken, flawed and non 100% Arduino-compatible PlatformIO build system.

Please read the documentation relating to PlatformIO and its broken, flawed and non 100% Arduino-compatible build system.