Tech Talk

Linux, Python, E51, Scripting…

Archive for the ‘nokia’ Category

Python, E51 and Sid

without comments

I installed python almost immediately after I picked my phone, about six months back. But I forgot all about it! Yesterday, I decided to fix it up for good and start getting my phone do some of my work?

As a first step, I’ve had tremendous success getting python over a bluetooth serial console to work. Of course, sincere thanks to google and other hackers who have tried and tested this method before me. First thing I ever did is to repeat what I did to get my older 6111 to talk to sarge. It is available here. That worked like a piece of cake. I installed a newer python and the python shell using this method.

I tried connecting to python over bluetooth serial console. But I don’t think I ever got it right. So google and I got these links.

http://ramblingfoo.blogspot.com/2007/05/bluetooth-fun-with-my-nokia-6600.html

https://bugs.launchpad.net/ubuntu/+source/bluez-utils/+bug/227429

Both had the most vital information to get started. Here is what I did.

$ sdptool add --channel=4 SP
$ rfcomm listen 1 4

I used 1 because I tried setting my debian to use 0 at startup. Another “fail” attempt that one.

In another terminal,

$ screen /dev/rfcomm1

It had some wierd characters to start, just press enter and a new interactive python prompt appears. I checked to ensure that it is the one on the phone and not on my machine!

Now to try something useful

Written by abiya

December 13, 2008 at 2:41 am

Posted in E51, debian, nokia, python, technical

Tagged with , , , ,

How not to write software

with one comment

No, this is not another preaching or top ten tips or anything. This is about something I loved when I first understood it, felt people didn’t know to use it when I started using it and now feel is a bad design example. There are two facets to it : the windows registry and the nokia pc suite.

I knew about windows registry when I first started learning Visual Basic about 8 years ago. It felt exciting. You could actually register a service and some client could look it up and use much like the today’s hyped WSDL and SOA stuff. I was not a programmer then. Was just another curious kid trying to understand what my machine has installed.

After a while, I came across a whole lot of demo software that you could continue using by changing some entries in this registry. I felt that the programmers of these tools were missing something, or the entire idea of a demo is just a hype. Again it was too early for me to say anything about this. I just did not know enough of the software business then.

About three years back, I picked my first Nokia mobile phone. It came with this software called PC suite. At that time, I was as excited about it as I was about using windows registry. This was a time when I just started using linux. I used to regularly login to windows since I was not entirely comfortable with the toolset in linux and this nokia pc suite did not ship a linux version. It still doesn’t, but that is another issue.

But the pc suite experience left me wondering if it was written by software programmers. I was working in a software outsourcing co at this time and did understand something about software design and principles. But I found pc suite application very stupid. I seemed to eat a lot of my machine’s resources while trying to sync contacts with my phone, or transferring images from the phone. I have many times cursed the app and quit without doing anything.

Last week when I picked E51, the pc suite developers proved their capabilities. Pc suite wouldn’t install because the previous PC suite version was not completely uninstalled. WTH, you wrote both the versions, won’t you know how to upgrade between them? It left me irritated. I even thought I’ll return the phone to nokia and request them to hire some software engineers to do the user installation end of stuff also.

The issue : PC suite makes one million entries in various names across the entire registry making it almost impossible to remove them all. In fact, it must have gotten so out of their hands, that they even had a PC suite clean up application! Can you beat that? Anyways, after a couple of registry edits a lot of curses and about three restarts, the thing finally worked. Now I understand why they don’t ship PC suite for linux. You perhaps can never make it so complicated. Windows registry and Nokia PC suite combo is one perfect example for a “spaghetti pattern”, an anti-pattern that most software guys try to avoid. Do they really?

The reason for irritation has its seeds elsewhere. I have not used windows a lot in the last two years. I have a debian dual boot and am loving it. Installing something in linux can get just as painful, but most of the times, the issue is just unresolved dependancy. Rarely unresolvable. But in windows, they neither tell you what dependancy failed, nor what you can do to resolve them. You need somebody who speaks in “registry” to resolve the issue. Maybe this is because I don’t develop in a windows environment, but the user friendly part is totally lost. Why else is anyone using windows?

Blogged with the Flock Browser

Tags: , , , , , ,

Written by abiya

April 17, 2008 at 4:40 am

Connecting my Nokia 6111 to my Debian

with 4 comments

There are a couple of tools that you can use to connect from linux to a mobile phone over a bluetooth conection. Some of them that I tried include gammu, gnome-bluetooth. I was trying to install gnome-phone-manager. Of course, I did an apt-get to install gammu. I installed gnome-bluetooth from ubuntu repository. Wouldn’t debian maintain that? I am using sid after all!!

Most of these tools are not as simple to use as the nokia phone manager. Part of the reason is certainly the fact that I got used to the PC Suite well before other linux based tools. Nevertheless, I wanted to transfer some backgrounds on to my phone and these tools wont help me right away!

So, I decided to get my hands wet using these primary tools – hcitool, obexftp. Good ones and did the job! Here is what I did and the results.

abishek@ingeneur:~$ hcitool scan
Scanning …
������� 00:15:DE:11:6B:74������ Ingeneur’ nokia

That is my phone alright.

abishek@ingeneur:~$ obexftp -b 00:15:DE:11:6B:74 –put �splash.png
Browsing 00:15:DE:11:6B:74 …
Channel: 10
Connecting…
done
Sending “mac_osx_linux_splash.png”…|done
Disconnecting…done

That was the simple bg pic from my debian that I wanted on my phone. Getting files as simple as that too.

Interesting, right?

Written by abiya

June 27, 2006 at 12:30 pm

Posted in 6111, debian, nokia, technical