-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathconfig_network_example.h
More file actions
100 lines (72 loc) · 5.26 KB
/
config_network_example.h
File metadata and controls
100 lines (72 loc) · 5.26 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
// enter number the SSIDs and passwords of as many networks you wish to try to connect to.
// This can be any number, but you must then add the same number in each array below.
// ˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉ
const int maxSsids = 4;
// There must be the same number of elements (specified above) in each of the following arrays
// ˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉˉ
const String ssids[maxSsids] = {"Network1", "Network2", "Network3", "Network4"};
const String passwords[maxSsids] = {"password1", "password2", "password3", "password4"};
const String turnoutPrefixes[maxSsids] = {"NT", "NT", "NT", "NT"}; // required if you wish to use turnouts
// this the prefix of all turnout system names for YOUR system, for the wiThrottle servers on the the networks above
// note: for DCC-EX EX-CommandStations, the corresponing value should be blank (i.e. "")
const String routePrefixes[maxSsids] = {"IO:AUTO:", "IO:AUTO:", "IO:AUTO:", "IO:AUTO:"}; // required if you wish to use routes
// this is the prefix of all route system names for YOUR system, for the wiThrottle servers on the networks above
// If defined this must be of the form 99999999999999999 e.g. "19216800400102560" equals 192.168.004.001:2560
// Each block of the ip address MUST be 3 digit. Use leading zeros if needed to insure 3 digits.
// The port MUST be 5 digit. Use leading zeros if needed to insure 5 digits.
// #define DEFAULT_IP_AND_PORT "19216800400102560"
// ********************************************************************************************
// WiFi Country Code for the country you are in. This is used to set the WiFi channel and power level
// for the ESP32. The default is 01 (World) and should work in most countries. If you are having
// problems try changing to another code.
// Supported country codes are "01"(world safe mode) "AT","AU","BE","BG","BR",
// "CA","CH","CN","CY","CZ","DE","DK","EE","ES","FI","FR","GB","GR","HK","HR","HU",
// "IE","IN","IS","IT","JP","KR","LI","LT","LU","LV","MT","MX","NL","NO","NZ","PL","PT",
// "RO","SE","SI","SK","TW","US"
// #define USE_WIFI_COUNTRY_CODE true
// #define COUNTRY_CODE "01"
// By default the country code of the device you are connecting to can override the country code selected here
// Uncommenting the following line will enforce the country code selected above.
// This is useful if you are using a device that does not have a country code set or is set to a different country code.
// This will also set the power level to the maximum allowed for that country code.
// This is not recommended unless you are sure of the country code of the device you are connecting to.
// Included for future use. This currently does nothing
// #define ENFORCED_COUNTRY_CODE true
// ********************************************************************************************
// The period that the controller waits for a connection in milliseconds. Default is 10 seconds (10000ms)
// If you are having problems connection to you network, try uncommenting the line increasing this
// #define SSID_CONNECTION_TIMEOUT 10000
// ********************************************************************************************
// Autoconnect to first SSID in the list above (default, if not specified is false)
// #define AUTO_CONNECT_TO_FIRST_DEFINED_SERVER true
// Autoconnect to first found server (default, if not specified is true)
// #define AUTO_CONNECT_TO_FIRST_WITHROTTLE_SERVER true
// ********************************************************************************************
// Minimum time spacing in milliseconds for commands sent.
// Default is 50
// uncomment and increase this value if the command station is skipping some commands
// Probably Not advisable to set to more than 500
// #define OUTBOUND_COMMANDS_MINIMUM_DELAY 200
// ********************************************************************************************
// For some reason WifiTrax WFD-30 system don't respond unless the commands are preceeded with CR+LF
// Originally these would be sent if the SSID name contains "wftrx_" or you could override the name
// From version v1.77 the extra CR+LF are sent by default. This define allows you to override this
// behaviour if needed.
//
// Uncomment the following line and set to false to disable this feature
// #define SEND_LEADING_CR_LF_FOR_COMMANDS false
// ********************************************************************************************
// Time in milliseconds to wait for mDNS response
// default is 10 seconds (10000ms)
//
// Uncomment the following line and increase the time if you are having problems with mDNS discovery
// #define MDNS_WAIT_TIME 10000
// ********************************************************************************************
// Scanning and sorting method for WiFi networks
// By default networks are scanned but not sorted
// Uncomment the following line to enable sorting of WiFi networks by signal strength (RSSI)
// #define SORT_WIFI_NETWORKS true
// Uncomment the following line to use fast scan method (less thorough)
// #define USE_FAST_WIFI_SCAN_METHOD true
// Uncomment the following line to bypass the WiFi scan on startup
// #define BYPASS_WIFI_SCAN_ON_STARTUP true