[maemo-developers] Second WSOD and making sure wireless connects at startup.

From: Jason Monroe Martin jasmar at localnet.com
Date: Mon Mar 26 17:21:34 EEST 2007
#!/usr/bin/env python2.5

Save all lines to /usr/bin/pynetup, make it executable and
    do what is in the following  comments.

This is my second WSOD and I was in a jam. Although I have a discount 
code for
the N800, I do not have the spare money to order it or repair the N770. 
To make
this work you need the python-runtime and OpenSSH needs to be installed 
and setup.
You also have to be able to become root. I had the becomeroot package 

Leave only one connection listed in 
Move the rest to /root/my_backup or some other safe place.

Add "run-standalone.sh /usr/bin/pynetup" without the quotes to
osso-connectivity-ui.sh in the /etc/osso-af-init directory.

    Like this:
    if [ $START = TRUE ]; then
      # check that required environment is defined
      if [ "x$DISPLAY" = "x" ]; then
        echo "$0: Error, DISPLAY is not defined"
        return 2
      run-standalone.sh /usr/bin/pynetup

import commands
import urllib2
import sys
import time

page = ''

# Let's make sure everything is up and settled.

while 1:
    # Call the browser with dbus to open a web page.
    # If there is no connection it should try to open one.
    result=commands.getoutput('dbus-send '
        '--print-reply '
        '--dest=com.nokia.osso_browser '
        '/usr/bin/browser '
        'com.nokia.osso_browser.load_url '
    # Read a page with python.
    # In this case it is the WEB GUI on my wireless router.
    page = urllib2.urlopen('')
    # I know the page contains the phrase "Bad Request" because
    # WEB ADMIN stuff is restricted from wireless devices.
    if page.read().find('Bad Request') == 83:
        # The link is up. I could do something else here but
        # I am just happy I can ssh into the tablet now.
    # Must not have worked. Wait and try again.

More information about the maemo-developers mailing list