Odroid c2 as multi AP`s

Moderators: odroid, mdrjr

Odroid c2 as multi AP`s

Unread postby Skazochnik » Thu Mar 16, 2017 4:05 am

How to setup multi ssid WIFI.
Hello.
Some time ago I start thinking about additional access point for existed WIFI. Now I have odroid c2 and decide to use it as access point. My WIFI network has multi ssid an I have to recreate all of them in new access point.
Before we start we need install some tools:
Code: Select all
sudo su

Create a file /etc/udev/rules.d/70-persistent-net.rules with these contents:
Code: Select all
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="11:11:11:11:11:11", NAME="wlan10"
ACTION=="add", SUBSYSTEM=="net", DRIVERS=="?*", ATTR{address}=="22:22:22:22:22:22", NAME="wlan11"

chmod a+x /etc/udev/rules.d/70-persistent-net.rules
resault:
-rwxr-xr-x 1 root root 195 Mar 13 21:19 70-persistent-net.ruleset`s assign MAC`s to WLAN% :)
After reboot:
Ifconfig
wlan10 Link encap:Ethernet HWaddr ….
wlan11 Link encap:Ethernet HWaddr ….
Let`s disable management for wlan10 and wlan11 to do this you need add unmanaged-devices=interface-name:wlan10;interface-name:wlan11 into /etc/NetworkManager/NetworkManager.conf
Here is my file: cat /etc/NetworkManager/NetworkManager.conf
Code: Select all
[main]
#plugins=ifupdown,keyfile,ofono
#dns=dnsmasq
plugins=ifupdown,keyfile
[ifupdown]
managed=false
#managed=true


[keyfile]
unmanaged-devices=interface-name:wlan10;interface-name:wlan11

Also we nee some additional software in this case is : hostapd and bridge-utils
Lets install them:
apt install bridge-utils
apt install hostapd
important note:
Its good if only bridge will have ip!!!
In net steps you have to be very careful !!! You can lost connect to your unix.
We need create bridge with name br0 (for example).
Les create configuration files for interfaces:
File location is: /etc/network/interfaces.d/
cat /etc/network/interfaces.d/br0.cfg
Code: Select all
auto br0
    iface br0 inet static
        address 192.168.14.4
        netmask 255.255.255.0
        gateway 192.168.14.1
        dns-search itdeploymentpro.com
        dns-nameservers 192.168.14.1
        broadcast 192.168.14.255
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0

I remove all setting from eth0 configuration and as a result it`s get default setting.
After reboot you got something like :
brctl show
bridge name bridge id STP enabled interfaces
br0 8000.001e063383da no eth0
now we can start with AP`s
I crate 2 config files for wlan10 and wlan11
My AP config for wlan10
cat /etc/hostapd/hostapd_wlan10.conf
Code: Select all
beacon_int=100
ssid=Isss1
interface=wlan10
bssid=7c:dd:ff:ff:ff:fb
driver=nl80211
channel=0
#ctrl_interface=/tmp/hostapd_ctrl
ctrl_interface_group=0
ignore_broadcast_ssid=0
ap_isolate=0
hw_mode=g
ieee80211n=1
ht_capab=[HT40+]
wmm_enabled=1
wpa=2
wpa_passphrase=Izssssddfff992
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP
bridge=br0


My AP config for wlan11
cat /etc/hostapd/hostapd_wlan11.conf
Code: Select all
beacon_int=100
ssid=IotHSS1
interface=wlan11
bssid=7c:dd:90:bc:69:1f
driver=nl80211
channel=0
#ctrl_interface=/tmp/hostapd_ctrl
ctrl_interface_group=0
ignore_broadcast_ssid=0
ap_isolate=0
hw_mode=g
ieee80211n=1
ht_capab=[HT40+]
wmm_enabled=1
wpa=2
wpa_passphrase=ie2015wwaeews
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
rsn_pairwise=CCMP
bridge=br0

to check for error use next command for testing:
/usr/sbin/hostapd –dd /etc/hostapd/hostapd_wlan10.conf &
/usr/sbin/hostapd –dd /etc/hostapd/hostapd_wlan11.conf &
Finally let`s AP`s wlan10 and wlan11
In my case:
cat /etc/network/interfaces.d/wlan10.cfg

Code: Select all
auto wlan10
# Hotplug will watch for this device and bring it up when connected.
# Useful for USB devices
allow-hotplug wlan10
iface wlan10 inet manual
 # Start hostapd if it is not running
 post-up /usr/sbin/hostapd /etc/hostapd/hostapd_wlan10.conf &

cat /etc/network/interfaces.d/wlan11.cfg

Code: Select all
auto wlan11
# Hotplug will watch for this device and bring it up when connected.
# Useful for USB devices
allow-hotplug wlan11
iface wlan11 inet manual
 # Start hostapd if it is not running
post-up /usr/sbin/hostapd /etc/hostapd/hostapd_wlan11.conf &


after reboot you have to have:
brctl show
Code: Select all
bridge name     bridge id               STP enabled     interfaces
br0             8000.001e063383da       no              eth0
                                                        wlan10
                                                        wlan11

and 2 additional AP 
Skazochnik
 
Posts: 16
Joined: Thu Jul 28, 2016 4:38 pm
languages_spoken: english
ODROIDs: odrid-c2

Re: Odroid c2 as multi AP`s

Unread postby odroid » Thu Mar 16, 2017 7:21 am

Thank you for sharing nice tutorial. I've add "[code]" template to increase the readability.

In fact, I didn't know this multiple AP modes.
User avatar
odroid
Site Admin
 
Posts: 21806
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID


Return to Projects

Who is online

Users browsing this forum: No registered users and 3 guests