Akash Xavier RSS


About

Everything interesting that I come across in my life, I post it here.

Social
Feb
22nd
Sun
permalink
Feb
21st
Sat
permalink

ShoutJam: Welcome Ram Bhat !!!

ShoutJam’s now run by a small team of two.

I just found another guy excited about the idea I was working on. We had a small chat and boom, we are now working togther on ShoutJam.

Welcome Ram Bhat !!!

Apart from both of us being geeks, Ram and me work on different language stacks and hence have complimentary skillsets which we hope would get ShoutJam a long way. We met in college around 3 years back (yeah, we’ve known each other for sometime). So watch out for some action :)

Ram Bhat is on ShoutJam as ram

Akash Xavier as akash

Feb
19th
Thu
permalink

ShoutJam now stable

There was a technical fault in the ShoutJam system which prevented it from being active today morning. This was the same bug that caused the downtime yesterday.The problem has been corrected.

Feb
18th
Wed
permalink

Now tinkering with OpenStreetMaps, Gosmore and routing

I’ve got myself a new problem to solve, routing on maps based on live traffic data. Well, before that I’ve got to add new commands to ShoutJam.

Feb
11th
Wed
permalink

PyS60 Bluetooth stress tests

I’ve been testing my phone’s bluetooth connection to my PC.

Here’s my config: Nokia N70 phone programmed in PyS60, PC with Ubuntu Linux kernel 8.04, Bluez, PyBluez and programmed in Python. And my phone and PC are sending data almost every half second, so there’s no chance of a timeout due to idle connection.

Feb 9:

Connection lasts only for 20-30 minutes. After that the phone’s bluetooth isn’t detectable by the PC and the phone’s bluetooth has to be restarted.

Feb 10:

Conditions worsens after a workaround. The script on phone works fine only for around 10 minutes. Then a broken pipe error is returned. Bluetooth doesn’t require a restart as before but the script needs to be restarted. My battery is drained out quickly. No idea why. The same happens again during midnight.

Feb 11:

Phone fully charged up. Started phone and PC scripts at 7:45am. Connection surprisingly withstands until 10am. Received broken pipe error. Bluetooth needs restart again. Called up Nokia customer care. Reset the phone’s settings. Connection started again at 10:15am. Connection is again surpassing previous active connection time. It’s 1:30pm and connection is still on. It’s been around 3 hours. Battery usage is fine. Just 30% of the battery has been drained out since morning.

update: I shutdown the phone’s script manually at 2pm to recharge the phone’s battery. The script working for 4hrs approx is proof that it can manage the load. Looking forward for an error-free launch today evening.

Feb
8th
Sun
permalink

Workaround for PyS60: Sending SMS in a loop

It isn’t possible to send SMS in an iteration in PyS60 since the messaging.sms_send() will raise an error if the previous SMS isn’t sent (or failed to send). The PyS60 docs say that the state of the previous SMS can be determined by using the callback function as an argument in messaging.sms_send() and then checking the state of the SMS by testing with messaging.ESent, messaging.ESendFailed and other messaging.E* states.

When you want to send SMSes repeatedly in an iteration you’re stuck when it comes to determining whether the previous has been sent. So here’s a quick and easy workaround.

Use the try-except to detect errors and loop until the previous SMS has been sent.

permalink

Auto-Commit mode in Python-SQLite

I executed all the insert statements for SQLite in Python and was wondering why my database was empty when I queried it. This I did from my Python script.

I was scratching my head as to what’s wrong and then found out that the isolation_level must be set to None while connecting to the database like below

from pysqlite2 import dbapi2 as sqlite
connection = sqlite.connect(‘jaxfu.db’,isolation_level=None)
cursor = connection.cursor()
bla bla bla… here goes your code… :)

Now it should work fine!

Feb
7th
Sat
permalink

How staying away from the computer helped me

My first thought when mom forced me on a trip to to a pilgrimage with her was “What the hell am I gonna do there?” But the week long trip helped me plan a lot of things, coz I fell sick and was mostly resting. For the first time I was planning things before-hand. I had no access to a computer, so all I could do was just think and try out snippets of code on PyS60 on my N70 phone (situation got worse when I was out of network for 3 days, therefore ridding me of GPRS and hence the Python docs online). The only thing I could refer was the PyS60 reference docs which I had in my phone and some saved doc pages on Opera Mini.

I tried new stuff and read a lot about Bluetooth and socket programming in Python. The moment I got back home, I was not only full of new ideas, but also clear plans on how to execute them module-by-module including the logic. Code began to flow from my finger tips like water from a fountain. I never had to think again about the logic. My text tditor (I use Ped) on phone had all the logic I needed for the app. I was just typing on the go.

A few days away from my computer gave me a clear picture of the ‘real’ ecosystem and economic state of my country - India. This helped me understand the mindset of the Indian people (read non-hackers). Therefore giving me a clear picture on how I was supposed to market a tech product or service in such a country where every penny counts (Nope! I was never bothered about spending money. The thought that whether I’m spending on the right cause is what worries me). I dropped my idea of buying a new keyboard (musical instrument) which I always wanted to continue learning. I instead have decided to invest more time and money in what is accessible to me among my likes.

Feb
2nd
Mon
permalink

Yes! The beginning of something begins today

Confusing huh?

The beginning of something begins at the end of today which is also the beginning of a new month.

Hehee… The Captain Jack Sparrow way of explaining complex things LOL :)

I can’t stop jumping. After 3 days I got my bluetooth and computer talking thru python. Thats the beginning of something cool. And it’s the beginning of the month on a tuesday evening.

Jan
31st
Sat
permalink

Bluetooth programming in Python

I have been tinkering with my bluetooth dongle and Nokia N70 phone trying to make a  connection between them in Python. N70 is a S60 phone and supports PyS60 a limited version of python (but cool).

I tried to setup Bluetooth stack on Windows XP, but my bluetooth dongle driver is BlueSoliel and the latest version is being sold at a price. The BlueSoleil SDK has C++ and C examples which I don’t understand much. Python modules for bluetooth on Windows is PyBluez. But it supports only the Microsoft Bluetooth stack and the Widcomm stack. So I booted my Kubuntu and used the PyBluez on it. It worked fine and detected my bluetooth dongle. I am now also able to discover devices. I also tried lightblue, which depends on PyBluez, OBEXopen and Bluez. But lightblue seems to have a problem with the lightblue.advertise() function which enables to advertise devices on the open network.

Just noted that the kbluetooth tool must not be running to get the connections working. I just tried to make connections and it used to fail. Even now I’ve not got a connection right, but I just moved a step forward. I now get the usual password box on my phone. I’m using the Nokia N70 phone as a server(listening to a port) and my computer as a client to push data.