Wifi, Apache, Obexftp, E61

Now that it’s possible to connect a device over Wifi instead of cellular (or TCP/IP over Bluetooth) the Apache on S60 effort is a bit more interesting. When I first heard about it one of my initial thoughts was to create an iCal export of my calendar via Apache and include that in my Evolution calendar setup. But that turns out to be just as much of a hack as any of the other methods. Still, I think there’s something interesting there, so I’ve got Apache on my E61 and I’ve been going through the demos in little fits and starts between the real work I’m doing and trying to get all my equipment back up online and talking to the interweb without blowing circuit breakers. I’ve been pretty impressed with using the server locally and how quick it is using it through the proxy when running over wifi instead of cellular.

Unfortunately file manipulation and editing on the E61 is still a pain. I used obexftp under Linux to poke around at the files that make up the htdocs and config for the Apache server. I have no idea where these files are that the Apache folks expect users to find. The docs say “check out the files installed on the phone to see how the python modules hook up,” but there’s no easy way to do that using just the phone that I’ve found. So of course I started wondering about maybe a python based editor to just generally take care of this “file access and editing on the device” problem once and for all. I always install the source for the apps and run them from the scripts menu, and none of them were working on the E61 when I did that. The import statement didn’t seem to be working at all for things in the python/lib directory. A quick search turned up info about the lib directory not working on the current version at all. That’s annoying. Some quick hacks to import sys and sys.path.append(‘e:\\python\\lib’) as necessary got things working though.

Here’s some general tips I’ve taken away:

  • Getting python scripts onto 3rd edition devices seem to be a huge pain in the ass. Transfering just a .py file over generates an error in the messenger when you click on it. Why, I’m not sure. .zip files still work with the zip manager… why don’t .py files work?
  • Speaking of the zip manager, transfering over .py files inside zips sounds like a good idea. Unfortunately the zip manager won’t let you extract to c:\\python for some reason. You can use e:\\python however, which is decent. But very oddly asymetric. One of those instances of getting something working despite the technology instead of getting something working because of it. The more time I spend doing mobile stuff the more accustomed to that mode I seem to get.
  • Ditto for obexftp, you can put into the E: drive python folder, but not C:. Consistent at least.
  • PyEdit has been working out fantastic for poking around with files on the device. Haven’t used it for editing too much, but it works great for viewing. Make sure you don’t accidentally click the wrong button when navigating the files list cause that throws an error and pops you out of the file selection dialogs, and no scrollbars in the file nav screens can make that a bit frusterating. There are newer versions I see, maybe these are fixed/updated now.
  • The Apache server does listen on all interfaces when you start it up in cellular mode. What that means is that you can start a “cellular” session with the app, choose a wifi access point to connect to, and access the service both through the at.openlaboratory.net address you get with your Raccoon account and the IP address assigned to your phone by your router (or whatever you’re connected to). Cool. Looking at the setup screens I didn’t think that would work as I had hoped it out. I expected the server to be listening on loopback only when the connector was started, but that isn’t the case.
This entry was posted in ThisIsMobility. Bookmark the permalink.

One Response to Wifi, Apache, Obexftp, E61

  1. Bar Chiu says:


    I’m interested in how you managed to solve your connectivity problem of your mobile to a server, if I got your explanation right. I have recently been interested in programming my mobile phone to connect to my nginx-based server through WiFi and it seems that you have the key to my problem.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">