diff --git a/app.py b/app.py
index 972f525..8acb3b3 100644
--- a/app.py
+++ b/app.py
@@ -12,6 +12,7 @@ from bs4 import BeautifulSoup
import ipaddress
from io import StringIO, BytesIO
import csv
+import serial.tools.list_ports
app = Flask(__name__)
socketio = SocketIO(app)
@@ -343,6 +344,11 @@ def transmit433():
ser1.write(msg.encode())
return jsonify(result="Ok")
+@app.route('/get_serial_ports')
+def get_serial_ports():
+ ports = [port.device for port in serial.tools.list_ports.comports()]
+ return jsonify(ports=ports)
+
@app.route('/transmit868', methods=['POST'])
def transmit868():
global ser2
diff --git a/templates/analysis.html b/templates/analysis.html
index b4db320..db6e7e1 100644
--- a/templates/analysis.html
+++ b/templates/analysis.html
@@ -50,8 +50,8 @@
Skinny Research and Development
- Analyze LoRa traffic received at 433, 868, or 915 MHz. Click the desired frequency below to get started. Once you are on the appropriate page, click the 'Connect Serial Port' button to connect to a serial port on your computer. Once connected to your LoRa receiver, traffic will automatically be streamed to the web page for analysis. To disconnect a receiver, click the 'Disconnect Serial Port' button.
-
+ Analyze LoRa traffic received at 433, 868, or 915 MHz. Click the desired frequency below to get started. Once you are on the appropriate page, click the 'Select Device' button to connect to a serial port on your computer. Once connected to your LoRa receiver, traffic will automatically be streamed to the web page for analysis. To disconnect a receiver, click the 'Disconnect Device' button.
+
@@ -65,8 +65,8 @@
-
Connect Serial Port
-
Disconnect Serial Port
+
Select Device
+
Disconnect Device
Transmit Data
Clear Data
@@ -153,34 +153,43 @@
@@ -267,8 +276,8 @@
-
Connect Serial Port
-
Disconnect Serial Port
+
Select Device
+
Disconnect Device
Transmit Data
Clear Data
@@ -340,34 +349,43 @@
@@ -455,8 +473,8 @@
- Connect Serial Port
- Disconnect Serial Port
+ Select Device
+ Disconnect Device
Transmit Data
Clear Data
@@ -527,34 +545,43 @@
diff --git a/templates/index.html b/templates/index.html
index 1de12b4..8159183 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -86,8 +86,8 @@
-
Connect Serial Port
-
Disconnect Serial Port
+
Select Device
+
Disconnect Device
Transmit Data
Clear Data
@@ -174,34 +174,43 @@
@@ -288,8 +297,8 @@
-
Connect Serial Port
-
Disconnect Serial Port
+
Select Device
+
Disconnect Device
Transmit Data
Clear Data
@@ -361,34 +370,43 @@
@@ -476,8 +494,8 @@
- Connect Serial Port
- Disconnect Serial Port
+ Select Device
+ Disconnect Device
Transmit Data
Clear Data
@@ -548,34 +566,43 @@
diff --git a/templates/tracking.html b/templates/tracking.html
index 21868a1..e3f652d 100644
--- a/templates/tracking.html
+++ b/templates/tracking.html
@@ -210,8 +210,8 @@
-
Connect Serial Port
-
Disconnect Serial Port
+
Select Device
+
Disconnect Device
Start Beacon
Stop Beacon
Clear Data
@@ -283,34 +283,43 @@
@@ -458,8 +467,8 @@
-
Connect Serial Port
-
Disconnect Serial Port
+
Select Device
+
Disconnect Device
Start Beacon
Stop Beacon
Clear Data
@@ -528,34 +537,43 @@
@@ -705,8 +723,8 @@
- Connect Serial Port
- Disconnect Serial Port
+ Select Device
+ Disconnect Device
Start Beacon
Stop Beacon
Clear Data
@@ -776,34 +794,43 @@