I have tested the same SD card using a Pi 1 B with 512M of ram, a Pi B+, a Pi 2 B and a Pi 3 B. The same card works on all 4 versions of the Pi. The same SD card, with a very minor change, also works as an AP with the Broadcom wifi module built in to the Pi 3 B.
I use a SandDisk Ultra class 10 16GB SD card. I created the initial card using a Pi 2 B, although you should be able to install it on any version of the Pi. You will just need to be sure to install the correct wifi drivers describe further down the post. I based my set up on http://www.daveconroy.com/turn-your-ras ... s-chipset/ but have made some changes.
So, first I formatted the SD card with SDFormatter v4.0 on my Windows 7 laptop, using full overwrite and Format Size Adjustment ON. I then copied the image, 2016-03-18-raspbian-jessie-lite, to the SD card using Win32DiskImager 0.9.5.
I inserted the card into the Pi 2 B, connected the 2 B to my network using an ethernet cable and powered on the Pi. Do not connect the wifi module until the wifi driver is installed. I connected to the Pi from my laptop using SSH and started to set it up. First ran
Code: Select all
sudo raspi-config
After booting ran
Code: Select all
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install rpi-update
sudo rpi-update
Logged in again and checked the kernel version using uname -a which was 4.1.21-v7+ #872. If uname -a returns a different value for the kernel and build you have replace the values in the commands below with those from uname -a to download the right version of the driver. Then downloaded and installed the wifi driver for the kernel I have using
Code: Select all
wget https://dl.dropboxusercontent.com/u/80256631/8188eu-4.1.21-v7-872.tar.gz
tar xzf 8188eu-4.1.21-v7-872.tar.gz
./install.sh
The driver installed above is specifically for the Pi 2 B and Pi 3 B. It would also be a good idea to install the driver for the Pi 1 and B+ so you can then use the SD card on any Pi. The Pi 1 B, B+ driver can be installed using commands
Code: Select all
wget https://dl.dropboxusercontent.com/u/80256631/8188eu-4.1.21-872.tar.gz
tar xzf 8188eu-4.1.21-872.tar.gz
./install.sh
Now plug in the wifi adapter. You should now be able to check the wifi is working with command
Code: Select all
sudo iwlist wlan0 scan
Now to configure the AP, first installing the necessary packages and files required.
Code: Select all
sudo apt-get update
sudo apt-get install bridge-utils hostapd
Code: Select all
wget https://dl.dropboxusercontent.com/u/80256631/hostapd
sudo mv hostapd /usr/sbin/hostapd
sudo chown root.root /usr/sbin/hostapd
sudo chmod 755 /usr/sbin/hostapd
Now set up the /etc/network/interfaces file like
Code: Select all
auto lo
iface lo inet loopback
iface eth0 inet dhcp
auto br0
iface br0 inet dhcp
bridge_ports eth0 wlan0
Code: Select all
interface=wlan0
driver=nl80211
bridge=br0
ssid=Network-Name
channel=1
wmm_enabled=0
wpa=1
wpa_passphrase=Network-Password
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0
The set up should now be ready to test so first reboot your Pi.
After logging in run command
Code: Select all
sudo hostapd -dd /etc/hostapd/hostapd.conf
Once you determine the AP is working edit file /etc/default/hostapd to get the AP to automatically start when the Pi boots. In file /etc/default/hostapd uncomment line
Code: Select all
#DAEMON_CONF=""
Code: Select all
DAEMON_CONF="/etc/hostapd/hostapd.conf"
So that's it for the Pi 1 B 512MB, B+, Pi 2 B and Pi 3 B using the TL-WN725N wifi module.. For the Pi 3 the same setup will work with the built in Broadcom wifi module. However, to allow the Pi 3 Broadcom module to work it is necessary to edit the file /etc/modprobe.d/8188eu.conf and either comment out or remove the line blacklist brcmfmac to allow the built in wifi driver to run, and of course do not connect the TL-WN725N to the Pi 3 B if the built in wifi is enabled.
Using this set up I have tested the 4 versions of Pi as an AP just by moving the SD card from one Pi to another with no need to make any changes to the configuration using the TL-WN725N wifi. I have also tested the Pi 3 B using the built in Broadcom wifi using the change to the /etc/modprobe.d/8188eu.conf file described in the previous paragraph. All the tests appeared to run OK and if you try this setup hopefully you will find the same.
MrEngman