When I went to kishor's house on a weekend, he was playing Oy, a new telugu movie, songs and found out that Subhash too was advertising them on gtalk. So went to raaga and started listening them. On the next Monday, I was too tempted to listen them again while I was in lab. So I started playing them out on my lappy with full volume, without noticing that someone left my lab door open. lol ... (I think it was Pria).
Umm ... after listening to couple of songs a heard a bug thud and wondered what it was ... OMG!! prof Tan. F. Wong was walking out of his room and at that moment I was fully afraid that I have disturbed him. So I waited for him to come back and went into his room to smooth out the matter.
Me : "Hello professor. I am Obulpathi and I stay in the room opposite to you. And I make lot of noise as you might have noticed many a time and today too .. I din't notice that the door was open .. ", he was smiling ...
Wong : "It's ok. I have kids at home. I am used to them. So I can bear your noise easily"
hahaha ..
Sunday, May 31, 2009
Saturday, May 9, 2009
Living in Lab
"I may have done a little bit more living at the lab than most people, because every year or two for some reason or other I'd have no apartment and I would spend a few months living at the lab. .... It was not at all uncommon to find people falling asleep at the lab, again because of their enthusiasm; you stay up as long as you possibly can hacking, because you just don't want to stop. And then when you're completely exhausted, you climb over to the nearest soft horizontal surface. A very informal atmosphere" : by RMS from "Free as in Freedom" in which he explains his life and "living" in AI lab at MIT. And found it very close to what I used to do in my old lab ... "living" in lab rather than merely working in lab. But I am not getting it the same style at UF. And the time eventually came when I had to survive an entire night with just a towel to cover me up from the freezing cold temperatures of AC .
In the holidays too I could not resist going to lab even though I do nothing there. But I got way too much involved with what I was doing (I wonder what I was doing!) that I forgot to notice the new bus schedule and so finally when I decided to go home, bus tracker said "there are no buses " :(
Anyways this work is interesting ... so lets continue .. tired after a couple of hours, I go to sleep with almost nothing to cover. When I woke up again I was shivering in cold (freaking AC, I wonder why they put it on in such ghostly hours). I curled up myself in towel and slept till 6:30 AM and then left home ...
Going home in the heavenly hours of 6:30 AM, listening to the chirping of birds and feeling satisfied for your work ... is something one should do, at least once in lifetime :)
In the holidays too I could not resist going to lab even though I do nothing there. But I got way too much involved with what I was doing (I wonder what I was doing!) that I forgot to notice the new bus schedule and so finally when I decided to go home, bus tracker said "there are no buses " :(
Anyways this work is interesting ... so lets continue .. tired after a couple of hours, I go to sleep with almost nothing to cover. When I woke up again I was shivering in cold (freaking AC, I wonder why they put it on in such ghostly hours). I curled up myself in towel and slept till 6:30 AM and then left home ...
Going home in the heavenly hours of 6:30 AM, listening to the chirping of birds and feeling satisfied for your work ... is something one should do, at least once in lifetime :)
Monday, May 4, 2009
code your name ...
recently I read about ester eggs in Linux and it was fun playing with them.
And here is my attempt to create a one.
"how to codify you name and burn it in a microcontroller"
Two years of my learning, struggle and frustration in Embedded Systems and Sensor Networks Lab finally led me to do things like this (Thanks to PR ;)).
I created an easter egg, which nothing but my name in code format, and burned it in to a microcontroller.
First you generate you name pattern using banner.
(A line starting with "$" is a command and a line starting with a "#" is a comment).
$ banner "your name" > easter-egg.hex
$ banner -w 46 bullz > banner.hex
size will be a bit big, so reduce the size to fit a "Record" (line) in a 32 hex char field(32 : data length of a intel hex format field).
As you might have noticed, the length of each line is not uniform.
Lets take care of this using a simple sed script "uniform.sed"
$ sed -f uniform.sed banner.hex > uniform.hex
$ cat uniform.sed
s/$/ /
s/ *$/&&&&&&&&/
# keep 1st 43 chars
s/^\(.\{45\}\).*$/\1/
# delete first 11 spaces
s/^ //
Now as you can see, all the fields are fixed to contain same length.
But to burn into microcontroller, we need to have separate addresses for each field.
So lets strip addresses (first 9 chars of any rom.hex file) from some arbitrary rom.hex file. Trim the size of the output file so that it contains same number of lines as of uniform.hex
$ sed -f genadd.sed rom.hex > addfile.hex
$ cat genadd.sed
# keep 1st 9 chars
s/^\(.\{9\}\).*$/\1/
now lets join address file (genadd.hex) and name file (uniform.hex) into a tmp file and then fix the tab spacing to generate fixadd.hex file.
$ paste addfile.hex uniform.hex > tmp.hex
$ sed 's/\t//' tmp.hex > fixadd.hex
Now lets "hexify" the file to contain only "0" and "F".
$ sed -f hexify.sed fixadd.hex > hexify.hex
$ cat hexify.sed
s/ /0/g
s/#/F/g
Lets add EOF Record, in order to indicate the microcontroler programmer to indicate EOF.
$ echo ":00000001FF" >> hexify.hex
Almost there, but if we try to burn this code, the programmer will come back and say "Checksum error".
So lets fox the Checksums using "fixchksum" utility.
$ fixchksum hexify.hex
And we finally made it the easter-egg.
$ mv hexify-fixed.hex easter-egg.hex
And here is the final result.
$ cat easter-egg.hex
:10000000F00000000000000000000000000000FF01
:10001000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
:10002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0
:10003000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD0
:1000400000F000000000000FF000000000000000C1
:10005000FF000000000000000F0000000000000092
:10006000FF000000000000000FF000000000000092
:10007000FF00000000000000FFF000000000000092
:10008000FFFF00000000000FFF0000000000000064
:100090000FFFFFFFFFFFFFFFF00000000000000068
:1000A000000FFFFFFFFFFFFF000000000000000047
:1000B0000000000000000000000000000000000040
:1000C00000000000000000000FF000000000000031
:1000D0000000FFFFFFFFFFFFFFF000000000000037
:1000E0000FFFFFFFFFFFFFFFFFF000000000000019
:1000F000FFFFFFFFFFFFFFFFFFF000000000000019
:10010000FFF0000000000000000000000000000000
:10011000FF000000000000000000000000000000E0
:100120000FF00000000000000000000000000000D0
:1001300000F00000000000000FF0000000000000D0
:10014000FFFFFFFFFFFFFFFFFFF0000000000000C8
:10015000FFFFFFFFFFFFFFFFFFF0000000000000B8
:10016000FFFFFFFFFFFFFFFFFFF0000000000000A8
:10017000F00000000000000000000000000000008F
:10018000F00000000000000000000000000000FF80
:10019000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6F
:1001A000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5F
:1001B000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4F
:1001C000F00000000000000000000000000000003F
:1001D000F00000000000000000000000000000FF30
:1001E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1F
:1001F000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0F
:10020000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE
:10021000F0000000000000000000000000000000EE
:1002200000000000000000FFFFF0000000000000E0
:10023000FF000000000000FFFFF0000000000000D1
:10024000FFFFF000000000000FF0000000000000C1
:10025000FFFFFFFF000000000FF0000000000000A3
:10026000F0FFFFFFFF0000000FF0000000000000A3
:10027000F0000FFFFFFFF0000FF000000000000093
:10028000F0000000FFFFFFFF0FF000000000000083
:10029000F000000000FFFFFFFFF000000000000082
:1002A000F00000000000FFFFFFF000000000000071
:1002B000FF0000000000000FFFF000000000000041
:1002C000FFFF00000000000000F000000000000040
:00000001FF
Can you see my name (bullz) in thr?
Lets hide it, so that someone else can find it ;)
$ flash easter-egg.hex (replace "flash" with you favorite way of flashing your micro)
And for those who want to try this out for fun, gimme a mail and I will post the makefiles and other sed files.
And here is my attempt to create a one.
"how to codify you name and burn it in a microcontroller"
Two years of my learning, struggle and frustration in Embedded Systems and Sensor Networks Lab finally led me to do things like this (Thanks to PR ;)).
I created an easter egg, which nothing but my name in code format, and burned it in to a microcontroller.
First you generate you name pattern using banner.
(A line starting with "$" is a command and a line starting with a "#" is a comment).
$ banner "your name" > easter-egg.hex
$ banner -w 46 bullz > banner.hex
size will be a bit big, so reduce the size to fit a "Record" (line) in a 32 hex char field(32 : data length of a intel hex format field).
As you might have noticed, the length of each line is not uniform.
Lets take care of this using a simple sed script "uniform.sed"
$ sed -f uniform.sed banner.hex > uniform.hex
$ cat uniform.sed
s/$/ /
s/ *$/&&&&&&&&/
# keep 1st 43 chars
s/^\(.\{45\}\).*$/\1/
# delete first 11 spaces
s/^ //
Now as you can see, all the fields are fixed to contain same length.
But to burn into microcontroller, we need to have separate addresses for each field.
So lets strip addresses (first 9 chars of any rom.hex file) from some arbitrary rom.hex file. Trim the size of the output file so that it contains same number of lines as of uniform.hex
$ sed -f genadd.sed rom.hex > addfile.hex
$ cat genadd.sed
# keep 1st 9 chars
s/^\(.\{9\}\).*$/\1/
now lets join address file (genadd.hex) and name file (uniform.hex) into a tmp file and then fix the tab spacing to generate fixadd.hex file.
$ paste addfile.hex uniform.hex > tmp.hex
$ sed 's/\t//' tmp.hex > fixadd.hex
Now lets "hexify" the file to contain only "0" and "F".
$ sed -f hexify.sed fixadd.hex > hexify.hex
$ cat hexify.sed
s/ /0/g
s/#/F/g
Lets add EOF Record, in order to indicate the microcontroler programmer to indicate EOF.
$ echo ":00000001FF" >> hexify.hex
Almost there, but if we try to burn this code, the programmer will come back and say "Checksum error".
So lets fox the Checksums using "fixchksum" utility.
$ fixchksum hexify.hex
And we finally made it the easter-egg.
$ mv hexify-fixed.hex easter-egg.hex
And here is the final result.
$ cat easter-egg.hex
:10000000F00000000000000000000000000000FF01
:10001000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0
:10002000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0
:10003000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD0
:1000400000F000000000000FF000000000000000C1
:10005000FF000000000000000F0000000000000092
:10006000FF000000000000000FF000000000000092
:10007000FF00000000000000FFF000000000000092
:10008000FFFF00000000000FFF0000000000000064
:100090000FFFFFFFFFFFFFFFF00000000000000068
:1000A000000FFFFFFFFFFFFF000000000000000047
:1000B0000000000000000000000000000000000040
:1000C00000000000000000000FF000000000000031
:1000D0000000FFFFFFFFFFFFFFF000000000000037
:1000E0000FFFFFFFFFFFFFFFFFF000000000000019
:1000F000FFFFFFFFFFFFFFFFFFF000000000000019
:10010000FFF0000000000000000000000000000000
:10011000FF000000000000000000000000000000E0
:100120000FF00000000000000000000000000000D0
:1001300000F00000000000000FF0000000000000D0
:10014000FFFFFFFFFFFFFFFFFFF0000000000000C8
:10015000FFFFFFFFFFFFFFFFFFF0000000000000B8
:10016000FFFFFFFFFFFFFFFFFFF0000000000000A8
:10017000F00000000000000000000000000000008F
:10018000F00000000000000000000000000000FF80
:10019000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF6F
:1001A000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5F
:1001B000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4F
:1001C000F00000000000000000000000000000003F
:1001D000F00000000000000000000000000000FF30
:1001E000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF1F
:1001F000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF0F
:10020000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE
:10021000F0000000000000000000000000000000EE
:1002200000000000000000FFFFF0000000000000E0
:10023000FF000000000000FFFFF0000000000000D1
:10024000FFFFF000000000000FF0000000000000C1
:10025000FFFFFFFF000000000FF0000000000000A3
:10026000F0FFFFFFFF0000000FF0000000000000A3
:10027000F0000FFFFFFFF0000FF000000000000093
:10028000F0000000FFFFFFFF0FF000000000000083
:10029000F000000000FFFFFFFFF000000000000082
:1002A000F00000000000FFFFFFF000000000000071
:1002B000FF0000000000000FFFF000000000000041
:1002C000FFFF00000000000000F000000000000040
:00000001FF
Can you see my name (bullz) in thr?
Lets hide it, so that someone else can find it ;)
$ flash easter-egg.hex (replace "flash" with you favorite way of flashing your micro)
And for those who want to try this out for fun, gimme a mail and I will post the makefiles and other sed files.
Coward
I was afraid, like a scared cat.
I lost so many things ... because I was afraid to be myself.
And only after losing them, I realized what I have lost.
I promise, next time, it won't go the same way.
I am not afraid, not afraid of losing.
I lost so many things ... because I was afraid to be myself.
And only after losing them, I realized what I have lost.
I promise, next time, it won't go the same way.
I am not afraid, not afraid of losing.
Subscribe to:
Posts (Atom)