Copyright ©

Mongoose OS Forum

ATTENTION! This forum has moved to:

Do not post any new messages.

MQTT does not connect with the latest mongoose os

MQTT service stopped working on esp8266 after flashing it with the latest mongoose os. I can't see any log from the mgos_mqtt_ev.

The logs:
bcn 0
del if1
mode : null
mgos_wifi_set_mode WiFi mode: AP
mode : softAP(a2:20:a6:18:32:df)
add if1
dhcp server start:(ip:,mask:,gw:
bcn 100
mgos_wifi_setup_ap WiFi AP: SSID Mongoose_1832DF, channel 6
bcn 0
del if1
add if1
dhcp server start:(ip:,mask:,gw:
bcn 100
mgos_wifi_setup_ap WiFi AP IP: gw, DHCP range -
mgos_i2c_create I2C GPIO init ok (SDA: 12, SCL: 14)
mgos_sys_config_init HTTP server started on [80]
mg_rpc_channel_uart 0x3fff0a94 UART0
mg_rpc_add_channel_i 0x3fff0a94 '' UART, trusted
mg_rpc_add_channel_i 0x3fff0b04 'RPC.LOCAL' loopback, trusted
set_spiffs_errno init.js: res = 1, e = -10002
mgos_mjs_init mJS memory stat: before init: 45948 after init: 44528 after init.js: 40764
mg_rpc_channel_mqtt 0x3fff1604 esp8266_1832DF/rpc/#
mg_rpc_add_channel_i 0x3fff1604 '*' MQTT, trusted
mgos_init Init done, RAM: 51904 total, 39924 free, 37864 min free
mgos_upd_boot_finish 1 0
mg_rpc_ev_handler 0x3fff0b04 CHAN OPEN (loopback)
Tick uptime: 2.651660 {"free_ram":40176,"total_ram":51904}
Published: no topic: /devices/esp8266_1832DF/events message

The config is:

"mqtt": {
"enable": true,
"server": "",
"client_id": "",
"user": "",
"pass": "",
"reconnect_timeout_min": 2,
"reconnect_timeout_max": 60,
"ssl_cert": "",
"ssl_key": "",
"ssl_ca_cert": "",
"ssl_cipher_suites": "",
"ssl_psk_identity": "",
"ssl_psk_key": "",
"clean_session": true,
"keep_alive": 60,
"will_topic": "",
"will_message": ""

and here is the code:

Timer.set(1000 /* 1 sec /, true / repeat */, function() {
let value = GPIO.toggle(led);
print(value ? 'Tick' : 'Tock', 'uptime:', Sys.uptime(), getInfo());
let topic = '/devices/' + Cfg.get('') + '/events';
let message = getInfo();
let ok =, message, 1);
print('Published:', ok ? 'yes' : 'no', 'topic:', topic, 'message:', message);

}, null);

Thanked by 1UserMartin


  • Hi Roland. Have you fond a solution to your problem? I am also struggling with this.

  • rojerrojer Dublin, Ireland

    it looks like your wifi is in AP mode, so it's not connecting to any network.
    post mos config-get wifi results (screen the ssid and password if needed).

Sign In or Register to comment.