Friday, December 14, 2007

Mobile Ad Hoc Network

Remember Nokia Sensor?  Now that we've got our own personal web site in our pockets why don't we let those around us see it?  What we'll do here is to create an ad hoc WLAN network so that anyone can join and access our web server.

Download and install Web Server on your S60 handset (I'm going to use an N95 here).


Create a new access point with WLAN network mode set to Ad-hoc.


Open the Web Server application.


Start the server.


Select the connection type as local so that it doesn't use the gateway.


Allow it to establish a network connection.


Select our ad hoc WLAN access point.


After a few moments the web server is running on the local network.


Now we need someone to connect to us. I'll use my E61i.

Create a new access point with WLAN network mode set to Ad-hoc.

Open the web browser and try to go to a network location.


You should have the browser's default access point set to always ask.
Select the new ad hoc WLAN access point.


While it's trying futilely to connect open the Connection Manager while leaving the browser running.


Now you should see that we have succeeded in getting an ad hoc WLAN running between the two handsets.
Now let's find out what addresses we are using. First let's just ask the web server:


Above we see that the web server on the N95 is reporting that it has an IPv6 link-local address assigned. We should be able to use that address to reach the web server by formatting a URL in the accepted manner:


However we find that it never connects. Investigating this I used the handy IfInfo application to see what network interfaces I have configured on the E61i.


What we see is that we have an interface named EthWlan4 which has been assigned an IPv4 link-local address.

Let's use the same application over on the N95.


It seems that on the N95, which is an S60 3rd Edition FP1, it has assigned an IPv4 link-local addresson EthWlan4 and IPv6 on EthWlan6. Since the E61i, which is an S60 3rd Edition (without feature pack 1), did not assign an IPv6 address let's try and use the IPv4 interfaces.


Success! The browser on the E61i is viewing a web page served by the N95 over an ad hoc WLAN.
Of course this is hardly Sensor. The big missing piece is discovery. There seems to be a third party solution.

Thursday, December 13, 2007

Apache on S60

The fine folks at Nokia Research Center have done a surprising job of porting the Apache web server to the S60 platform.  Read that again.  That's right the server runs on the handset! 

 As they have done with many other projects, including the S60WebKit, the heart of the venerable S60 Browser, they have released the project as opensource.  The project has left the lab and is well documented as Mobile Web Server.

The project includes a gateway to proxy the traffic and map the dynamically assigned addresses of mobile terminals to domain names.  There is a "consumer friendly" commercial site for the product beta hosted by Nokia at mymobilesite.net.  Here you can download the software for your phone and register for the service including your own sub domain name.