Uno WiFi Developer Edition MQTT Connection Problems

Hi all,

I'm having trouble with the MQTT client on the Uno WiFi Developer Edition. It can't keep a connection alive (logs below), and messages for subscriptions are never delivered. I've tried this with a few different brokers now, and they all exhibit the same problem.

Logs from the board:

8171> MQTT: TCP connected to m20.cloudmqtt.com:18462
8171> MQTT: Send type=TYPE_CONNECT id=0000 len=40
8210> MQTT: Send type=SUBSCRIBE id=0001 len=10
8212> MQTT: Recv type=CONNACK id=0000 len=4; Pend type=SUBSCRIBE id=01
8305> MQTT: Recv type=SUBACK id=0001 len=5; Pend type=SUBSCRIBE id=01
10444> Thu Feb 09 13:12:30 2017
10444> 
12464> MQTT: Recv type=PUBLISH id=0000 len=8; Pend type=NULL id=00
12464> MQTT: Recv PUBLISH qos=0 v/ba
15089> Wifi check: mode=AP+STA status=5
32436> MQTT: Connect to m20.cloudmqtt.com:18462 0x3fff91a8
32492> MQTT: ip 54.228.205.206
32492> MQTT: connecting...
32529> MQTT: TCP connected to m20.cloudmqtt.com:18462
32529> MQTT: Send type=TYPE_CONNECT id=0000 len=40
32574> MQTT: Disconnect CB, freeing espconn 0x3fff8f58
32574> MQTT: Disconnected from m20.cloudmqtt.com:18462
32575> MQTT ERROR: recv in invalid state 1
32575> MQTT: Disconnecting from m20.cloudmqtt.com:18462 (0x3fff91a8)
32576> MQTT: Disconnect CB, freeing espconn 0x3fff91a8

The code that queries the MQTT status is relatively trivial (excerpt below):

if (current - msg_last_check >= MSG_INTERVAL) {
    CiaoData packet = Ciao.read(MSG_PROTOCOL, MSG_RECEIVE);
    if (!packet.isEmpty()) {
      String status = packet.get(2);
      #ifdef DEBUG
      Serial.print("loop: received status '");
      Serial.print(status);
      Serial.print("' from server.\n");
      #endif
    }
}

Has anybody encountered this issue, or managed to bypass it? It's looking like the MQTT client implementation on the ESP8266 coprocessor is flawed, but if the problem is anywhere in my setup, that'd be great.

I'm also regularly seeing internal exceptions and reboots from the ESP, typically after 30-60 seconds uptime connected to an MQTT broker:

p=0
90> Reset cause: 2=exception
90> exccause=28 epc1=0x402119c6 epc2=0x0 epc3=0x0 excvaddr=0xc depc=0x0
90> Flash map 4MB:512/512, manuf 0x01 chip 0x4016
91> ** esp-link ready
91> initializing MQTT
91> MQTT_Init
91> MQTT: Connect to m20.cloudmqtt.com:18462 0x3fff5d98

Hello, I have also issues with MQTT and UnoWifi.....I like ESP8266 but UnoWifi seems quite instable.....I'm having hard times setting up MQTT message publishing.....it works to publish the status configured in the GUI, but my own additional messages never arrive......
No Idea what is going wrong.....any help highly appreciated.