-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
155 lines (133 loc) · 5.59 KB
/
index.html
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="./assets/icon-192x192.png">
<link rel="stylesheet" href="./src/styles.scss">
<link rel="manifest" href="./manifest.json">
<meta name="theme-color" content="#4CAF50">
<title>Meshtastic Configurator</title>
</head>
<body>
<h1>Meshtastic QR Code Generator</h1>
<form id="meshtasticForm">
<fieldset>
<legend>Share this with others</legend>
<div class="form-group">
<canvas id="qrcode"></canvas>
</div>
<div class="form-group">
<label for="generatedUrl">Generated URL:</label>
<input type="text" id="generatedUrl" name="generatedUrl" readonly>
<button type="button" id="copyUrlButton">Copy URL</button>
</div>
<!-- <div class="form-group">
<button type="button" id="generateConfig">Generate Configuration (QR Code)</button>
</div> -->
</fieldset>
<fieldset>
<legend>Channel Settings</legend>
<div class="form-group">
<label for="channelName">Channel Name (max 12 bytes):</label>
<input type="text" id="channelName" name="channelName" placeholder="Enter Channel Name">
</div>
<div class="form-group">
<label for="modemPreset">Modem Preset:</label>
<select id="modemPreset" name="modemPreset">
<option value="0">Long Range - Fast</option>
<option value="1">Long Range - Slow</option>
<option value="3">Medium Range - Slow</option>
<option value="4">Medium Range - Fast</option>
<option value="5">Short Range - Slow</option>
<option value="6">Short Range - Fast</option>
<option value="7">Long Range - Moderate</option>
<option value="8">Short Range - Turbo</option>
</select>
</div>
<div class="form-group">
<label for="pskType">PSK Type:</label>
<select id="pskType" name="pskType">
<option value="none">No encryption</option>
<option value="aes128">AES-128 (16 bytes)</option>
<option value="aes256">AES-256 (32 bytes)</option>
</select>
</div>
<div class="form-group">
<label for="psk">PSK (Pre-Shared Key):</label>
<input type="text" id="psk" name="psk" placeholder="Generated based on PSK Type" readonly>
<button type="button" id="generatePSK">Generate PSK</button>
</div>
<div class="form-group">
<label for="uplinkEnabled">Uplink Enabled:</label>
<input type="checkbox" id="uplinkEnabled" name="uplinkEnabled">
</div>
<div class="form-group">
<label for="downlinkEnabled">Downlink Enabled:</label>
<input type="checkbox" id="downlinkEnabled" name="downlinkEnabled">
</div>
</fieldset>
<fieldset>
<legend>Module Settings</legend>
<div class="form-group">
<label for="positionPrecision">Position Precision:</label>
<select id="positionPrecision" name="positionPrecision">
<option value="0">Location data is never sent</option>
<option value="11">Large region (±11 kilometers)</option>
<option value="13">City-sized region (±3 kilometers)</option>
<option value="16">Neighborhood-level (±350 meters)</option>
<option value="32" selected="selected">Full precision</option>
</select>
</div>
<div class="form-group">
<label for="isClientMuted">Is Client Muted:</label>
<input type="checkbox" id="isClientMuted" name="isClientMuted">
</div>
</fieldset>
<fieldset>
<legend>LoRa Configuration</legend>
<div class="form-group">
<label for="region">Region:</label>
<select id="region" name="region" required>
<option value="0">Unset</option>
<option value="1">United States</option>
<option value="2">EU 433 MHz</option>
<option value="3">EU 868 MHz</option>
<option value="4">China</option>
<option value="5" selected="selected">Japan</option>
<option value="6">Australia / New Zealand</option>
<option value="7">Korea</option>
<option value="8">Taiwan</option>
<option value="9">Russia</option>
<option value="10">India</option>
<option value="11">New Zealand 865 MHz</option>
<option value="12">Thailand</option>
<option value="13">WLAN Band (LoRa 2.4 GHz)</option>
<option value="14">Ukraine 433 MHz</option>
<option value="15">Ukraine 868 MHz</option>
<option value="16">Malaysia 433 MHz</option>
<option value="17">Malaysia 919 MHz</option>
<option value="18">Singapore 923 MHz</option>
</select>
</div>
<div class="form-group">
<label for="hopLimit">Hop Limit:</label>
<input type="number" id="hopLimit" name="hopLimit" min="1" max="7" value="3">
</div>
<div class="form-group">
<label for="ignoreMqtt">Ignore MQTT:</label>
<input type="checkbox" id="ignoreMqtt" name="ignoreMqtt">
</div>
<div class="form-group">
<label for="configOkToMqtt">Is MQTT OK on outgoing packets:</label>
<input type="checkbox" id="configOkToMqtt" name="configOkToMqtt">
</div>
</fieldset>
</form>
<div id="copyNotification" class="hidden">URL copied to clipboard!</div>
<footer>
<p>View this project on <a href="https://github.com/Georepublic/meshtastic-configurator" target="_blank">GitHub</a>.</p>
</footer>
<script type="module" src="./src/main.ts"></script>
</body>
</html>