Tethering Nokia N73 with Macbook Pro

Posted in How-To, Mac with tags , , , , on August 18, 2009 by rubayeet

Tethering

Tethering your laptop with an EDGE enabled cellphone is an ideal solution for “Internet on the go” problem.

I have a Nokia N73 which  I wished to connect via Bluetooth with my Macbook Pro running on OS X 10.5.7. Unfortunately, it wasn’t a walk in the park as I expected everything with Mac to be. After spending quite some time searching on Google and with the help of some very useful resources(which I’ve listed at the end of this post). I was finally able to browse the Net on the macbook through the phone. I’ll outline the process below

1. Download the Modem Scripts

Although OS X ships with modem scripts for Nokia phones, they don’t work for all the models. Ross Barkman to the rescue! His website contains customized modem scripts for a large array of cellphone brands and models. N73 is 3G enabled so you’ll need Nokia 3G scripts. Download the zip file and extract it, copy the scripts(Nokia 3G CID 1, 2 and 3) and paste them inside [RootDrive]/Library/Modem Scripts folder.

2. Pair the phone with the Macbook

This step is pretty easy to follow. Click on the Bluetooth icon on the Menu bar(go to System Preferences > Bluetooth if (it’s not there) and select “Set up Bluetooth Device”. Follow the steps to pair the phone, make sure you’ve chosen “Access the Internet” option at the final step.

3. Connect to Internet

  • Go to System Preferences > Network and select Bluetooth from the left pane.
  • Click on “Advanced” button. Under the “Modem” tab, select “Other” for “Vendor” option.
  • Select “Nokia 3G CID 1″ for “Vendor” option.
  • Select “Ignore dial tone when dialing” from “Dial Mode” options
  • Click OK and now back to Network Menu. Enter your phone’s APN in the “Telephone Number” box. You can know your APN from your phone’s Menu > Tools > Settings > Connection menu.
  • Click “Apply” and then click “Connect”.

You should be connected to Net by now.

Resources

  1. Ross Barkman’s site. It has modem scripts for several phone brands.
  2. A similar post on tethering.

Update Tao of Mac has a very detailed post on this topic.

Google Chrome OS – Lets try to be positive

Posted in Opinions, Personal, Random Ruminations on July 9, 2009 by rubayeet

1489_540

Google’s announcement of stepping into the OS market with Google Chrome has generated quite a stir in the Net. While many have welcomed Google’s new venture, others have been busy with making absurd predictions. Some are talking about what current operating system it’s going to kill? Some saying they don’t need a new OS because they already have one they like. This fellow got more creative and ranted about ‘features’ of the OS before it’s even released! It’s like blaming an unborn baby for being bad in sports?

Personally, I don’t understand the motive behind this kind of negative thinking. Why not think about what new things Chomre might offer, rather than which popular OS it’s going to kill? Let Bill worry about possible market threat of Windows, we should worry about how to use Chrome. You already have the perfect desktop? May be that’s what you think and may be you are right. But should that stop others from trying to innovate, seek answers to problems you never realized you had? Google’s new browser introduced radical concepts in terms  of usability, may be the OS will do the same.

As developers we should be more open minded towards innovations, and throw away this die hard slash fanboy culture.  Technology isn’t religion, you won’t be denied entry to heaven for switching to a newOS/programming language. If nothing else, competition is good. It brings the best out of people. Let’s hope it’ll force Microsoft to make a more secure Windows, or inspire Linux people to create much user friendly desktop systems.

WinDirStat gives the real picture of the hard drive, literally.

Posted in Sys Admin, Windows on July 7, 2009 by rubayeet

If you are trying to find out what’s eating up your precious hard disk space in Windows XP/Vista, WinDirStat is your weapon of choice. A much helpful tool than the brain dead Explorer, WinDirStat analyzes the usage statistics of your hard drive/partition/directory and outputs(along with other data) a treemap, which is a visual representation of how blocks of data are organized on the disk.

windirstat

Clicking on a block shows you the file/directory physically taking up the space in the directory list(shown in the picture). Comes quite in handy. I just cleaned 1 Gigabytes worth of data cached by Safari 4. If it wasn’t for WinDirStat, I would’ve never known that Safari thinks your hard drive space is infinte! Who knows, may be Steve’s is really is?

Download WinDirStat from SourceForge.

Deploying Django application on mod_python and Mini Mac

Posted in Django, How-To, Mac, Programming, Python, Sys Admin on July 2, 2009 by rubayeet
Server  : Apache 2.2
OS      : Mac OS X 10.5.4 
Python  : Version 2.5.1
Django  : Version 1.0.2 final
Machine : Mac Mini

mac finder

Mod_python is a loadable Apache module which embeds the Python interpreter, so Python code can be run in-process by Apache. To deploy and run your Django application in an Apache web server you have to

  1. Download and install mod_python
  2. Load it in Apache
  3. Configure Apache to run the Django app.

In this post I’m going to share my experience on how to do all that on a Mac Mini that runs on OS X 10.5.

The Software & Hardware

Here was my system configuration

  • Server  : Apache 2.2
  • OS      : Mac OS X 10.5.4 
  • Python  : Version 2.5.1
  • Django  : Version 1.0.2 final
  • Machine : Mac Mini running on 2.0 GHz Intel Core 2 Duo processor with 2GB RAM

1. Get the mod_python source

Check out the mod_python source code from the remote SVN repository*

$ svn co https://svn.apache.org/repos/asf/quetzalcoatl/mod_python/trunk/ mod_python_src/

*The reason I’m downloading the source from an SVN trunk and not from the Apache website, is because the source available at the later one isn’t properly patched for Mac Mini’s architecture. In my earlier attempts, when I downloaded and built mod_python from stable releases, Apache was failing to start whenever the mod_python module was being loaded using the LoadModule Directive.

2. Build the source

$ cd mod_python_src

$ ./configure --with-apxs=/usr/sbin/apxs

$ make

$ sudo make install

3. Configure Apache to load mod_python when it starts

Open the Apache configuration file

$ sudo vi /etc/apache2/httpd.conf

Add the following line to the file 

LoadModule python_module libexec/apache2/mod_python.so

Now restart Apache

$ sudo /usr/sbin/apachectl restart

4. Configure Apache for Django 

Let’s suppose you have a Django app callled “mysite”. Copy you the directory to the Apache DocumentRoot

$ cp -r /path/to/mysite /Library/WebServer/Document/

Add the following lines to the httpd.conf file

<Location "/mysite">

    SetHandler python-program

PythonPath "['/Library/WebServer/Documents'] + sys.path"

     PythonHandler django.core.handlers.modpython

     SetEnv DJANGO_SETTINGS_MODULE mysite.settings

PythonAutoReload On

PythonDebug On

</Location>

This’ll make Apache to route any requests under URL “/mysite” to the mod_python handler. It passes the value of DJANGO_SETTINGS_MODULE so mod_python knows which settings to use.

Now restart Apache and go to the site http://localhost/mysite

If it works then congratulations! You’ve just deployed your app on Apache!

Troubleshooting tip(s)

If Apache fails to launch after you’ve installed and loaded mod_python, run it in debugging mode

$ sudo /usr/sbin/httpd -X

Look for any error message printed in the terminal, copy it and google it. You may find a solution online.

You should also check out