LaFonera Software Chilispot

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 18:40, 26 June 2007 (edit)
Cryptic.scriptz (Talk | contribs)
m (Installing & configuring Chillispot)
← Previous diff
Current revision (09:44, 11 April 2011) (edit) (undo)
Anzorik (Talk | contribs)
m (The original Idea)
 
(20 intermediate revisions not shown.)
Line 1: Line 1:
-[[Category:LaFonera]]+[[Category:LaFonera_Software_(en)]]
-[[Category:LaFonera_Software]]+ 
-You are here: '''[[Main_Page|DD-WRT wiki mainpage]] / [[LaFonera|LaFonera]] / [[LaFonera_Software|Software]] / Chilispot'''+You are here: '''[[Main_Page|DD-WRT wiki mainpage]] / [[LaFonera_(en)|LaFonera]] / [[:Category:LaFonera_Software_(en)|Software]] / Chilispot'''
Line 219: Line 219:
== The original Idea == == The original Idea ==
came from http://volubilus.info/ came from http://volubilus.info/
 +visit here [http://www.top5optimizers.com/ PC optimizer tool] and [http://www.top-cleaners.com/ PC Cleaner]

Current revision


You are here: DD-WRT wiki mainpage / LaFonera / Software / Chilispot


Contents

[edit] Summary

This howto will enable you to convert the LaFonera into an access point to use with wifi-cpa.com or any other AAA service that makes use of Chillispot, but its key focus shall be on Wifi-CPA, whilst the ddwrt firmware for the LaFonera is still under development and is working great for the most part, the Chillispot portal software crashes due to an unknown (to me anyhow) bug (?memory leaks) at the time of writing (18 June 2007). I would also like to mention that I am in no way affiliated/bribed/blackmailed by FON Wireless LTD, Wifi-CPA, DD-WRT, Chillispot or any political party.


[edit] Preparation

You'll need the following for this tutorial:

  1. A LaFonera! 21xx models as the 22xx use a different memory allocation!
  2. SSH client: Putty .
  3. A FON kernel and root.fs hacked to write on the MTD partition with RedBoot, the 2 files that are needed are here and here (only download if you plan to setup a http/ftp server locally, which is outside the scope of this howto).
  4. A recent kernel and root.fs build of ddwrt for atheros WiSOC based hardware, I used root.fs and vmlinux.bin.l7 ((06/10/07) std (SVN revision 7213).
  5. Klever PumpKIN TFTP server/client from here .
  6. A functioning Chillispot mips package from here .
  7. An account with www.wifi-cpa.com and you will also need the unique code that is generated once you've created a hotspot which will have the format XXX-XXXX.
  8. This is not really necessary but worth having,
    • patience,
    • no one bugging you during any part of this guide,
    • a hammer in case of point (b),
    • a swiss bank account,
    • some refreshments.


[edit] Flashing

1. Start with a stock LaFonera, with the original firmware (7.x). If you're unsure of your version, with the power on, hold down the reset button on the bottom of the unit for up to 30 seconds. This should reset it to the original firmware.

2. Enable the built-in SSH server on the LaFonera :-)


Image:LaFonera_Software_Chillispot_-_01_fonfirmware_routerstatus.gif


Log into the web administration page for your LaFonera, go to the advanced tab, then internet connection, change the mode from DHCP to static IP from the dropdown option, set an IP and netmask within your modem/routers range, set the gateway to your modem/router IP and change the name server (DNS) of your La Fonera to 88.198.165.155.


Image:LaFonera_Software_Chillispot_-_02_fonfirmware_internetconnectionsettings.jpg


Hit submit and reboot your LaFonera (unplug power and back in again). Now you should be able to connect via SSH. This should work with other firmwares, too. Please change the name server according to your ISP or network setup after the reboot.

3. Connect via SSH to the LaFonera, and execute the following commands:

cd /tmp
wget http://fonera.info/camicia/openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma
mtd -e vmlinux.bin.l7 write openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma vmlinux.bin.l7
reboot

After the "reboot" command, the LaFonera will reboot and you'll lose the connection.

Don't be misled by the name of the file. This is actually a FON kernel hacked to write on the MTD partition with RedBoot. After this step the LaFonera should be able to restart without any problems. In case you are not able to connect to the Internet from the LaFonera, you can download the files locally, install an FTP or HTTP server on your PC and wget the files from the PC by entering the local server IP.

4. Again connect via SSH to the LaFonera, and execute the following commands. (Note: Your LaFonera will not boot past RedBoot anymore after this step.)

cd /tmp
wget http://fonera.info/camicia/out.hex
mtd -e "RedBoot config" write out.hex "RedBoot config"
reboot

5. Your LaFonera should not be able to completely boot, because the FIS directory will be erased. However, you should be able to connect to the RedBoot prompt. To connect to RedBoot you need to:

a) Configure your PC so you have an address like 192.168.1.166, netmask 255.255.255.0, gateway and DNS can be left blank.
b) Connect your PC and the LaFonera through a crossover ethernet cable or a switch and 2 normal cables (note: you can connect to LaFonera with either a normal cat5 ethernet cable, or with a crossover cable, as La Fonera's NIC is auto-sensing).

Load up putty and set the address and port to the following: 192.168.1.254 9000


Image:LaFonera_Software_Chillispot_-_03_putty_configuration.jpg


c) Disconnect and reconnect the power to your LaFonera. Then click open on putty. You have the first 8 secs to access to RedBoot via a plain Telnet connection. (I would avoid using the built in windows telnet client as it seems to give me no joy, just an ascii character.)

If everything goes well you should have a "RedBoot>" prompt in telnet.


Image:LaFonera_Software_Chillispot_-_04_putty_shell.jpg


Thats enough "point & click" for now, now the exciting parts.

6. You should have Klever PumpKIN and the firmware files from the "Preparation" section, points 4 & 5 respectively.

a) Create a folder on your desktop, call it TFTPROOT, move both root.fs and vmlinuz.bin.l7 in to this folder.
b) Load up PumpKIN, click on "Options", in the "TFTP filesystem root (download path)" browse to the TFTPROOT directory created in the previous step and click "OK"

7. Configure RedBoot for local IP address and TFTP server in telnet, so in putty you would issue the following command:

ip_address -l 192.168.1.254/24 -h 192.168.1.166

8. Run the following commands below in putty. (IMPORTANT: The "fis create" commands below will take a while, do not disconnect while waiting.)

fis init
load -r -v -b 0x80041000 root.fs
fis create -b 0x80041000 -f 0xA8030000 -l 0x002C0000 -e 0x00000000 rootfs
load -r -v -b 0x80041000 vmlinux.bin.l7
fis create -r 0x80041000 -e 0x80041000 -l 0x000E0000 vmlinux.bin.l7
fis create -f 0xA83D0000 -l 0x00010000 -n nvram

Each "fis create" commands take up to 10 minutes or so to complete, so be patient before typing the next command! Also with each "load" command, PumpKIN will inform you that the LaFonera is trying to access a file, you must "Grant" access. There will be no output in the terminal window after the programming starts until the programming cycle has been completed. This is normal, don't panic.

Once the last fis command has finished, you will be at the Redboot prompt again. Run this command in putty to reboot.

reset

9. Go make a cup of tea or whatever refreshments you prepared for yourself.

Your LaFonera should have been flashed and would have rebooted successfully, by default it will DHCP an external IP address, start an open wireless network called "DD-WRT" and have management at http://192.168.1.1(on port 80). The default username is "root" and the default password is "admin".


[edit] Configuring ddwrt for Wifi-CPA

Connect to the "DD-WRT" wireless signal and browse to the web management at the address given above.

Now go to the "Setup" tab, then click on "Basic Setup", on the "WAN Connection Type" choose "Static IP", now enter an IP and subnet mask within the range of your network, also dont forget to enter your ISP's dns IP(s).


[edit] Setup/Basic Setup

Image:LaFonera_Software_Chillispot_-_05_ddwrt_wansetup.jpg


My own looks like this, for your reference

The DNS IP I have used are from www.opendns.org , you can use these, if later on in this tutorial, you find that your hotspot just "hangs" when trying to make a transaction with paypal you know where the problem lies!..................optionally set a "Router Name" and "Hostname".

Next scroll down and you get to the section "Network Address Server Settings (DHCP)" and untick "DHCP-Authoritative".


Image:LaFonera_Software_Chillispot_-_06_ddwrt_networksetup.jpg


Also set up your "Time Zone", "DST" and time "Server IP". then scroll down and click on "Save Settings".


[edit] Wireless

Next click on the "Wireless" tab and set your "Regulatory Domain" from the drop down list, set your prefered "TX Power" (Max is 18, also depending on which country you select for regulatory domain, it may set the max to 16), scroll down and choose a suitable name for your "Wireless Network Name (SSID) and finally choose a "Wireless Channel" from the drop down list (it is recommended to choose one of three channels, the ones I specify here dont "overlap" and dont cause signal weakness because other AP's in the vicinity, if you live in a remote area, then this does not apply to you, so one of these 3 are fine, channels 1,6, or 11.

Click "Save Settings".


Image:LaFonera_Software_Chillispot_-_07_wlan_channels.gif


For your reference! The 4 thin blue vertical lines represent where channels overlap.


[edit] Services

Click on the "Services" tab and you should be within another "Services" tab already, you will notice that under "DHCP Server", "Use JFFS for client lease DB" is not mounted, dont worry we will set this up in a few more steps, for now the only thing you change in that particular section is "Used Domain" and set it to "LAN & WLAN", next scroll down to "Secure Shell" and select "Enable", select enable for "Sysem Log and select disable for "Telnet".


[edit] Security

Click on the "Security" tab and disable "SPI Firewall" then click save settings, click on the next tab named "VPN" and disable "IPSec Passthrough", "PPTP Passthrough" and L2TP Passthrough", then click "Save Settings".


[edit] Administration

Next we'll click on "Administration" and then "Managment" and then set a suitable "Router Username" and a "Router Password", scroll down and tick the following "HTTPS" on the "Web Access" section, "Use HTTPS" on the "Remote Access" section, "Enable JFFS" and "Clean JFFS" on "JFFS Support" and change the values in "UDP Timeout (in seconds)" to "3600".

Finally, click "Save Settings" and then "Reboot"!


[edit] Installing & configuring Chillispot

a) Now log in to the LaFonera through shell with the username/password you set earlier and type in the following commands:-

cd /tmp
ipkg install http://ipkg.hotsplots.de/kamikaze/7.06/atheros-2.6/packages/chillispot_1.1.0-3_mips.ipk

(ILL REMIND YOU, DO NOT ENABLE CHILLISPOT WITHIN THE DDWRT WEB INTERFACE, IT WILL CRASH YOUR AP AND YOU WILL HAVE TO REFLASH TO GET IT UP AND RUNNING AGAIN!)

b) Configure /jffs/etc/chillispot.conf to your own settings, when you get to the section for "dhcpif" use br0

vi /jffs/etc/chilli.conf 

Here is a working example of my own chillispot I use with Wifi-CPA

radiusserver1 radius.wifi-cpa.com
radiusserver2 radius.wifi-cpa.com
radiussecret wificpa
dhcpif br0
uamserver http://hotspot.wifi-cpa.com/login/
dns1 208.67.222.222
uamsecret wificpa
uamallowed www.paypal.com,www.paypalobjects.com,paypal.112.2o7.net
net 192.168.182.0/24
radiusnasid PUT YOUR OWN ID HERE (This can be found in your Wifi-CPA profile for the hotspot you're using)
uamallowed netweather.accuweather.com,vortex.accuweather.com,wwwa.accuweather.com,www.accuweather.com
uamallowed netwx.accuweather.com,maps.google.com,72.14.207.0/24,64.233.167.0/24,12.120.5.14,12.120.37.104

c) Go back to the ddwrt web administration at http://192.168.1.1 and then click on the "Administration" tab and then "Commands" tab.

Paste the following command in to the "Commands" box

/jffs/usr/sbin/chilli -c /jffs/etc/chilli.conf 2>&1 | logger

Then hit "Save Startup" and reboot your LaFonera.

[edit] Testing

You have now completed this tutorial, once the LaFonera has rebooted, test it by connecting with your laptop/desktop to the wireless signal DD-WRT or whatever you have set it to be, you should get the IP address in the range of 192.168.182.xx, if you get the IP 192.168.1.xx, then you have messed up somewhere along the way, double check everything outlined on this tutorial.

Image:LaFonera_Software_Chillispot_-_08_ddwrt_testing.jpg

I must say, I had 6 clients connected at the time of this screenshot and the AP was very very stable!!!


[edit] The original Idea

came from http://volubilus.info/ visit here PC optimizer tool and PC Cleaner




this page was made by wildblue!