OpenWrt Forum Archive

Topic: Can OpenWrt repeat a FON Free Network with automatic authentication?

The content of this topic has been archived on 2 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello all,


I'm currently using a TP-Link TL-WR703N router with OpenWrt to repeat a FON Free Network.

As most of you already know, the FON Free Network is an open network which uses a browser authentication method for its users to access internet (based on WISPr protocol I believe).

While it strengths the signal well (accomplishing its repeater function), obviously it asks for authentication as it would if I was connecting to the original FON Free router.

I intend to go to the next level and automate the authentication on the repeater, making sure the network repeated accesses directly to the internet. Can OpenWrt do this (or other firmware/method for that matter)?


Thank you!

References:
https://code.google.com/p/androidwisprclient/

Sure very possibly, but since I don't have such an access point nearby it is too hard to stick it together (for me).

But some additional stuff about this:
http://wiki.maemo.org/WISPr_Wireless_IS … spot_login
https://github.com/matsuu/auwifispot-cl … r_login.pl

only it is written in perl, but it could be ported to an sh script or proper c coding.

edit: Well the fonera info I found on Google got me interested enough to order one smile so I guess stay tuned.

(Last edited by FriedZombie on 20 Sep 2013, 09:44)

I realise this is an old topic but as my broadband went down I actually needed to figure out how to do this to keep things online via nearby BTWiFi-with-FON hotspots.

I couldn't figure out how to get all the dependencies for the perl script above so downloaded it and picked out the bits I needed to authenticate manually with BTWiFi-with-FON spots.

I saved the following script as /root/fon, chmod 755 fon and then added it to /etc/rc.local so it starts at boot:

#!/bin/sh

while [ 1 = 1 ]; do
  DATE=$(date)
  CONNECTED=$(ifconfig wlan0 | grep "inet addr")
  if [ -n "$CONNECTED" ]; then
    ROUTER=$(route -n | grep UG | awk '{ print $2;}')
    AUTHENTICATED=$(ping -c5 -W 1 -w 5 8.8.8.8 -q | grep "100% packet loss")
    DATE=$(date)
    if [ -n "$AUTHENTICATED" ]; then
      logger "BTFON: $DATE Internet access is blocked, attempting to login to BTFON..."
      wget -O /tmp/fonlogin --quiet --no-check-certificate "https://www.btopenzone.com:8443/wbacOpe … d=password"
      sleep 10
    else
      logger "BTFON: $DATE FON is working!"
    fi
  else
    logger "BTFON: $DATE wlan0 has no IP, waiting for DHCP to complete..."
  fi
  sleep 5
done

Dependencies:
You need to install the full version of wget as the busybox version does not support SSL.

Customisation:
wlan0 above needs to be the wifi card used to connect to FON.
If you are using this to login with a BTFON account you just need to change the email@ddress and password to your own.  If you want to login with a BT Broadband account you will need to change the BTFON/ prefix as well although I cannot remember off the top of my head what it needs to be.

If you are wanting to use BTFON spots or any other FON provider, the URL will be completely different.  You can find this out from the page source of the login page.

Also, it WILL fill your log with messages but as I am using a router dedicated to this task it made sense for it be as verbose as possible for me.  Just comment out logger "BTFON: $DATE FON is working!" to remove the majority of the log messages.

Hi, did anyone get this working?

The discussion might have continued from here.