Copyright ©

Mongoose OS Forum


Serial Ports on ESP8266

kcbeskcbes Boulder, CO

We would like the ESP8266 have one serial port assigned to respond to commands from an external STM32 host. What are our options in this regard, since the only bi-directional UART (UART0?) is assigned to the MOS Console? And the other UART (UART1) has only TX?
1. How do we disable the mos console over uart and reclaim that UART for application use?
2. Can we use a SoftSerial Library?
3. Can we extend the console as is to incorporate application related API?


  • SergeySergey Dublin, Ireland
    1. Using the config. mos config-get, then see which UART the debug output (stderr/stdout) is routed, and change it with mos confg-set
    2. I don't think it is ported
    3. Could you elaborate please?
  • kcbeskcbes Boulder, CO

    I am seeing some flaky behavior, I was able to connect to the access point and plug in the WiFi router credentials previously, but now I'm seeing a bunch of issues:

    1. Not seeing the expected debug output on TXD1/UART1
    2. Device stays in Access Point Mode, even after receiving the correct credentials (confirmed by Config.Get over HTTP(attached))
    3. Device only consistently connects with direct commands mos wifi <ssid> <psk> and turns off AP mode and switches to station mode and connects to the WiFi network

    Note: Any reference to our WiFi credentials have been intentionally masked for the purposes of this document.

    My mos.yml file has:

      - ["debug.stderr_uart", 1]
      - ["debug.stdout_uart", 1]

    Messages seen on TXD1:

    rBoot v1.2.1 -
    Flash Size:   32 Mbit
    Flash Mode:   DIO
    Flash Speed:  40 MHz
    rBoot Option: Big flash
    Writing default boot config @ 0x7000.
    Booting rom 0 (0x100000).
    mgos_sys_config_init MAC: 620194316B00
                                          mgos_sys_config_init WDT: 30 seconds
                                                                              bcn 0
                                                                                   del if1
                                                                                             mode : null
                                                                                                        mgos_wifi_set_config WiFi mode: AP
                   mgos_wifi_set_mode   WiFi mode: AP
                                                     mode : softAP(62:01:94:31:6b:00)
                                                                                     add if1
                                                                                            dhcp server start:(ip:,mask:,gw:
                                         bcn 100
                                                mgos_wifi_dev_ap_set WiFi AP: SSID Mongoose_316B00, channel 6

    When I send the credentials over the Access Point, I see this:

    TA: Connecting to besguest
                              mgos_http_server_ini HTTP server started on [80]
                                                                              mg_rpc_channel_mqtt  0x3fff1614
     ets Jan  8 2013,rst cause:2, boot mode:(3,7)
    load 0x40100000, len 1796, room 16 
    tail 4
    chksum 0x63
    load 0x3ffe8000, len 824, room 4 
    tail 4
    chksum 0x0c

    The above console outputs are exclusive of a bunch of non-human-readable characters.

  • SergeySergey Dublin, Ireland

    Config.Set + Config.Save is not enough.
    You need to reboot after.

Sign In or Register to comment.