mDash never connected stm32 Ethernet

Hi, I’m trying to setup mDash on stm32F7 board. I have set token with mos mdash-setup but this is the log. Any suggestion on how to fix it?
Thanks

[Dec  5 00:05:41.019] mgos_freertos.c:175     test2 1.0 (20191204-230503)
[Dec  5 00:05:41.019] mgos_freertos.c:177     Mongoose OS 2.16.0 (20191204-230503/2.16.0-g9b779cd)
[Dec  5 00:05:41.020] mgos_freertos.c:181     CPU: 192 MHz, FreeRTOS 10.2.0, heap: 299008 total, 297224 free
[Dec  5 00:05:41.020] mgos_freertos.c:183     Newlib 3.0.0
[Dec  5 00:05:41.021] mg_lwip_ev_mgr.c:93     Mongoose 6.15, LwIP 2.1.2
[Dec  5 00:05:41.021] mg_ssl_if_mbedtls.c:57  mbed TLS 2.16.3-cesanta2
[Dec  5 00:05:41.022] mgos_vfs_dev.c:73       fs0: stm32flash ({"offset": 0x8000, "size": 0x80000, "ese": true}), size 524288
[Dec  5 00:05:41.022] mgos_core.c:60          Failed to init boot cfg, OTA not supported.
[Dec  5 00:05:41.023] mgos_vfs.c:147          /: SPIFFS @ fs0, opts {"bs": 4096, "is": 128}
[Dec  5 00:05:41.071] mgos_vfs.c:320          /: size 474641, used: 29116, free: 445525
[Dec  5 00:05:41.117] mgos_sys_config.c:368   MAC: 12:34:64:69:af:ee
[Dec  5 00:05:41.117] mgos_sys_config.c:376   WDT: 30 seconds
[Dec  5 00:05:41.173] mgos_deps_init.c:150    init i2c...
[Dec  5 00:05:41.173] mgos_deps_init.c:150    init atca...
[Dec  5 00:05:41.174] mgos_deps_init.c:150    init ethernet...
[Dec  5 00:05:42.065] stm32_eth.c:112         ETH: MAC 12:34:56:69:af:ee; PHY: LAN8742a @ 0, speed auto, duplex auto; IP: DHCP
[Dec  5 00:05:42.065] mgos_deps_init.c:150    init http-server...
[Dec  5 00:05:42.066] mgos_http_server.c:282  HTTP server started on [80]
[Dec  5 00:05:42.067] mgos_deps_init.c:150    init rpc-common...
[Dec  5 00:05:42.068] mgos_deps_init.c:150    init rpc-ws...
[Dec  5 00:05:42.069] mgos_deps_init.c:150    init shadow...
[Dec  5 00:05:42.070] mgos_deps_init.c:150    init dash...
[Dec  5 00:05:42.072] mg_rpc.c:539            0x2000e308 'wss://mdash.net/api/v2/rpc' WSS_out
[Dec  5 00:05:42.073] mgos_dash.c:203         Dash init ok, server: wss://mdash.net/api/v2/rpc)
[Dec  5 00:05:42.078] mgos_deps_init.c:150    init mbedtls...
[Dec  5 00:05:42.080] mgos_deps_init.c:150    init ota-http-client...
[Dec  5 00:05:42.080] mgos_deps_init.c:150    init ota-http-server...
[Dec  5 00:05:42.081] mgos_deps_init.c:150    init ota-shadow...
[Dec  5 00:05:42.081] mgos_ota_shadow_lib:123 OTA over shadow initialised
[Dec  5 00:05:42.082] mgos_deps_init.c:150    init rpc-service-config...
[Dec  5 00:05:42.082] mgos_deps_init.c:150    init rpc-service-fs...
[Dec  5 00:05:42.083] mgos_deps_init.c:150    init rpc-service-ota...
[Dec  5 00:05:42.083] mgos_deps_init.c:150    init rpc-uart...
[Dec  5 00:05:42.084] mgos_rpc_channel_ua:313 0x2000e968 UART3
[Dec  5 00:05:42.084] mg_rpc.c:539            0x2000e968 '' UART
[Dec  5 00:05:42.085] mg_rpc.c:470            0x2000e968 CHAN OPEN (UART UART3)
[Dec  5 00:05:42.085] mgos_deps_init.c:150    init sntp...
[Dec  5 00:05:42.085] mgos_deps_init.c:150    init spi...
[Dec  5 00:05:42.086] main.c:41               Start
[Dec  5 00:05:42.086] main.c:44               mgos_vfs.c:256          / -> / pl 1 -> 1 0x200097e8 (refs 1)
[Dec  5 00:05:42.086] File System size: 474641
[Dec  5 00:05:42.087] main.c:45               mgos_vfs.c:256          / -> / pl 1 -> 1 0x200097e8 (refs 1)
[Dec  5 00:05:42.087] Free File System size: 445525
[Dec  5 00:05:42.095] main.c:48               Finish
[Dec  5 00:05:42.096] mgos_init.c:36          Init done, RAM: 299008 total, 266688 free, 0 min free
[Dec  5 00:05:42.100] mgos_event.c:135        ev MOS0 triggered 0 handlers
[Dec  5 00:05:42.101] mgos_ota_core.c:969     1 0
[Dec  5 00:05:42.101] mgos_ota_core.c:1318    UID: 10e1e3172b420ac4, license: none
[Dec  5 00:05:45.950] stm32_eth_netif.c:399   ETH: Link up, 100Mbps, full-duplex
[Dec  5 00:05:45.951] stm32_eth_netif.c:417   DHCP state 0 -> 6
[Dec  5 00:05:45.953] mgos_net.c:90           ETH: connected
[Dec  5 00:05:45.956] mgos_event.c:135        ev NET2 triggered 2 handlers

Your device log stops when it should print the next step in the ethernet initialisation - when it receives IP config from the DHCP. You should see something like:

[Dec  5 00:05:45.956] mgos_net_on_change_c ETH: ready, IP 192.168.1.2, GW 192.168.1.1, DNS default

But apparently you don’t see it. Try to specify the IP configuration by hands via the config, see https://github.com/mongoose-os-libs/ethernet/blob/master/mos.yml for the reference.

1 Like

HI, It’s always me, my account is blocked I can’t reply. I don’t know why.
Thanks for the help, it works now. mDash is connected but the ota is not working.
In the log it shows this:
mgos_core.c:60 Failed to init boot cfg, OTA not supported.
what could be the problem?
Thanks again

My mos.yml:

author: mongoose-os
description: A Mongoose OS app skeleton
version: 1.0

libs_version: ${mos.version}
modules_version: ${mos.version}
mongoose_os_version: ${mos.version}

# Optional. List of tags for online search.
tags:
  - c

# List of files / directories with C sources. No slashes at the end of dir names.
sources:
  - src

# List of dirs. Files from these dirs will be copied to the device filesystem
filesystem:
  - fs
  - fs/web

libs:
    - origin: https://github.com/mongoose-os-libs/ethernet
    - origin: https://github.com/mongoose-os-libs/sntp
    - origin: https://github.com/mongoose-os-libs/ca-bundle
    - origin: https://github.com/mongoose-os-libs/mbedtls
      variant: stm32-NUCLEO-F746ZG
    - origin: https://github.com/mongoose-os-libs/ota-http-server
      variant: stm32-NUCLEO-F746ZG
    - origin: https://github.com/mongoose-os-libs/ota-common
      variant: stm32-NUCLEO-F746ZG
    - origin: https://github.com/mongoose-os-libs/shadow
    - origin: https://github.com/mongoose-os-libs/ota-shadow
      variant: stm32-NUCLEO-F746ZG
    - origin: https://github.com/mongoose-os-libs/ota-http-client
      variant: stm32-NUCLEO-F746ZG
    - origin: https://github.com/mongoose-os-libs/rpc-service-ota
      variant: stm32-NUCLEO-F746ZG
    - origin: https://github.com/mongoose-os-libs/http-server
    - origin: https://github.com/mongoose-os-libs/rpc-common
    - origin: https://github.com/mongoose-os-libs/rpc-uart
    - origin: https://github.com/mongoose-os-libs/rpc-ws
    - origin: https://github.com/mongoose-os-libs/rpc-service-fs
    - origin: https://github.com/mongoose-os-libs/rpc-service-config
    - origin: https://github.com/mongoose-os-libs/freertos
    - origin: https://github.com/mongoose-os-libs/mongoose
      variant: stm32-NUCLEO-F746ZG
    - origin: https://github.com/mongoose-os-libs/dash
      variant: stm32-NUCLEO-F746ZG
  
config_schema:
    # - ["board.led1.pin", 0x1e]     # PB14 (LD3, red)
    # - ["board.led2.pin", 0x17]     # PB7 (LD2, blue)
    # - ["board.led3.pin", 0x10]     # PB0 (LD1, green)
    # - ["board.btn1.pin", 0x2d]     # PC13
    # - ["provision.btn.pin", 0x2d]  # PC13
    # - ["provision.led.pin", 0x17]  # PB7 (LD2, blue)
    - ["debug.level", 3]
    - ["eth.enable", true]
    - ["eth.ip", 192.168.100.103]
    - ["eth.netmask", 255.255.255.0]
    - ["eth.gw", 192.168.100.2]
    - ["debug.stdout_uart", 3]
    - ["debug.stderr_uart", 3]
    - ["rpc.uart.uart_no", 3]
    - ["dash.enable", true]

build_vars:
    DEVICE: stm32f746zg
    SRAM_SIZE: 524288
    FLASH_SIZE: 2097152
    HSE_VALUE: 8000000
    LSE_VALUE: 32768
    MGOS_DEBUG_UART: 3
    FLASH_BL_SIZE: 0
    FLASH_BL_CFG_SIZE: 0
    FREERTOS_PORT: GCC/ARM_CM7/r0p1
    MGOS_ROOT_DEVTAB: >
      fs0 stm32flash {"offset": 0x8000, "size": 0x80000, "ese": true}
    MGOS_ROOT_FS_TYPE: SPIFFS
    MGOS_ROOT_FS_SIZE: 0x80000
    MGOS_ROOT_FS_OPTS: '{"bs": 4096, "is": 128}'
    MGOS_ROOT_FS_EXTRACT: 0
    MGOS_ROOT_FS_ON_SYS_FLASH: 1
cdefs:
    STM32_ETH_PHY: STM32_ETH_PHY_LAN8742A
    STM32_ETH_MAC_PIN_REF_CLK: 'STM32_PIN\(STM32_GPIO_PORT_A,1,11\)'
    STM32_ETH_MAC_PIN_MDC:     'STM32_PIN\(STM32_GPIO_PORT_C,1,11\)'
    STM32_ETH_MAC_PIN_MDIO:    'STM32_PIN\(STM32_GPIO_PORT_A,2,11\)'
    STM32_ETH_MAC_PIN_CRS_DV:  'STM32_PIN\(STM32_GPIO_PORT_A,7,11\)'
    STM32_ETH_MAC_PIN_RXD0:    'STM32_PIN\(STM32_GPIO_PORT_C,4,11\)'
    STM32_ETH_MAC_PIN_RXD1:    'STM32_PIN\(STM32_GPIO_PORT_C,5,11\)'
    STM32_ETH_MAC_PIN_TXD0:    'STM32_PIN\(STM32_GPIO_PORT_G,13,11\)'
    STM32_ETH_MAC_PIN_TXD1:    'STM32_PIN\(STM32_GPIO_PORT_B,13,11\)'  # !
    STM32_ETH_MAC_PIN_TXD_EN:  'STM32_PIN\(STM32_GPIO_PORT_G,11,11\)'

# Used by the mos tool to catch mos binaries incompatible with this file format
manifest_version: 2018-09-29

The problem is that it is not supported :slight_smile:

But it should work though. See

What your build log says?

Do I need an explicit way to enable OTA? In my registry I didn’t find any warning or error on bootloader or ota. Can you take a look please? Thanks

https://justpaste.it/3mhji