Command line tool is unable to configure Nodemcu

I am getting issues when configuring Nodemcu using Command line tool.
These used to work even after changing from miot to mgos tool.
Please advice. (Already downloaded the latest version)

mgos aws-iot-setup --aws-iot-policy XXXXXXXXXXXXXXXXXXXXXX

.
.
.
Uploading certificate... <<<<==== stops here till time out

mgos config-set mqtt.sub=aa mqtt.pub=bb

.
.
.
Setting new configuration... <<<<==== stops here

Comments

  • silversupremesilversupreme Bay Area, CA

    I'm seeing similar problems with custom firmware that I'm working on. What's curious is that the c_mqtt example firmware seems to work just fine - I'm attempting to figure out what's different.

    Of some note is this output when using commands like "mgos ls" on the custom firmware:

    E0110 10:37:51.389537   13441 stream.go:121] [streamConnectionCodec to /dev/tty.SLAB_USBtoUART]: failed to parse frame: ",\"sys_config_schema.json\",\"test.txt\",\"index.html\"]}" invalid character ',' looking for beginning of value
    

    The c_mqtt firmware does not exhibit this behaviour at all. Cesanta folks, can you please look into this? I'd also like to get my ESP8266 online.

  • The c_mqtt example on my esp8266 exhibit the same behavior as reported by aws_iot_esp8266.

  • Although, it doesn't response for "SET" commands ex: mgos config-set
    it responses for "GET" commands ex: mgos config-get
    **Issues has not been rectified yet :-( **

    {
      "conf_acl": "*",
      "console": {
        "log_file": "console.log",
        "log_file_size": 2048,
        "mem_buf_size": 256,
        "send_to_cloud": true
      },
      "debug": {
        "enable_prompt": true,
        "factory_reset_gpio": -1,
        "level": 2,
        "mbedtls_level": 0,
        "stderr_uart": 0,
        "stdout_uart": 0
      },
      "device": {
        "id": "test",
        "password": "test"
      },
      "dns_sd": {
        "enable": true,
        "service_name": "mongoose-os-??????",
        "service_type": ""
      },
      "http": {
        "enable": true,
        "hidden_files": "",
        "listen_addr": "80",
        "ssl_ca_cert": "",
        "ssl_cert": "",
        "ssl_key": "",
        "tunnel": {
          "addr": "mongoose.link",
          "enable": false
        },
        "upload_acl": "*"
      },
      "i2c": {
        "debug": false,
        "enable": true,
        "scl_gpio": 14,
        "sda_gpio": 12
      },
      "mqtt": {
        "clean_session": true,
        "keep_alive": 60,
        "pub": "/response",
        "reconnect_timeout_max": 60,
        "reconnect_timeout_min": 10,
        "server": "broker.mqttdashboard.com:1883"
        "ssl_ca_cert": "",
        "ssl_cert": "",
        "ssl_key": "",
        "sub": "/request",
        "will_message": "",
        "will_topic": ""
      },
      "rpc": {
        "enable": true,
        "max_queue_size": 25,
        "mqtt": {
          "enable": true,
          "is_trusted": true
        },
        "uart": {
          "baud_rate": 115200,
          "fc_enable": false,
          "uart_no": 0,
          "wait_for_start_frame": true
        }
      },
      "sys": {
        "atca": {
          "ecdh_slots_mask": 12,
          "enable": false,
          "i2c_addr": 96
        },
        "atca_enable": false,
        "wdt_timeout": 30
      },
      "update": {
        "commit_timeout": 0,
        "enable_post": true,
        "interval": 0,
        "ssl_ca_file": "",
        "ssl_client_cert_file": "",
        "ssl_server_name": "",
        "timeout": 300,
        "url": ""
      },
      "wifi": {
        "ap": {
          "channel": 6,
          "dhcp_end": "192.168.4.100",
          "dhcp_start": "192.168.4.2",
          "enable": true,
          "gw": "192.168.4.1",
          "hidden": false,
          "ip": "192.168.4.1",
          "keep_enabled": true,
          "max_connections": 10,
          "netmask": "255.255.255.0",
          "pass": "Mongoose",
          "ssid": "Mongoose_??????",
          "trigger_on_gpio": -1
        },
        "sta": {
          "enable": false,
          "gw": "",
          "ip": "",
          "netmask": "",
          "pass": "",
          "ssid": ""
        }
      }
    }

    @aws_iot_esp8266 said:
    I am getting issues when configuring Nodemcu using Command line tool.
    These used to work even after changing from miot to mgos tool.
    Please advice. (Already downloaded the latest version)

    Setting new configuration... <<<<==== stops here

  • lsmlsm Dublin, Ireland
    edited January 12

    Ah, thank you folks. We have made changes to the way device sends command frame separators over the UART, and I have just updated the mgos tool.

    Please re-download, and try again!

    https://mongoose-iot.com/software.html

  • Thank you very much @lsm :-) It's finally working back.
    Those who have troubles with web UI may parse "--ui=false" to run as usual.
    Ex: mgos build --arch esp8266 --ui=false
    I am getting an error "Error Access is denied." on browser.

    Cheers!!

    @lsm said:
    Ah, thank you folks. We have made changes to the way device sends command frame separators over the UART, and I have just updated the mgos tool.

    Please re-download, and try again!

    https://mongoose-iot.com/software.html

  • edited January 13

    Yeah, thanks, I have disabled the UI on all platforms for time being.

    @aws_iot_esp8266 could you share a screenshot with your error please? I'd like to fix it.

Sign In or Register to comment.