diff --git a/plinth/modules/networks/networks.py b/plinth/modules/networks/networks.py
index 296f1aab9..fe5771570 100644
--- a/plinth/modules/networks/networks.py
+++ b/plinth/modules/networks/networks.py
@@ -31,6 +31,8 @@ from plinth import network
subsubmenu = [{'url': reverse_lazy('networks:index'),
'text': _('Network Connections')},
+ {'url': reverse_lazy('networks:scan'),
+ 'text': _('Nearby Wi-Fi Networks')},
{'url': reverse_lazy('networks:add'),
'text': _('Add Connection')}]
@@ -136,6 +138,16 @@ def deactivate(request, conn_id):
return redirect(reverse_lazy('networks:index'))
+@login_required
+def scan(request):
+ """Show a list of nearby visible wifi APs."""
+ aps = network.wifi_scan()
+ return TemplateResponse(request, 'wifi_scan.html',
+ {'title': _('Nearby Wi-Fi Networks'),
+ 'subsubmenu': subsubmenu,
+ 'aps': aps})
+
+
@login_required
def add(request):
"""Serve the connection type selection form."""
diff --git a/plinth/modules/networks/templates/wifi_scan.html b/plinth/modules/networks/templates/wifi_scan.html
new file mode 100644
index 000000000..8ecad2b23
--- /dev/null
+++ b/plinth/modules/networks/templates/wifi_scan.html
@@ -0,0 +1,40 @@
+{% extends "base.html" %}
+{% comment %}
+#
+# This file is part of Plinth.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see