Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: eno on January 01, 2015, 12:30:59 AM

Title: Building a WiFi access point
Post by: eno on January 01, 2015, 12:30:59 AM
Ive ordered and received the Edimax EW-7811Un (See http://www.amazon.com/gp/product/B003MTTJOY/ref=oh_aui_detailpage_o02_s00?ie=UTF8&psc=1 (http://www.amazon.com/gp/product/B003MTTJOY/ref=oh_aui_detailpage_o02_s00?ie=UTF8&psc=1)), a USB WiFi dongle. I would like to create a WiFi access point. Im assuming Ill need to figure out which kernel modules will activate this dongle, add config settings, dhcp and some routing. Im wondering what the preferred way to do these things in Tiny Core Linux?

Title: Re: Building a WiFi access point
Post by: eno on January 01, 2015, 12:42:51 AM
Code: [Select]
tc@router:~$ lsusb
Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. SMC9514 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Title: Re: Building a WiFi access point
Post by: bmarkus on January 01, 2015, 12:56:46 AM
Install wireless-KERNEL.tcz and post dmesg last 50 lines:

Code: [Select]
dmesg | tail -n 50
Title: Re: Building a WiFi access point
Post by: eno on January 01, 2015, 01:48:57 AM
I installed wireless_tools and see wlan0:

Code: [Select]
tc@router:~$ ifconfig -a
eth0      Link encap:Ethernet  HWaddr B8:27:EB:22:40:2A 
          inet addr:192.168.0.70  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6659 errors:0 dropped:8 overruns:0 frame:0
          TX packets:2335 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:4810863 (4.5 MiB)  TX bytes:261504 (255.3 KiB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1152 (1.1 KiB)  TX bytes:1152 (1.1 KiB)

wlan0     Link encap:Ethernet  HWaddr 74:DA:38:02:25:CE 
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Title: Re: Building a WiFi access point
Post by: bmarkus on January 01, 2015, 05:32:49 AM
For an AP you need hostapd, I will add it to repo.
Title: Re: Building a WiFi access point
Post by: bmarkus on January 01, 2015, 03:27:40 PM
hostapd added to 6.x repo
Title: Re: Building a WiFi access point
Post by: eno on January 01, 2015, 10:15:46 PM
Sweet, thanks!

Isn't it cute?  :D

https://drive.google.com/file/d/0B2JOBsvLyhXuNWZVcmhlYXpRQm8/view?usp=sharing (https://drive.google.com/file/d/0B2JOBsvLyhXuNWZVcmhlYXpRQm8/view?usp=sharing)
Title: Re: Building a WiFi access point
Post by: Alexey on January 02, 2015, 03:56:08 AM
Sweet, thanks!

Isn't it cute?  :D

https://drive.google.com/file/d/0B2JOBsvLyhXuNWZVcmhlYXpRQm8/view?usp=sharing (https://drive.google.com/file/d/0B2JOBsvLyhXuNWZVcmhlYXpRQm8/view?usp=sharing)

...very cute :)
Wasn't you thinking about disassembling this dongle, cutting off the USB-port, connecting the dongle board to RPi board using small, thin wires and soldering them right on the RPi board?
This may save you even more space and ports...
Title: Re: Building a WiFi access point
Post by: Gerrelt on January 02, 2015, 08:45:11 AM
That looks very stylish! Nice job.
Title: Re: Building a WiFi access point
Post by: eno on January 05, 2015, 05:40:23 PM
Wasn't you thinking about disassembling this dongle, cutting off the USB-port, connecting the dongle board to RPi board using small, thin wires and soldering them right on the RPi board?
This may save you even more space and ports...

True dat. But this is my first time building something substantial from a Raspberry Pi and its literally been years since Ive done any soldering. Also, being able to swap out the WiFi dongle when it fails or if I want to upgrade is kinda useful :-)

What wou;d be really cool is to add a 4G USb dongle and being able to provide fallback routing via cellular if no decent Ethernet is available...
Title: Re: Building a WiFi access point
Post by: eno on January 07, 2015, 10:00:45 PM
hostapd added to 6.x repo

Is iptables available for 6.x yet?

Code: [Select]
tc@router:~$ tce-load -wi iptables
Downloading: iptables.tcz
Connecting to repo.tinycorelinux.net (89.22.99.37:80)
wget: server returned error: HTTP/1.1 404 Not Found
md5sum: iptables.tcz.md5.txt: No such file or directory
Error on iptables.tcz
Title: Re: Building a WiFi access point
Post by: bmarkus on January 08, 2015, 08:18:54 AM
iptables.tcz added to repo.
Title: Re: Building a WiFi access point
Post by: eno on January 08, 2015, 11:51:45 AM
Fantastic, thanks. Ill give it a go.
Title: Re: Building a WiFi access point
Post by: eno on January 13, 2015, 09:14:06 PM
hostapd added to 6.x repo

Looks like RealTek provide their own version of hostapd for this device...

http://www.jenssegers.be/blog/43/Realtek-RTL8188-based-access-point-on-Raspberry-Pi (http://www.jenssegers.be/blog/43/Realtek-RTL8188-based-access-point-on-Raspberry-Pi)
Title: Re: Building a WiFi access point
Post by: eno on January 13, 2015, 09:58:13 PM
Following what I read here:
http://www.raspberrypi.org/forums/viewtopic.php?f=46&t=25921&p=285160 (http://www.raspberrypi.org/forums/viewtopic.php?f=46&t=25921&p=285160)

I was able to build their version of hostapd after installing the linux headers extension. I will test configurations and report back.
Title: Re: Building a WiFi access point
Post by: eno on January 13, 2015, 10:42:47 PM
So good news: it seems to work as advertised. I built hostapd from their sources and used the sample config files with SSID and password changed. The setup involved setting up forwarding with sysctl, Im routing between eth0 and wlan0 using iptables and running udhcpd and hostapd on wlan0.

Dont know if its worth building a special extension for their hostapd ?
Title: Re: Building a WiFi access point
Post by: bmarkus on January 14, 2015, 01:13:07 AM

Dont know if its worth building a special extension for their hostapd ?

Sure :) !
Title: Re: Building a WiFi access point
Post by: gpulido on February 10, 2015, 02:19:47 PM
So good news: it seems to work as advertised. I built hostapd from their sources and used the sample config files with SSID and password changed. The setup involved setting up forwarding with sysctl, Im routing between eth0 and wlan0 using iptables and running udhcpd and hostapd on wlan0.

Dont know if its worth building a special extension for their hostapd ?

Hello Eno,
I'm interested on the hostapd for realtek compilation. Are you going to create a hostapd versioned packaged? or at least could you provide the one that you have compiled?

Thank you
Title: Re: Building a WiFi access point
Post by: gpulido on February 11, 2015, 01:45:31 AM
BTW, I have been playing with the hostapd provided by adafruit (check https://learn.adafruit.com/setting-up-a-raspberry-pi-as-a-wifi-access-point/install-software) and
wget http://adafruit-download.s3.amazonaws.com/adafruit_hostapd_14128.zip

It seems to work.

Gabriel
Title: Re: Building a WiFi access point
Post by: eno on October 29, 2015, 03:33:52 AM
I thought about packaging this up but I don't remember what the exact requirements were to build it. I'll need to test with a base TCL image.


Sent from my iPad using Tapatalk