Skip to content

Commit

Permalink
Added files to configure the board as access point
Browse files Browse the repository at this point in the history
  • Loading branch information
rogergranada committed Oct 20, 2017
1 parent 31145bf commit 6b64684
Show file tree
Hide file tree
Showing 9 changed files with 944 additions and 0 deletions.
33 changes: 33 additions & 0 deletions docs/source/jetson/scripts/accesspoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

pid=$(pgrep -x wpa_supplicant) #kill wpa_supplicant if it is already running

if [ ! -z "$pid" ]; then
kill -sigterm $pid
fi

pid=$(pgrep -x dhclient) #kill dhclient if it is already running

if [ ! -z "$pid" ]; then
kill -sigterm $pid
fi

pid=$(pgrep -x hostapd) #kill Hostapd

if [ ! -z "$pid" ]; then
kill -sigterm $pid
fi

sleep 1
hostapd -B /etc/hostapd/hostapd.conf

rv=$(echo $?) # checking return status hostapd

if [ $rv -ne 0 ]; then
echo "could not start hostapd"
exit 1
else
echo "Access Point mode started"
fi

exit 0

0 comments on commit 6b64684

Please sign in to comment.