meadow.config.yaml file can be used to set general board and system configuration settings. This includes OS and device level settings such as device name, default network behavior, and network settings.
Remember to set Copy to Output Directory to
Copy always in the properties pane of any configuration files.
Consider the following sample config file:
#=============================================================================== # main device config Device: # Name of the device on the network. Name: MeadowF7V2_ConfigSample #=============================================================================== # Control how the .NET runtime executes your Meadow application, optionally enabling just-in-time (JIT) compilation instead of interpretation mode. MonoControl: Options: --jit # Control how the ESP coprocessor will start and operate. Coprocessor: # Should the ESP32 automatically attempt to connect to an access point at startup? # If set to true, wifi.yaml credentials must be stored in the device. AutomaticallyStartNetwork: true # Should the ESP32 automatically reconnect to the configured access point? AutomaticallyReconnect: true # Maximum number of retry attempts for connections etc. before an error code is returned. MaximumRetryCount: 7 # Network configuration. Network: # Automatically attempt to get the time at startup? GetNetworkTimeAtStartup: true # Time synchronization period in seconds. NtpRefreshPeriod: 600 # Name of the NTP servers. NtpServers: - 0.pool.ntp.org - 1.pool.ntp.org - 2.pool.ntp.org - 3.pool.ntp.org # IP addresses of the DNS servers. DnsServers: - 220.127.116.11 - 18.104.22.168
Device section contains configurable properties for the system in general. The
Coprocessor section of the file determines how the coprocessor interacts with the STM32 and the network.
This is the name that will show on the network.
Default value: MeadowF7
JIT compilation mode
This parameter determines if the .NET runtime executes your Meadow application via just-in-time (JIT) compilation or the default interpretation mode. This feature is enabled for RC1 and will eventually be enabled by default for later versions as JIT complication is typically significantly faster.
MonoControl: Options: --jit
This parameter determines if the system will automatically attempt to connect to an access point as the board starts. This requires a default access point configured in a separate
Valid values are:
false- Do not connect (default)
true- Automatically connect if a default access point has been specified
This parameter determines if the system should automatically attempt to reconnect to an access point if there is a communication issue and the connection is dropped.
Valid values are:
false- Do not reconnect (default)
true- Automatically try to reconnect
Reconnection attempts are limited by the
Note that this parameter does not force the system to start the network automatically, see
AutomaticallyStartNetwork for this functionality.
Ths property determines the maximum number of retry attempts for network operations should a failure occur.
Default value: 3
Whether or not the Meadow should attempt to request the latest network time from an Network Time Protocol (NTP) server.
If set to true, NTP servers should be specified.
DNS server(s) to use for DNS queries.
For an example of configuration in use, see the Config Files sample App in the
Weather Station Using Public Web Service Using Meadow
Build a WIFI Connected Clock Using Meadow
Make a Meadow indoor/outdoor temperature/weather desk clock