Hi all,
I’m trying to get an esp8266 make first contact with mDash but it fails with TCP connect failed: -9
.
[Jun 6 17:39:11.195] mgos_rpc_channel_ws:261 0x3fff0e74 Connecting to wss://mdash.net/api/v2/rpc, SSL? 1
[Jun 6 17:39:11.226] mgos_rpc_channel_ws:205 0x3fff0e74 TCP connect failed: -9
and of course no change in mDash in that case.
Btw, when I go through the routine with the esp32’s I’ve tried they do connect and are now ‘alive’ in mDash.
Any suggestions on how to get the esp8266 to connect with mDash are much appreciated
cheers,
Remco
–
my build / flash / configure routine
- start clean with de demo app
- change the platform:
arch: esp8266
- the setup routine:
-
mos build --local
/mos build
- (enter boot loader mode)
mos flash
- (press reset button)
-
mos wifi xxx yyy
(connection succeeds and ip address is obtained) -
mos mdash-setup xxx
(also:mos set-config mdash.enable-true mdash.token=ZZZ
)
-
I’m using:
- mos version 2.17
- Adafruit Huzzah 8266 breakout
here’s a typical boot log
[Jun 6 17:54:06.496] rBoot v1.2.1-cesanta1 - richardaburton@gmail.com
[Jun 6 17:54:06.496] Flash Size: 32 Mbit
[Jun 6 17:54:06.501] Flash Mode: DIO
[Jun 6 17:54:06.501] Flash Speed: 80 MHz
[Jun 6 17:54:06.501] rBoot Option: Big flash
[Jun 6 17:54:06.517]
[Jun 6 17:54:06.549] Booting rom 0 (0x100000).
[Jun 6 17:54:06.587] 8 n r n b l r b l < n l` > r 8 l mode : s
[Jun 6 17:54:06.600] esp_main.c:172 app1 1.0 (20200606-145003/2.14.0-g9310b83-dirty)
[Jun 6 17:54:06.605] esp_main.c:174 Mongoose OS 2.17.0 (20200606-145003/2.17.0-gc31a745)
[Jun 6 17:54:06.611] esp_main.c:178 CPU: ESP8266EX, 160 MHz, RAM: 51592 total, 49356 free
[Jun 6 17:54:06.616] esp_main.c:180 SDK 2.2.1(1247cc5); flash: 4M
[Jun 6 17:54:06.621] esp_exc.c:211 Reset cause: 6 (sys reset)
[Jun 6 17:54:06.627] mg_lwip_ev_mgr.c:77 Mongoose 6.16, LwIP 1.4.1
[Jun 6 17:54:06.632] mg_ssl_if_mbedtls.c:57 mbed TLS 2.16.3-cesanta9
[Jun 6 17:54:06.638] mgos_vfs_dev.c:73 sfl0: sysflash (), size 4194304
[Jun 6 17:54:06.645] mgos_vfs_dev.c:73 root: part ({"dev": "sfl0", "offset": 32768, "size": 262144}), size 262144
[Jun 6 17:54:06.650] mgos_vfs.c:174 /: SPIFFS @ root, opts {"bs":4096,"ps":256,"es":4096}
[Jun 6 17:54:06.719] mgos_vfs.c:347 /: size 233681, used: 138552, free: 95129
[Jun 6 17:54:06.831] mgos_sys_config.c:232 Loading conf9.json
[Jun 6 17:54:06.846] mgos_sys_config.c:366 MAC: 5e:cf:7f:0e:33:df
[Jun 6 17:54:06.853] mgos_sys_config.c:374 WDT: 30 seconds
[Jun 6 17:54:06.859] mgos_i2c_gpio_maste:250 I2C GPIO init ok (SDA: 12, SCL: 14, freq: 100000)
[Jun 6 17:54:06.867] mgos_ota_shadow_lib:116 OTA over shadow initialised
[Jun 6 17:54:06.873] del if0
[Jun 6 17:54:06.873] usl
[Jun 6 17:54:06.873] mode : null
[Jun 6 17:54:06.873] mgos_wifi.c:88 WiFi STA: Using config 0 (onsnetwerk)
[Jun 6 17:54:06.879] mgos_wifi.c:468 WiFi mode: STA
[Jun 6 17:54:06.884] esp_wifi.c:108 WiFi mode: STA
[Jun 6 17:54:06.884] mode : sta(5c:cf:7f:0e:33:df)
[Jun 6 17:54:06.890] add if0
[Jun 6 17:54:06.890] sleep disable
[Jun 6 17:54:06.890] mgos_wifi.c:270 WiFi STA: Connecting to onsnetwerk
[Jun 6 17:54:06.897] mgos_http_server.c:343 HTTP server started on [80]
[Jun 6 17:54:06.905] mgos_dash.c:203 Dash init ok, server: wss://mdash.net/api/v2/rpc)
[Jun 6 17:54:06.911] mgos_provision_btn.c:75 Factory reset button: pin 0, pull up, hold_ms 0 (hold on boot)
[Jun 6 17:54:06.927] mgos_provision_stat:119 Max state: 2
[Jun 6 17:54:06.933] mgos_rpc_channel_mq:203 0x3fff1234 esp8266_0E33DF/rpc
[Jun 6 17:54:06.941] mgos_rpc_channel_ua:313 0x3fff17f4 UART0
[Jun 6 17:54:06.949] mgos_init.c:36 Init done, RAM: 51592 total, 41432 free, 41440 min free
[Jun 6 17:54:07.796] mgos_mongoose.c:66 New heap free LWM: 26504
[Jun 6 17:54:07.802] mgos_ota_core.c:1318 UID: 038274a340301a4d, license: none
[Jun 6 17:54:07.809] mgos_net.c:86 WiFi STA: connecting
[Jun 6 17:54:07.814] mgos_provision_state:43 Current state: 0 -> 1
[Jun 6 17:54:10.531] scandone
[Jun 6 17:54:10.531] state: 0 -> 2 (b0)
[Jun 6 17:54:10.531] state: 2 -> 3 (0)
[Jun 6 17:54:10.547] state: 3 -> 5 (10)
[Jun 6 17:54:10.547] add 0
[Jun 6 17:54:10.547] aid 7
[Jun 6 17:54:10.547] cnt
[Jun 6 17:54:10.554]
[Jun 6 17:54:10.554] connected with onsnetwerk, channel 2
[Jun 6 17:54:10.554] dhcp client start...
[Jun 6 17:54:10.554] mgos_wifi.c:136 WiFi STA: Connected, BSSID 9c:c7:a6:46:62:d7 ch 2 RSSI -66
[Jun 6 17:54:10.566] mgos_net.c:90 WiFi STA: connected
[Jun 6 17:54:12.141] ip:192.168.178.26,mask:255.255.255.0,gw:192.168.178.1
[Jun 6 17:54:12.141] mgos_net.c:102 WiFi STA: ready, IP 192.168.178.26, GW 192.168.178.1, DNS 192.168.178.1
[Jun 6 17:54:12.152] mgos_provision_state:43 Current state: 1 -> 2
[Jun 6 17:54:12.157] mgos_rpc_channel_ws:261 0x3fff0e74 Connecting to wss://mdash.net/api/v2/rpc, SSL? 1
[Jun 6 17:54:12.188] mgos_mongoose.c:66 New heap free LWM: 25608
[Jun 6 17:54:12.188] mgos_mongoose.c:66 New heap free LWM: 25360
[Jun 6 17:54:12.198] mgos_rpc_channel_ws:205 0x3fff0e74 TCP connect failed: -9
[Jun 6 17:54:13.109] mgos_sntp.c:95 SNTP query to time.google.com
[Jun 6 17:54:17.208] mgos_rpc_channel_ws:261 0x3fff0e74 Connecting to wss://mdash.net/api/v2/rpc, SSL? 1
[Jun 6 17:54:17.239] mgos_rpc_channel_ws:205 0x3fff0e74 TCP connect failed: -9
[Jun 6 17:54:17.751] online: false {"ram_free":31808,"uptime":11.222010,"btnCount":0,"on":false}
cheers,
Remco