Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New feature: option to hide access point #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions hassio-hostapd/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## [1.0.3]
### Feature addition
- Added option to hide the ssid of the access points.

## [1.0.2]
### Fixed
- Disabled NetworkManager for wlan0 to prevent the addon stop working after a few minutes.
Expand Down
3 changes: 2 additions & 1 deletion hassio-hostapd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ The available configuration options are as follows (this is filled in with some
"channel": "6",
"address": "192.168.99.1",
"netmask": "255.255.255.0",
"broadcast": "192.168.99.254"
"broadcast": "192.168.99.254",
"hide_ap": true
}
```
**Note**: _This is just an example, don't copy and paste it! Create your own!_
Expand Down
48 changes: 0 additions & 48 deletions hassio-hostapd/config.json

This file was deleted.

9 changes: 5 additions & 4 deletions hassio-hostapd/hassio-hostapd/config.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Hassio Hostapd",
"version": "1.0.2",
"version": "1.0.3",
"slug": "hassio-hostapd",
"description": "Raspberry Pi as hotspot in hass.io",
"arch": ["armhf", "armv7", "aarch64", "amd64", "i386"],
Expand Down Expand Up @@ -34,15 +34,16 @@
"channel": "6",
"address": "192.168.99.1",
"netmask": "255.255.255.0",
"broadcast": "192.168.99.254"

"broadcast": "192.168.99.254",
"hide_ap": "true"
},
"schema": {
"ssid": "str",
"wpa_passphrase": "str",
"channel": "int",
"address": "str",
"netmask": "str",
"broadcast": "str"
"broadcast": "str",
"hide_ap": "str"
}
}
6 changes: 6 additions & 0 deletions hassio-hostapd/hassio-hostapd/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ CHANNEL=$(jq --raw-output ".channel" $CONFIG_PATH)
ADDRESS=$(jq --raw-output ".address" $CONFIG_PATH)
NETMASK=$(jq --raw-output ".netmask" $CONFIG_PATH)
BROADCAST=$(jq --raw-output ".broadcast" $CONFIG_PATH)
HIDEAP=$(jq --raw-output ".hide_ap" $CONFIG_PATH)

# Enforces required env variables
required_vars=(SSID WPA_PASSPHRASE CHANNEL ADDRESS NETMASK BROADCAST)
Expand All @@ -45,6 +46,11 @@ echo "ssid=$SSID"$'\n' >> /hostapd.conf
echo "wpa_passphrase=$WPA_PASSPHRASE"$'\n' >> /hostapd.conf
echo "channel=$CHANNEL"$'\n' >> /hostapd.conf

if [ "$HIDEAP" = true ]; then
# Modify hostapd.conf to hide AP-ssid
sed -i 's/ignore_broadcast_ssid=0/ignore_broadcast_ssid=1/g' hostapd.conf
fi

# Setup interface
echo "Setup interface ..."

Expand Down