Difference between revisions of "Access Point"

From Klaus' wiki
Jump to: navigation, search
(Configure IP addresses)
Line 43: Line 43:
 
==Configure IP addresses==
 
==Configure IP addresses==
  
In the file /etc/network/interfaces add these lines (choose an address suitable for you):
+
To set an ip address on the wlan0 interface perform these commands as root:
iface wlan0 inet static
+
<source lang=bash>
    address 192.168.22.1
+
]$ ip link set wlan0 down
    netmask 255.255.255.0
+
]$ ip addr flush dev wlan0
which will set up a static address for the access point.
+
]$ ip link set wlan0 up
 +
]$ ip addr add 192.168.22.1/24 dev wlan0
 +
</source>
  
 
==Manually test==
 
==Manually test==

Revision as of 16:32, 12 November 2020

In order to setup the BeagleBone Black as an access point you need to go through a few steps.

I have done this with a TP-Link TL-WN722N adapter.
TP-Link TL-WN722N.png

Configure the Hostappd

First edit the /etc/hostapd/hostapd.conf file (as root)

### Wireless network name ###
#
### Set your bridge name ###
#bridge=br0
#driver
driver=nl80211
country_code=DK
ssid=<The SSID the AP should Present it self with>
channel=<select af free channel e.g. 1, 6 or 11>
hw_mode=g
interface=wlan0
# # Static WPA2 key configuration
# #1=wpa1, 2=wpa2, 3=both
wpa=2
wpa_passphrase=<YourDesiredVerySecretPassword>
## Key management algorithms ##
wpa_key_mgmt=WPA-PSK
#
## Set cipher suites (encryption algorithms) ##
## TKIP = Temporal Key Integrity Protocol
## CCMP = AES in Counter mode with CBC-MAC
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP
#
## Shared Key Authentication ##
auth_algs=1
## Accept all MAC address ###
macaddr_acl=0
#enables/disables broadcasting the ssid
ignore_broadcast_ssid=0
# Needed for Windows clients
eapol_key_index_workaround=0
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0

Configure IP addresses

To set an ip address on the wlan0 interface perform these commands as root:

]$ ip link set wlan0 down
]$ ip addr flush dev wlan0
]$ ip link set wlan0 up
]$ ip addr add 192.168.22.1/24 dev wlan0

Manually test

Next test i manually, in order to see if the access point software will run without errors.

root@beaglebone ]$ systemctl stop wpa_supplicant.service
root@beaglebone ]$ hostapd  /etc/hostapd/hostapd.conf

If you can get this connection up running with your password but no IP address everything at this point is fine.

You can stop the wpa_supplicant service permanently by issuing

root@beaglebone ]$ systemctl disable wpa_supplicant.service

Enable DCHP server

Next thing is to enable a dhcp server.


---more to come, when I get the spare time---