📜 ⬆️ ⬇️

Wi-Fi access point with WPA based on EEE 701

I decided to find a wireless router with the possibility of installing additional software. Immediately I remembered the ASUS WL-500gP and the like. But since 3k are not superfluous, and there was an itch in one place, I undertook to set everything up on the basis of the netbook ASUS EEE 701 (I was left without a display, so I could not use it as a router).
I started by soldering the external antenna, instead of one of the internal ones in EEE.

I chose FreeBSD 8.1 because in terms of iron support, no additional drivers were required, unlike previous versions of the fryah.

All network interfaces were defined and worked immediately after installation:

re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=2018<VLAN_MTU,VLAN_HWTAGGING,WOL_MAGIC>
ether 00:00:00:00:00:00
status: no carrier
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
ether 00:00:00:00:00:00
status: no carrier

re0 - Ethernet 10/100 Mbit
ath0 - Wireless Ethernet

Core


To begin, rebuild the kernel by adding to it:
')
device wlan_acl

to bring the Wireless NIC cards section to the following form:

device wlan # 802.11 support
options IEEE80211_DEBUG # enable debug msgs
options IEEE80211_AMPDU_AGE # age frames in AMPDU reorder q's
options IEEE80211_SUPPORT_MESH # enable 802.11s D3.0 support
device wlan_wep # 802.11 WEP support
device wlan_ccmp # 802.11 CCMP support
device wlan_tkip # 802.11 TKIP support
device wlan_amrr # AMRR transmit rate control algorithm
device wlan_acl
device an # Aironet 4500/4800 802.11 wireless NICs.
device ath # Atheros pci/cardbus NIC's
device ath_hal # pci/cardbus chip support
options AH_SUPPORT_AR5416 # enable AR5416 tx/rx descriptors
device ath_rate_sample # SampleRate tx rate control for ath
device ral # Ralink Technology RT2500 wireless NICs.
device wi # WaveLAN/Intersil/Symbol 802.11 wireless NICs.
#device wl # Older non 802.11 Wavelan wireless NIC.


rc.conf


To configure ath0 wireless interface as an access point, add the following to rc.conf:

ifconfig_re0="up"
# ath0
wlans_ath0="wlan0"
#
create_args_wlan0="wlanmode hostap"
ifconfig_wlan0="mode 11g ssid TEST mediaopt hostap up"
cloned_interfaces="bridge0"
ifconfig_bridge0="inet 172.16.1.1 netmask 255.255.255.0 addm re0 addm wlan0 up"


Thus, we get the work of wired and wireless connections in the same subnet.

hostapd


Since I use WPA, I need an authenticator.
Create the file /etc/hostapd.conf and add to it:

#
interface=wlan0

logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
# : 0 4
debug=0

dump_file=/tmp/hostapd.dump
#
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
# , rc.conf
ssid=TEST

# 1 - WPA1; 2 - WPA2; 3 - WPA1+WPA2
wpa=3
# WPA ( 8 )
wpa_passphrase=12345678
#
wpa_key_mgmt=WPA-PSK
#
wpa_pairwise=TKIP CCMP


This is the minimum I need for the operation of the access point with WPA. The rest is available in man hostapd and man hostapd.conf .
Do not forget to add hostapd_enable = "YES" to rc.conf.

Completion


Reboot and see that the interface is in AP mode:

re0: flags=8943 metric 0 mtu 1500
options=3898
ether 00:00:00:00:00:00
media: Ethernet autoselect (1000baseT )
status: active


ath0: flags=8843 metric 0 mtu 2290
ether 00:00:00:00:00:00
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
status: running


wlan0: flags=8943 metric 0 mtu 1500
ether 00:00:00:00:00:00
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
status: running
ssid TEST channel 7 (2442 MHz 11g) bssid 00:00:00:00:00:00
regdomain 32924 country CN indoor ecm authmode WPA1+WPA2/802.11i
privacy MIXED deftxkey 3 TKIP 2:128-bit TKIP 3:128-bit txpower 20
scanvalid 60 protmode CTS wme dtimperiod 1 -dfs


bridge0: flags=8843 metric 0 mtu 1500
ether 00:00:00:00:00:00
inet 172.16.1.1 netmask 0xffffff00 broadcast 172.16.1.255
id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15
maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200
root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0
member: wlan0 flags=143
ifmaxaddr 0 port 9 priority 128 path cost 370370
member: re0 flags=143
ifmaxaddr 0 port 1 priority 128 path cost 55


Conclusion


Minuses:

- the price of the netbook is much higher than the price of an ordinary router
- unlike the above-mentioned ASUS WL-500g wireless router, there is only 1 LAN port in EEE 701, which makes it available only via Wi-Fi, since In this port the provider string is stuck.
To connect machines to it via LAN, you need a rather rare USB-LAN device, which I have. But the problem is that the USB ports in the netbook work in full speed mode (I don’t know how to convert to high speed yet), and I don’t see the sense of using a wired connection at a speed of 12 Mbit / s :)

Pros:

- of course - it's more powerful hardware
- the ability to install additional software (OpenVPN, rttorrent, apache) and other FreeBSD charms
- autonomous operation from the battery for at least 1 hour (in case of a power outage)

Source: https://habr.com/ru/post/72158/


All Articles