RPI‎ > ‎

B+ Realtek access point (own compile)

Decide that I need a dedicate network for the streaming of the PI stuff something portable.

sudo apt-get install hostapd udhcpd zd1211-firmware

Inspired by
https://learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point/install-softwareh
http://elinux.org/RPI-Wireless-Hotspot
http://www.daveconroy.com/turn-your-raspberry-pi-into-a-wifi-hotspot-with-edimax-nano-usb-ew-7811un-rtl8188cus-chipset/


root@c10:/home/pi# lsmod
Module Size Used by
snd_bcm2835 19584 0
snd_soc_bcm2708_i2s 6202 0
regmap_mmio 2818 1 snd_soc_bcm2708_i2s
snd_soc_core 127841 1 snd_soc_bcm2708_i2s
snd_compress 8259 1 snd_soc_core
regmap_i2c 1661 1 snd_soc_core
snd_pcm_dmaengine 5505 1 snd_soc_core
regmap_spi 1913 1 snd_soc_core
snd_pcm 83845 3 snd_bcm2835,snd_soc_core,snd_pcm_dmaengine
snd_page_alloc 5132 1 snd_pcm
snd_seq 55484 0
8188eu 793672 0
snd_seq_device 6469 1 snd_seq
snd_timer 20998 2 snd_pcm,snd_seq
evdev 10661 2
leds_gpio 2079 0
led_class 4118 1 leds_gpio
snd 62252 7 snd_bcm2835,snd_soc_core,snd_timer,snd_pcm,snd_seq,snd_seq_device,snd_compress

root@c10:/home/pi# lsmod
Module Size Used by
snd_bcm2835 19584 0
snd_soc_bcm2708_i2s 6202 0
regmap_mmio 2818 1 snd_soc_bcm2708_i2s
snd_soc_core 127841 1 snd_soc_bcm2708_i2s
snd_compress 8259 1 snd_soc_core
regmap_i2c 1661 1 snd_soc_core
snd_pcm_dmaengine 5505 1 snd_soc_core
regmap_spi 1913 1 snd_soc_core
snd_pcm 83845 3 snd_bcm2835,snd_soc_core,snd_pcm_dmaengine
snd_page_alloc 5132 1 snd_pcm
evdev 10661 2
snd_seq 55484 0
8192cu 550797 0
snd_seq_device 6469 1 snd_seq
snd_timer 20998 2 snd_pcm,snd_seq
leds_gpio 2079 0
led_class 4118 1 leds_gpio
snd 62252 7 snd_bcm2835,snd_soc_core,snd_timer,snd_pcm,snd_seq,snd_seq_device,snd_compress

root@c10:/home/pi# lsmod
Module Size Used by
snd_bcm2835 19584 0
snd_soc_bcm2708_i2s 6202 0
regmap_mmio 2818 1 snd_soc_bcm2708_i2s
snd_soc_core 127841 1 snd_soc_bcm2708_i2s
snd_compress 8259 1 snd_soc_core
regmap_i2c 1661 1 snd_soc_core
snd_pcm_dmaengine 5505 1 snd_soc_core
regmap_spi 1913 1 snd_soc_core
snd_pcm 83845 3 snd_bcm2835,snd_soc_core,snd_pcm_dmaengine
snd_page_alloc 5132 1 snd_pcm
snd_seq 55484 0
snd_seq_device 6469 1 snd_seq
snd_timer 20998 2 snd_pcm,snd_seq
evdev 10661 2
8192cu 550797 0
leds_gpio 2079 0
led_class 4118 1 leds_gpio
snd 62252 7 snd_bcm2835,snd_soc_core,snd_timer,snd_pcm,snd_seq,snd_seq_device,snd_compress

To get the CU's to work for the ap ( note it worked on normal drivers for connectivity) 

From : http://www.daveconroy.com/turn-your-raspberry-pi-into-a-wifi-hotspot-with-edimax-nano-usb-ew-7811un-rtl8188cus-chipset/
wget http://www.daveconroy.com/wp3/wp-content/uploads/2013/07/hostapd.zip
unzip hostapd.zip 
sudo mv /usr/sbin/hostapd /usr/sbin/hostapd.bak
sudo mv hostapd /usr/sbin/hostapd.edimax 
sudo ln -sf /usr/sbin/hostapd.edimax /usr/sbin/hostapd 
sudo chown root.root /usr/sbin/hostapd 
sudo chmod 755 /usr/sbin/hostapd

if the above binary does not work and you get 

 Starting advanced IEEE 802.11 management: hostapdioctl[RTL_IOCTL_HOSTAPD]: Invalid argument


see https://learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point/compiling-hostapd

and compile your own. 

RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip

pi@c10 ~/rtl $ unzip RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911.zip

tar -xzf wpa_supplicant_hostapd-0.8_rtw_r7475.20130812.tar.gz

pi@c10 ~/rtl/RTL8188C_8192C_USB_linux_v4.0.2_9000.20130911/wpa_supplicant_hostapd/wpa_supplicant_hostapd-0.8_rtw_r7475.20130812/hostapd $ make
 
gives us 

-rwxr-xr-x 1 pi pi 1681675 Oct 11 20:39 hostapd

sudo mv hostapd /usr/sbin/hostapd.rtl
sudo ln -sf /usr/sbin/hostapd.rtl /usr/sbin/hostapd 
sudo chown root.root /usr/sbin/hostapd 


 It should start without any errors 
 $ sudo /etc/init.d/hosta
pd start
[ ok ] Starting advanced IEEE 802.11 management: hostapd.

Running an AP comes at a cost of power consumption ... typically the RPi model B now peaks at 610mA and about 580mA avg - that is  about a 160mA increase form just being wifi connected. 

Then the unit also runs much warmer, almost up by 10 deg C max. 

Range is actually not to bad, decided to park it next to the d-link router and see how normal OK use would look like. Signal very comparable to the d-link.
Typical usage range with many walls in the way
RPi powered from the router for the test. 





Comments