Saturday, June 20, 2009

Google maps works without GPS


A GPS phone with Google maps is really amazing. But unfortunately, my Nokia E65 has not any GPS support, but navigator programs are included in Symbian. A bluetooth GPS device can be used along with many phones without any GPS module in-built. But it costs around Rs.5000 India. But Google maps is useful even if you have any GPS support because it works well using GPRS network to find current position, not much accurate because it will show the nearest mobile radio transmitting tower. But it becomes handy and have only 1.3MB to download and useful in navigation. Recently, Nokia also provided "nokia maps", but I am not commenting about it because, now I decided to stick with Google!
You can download Google maps directly to your mobile phone from m.google.co.in/maps
or vist www.google.co.in/mobile from your PC.

Saturday, June 13, 2009

Open electronics - Philosophy


Electronics is nowadays being a part of modern human life. Computer, Television, PDAs, Mobile phones, ,Vehicle Engines, and every field of communication, Medical science, Military requirements and everywhere….A similar boom was taken place years ago in the software field. The necessity of software with less cost and freedom opened the windows of open source software foundations like GNU. Thanks to GNU/Linux.
But the case is different in the case of electronics. Here the real source is the circuit schematic and logic. Here the source is more valuable than software distributed under GPL License. But as development goes on, the nomenclature of “opensource” is becoming relevant in electronics also. In modern digital control, the logic is not only the part of hardware and is shared by the software also. That means, hardware is likely to be same in all devices, but the complexity of logic completely depend upon the program itself. That is what is I want to emphasize “opensource” is being relevant in the filed of electronics also.
In older age, it was easy to 'hack' the circuit by the method known as 'Screw Driver Engineering'. But as micro electronics development goes on, a single chip can hide most of the important logic to the end user. The arrival of microcontrollers again increase the complexity of hacking. These technology is extremely useful where security is required. The same security issues exists in software field also. But a programmer can hide important parts of program from the user. This is considered to be severe from the perspective of openness. The similarity in the electronic field and the computer software field gives us a way for a new revolution - open source electronics.

Read more about the open electronics philosophy here.
Another good website concerning open circuits.

Portable programs for your pen drive

Nowadays, there is no need of an introduction to portable applications, but I am starting from introduction before going to some useful portable application links.

Most of the computer application programs are to be installed in your system. It is not a problem in Windows platform just click next->next->.......finish. Quite complicated but amazingly interesting way in Linux. There are several Java programs which is intended for direct work instead of initial installation setups. The problem arises in installable applications comes to play if you are working in your office, college in computer. The computer administrator may prohibit to install your favorite Firefox in the office computer. These problems can be avoided by using some portable versions of your favorite applications. Just download an unzip it in into your pen drive and use it every where. Currently, most applications support portability in MS Windows OS. If you are a Linux user, Linux OS itself become portable to follow you!

Some good links for MS windows:

http://portableapps.com/

http://www.pendriveapps.com/

Here follows a junk of pen drive Linux:

http://www.pendrivelinux.com/

Python for Symbian s60


Python is very convinient language compared to any other and constantly increasing it's popularity. It is listed in the top 10 programming languages also. It can be used in MS Windows, Linux and everywhere. It's a best hacker's choice also. Many varieties are emerging from python. Portable python- which need not be installed but paste the file in your Thumb drive or any other portable devices and you can use it everywhere. Really Nice. Now the pyhton coming to conquer the mobile phone world!. Yes, you can do what is you go for in a PC.

  • Just donwlad the pyhton instllalble file. Install it
  • Open python for s60
  • Options->Interactive Console
  • Do what you want
  • You can see some example *.py files in Options->Run Script
simplest example:

print "hello World!"

#Note: Wherever you want to press enter in PC version of linux, in mobile, you use 'scroll key', not 'enter' character in the list of special characters. You can run python scripts also bu require one text editor. One good text editor is JtextLite.

Happy Programming!

Friday, June 12, 2009

Play with "cdrom" in Linux

Linux comand shell "bash" is powerful as we know. Here is a fun with bash. You can control your cdrom using 'eject command'. Here is only a simple description. For nore details, you should look at it's man pages.

This is not a project or something serious. just for fun. You can control your cdrom by using this code. This will only work on Linux platform. I did it in fedora core 9. But it will work other disro's also.

!!!!!!!WARNING!!!!!!!!
1)Some procedure described in this article is not a recommended or the hardware devices are intended to work like it. Do it in your own risk.
2)Don't interrupt the way the hardware working (the movement of CD ROM tray by your hand).

Open your 'cdrom' tray under software control
Try this command

$eject cdrom


It will try to open your cdrom tray. if you have two or more cdrom drives, try

$eject cdrom0


If you havn't any cdrom device, bash will return an error message:

$eject cdrom2
eject: unable to find or open device for: `cdrom2'


You can find your device name ( "cdrom0', 'cdrom1' etc.) from "/media"

Close your 'cdrom' tray under software control
Try this command

$eject -t cdrom


Other useful parameters are there in 'eject'. You can read about it:

$man eject


Writing a bash script
Just entering the command at a time is not convenient. You can write some commands together and execute it when you want.
Open a new file using gedit editor (or any other you want)

$gedit cdromplay


A winow will appear and type what you want. For example, if you want to open and close your cdrom continously three times just print like this:

eject cdrom
eject -t cdrom
eject cdrom
eject -t cdrom
eject cdrom
eject -t cdrom


save it and close.
Then to resolve permission,

$chmode +x cdromplay

Then execute cdromplay

./cdromplay


You can see what I said before.

Do it in your real applications
As you know, we did some rubbish things before. There is no need to do so. But this is useful in some applications like CDburner - It will automatically eject tray after writing a CD ROM or you can control convineiently in a CD ROM player. We can use python to do a GUI application.

# File: cdromplay.py

import os
from Tkinter import *

class App:

def __init__(self, master):

frame = Frame(master)
frame.pack()
self.button = Button(frame, text="Quit", command=frame.quit)
self.button.pack(side=LEFT)

self.hi_there = Button(frame, text="Eject", command=self.say_hi)
self.hi_there.pack(side=LEFT)

def say_hi(self):
os.system("eject cdrom1 -T")
print "boss, cdrom activated"

root = Tk()

app = App(root)

root.mainloop()

As you can see, the above program is the altered version of "Hello World!" program of one famous python tutorial. Don't get upset or confused by the defnition names. The confusion in program code will not affect the real program.Copy and save it or download it from here. You require python to do this. 'cd' to the appropriate directory and run,

$python cdromplay.py


Now you will see a simple widget with a button.


Press button and observe what's happen.



Download cdromplay for python
Download cdromplay bashscript

Watch the video how cdrom is ejected:

Good Luck!

Increase Battery life of your Nokia!

There are several ways to increase the battery life of your Nokia mobile (not only nokia ;-) ). One good advice read from this link. I am now describinf how to turn off dual mode of your mobile to GSM in Nokia E65. Other mobile phones (probably using symbian OS) have the same step to do so.

Navigate to
Main Menu->Tools->Settings->Network

Change network mode to 'GSM'

It will ask to restart. Press 'Yes'.

Another good link here.