Tech Talk

Linux, Python, E51, Scripting…

Archive for the ‘debian’ 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

Firefox 3 is impressive

without comments

I have this age old machine in my hostel room. It is a 800MHz Celeron with 256M RAM. That is a good combination for CLI guys like me. It runs debian sid. Its primary purpose is documenting work over night, practicing a couple of scripts, occasional programming and movies. I use the gui only when browsing shares over dc, internet and movies. For movies I use no window manager. Default WM shifts between icewm and fluxbox.

I have installed iceweasel and dillo from the repository. Using iceweasel used to kill my machine. I can’t open a second tab and the machine resource monitor graph is mostly clamped to the top 98%. So, you know what time I spend on the internet after I get to my room.

Anyway, last weekend I downloaded firefox 3. Believe it or not, I am able to run firefox 3 along side django test server and emacs without saturating the machine resources. And even otherwise, I am able to have at least 3-4 tabs simultaneously open on my machine. I almost can’t believe this. Now I am really wondering if I ll update my firefox 3. I am just scared it might become memory hungry when they finally release it.

Blogged with the Flock Browser

Tags: , , ,

Written by abiya

March 13, 2008 at 11:01 am

Download Youtube Video?

with 4 comments

I was viewing a video on youtube and suddenly thought I wanted to download the video for offline viewing. I have a fresh install of debian etch, a 1/21 CD install. So, you know what little tools are available on my machine. Above this I don’t have a really fast internet connection that I can afford the video twice. Of course, it was just a five minute video. But I had seen two minutes of it, which I didn’t want to download again. Actually, I started to see this video a week back, and every time I would cut it out at 1 minute!

I use Iceweasel that comes packed with etch and I had installed flash player 9 from the adobe website. I could not open a second tab and search for the youtube download plugin, because the download bandwidth was occupied entirely by youtube!! (Remember that mine is not a “broad”band connection!) So, I casually get to the /tmp folder and bingo, the video is getting buffered there as a single file (Flash**** something is the file name). I don’t know if this is how youtube videos are always played!? Well they had to get buffered somewhere, right? Now I have the video saved and without going through it a second time. If this is a bug, then you guys at youtube better have a look at this. Or else, hey this is just another simple way to download the video. Unless of course, you were using a download manager, that is.

Written by abiya

June 1, 2007 at 4:17 pm

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