Mos wifi error ESP8266-01

#1

Hi there,

I’m new to the mongoose OS platform and I’ve got some issues with the “mos wifi” command.

I’m using a ESP8266-01 module with 1Mb of flash memory.
As test I’ve created the demo app (mos clone https://github.com/mongoose-os-apps/demo-js app1).
I’ve added the FLASH_SIZE: 1048576 to the mos.yml file before making a build of the app.
Afterwards I’ve flashed to ESP8266 module.

Everything works fine but when I try to configure the wifi connection with the command: mos wifi WIFI_NETWORK_NAME WIFI_PASSWORD, I’ve receive the following message:

$ mos wifi
Error: /private/tmp/mos-20200204-9510-12i29jp/mos-18c19395db3292985b1d067c4188efd91eea62d3/go/src/github.com/mongoose-os/mos/cli/wifi.go:33: Usage: /usr/local/bin/mos wifi WIFI_NETWORK_NAME WIFI_PASSWORD
/private/tmp/mos-20200204-9510-12i29jp/mos-18c19395db3292985b1d067c4188efd91eea62d3/go/src/github.com/mongoose-os/mos/cli/main.go:197: wifi failed
exit status 1
Command completed.

Does anyone have an idea what could cause this issue?

Thanks!

#2

It looks like you ran

mos wifi

You have to run

mos wifi SSID PASSWORD

where SSID is the name of your wifi network and PASSWORD is its password.

#3

Hi,

Thanks for the response.
I already tried with different wifi networks (SSID, PASSWORD).
But I receive always the same error response.

#4

After a few additional attempts, I receive the following error message:

Getting configuration...
Setting new configuration...
Error: /private/tmp/mos-20200204-9510-12i29jp/mos-18c19395db3292985b1d067c4188efd91eea62d3/go/src/github.com/mongoose-os/mos/cli/dev/dev_conn_impl.go:171: remote error -1: error saving config: failed to write file
/private/tmp/mos-20200204-9510-12i29jp/mos-18c19395db3292985b1d067c4188efd91eea62d3/go/src/github.com/mongoose-os/mos/cli/dev/dev_conn_impl.go:190: 
/private/tmp/mos-20200204-9510-12i29jp/mos-18c19395db3292985b1d067c4188efd91eea62d3/go/src/github.com/mongoose-os/mos/cli/dev/dev_conn.go:88: 
/private/tmp/mos-20200204-9510-12i29jp/mos-18c19395db3292985b1d067c4188efd91eea62d3/go/src/github.com/mongoose-os/mos/cli/config/config.go:120: 
/private/tmp/mos-20200204-9510-12i29jp/mos-18c19395db3292985b1d067c4188efd91eea62d3/go/src/github.com/mongoose-os/mos/cli/main.go:197: wifi failed
#5

Looks like no flash space left on the device.
Check the free space. Run mos console and you should see something like this

[May 11 17:54:33.692] mgos_vfs.c:174          /: SPIFFS @ fs_0, opts {"bs":4096,"ps":256,"es":4096}
[May 11 17:54:34.421] mgos_vfs.c:347          /: size 233681, used: 33634, free: 200047