Setting up a WiFi hotspot on BB black using WiFI USB adapter with RTL8188CUS chipset

Hi

I am new to Beagleboen black and am trying to set up a WiFi hotpspot on Beagleboe Black using the USB adapters with RTL8188CUS chipset. I am not able to create it. If somebody has done ti please let me know. Thanks!!!

I have successfully set up my beaglebone black as an access point using a USB wifi adapter with the RTL8188CUS chipset. Here are the details:

Hardware:
Beaglebone Black rev C
LB link wireless usb adapter (http://chicagodist.com/products/long-range-wifi-usb-with-antenna-for-raspberry-pi)

Bone Software:
Debian GNU/Linux 7
Kernel - Linux beaglebone 3.8.13-bone69
manually built rtl8188CUS device driver, 8192cu.ko (from sources at https://github.com/mcantarutti/ShopBot-API/tree/master/Arch_linux_config/rtl8188CUS-driver-beaglebone)
hostapd

Procedure:
The stock 8192cu driver worked as a client, but could not be setup as an access point. Apparently the stock 8192cu driver does not have nl80211 support, which I believe is needed for access point functionality. I obtained the driver source from https://github.com/jlucidar/FabMo-Platform/tree/master/Arch_linux_config/rtl8188CUS-driver-beaglebone. This source has nl80211 support. I compiled the module from source and then replaced the stock 8192cu.ko file. At the next boot hostapd successfully set up wlan0 as an access point. As a bonus, the new version of the driver has concurrence enabled. With this function, the 8192cu driver creates two wifi interfaces, wlan0 and wlan1. I can use each of these wifi interfaces independently.

frank agius

Hi

Thanks for the help !!!
I tried going your way but I dont know how to download drivers of the adpaters. If you dont miind would you explain me this process in a little bit detail. As I mentioned I am new to BBB, so it will take some time for me to dig in.Also if you are available to chat about it please let me know.

Regards,
AK

Frank,
Thanks for providing some guidance. I previously got the RTL8192cu working using instructions from here:
http://wiesel.ece.utah.edu/redmine/projects/hacks/wiki/BeagleBone_Black_AP

I am trying to follow your instructions now which on the surface seem much easier. So, I did the following:
Debian, Kernel 3.8.13-bone70
/opt/scripts/tools/update_kernel.sh
Download and build drivers from https://github.com/jlucidar/FabMo-Platform/tree/master/Arch_linux_config/rtl8188CUS-driver-beaglebone
make
make install
(do I need to blacklist anything?)
Reboot shows wlan0 and wlan1. I can edit /etc/network/interfaces for wlan0 and connect to my home wifi network.
apt-get install hostapd dnsmasq
Edited interfaces, hostapd.conf, and dnsmasq.conf files to use wlan0 in static address. Reboot.

My iPhones (iOS 3 and 8) show that the network is coming up, and it asks for a password (tried wpa 1 and 2), but it won’t accept the password I placed in hostapd.conf.
wpa_passphrase=12345678

I verified that /lib/modules/3.8.13-bone70/kernel/drivers/net/wireless has the built 8192cu.ko.

Did you have to build hostapd as well? How are your hostapd.conf and /etc/network/interfaces configured? Are you using dnsmasq or a different program for address assignment? Firmware? Any other thoughts on why the password is not being accepted?

Jeff

Frank,
Thanks for providing some guidance. I previously got the RTL8192cu
working using instructions from here:
http://wiesel.ece.utah.edu/redmine/projects/hacks/wiki/BeagleBone_Black_AP

I am trying to follow your instructions now which on the surface seem much
easier. So, I did the following:
Debian, Kernel 3.8.13-bone70
/opt/scripts/tools/update_kernel.sh
Download and build drivers from https://github.com/jlucidar/
FabMo-Platform/tree/master/Arch_linux_config/rtl8188CUS-driver-beaglebone
make
make install
(do I need to blacklist anything?)

No, no need to blacklist any modules

Reboot shows wlan0 and wlan1. I can edit /etc/network/interfaces for wlan0

and connect to my home wifi network.
apt-get install hostapd dnsmasq
Edited interfaces, hostapd.conf, and dnsmasq.conf files to use wlan0 in
static address. Reboot.

My iPhones (iOS 3 and 8) show that the network is coming up, and it asks
for a password (tried wpa 1 and 2), but it won't accept the password I
placed in hostapd.conf.
wpa_passphrase=12345678

I verified that /lib/modules/3.8.13-bone70/kernel/drivers/net/wireless has
the built 8192cu.ko.

Did you have to build hostapd as well?

With the stock hostapd and no security, hostapd worked well and I was able
to connect with my tablet and phone. When I tried using a passphrase, I
had the same connection issue you described. I then followed the
instructions from this webpage, "
https://ariandy1.wordpress.com/2013/04/18/wifi-access-point-with-tp-link-tl-wn722n-on-ubuntu-12-04/",
to download, configure and compile hostapd. The instructions are not
beaglebone specific, but they worked for me. The newly compiled hostapd ran
and allowed me to connect using a passphrase.

How are your hostapd.conf and /etc/network/interfaces configured? Are
you using dnsmasq or a different program for address assignment?
Firmware? Any other thoughts on why the password is not being accepted?

Nothing special in hostapd.conf or interfaces. I am using dnsmasq to hand
out IP addresses.

Here is the contents of my hostapd.conf file:

interface=wlan1
country_code=US
ctrl_interface=wlan1
ctrl_interface_group=0
ssid=testSetup
hw_mode=g
channel=11
wpa=3
wpa_passphrase=BeagleBoneRocks
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
beacon_int=100
auth_algs=3
macaddr_acl=0
wmm_enabled=1
eap_reauth_period=360000000

Here is the section of the interfaces file for the AP interface:

iface wlan1 inet static
        address 172.55.1.5
        network 172.55.1.0
        netmask 255.255.255.0

Did you have to build hostapd as well?

With the stock hostapd and no security, hostapd worked well and I was able to connect with my tablet and phone. When I tried using a passphrase, I had the same connection issue you described. I then followed the instructions from this webpage, “https://ariandy1.wordpress.com/2013/04/18/wifi-access-point-with-tp-link-tl-wn722n-on-ubuntu-12-04/”, to download, configure and compile hostapd. The instructions are not beaglebone specific, but they worked for me. The newly compiled hostapd ran and allowed me to connect using a passphrase.

Ah ha! Yes, the default hostapd was working fine for me (except for timing of the init) when I had an open network. In my old kernel on a different SD card, I had previously compiled hostapd. Thanks for the link with straightforward instructions.

hostapd is still having some difficulties finding wlan0 during boot, so I added a post-up to my /etc/network/interfaces.

`

allow-hotplug wlan0
auto wlan0
iface wlan0 inet static
address 192.168.4.1
network 192.168.4.0
netmask 255.255.255.0
broadcast 192.168.4.255
post-up /usr/sbin/service hostapd restart

`

All is good now!