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.


# /etc/NetworkManager/dispatcher.d/
#exit 0
if test "$2" = "up"
	case "$1" in
			echo "$0 $*"
			t=`mktemp --tmpdir=/dev/shm`
			set -x
			w3m -dump_source > ${t}
			cat ${t}
			url="`sed -n '/window.location.href/s@^\(.*window.location.href[[:blank:]]*=[[:blank:]]*\"\)\([^\"]\+\).*@\2@p' ${t}`"
			echo "url '${url}'"
			w3m -dump_source "${url}"; > ${t}
			cat ${t}
			url="`sed -n \"/var[[:blank:]]*winRef[[:blank:]]*=[[:blank:]]*^\(.*var[[:blank:]]*winRef[[:blank:]]*=[[:blank:]]*'\)\([^']\+\).*@\2@p\" ${t}`"
			echo "url '${url}'"
			w3m -dump_source "${url}"; > ${t}
			cat ${t}
			rm -fv ${t}
			) &> "/dev/shm/websession-${1}-${2}.txt"

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