-
Notifications
You must be signed in to change notification settings - Fork 1
/
mos.yml
86 lines (72 loc) · 5.34 KB
/
mos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
author: Myles McNamara <myles@smyl.es>
type: lib
description: WiFi Provisioning library to check/test WiFi credentials, and save them to STA configuration
version: 1.0
# platforms: [ cc3200, cc3220, esp32, esp8266 ]
sources:
- src
includes:
- include
config_schema:
- [ "provision", "o", {title: "Device provisioning object"}]
- [ "provision.wifi", "o", {title: "Device WiFi provisioning configuration"}]
# This lib will consider a connection attempt as FAILED when either the value of attempts is reached, or the timeout period is reached ... whichever comes first.
# Attempts is based on the number of times that the event for CONNECTING is triggered
- [ "provision.wifi.attempts", "i", 15, {title: "Number of failed attempts to connect to WiFi before considering connection failed."} ]
- [ "provision.wifi.timeout", "i", 30, {title: "Timeout for connection, in seconds."} ] # Timeout is defined period of time, in seconds, before considering the connection failed
- [ "provision.wifi.reconnect", "b", true, {titie: "If existing STA is connected when test is initiated, and that test fails, reconnect to existing STA wifi configuration."} ]
# On Device Boot Settings
- ["provision.wifi.boot", "o", {title: "WiFi Provision Boot Settings"}]
# This will be set to FALSE automagically after the test is ran (success OR failure)
- ["provision.wifi.boot.enable", "b", false, {titie: "Enable provision WiFi connection test on device boot"} ]
- ["provision.wifi.boot.delay", "i", 10, {titie: "Delay in seconds before attempting test on boot for existing STA to connect only when wifi.sta.enable is true, set to 0 to disable (not recommended)"} ]
# WiFi STA Test Configuration
- ["provision.wifi.sta", "o", {title: "WiFi Provision Test Station"}]
- ["provision.wifi.sta.enable", "b", true, {title: "INTERNAL USE ONLY - Connect to existing WiFi"}] # This MUST always be set to TRUE otherwise call to core wifi lib to validate STA config will fail
# Most setups will only need to set SSID and Password
# You can use mgos_provision_wifi_test_ssid_pass() or mjs ProvisionWiFi.Test.SSIDandPass( "ssid", "password", callback_fn, userdata )
- ["provision.wifi.sta.ssid", "s", {title: "SSID"}]
- ["provision.wifi.sta.pass", "s", {title: "Password", type: "password"}]
# The rest of these settings should only be used by advanced users who know what they are doing
- ["provision.wifi.sta.user", "s", {title: "Username for WPA-PEAP mode"}]
- ["provision.wifi.sta.anon_identity", "s", {title: "Anonymous identity for WPA mode"}]
- ["provision.wifi.sta.cert", "s", {title: "Client certificate for WPA-TTLS mode"}]
- ["provision.wifi.sta.key", "s", {title: "Client key for WPA-TTLS mode"}]
- ["provision.wifi.sta.ca_cert", "s", {title: "CA certificate for WPA-enterprise mode"}]
- ["provision.wifi.sta.ip", "s", {title: "Static IP Address"}]
- ["provision.wifi.sta.netmask", "s", {title: "Static Netmask"}]
- ["provision.wifi.sta.gw", "s", {title: "Static Default Gateway"}]
- ["provision.wifi.sta.nameserver", "s", {title: "DNS Server"}]
- ["provision.wifi.sta.dhcp_hostname", "s", {title: "Host name to include in DHCP requests"}]
# Successful Connection Test Settings
- [ "provision.wifi.success", "o", {title: "Successful WiFi connection settings"} ]
- [ "provision.wifi.success.clear", "b", false, {title: "Clear test STA configurations after a succesful connection"} ]
- [ "provision.wifi.success.copy", "b", true, {title: "Save WiFi STA configuration to device (wifi.sta) after successful connection"} ]
- [ "provision.wifi.success.enable", "b", true, {title: "Enable WiFi STA after copying values (only if copy is enabled)"} ]
- [ "provision.wifi.success.reboot", "b", false, {title: "Reboot device after successful WiFi connection attempt, and copying sta values to wifi statation (if enabled)" } ]
- [ "provision.wifi.success.disable_ap", "b", false, {title: "Disable WiFi AP after successful connection attempt (sets wifi.ap.enable to false)"} ]
- [ "provision.wifi.success.disconnect", "b", false, {title: "Disconnect from STA after succesful connection attempt" } ]
# TODO:
# - [ "provision.wifi.success.index", "i", 0, {title: "STA index to copy values to. Default is 0 which is the first STA in configuration, only change this if you know what you are doing."} ]
# Failed Connection Settings
- [ "provision.wifi.fail", "o", {title: "Failed WiFi connection settings"} ]
- [ "provision.wifi.fail.clear", "b", false, {title: "Clear set STA configurations after a failed connection attempt (default false)"} ]
- [ "provision.wifi.fail.reboot", "b", false, {title: "Reboot device after failed WiFi connection attempt (default false)"} ]
# !! START INTERNAL USE ONLY SETTINGS !!
# DO NOT MODIFY ANY OF THE VALUES BELOW HERE!!
- ["provision.wifi.results", "o", {title: "WiFi Provision Test Results"}]
- ["provision.wifi.results.success", "b", false, {title: "INTERNAL USE ONLY - Whether or not the last test was succesful or not"}] # You should NEVER override this value
- ["provision.wifi.results.ssid", "s", "", {title: "INTERNAL USE ONLY - SSID used for last test results"}] # You should NEVER override this value
# !! END INTERNAL USE ONLY SETTINGS !!
libs:
- origin: https://github.com/mongoose-os-libs/wifi
tags:
- c
- wifi
- setup
- js
cdefs:
MGOS_ENABLE_WIFI_SETUP_CHECK: 0
init_after:
- wifi
manifest_version: 2017-09-29