Tuesday, May 19, 2015
Monday, May 18, 2015
HostAPd Installation and Configuration
The version of HostAPd available in the Raspbian repositories is not compatible with the Edimax USB Wifi adapter. So, I have to download the network driver for the RTL8188CUS chipset, compile it, and then install HostAPd. After that, I have to configure HostAPd to use WEP encryption. WEP (Wired Equivalent Privacy) encryption is not very secure, as it can be easily broken into, but the router that I have is older and only supports WEP, so that is what I have to use. Commands used to compile, install, and configure HostAPd:
1. Go to http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=21&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true and download the Linux driver.
2. Unzip the file and navigate to the ~/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/wpa_supplicant_hostapd/wpa_supplicant_hostapd-0.8/hostapd.
3. Run a make and then a make install.
4. sudo nano /etc/hostapd/hostapd.conf # hostapd configuration file
5. interface=wlan0
driver=rtl871xdrv
ssid=Pi-AP
hw_mode=b
channel=1
macaddr_acl=0
auth_algs=1
wep_default_key=0
wep_key0=PASSWORD
6. sudo nano /etc/default/hostapd
7. DAEMON_CONF="/etc/hostapd/hostapd.conf" # Decides which configuration file to use
8. sudo nano update-rc.d hostapd enable # Starts the hostapd service when the Raspberry Pi boots up
9. sudo nano update-rc.d isc-dhcp-server enable # Starts the isc-dhcp-server when the Raspberry Pi boots up
1. Go to http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=21&PFid=48&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true and download the Linux driver.
2. Unzip the file and navigate to the ~/RTL8188C_8192C_USB_linux_v3.4.4_4749.20121105/wpa_supplicant_hostapd/wpa_supplicant_hostapd-0.8/hostapd.
3. Run a make and then a make install.
4. sudo nano /etc/hostapd/hostapd.conf # hostapd configuration file
5. interface=wlan0
driver=rtl871xdrv
ssid=Pi-AP
hw_mode=b
channel=1
macaddr_acl=0
auth_algs=1
wep_default_key=0
wep_key0=PASSWORD
6. sudo nano /etc/default/hostapd
7. DAEMON_CONF="/etc/hostapd/hostapd.conf" # Decides which configuration file to use
8. sudo nano update-rc.d hostapd enable # Starts the hostapd service when the Raspberry Pi boots up
9. sudo nano update-rc.d isc-dhcp-server enable # Starts the isc-dhcp-server when the Raspberry Pi boots up
Sunday, May 3, 2015
DHCP Server
DHCP is an acronym for Dynamic Host Configuration Protocol. A DHCP server automatically assigns IP addresses to devices that attempt to connect to a network. Commands used to install a DHCP server:
sudo apt-get install isc-dhcp-server # installs the DHCP server
sudo nano /etc/dhcp/dhcpd.conf # Edit this file
# Comment out these two sections on lines 13-14:
# option domain-name "example.org";
# option domain-name-servers ns1.example.org, ns2.example.org;
# Remove the comment from line 21:
authoritative;
# Add this segment at the end of the file:
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.80 192.168.1.90;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
default-lease-time 600;
max-lease-time 7200;
option domain-name "Pi-AP";
option domain-name-servers 8.8.8.8, 8.8.4.4;
}
# Save the file
sudo nano /etc/default/isc-dhcp-server # Edit this file
INTERFACES="wlan0"
# Save the file
sudo nano /etc/network/interfaces # Edit this file
iface wlan0 inet static # Changed from iface wlan0 inet dhcp
address 192.168.1.1
netmask 255.255.255.0
# iface default inet dhcp # Comment out this line
sudo apt-get install isc-dhcp-server # installs the DHCP server
sudo nano /etc/dhcp/dhcpd.conf # Edit this file
# Comment out these two sections on lines 13-14:
# option domain-name "example.org";
# option domain-name-servers ns1.example.org, ns2.example.org;
# Remove the comment from line 21:
authoritative;
# Add this segment at the end of the file:
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.80 192.168.1.90;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
default-lease-time 600;
max-lease-time 7200;
option domain-name "Pi-AP";
option domain-name-servers 8.8.8.8, 8.8.4.4;
}
# Save the file
sudo nano /etc/default/isc-dhcp-server # Edit this file
INTERFACES="wlan0"
# Save the file
sudo nano /etc/network/interfaces # Edit this file
iface wlan0 inet static # Changed from iface wlan0 inet dhcp
address 192.168.1.1
netmask 255.255.255.0
# iface default inet dhcp # Comment out this line
Sunday, April 26, 2015
WiFi Connection
To get the USB Wifi adapter to work with the Raspberry Pi, I had to manually add it to the list of network interfaces. I used the following commands to allow a Wifi connection on the Raspberry Pi:
sudo nano /etc/network/interfaces # This opens the file so that I could edit it
# Input this into the file
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wireless-essid SSID # Network name
wireless-key PASSWORD # Network password
iface default inet dhcp
# Save the file
sudo nano /etc/network/interfaces # This opens the file so that I could edit it
# Input this into the file
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wireless-essid SSID # Network name
wireless-key PASSWORD # Network password
iface default inet dhcp
# Save the file
Sunday, April 19, 2015
Operating System Installed
This week, I downloaded and installed the operating system (OS) for the Raspberry Pi. There are several OSs available for the Raspberry Pi, but I chose the most the most popular one, Raspbian. Raspbian is based on the very stable Debian Linux distribution, but is designed specifically for the Raspberry Pi. My goal for next week is to set up the USB WiFi adapter so I can connect to my existing router. That will allow me to have an internet connection on the Raspberry Pi.
Sunday, April 12, 2015
Materials Required for WiFi Range Extender
To create a WiFi range extender, I will need these parts:
1. Raspberry Pi (mini computer)
1. Raspberry Pi (mini computer)
2. USB WiFi dongle
3. Micro SD card (storage)
4. Micro USB cable (power source)
Subscribe to:
Posts (Atom)
