Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A13 => Topic started by: ellecieffe on July 22, 2013, 08:14:21 pm

Title: Olinuxino A13 Wifi as router
Post by: ellecieffe on July 22, 2013, 08:14:21 pm
Hi to all,
I would to connect my Internet Key ONDA MW833UP (wind) to my Olinuxino A13-Wifi and use it to share the connection to other device. Is it possible?

Thanks :)
Title: Re: Olinuxino A13 Wifi as router
Post by: jwischka on July 23, 2013, 02:56:31 pm
Possible? Yes. But it's a complete pain if you're wanting to use the A13 as a WAP.
Title: Re: Olinuxino A13 Wifi as router
Post by: ellecieffe on July 23, 2013, 03:53:11 pm
Yes, I think so. However it would be much appreciated for me because I need it.  The problem is that in my house there isn't a good WiFi coverage area and I have to connect with internet key but I would have an access point to connect many devices (a very old PC and a modern smartphone,for now, and a laptop in the future)

Can you explain me what I need?

Thanks jwischka, time passes but you are always very polite and patient ... I need your advice once again :)
Title: Re: Olinuxino A13 Wifi as router
Post by: jwischka on July 24, 2013, 05:26:26 am
Quote from: ellecieffe on July 23, 2013, 03:53:11 pm
Yes, I think so. However it would be much appreciated for me because I need it.  The problem is that in my house there isn't a good WiFi coverage area and I have to connect with internet key but I would have an access point to connect many devices (a very old PC and a modern smartphone,for now, and a laptop in the future)

Can you explain me what I need?

Thanks jwischka, time passes but you are always very polite and patient ... I need your advice once again :)


You'll likely require a new wireless adapter.

This (http://wireless.kernel.org/en/users/Documentation/hostapd) is a good place to start. I'd first work at getting hostapd set up and running, then work on bridging the two connections.

As a word of warning, though, I tried to do something similar with my raspberry pi, and had only limited success (with the wired port, instead of wireless). In other words, I'm not sure it's a solution I'd want to live with, really.
Title: Re: Olinuxino A13 Wifi as router
Post by: JohnS on July 24, 2013, 09:27:14 am
Out of interest, why not use a wireless router (DG834 etc) such as the one many ISPs provide?

If you don't have one they're very cheap on fleabay.

John
Title: Re: Olinuxino A13 Wifi as router
Post by: jwischka on July 24, 2013, 05:15:13 pm
Quote from: JohnS on July 24, 2013, 09:27:14 am
Out of interest, why not use a wireless router (DG834 etc) such as the one many ISPs provide?

If you don't have one they're very cheap on fleabay.

John


I think because he's trying to use a wireless ISP as well, and the incoming connection is USB, not RJ45 - which most routers won't support.
Title: Re: Olinuxino A13 Wifi as router
Post by: JohnS on July 24, 2013, 06:04:45 pm
If he's already got wireless I don't see why he needs another AP on the A13.

(Here, if you have wireless you (always?) also have RJ45s - commonly unused.)

I use my Olinuxino WiFi to access my WiFi from my ISP, very like how I use my laptop to do the same.  What am I missing that he needs to do?

John
Title: Re: Olinuxino A13 Wifi as router
Post by: jwischka on July 25, 2013, 03:50:24 am
Quote from: JohnS on July 24, 2013, 06:04:45 pm
If he's already got wireless I don't see why he needs another AP on the A13.

(Here, if you have wireless you (always?) also have RJ45s - commonly unused.)

I use my Olinuxino WiFi to access my WiFi from my ISP, very like how I use my laptop to do the same.  What am I missing that he needs to do?

John


His "ISP" isn't "wireless" as in WiFi (802.11), but a USB cell modem (it looks like HSPA+, but in principle could be any cell technology). So in other words, he wants to plug in the USB cell modem to the A13 and have that be his WAN connection, then share that via 802.11 on the A13 as a LAN connection so his other devices can connect.

To do this, not only does he need to get the USB cell to work (which I assume he's already done), but he needs to get a wireless card that supports hostapd (most wireless chipsets do not support AP mode with Linux drivers). Then he needs to bridge the two connections and set up a firewall (two sides of the same coin) using iptables. Looking at a Linux-based firewall software like ipcop would probably be a good idea here.

Make sense?
Title: Re: Olinuxino A13 Wifi as router
Post by: JohnS on July 25, 2013, 09:17:43 am
Thanks.

I don't think it makes sense to do it with an A13 Olinuxino TBH.  Too many problems.

John
Title: Re: Olinuxino A13 Wifi as router
Post by: ellecieffe on July 25, 2013, 03:56:49 pm
I would like to solve the problem with this system for these reasons:
- I already have a Olinuxino A13 Wifi, that at this moment I'm not using for anything else
- I would like to deepen my knowledge about internet networks
- it is only a temporary solution, that I need for the summer holidays

Thank you both for the answers. I will update you when I get my hands on, in a few days :)
Title: Olinuxino A13 Wifi as router [SOLVED]
Post by: tac_evaworcim on December 13, 2013, 07:09:32 am
I finally managed to make an Access Point from Olinuxino A13 Wifi.

Tried many options and tutorials with no luck, but finally found one that worked :)

Now I have a full-featured access point, with WPA and DHCP.

The solution is here: http://jenssegers.be/blog/43/Realtek-RTL8188-based-access-point-on-Raspberry-Pi (http://jenssegers.be/blog/43/Realtek-RTL8188-based-access-point-on-Raspberry-Pi)
Just follow it step-by-step, then edit your /etc/hostapd/hostapd.conf (if your wifi interface is other than "wlan1", correct it in the code below)
interface=wlan1
ssid=YourWifiSSID
channel=8
ctrl_interface=/var/run/hostapd

macaddr_acl=0
auth_algs=3
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=YourWiFiPassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP
rsn_pairwise=CCMP
beacon_int=100
wmm_enabled=1

driver=rtl871xdrv
ieee80211n=1
hw_mode=g
device_name=RTL8192CU
manufacturer=Realtek


Create the file /etc/default/hostapd with the following content:

DAEMON_CONF="/etc/hostapd/hostapd.conf"

Install dhcp/dns server:
apt-get install dnsmasq


Edit your /etc/network/interfaces
Don't forget to replace wlan1 with your wlan number.
(Note: You will lose your internet connection after this edit, so make sure you did all required apt-get's before applying this. It's  a good idea to make a backup copy of this file to restore the internet connection later in case you'll need it)
You can use another ip address, but make sure you use the right IP range for DHCP server later:
auto lo
iface lo inet loopback

auto wlan1
iface wlan1 inet static
address 10.0.123.1
netmask 255.255.255.0



Edit /etc/dnsmasq.conf, add the following lines:

interface=wlan1
dhcp-range=10.0.123.50,10.0.123.150,12h


And finally, to apply all the changes:
shutdown -r now

Now you can connect to your olinuxino board from any wifi-enabled device  ;D

Here is the SD card image based on jwischka's R18 build, with all this set up and running (533Mb zip)
https://drive.google.com/file/d/0BxMRS3pflblRa3RGcnhjNkpvd2s (https://drive.google.com/file/d/0BxMRS3pflblRa3RGcnhjNkpvd2s)

(the image is LCD7-Video, but you can replace kernel/script.bin to make it VGA-Video or headless)