Skip to content
Permalink
Browse files

get the AP working again/joust.mania site, ethernet should now work a…

…gain in ap mode
  • Loading branch information...
adangert committed Jun 20, 2019
1 parent b09187b commit 4ce78650922e9c289b8f177839b5ac3c8a4bd7ba
Showing with 49 additions and 20 deletions.
  1. +4 −2 README.md
  2. +5 −1 apfiles/dhcpcd.conf
  3. +10 −4 apfiles/dnsmasq.conf
  4. +18 −2 apfiles/hostapd.conf
  5. +3 −2 apfiles/rc.local
  6. +9 −9 enable_ap.sh
@@ -111,11 +111,13 @@ Joustmania can also be controlled via a web browser on your laptop or smartphone
```
sudo ./enable_ap.sh
```
Note that this disables normal Wi-Fi on the Pi, the ethernet connection may not work either. The default SSID is "JOUSTMANIA" and the default password is "joustmania"; both (and other) settings may be adjusted in the apfiles/hostapd.conf file before running enable_ap.sh. To connect to the game, go to http://10.3.141.1/ in your web browser. To disable the access point and restore Wi-Fi, run the command
Note that this disables normal Wi-Fi on the Pi, the ethernet connection should still work however. The default SSID is "JOUSTMANIA" and the default password is "joustmania"; both (and other) settings may be adjusted in the apfiles/hostapd.conf file before running enable_ap.sh.

To connect to the game, go to http://joust.mania in your web browser, you may have to disable LTE on mobile. To disable the access point and restore Wi-Fi, run the command
```
sudo ./disable_ap.sh
```
If Wifi does not come back after issuing this command: go to "/etc/dhcpcd.conf" and open it, look for "#Access point for JoustMania" Change the line below that to "interfaces wlan0" reboot, and your wifi will come back.


Custom Music
---------------------------------
@@ -41,5 +41,9 @@ slaac private
nohook lookup-hostname

#Access point for JoustMania
denyinterfaces wlan0
#denyinterfaces wlan0

interface wlan0
static ip_address=10.3.141.1/24
nohook wpa_supplicant

@@ -17,8 +17,14 @@
#dhcp-range=172.24.1.50,172.24.1.150,12h # Assign IP addresses between 172.24.1.50 and 172.24.1.150 with a 12 hour lease time
#address=/joust.mania/172.24.1.1

interface=lo,uap0
no-dhcp-interface=lo,wlan0
bind-interfaces
server=8.8.8.8

#This was for testing both at the same time, wifi and ap server
#interface=lo,uap0
#no-dhcp-interface=lo,wlan0
#bind-interfaces
#server=8.8.8.8
#dhcp-range=10.3.141.50,10.3.141.255,12h

interface=wlan0
dhcp-range=10.3.141.50,10.3.141.255,12h
address=/joust.mania/10.3.141.1
@@ -47,11 +47,27 @@

#wpa_pairwise=TKIP

#This was for testing both wifi and accesspoint
#interface=uap0
#ssid=JOUSTMANIA
#hw_mode=g
#channel=6
#macaddr_acl=0
#auth_algs=1
#ignore_broadcast_ssid=0
#wpa=2
#wpa_passphrase=joustmania
#wpa_key_mgmt=WPA-PSK
#wpa_pairwise=TKIP
#rsn_pairwise=CCMP


interface=uap0
interface=wlan0
driver=nl80211
ssid=JOUSTMANIA
hw_mode=g
channel=6
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
@@ -17,11 +17,12 @@ if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi


#Access point for JoustMania
iptables-restore < /etc/iptables.ipv4.nat
#iptables-restore < /etc/iptables.ipv4.nat
#hostapd /etc/hostapd/hostapd.conf

sleep 5
#sleep 5
#ifdown wlan0

#sleep 2
@@ -16,14 +16,14 @@ touch ./apfiles/ap_active

apt-get install -y hostapd dnsmasq

cp ./apfiles/ap /etc/network/interfaces.d/ap
#cp ./apfiles/ap /etc/network/interfaces.d/ap

#cp ./apfiles/station /etc/network/interfaces.d/station

cp ./apfiles/90-wireless.rules /etc/udev/rules.d/90-wireless.rules
#cp ./apfiles/90-wireless.rules /etc/udev/rules.d/90-wireless.rules

mv /lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant /lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant.bak
cp ./apfiles/10-wpa_supplicant /lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant
#mv /lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant /lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant.bak
#cp ./apfiles/10-wpa_supplicant /lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant


mv /etc/dnsmasq.conf /etc/dnsmasq.conf.bak
@@ -37,12 +37,12 @@ cp ./apfiles/hostapd /etc/default/hostapd


#for testing
#mv /etc/dhcpcd.conf /etc/dhcpcd.conf.bak
#cp ./apfiles/dhcpcd.conf /etc/dhcpcd.conf
#chown :pi /etc/dhcpcd.conf
mv /etc/dhcpcd.conf /etc/dhcpcd.conf.bak
cp ./apfiles/dhcpcd.conf /etc/dhcpcd.conf
chown :pi /etc/dhcpcd.conf

mv /etc/network/interfaces /etc/network/interfaces.bak
cp ./apfiles/interfaces /etc/network/interfaces
#mv /etc/network/interfaces /etc/network/interfaces.bak
#cp ./apfiles/interfaces /etc/network/interfaces

#sudo service dhcpcd restart
#ifdown wlan0; ifup wlan0

0 comments on commit 4ce7865

Please sign in to comment.
You can’t perform that action at this time.