diff --git a/README.md b/README.md
index f7edeaf..35a0eae 100644
--- a/README.md
+++ b/README.md
@@ -122,6 +122,7 @@ wifi ap (also called wifi hotspot) on one of them.
Connect two wifi adapters on a device and [start naxalnet][startnx].
Now an ap will be created on one of the adapters.
+Type `naxalnet --print-wifi` to get the WiFi SSID and password.
If you had set up internet access on one of the peers, internet
can be accessed from the AP.
diff --git a/naxalnet/__init__.py b/naxalnet/__init__.py
index efc9152..8c96cd0 100644
--- a/naxalnet/__init__.py
+++ b/naxalnet/__init__.py
@@ -15,6 +15,13 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
+"""
+naxalnet
+========
+
+Create mesh networks with batman-adv, systemd-networkd and iwd.
+See README.md for documentation.
+"""
# GUIDE FOR CHANGING __version__
#
@@ -29,4 +36,4 @@
#
# In case you forgot to add a version, put the next number
# in the next commit
-__version__ = "0.2.0a3.dev1"
+__version__ = "0.2.0a3.dev2"
diff --git a/naxalnet/__main__.py b/naxalnet/__main__.py
index 624a524..70456a6 100644
--- a/naxalnet/__main__.py
+++ b/naxalnet/__main__.py
@@ -16,11 +16,9 @@
# along with this program. If not, see .
"""
-naxalnet
-========
-
If called as python -m naxalnet, this file makes naxalnet run like
-it was called from the commandline.
+it was called from the commandline. Try:
+ python -m naxalnet --help
"""
from naxalnet.scripts import here_be_dragons
diff --git a/naxalnet/scripts.py b/naxalnet/scripts.py
index dd5384d..e423566 100644
--- a/naxalnet/scripts.py
+++ b/naxalnet/scripts.py
@@ -105,6 +105,12 @@ def setup_devices(args):
ap_device.start_ap(args.ap_ssid, args.ap_passwd)
+def print_wifi(args):
+ print("Mesh name:", args.adhoc_name)
+ print("SSID:", args.ap_ssid)
+ print("Password:", args.ap_passwd)
+
+
def here_be_dragons():
"""
This function is run every time you
@@ -112,6 +118,10 @@ def here_be_dragons():
"""
args = parse_args()
+ if args.print_wifi:
+ print_wifi(args)
+ sys.exit(0)
+
try:
copy_files(args)
except PermissionError as error: