Search:

eriksmartt.com/blog

 

Topics:

  • arduino (3)
  • art (2)
  • austin (39)
  • automotive (15)
  • blogging (25)
  • books (14)
  • business (5)
  • code (15)
  • design (10)
  • diy (3)
  • django (9)
  • experience (17)
  • family (2)
  • film (4)
  • food (1)
  • for:optaros (2)
  • gadgets (11)
  • games (11)
  • garden (3)
  • green (5)
  • hack (13)
  • hardware (11)
  • hci (9)
  • life (13)
  • lifehack (11)
  • links (71)
  • linux (8)
  • living (3)
  • make (3)
  • media (7)
  • mobile (98)
  • music (2)
  • news (17)
  • osx (29)
  • outdoors (4)
  • privacy (2)
  • product-management (1)
  • python (75)
  • quote (3)
  • security (10)
  • society (21)
  • software (38)
  • spam (2)
  • syndication (5)
  • technical (31)
  • technolust (5)
  • transportation (12)
  • travel (25)
  • ubuntu (7)
  • web (67)
  •  

    Apache and mod_python for S60

    Filed under: mobile, python, technolust, web — May 9, 2006

    Nokia Research Center (NRC) has published a port of Apache for S60 which includes mod_python built for Python for S60. Once installed, you can run Apache on your phone and serve Python-based web applications that utilize the full (non-GUI) API of Python for S60!

    Running a server on the phone opens up a whole new class of mobile applications. The obvious “Hello World” for this environment would be a web-cam (which is included as an example), as well as a URL to query the device’s location and possibly share calendar and contacts data (all of which have Python API’s.) Add a Bluetooth GPS, and a Google Maps mashup plotting phone positions is only a few lines of code away!

    The release notes focus on the (optional) gateway to bridge the wired internet to mobile servers, which is very cool, but even without the gateway this software has potential as a unique tool for mobile web developers thanks to it’s ability to serve content to local browsers. Once you’ve installed Apache, all you need to do is select “Options”, “Start Non-Cellular” from within the application (called Racoon.) This will launch Apache, and you can connect to it on 127.0.0.1 from a local web browser, as shown in the following screenshots:

    starting apache

    connecting to local apache server

    viewing local server

    Combining the on-device server with a few Python for S60 scripts, you now have the potential for a rapid round-trip when optimizing a mobile web page design. The Python for S60 project includes a script for directory synchronization over Bluetooth. The idea was to make it extremely easy to edit Python scripts on a PC and synch with a phone for testing. This idea could easily be extended though, so that you’re synchronizing Apache’s DocumentRoot instead. With a synch daemon like this, the round-trip from editing XHTML on your desktop to previewing on-device could be as simple as hitting “Save” in your text editor, and “Reload” in your phone’s browser. No need to upload pages to a server or have a data-plan for the phone. That’s killer!



    2 Responses to “Apache and mod_python for S60”

    1. Avatar Peter Rukavina Says:

      I’ve tried the “Start Non-Cellular” option on my N70 (with a Danish Sonofon pre-paid SIM with no data access at all) and I get prompted to select an APN when I start Opera on the phone.

      Swapping the Sonofon SIM for a Portuguese Optimus SIM *with* a data plan, I don’t get prompted, and I can browse from Opera with no problem (it might be that Opera is simply using the default APN, and that’s why I’m not being prompted).

    2. Avatar erik Says:

      Hi Peter,

      Thanks for posting your findings about Opera on the N70 — quite interesting indeed! It sounds like Opera is doing some sanity checking on startup to ensure that network connectivity is possible. I suppose it’s a reasonable thing for them to do since the odds of a customer launching the browser to surf a local webserver are generally slim-to-none. Hopefully the idea of accessing a local webserver will gain enough traction for browser developers to adjust future releases to better handle this scenario.

      Now I wonder if the new open source S60 browser checks for network availability on startup as well?

    Leave a Reply


     

    A few books I'm reading now:

    A few books I'd recommend: