Hardware Reference
In-Depth Information
Connecting to an ad hoc Wi-Fi network in Mac
OS X
Let's set up the other end of the ad hoc Wi-Fi connection:
1. From the
Apple
drop-down menu, open
System Preferences…
and click on
the
Network
icon.
2. Select
Wi-Fi
in the list to the left, then in the panel to the right, select your
ad hoc network from the
Network Name
drop-down menu and type in the
WPA2 personal passphrase.
3. Next click on the
Advanced…
button and go to the
TCP/IP
tab.
4. Select
Manually
from the
Configure IPv4
drop-down menu.
5. Now fill in
192.168.10.2
for the
IP Address
and
255.255.255.0
for the
Subnet Mask
, then click the
OK
button.
Turning the Pi into a Wi-Fi hotspot
Let's say you're out in the field with a couple of fellow agents and you want to quickly
put up a network for your computers, maybe even share an Internet connection
together; your Pi equipped with a Wi-Fi dongle can easily be made into a makeshift
access point. Follow these steps to set up your hotspot:
1.
First install the required software with the following command:
pi@raspberrypi ~ $ sudo apt-get install hostapd bridge-utils
2.
Next we need to prevent Raspbian from interfering with the Wi-Fi interface.
Open up
/etc/network/interfaces
for editing:
pi@raspberrypi ~ $ sudo nano /etc/network/interfaces
3.
Find the block that starts with
allow-hotplug wlan0
and put a
#
character in
front of each line, like we've done here:
#allow-hotplug wlan0
#iface wlan0 inet manual
#wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
#iface default inet dhcp