Re: Extending the mobile-broadband-provider-info database



On Tue, Jul 19, Oleg Zhurakivskyy wrote:

> I am working on GRPS provisioning plugin for oFono open source telephony
> stack. This plugin should make it possible for oFono to automatically
> configure GPRS contexts based on information from the provider database.
> There's an idea to use the mobile-broadband-provider-info package as the
> provider database.

While you are at it, maybe something can be added to really establish an
internet connection for certain providers.

For example Vodafone offers something called Websessions. Once the
gsm/ppp connection is established, one has to start a webbrowser and
connect to any http website. This will trigger the WebBridge to open a window
with the remaining time and it will actually enable the real internet
connection in the 'Weblogic Bridge'. Without that http access, one can
just resolve hostnames, but nothing else can be done. I have no idea
wether Vodafone is the only provider doing that. The script below will
automate the http calls for the Websessions. I have used it in the last
two weeks and it worked well for me.

Olaf

#!/bin/bash
# /etc/NetworkManager/dispatcher.d/01websession.sh
#exit 0
if test "$2" = "up"
then
	case "$1" in
		ppp*)
			(
			date
			echo "$0 $*"
			echo
			env
			echo
			t=`mktemp --tmpdir=/dev/shm`
			set -x
			w3m -dump_source http://www.inter.net/some_404_url.html > ${t}
			cat ${t}
			url="`sed -n '/window.location.href/s@^\(.*window.location.href[[:blank:]]*=[[:blank:]]*\"\)\([^\"]\+\).*@\2@p' ${t}`"
			echo "url '${url}'"
			w3m -dump_source "https://web.vodafone.de${url}"; > ${t}
			cat ${t}
			url="`sed -n \"/var[[:blank:]]*winRef[[:blank:]]*=[[:blank:]]*window.open/s@^\(.*var[[:blank:]]*winRef[[:blank:]]*=[[:blank:]]*window.open('\)\([^']\+\).*@\2@p\" ${t}`"
			echo "url '${url}'"
			w3m -dump_source "https://web.vodafone.de${url}"; > ${t}
			cat ${t}
			rm -fv ${t}
			) &> "/dev/shm/websession-${1}-${2}.txt"
		;;
	esac
fi


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]