Skip to content
Merged
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
6 changes: 4 additions & 2 deletions skeleton/SYSTEM/tg5050/etc/wifi/wifi_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ start() {

# Bring up the interface
ip link set $WIFI_INTERFACE up 2>/dev/null

mkdir -p /etc/wifi/sockets

# Create default wpa_supplicant.conf if it doesn't exist
if [ ! -f "$WPA_SUPPLICANT_CONF" ]; then
Expand All @@ -31,7 +33,7 @@ EOF

# Start wpa_supplicant if not running
if ! pidof wpa_supplicant > /dev/null 2>&1; then
wpa_supplicant -B -i $WIFI_INTERFACE -c $WPA_SUPPLICANT_CONF -D nl80211 2>/dev/null
wpa_supplicant -B -i $WIFI_INTERFACE -c $WPA_SUPPLICANT_CONF -O /etc/wifi/sockets -D nl80211 2>/dev/null
sleep 0.5
fi

Expand All @@ -43,7 +45,7 @@ EOF

stop() {
# Disconnect and disable
wpa_cli -i $WIFI_INTERFACE disconnect 2>/dev/null
wpa_cli -p /etc/wifi/sockets -i $WIFI_INTERFACE disconnect 2>/dev/null

# Bring down interface
ip link set $WIFI_INTERFACE down 2>/dev/null
Expand Down
Loading