Update apfpv

This commit is contained in:
viktorxda
2025-07-11 17:49:34 +02:00
parent 9d74ca4856
commit 58a7dfa690
2 changed files with 14 additions and 10 deletions

View File

@@ -30,9 +30,8 @@ BR2_PACKAGE_EXFATPROGS=y
BR2_PACKAGE_UBOOT_TOOLS=y
BR2_PACKAGE_ZLIB=y
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
BR2_PACKAGE_HOSTAPD=y
BR2_PACKAGE_IW=y
BR2_PACKAGE_WPA_SUPPLICANT=y
BR2_PACKAGE_WPA_SUPPLICANT_AP_SUPPORT=y
BR2_TARGET_ROOTFS_CPIO=y
BR2_TARGET_ROOTFS_SQUASHFS=y
BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y

View File

@@ -1,13 +1,18 @@
#!/bin/sh
set_config() {
cat << EOF > /tmp/wpa_supplicant.conf
network={
mode=2
frequency=$(fw_printenv -n wlanfreq || echo 2412)
ssid="$(fw_printenv -n wlanssid || echo OpenIPC)"
psk="$(fw_printenv -n wlanpass || echo 12345678)"
}
cat << EOF > /tmp/hostapd.conf
ctrl_interface=/var/run/hostapd
interface=wlan0
hw_mode=g
channel=1
ieee80211n=1
ieee80211ac=1
wmm_enabled=1
rsn_pairwise=CCMP
wpa=2
ssid=$(fw_printenv -n wlanssid || echo OpenIPC)
wpa_passphrase=$(fw_printenv -n wlanpass || echo 12345678)
EOF
}
@@ -41,7 +46,7 @@ case "$1" in
start)
iw wlan0 set txpower fixed $(fw_printenv -n wlanpwr || echo 1500)
set_config
wpa_supplicant -B -i wlan0 -c /tmp/wpa_supplicant.conf
hostapd /tmp/hostapd.conf -B
udhcpd -S
;;