Among other things, I work on simulating human telnet and serial port sessions to various telecommunication switches so that we can perform automated provisioning (execution of switch commands) through our billing system. Certain switches are straight forward, the results are consistent, so at each step for each input you send you know how the switch will behave and you can keep track of the simulation. Switches like Nortel DMS 100, DMS 10 (not as easy as DMS100 though), and Interwave GSM switch falls into this category.
However I learned my lessons with Lucent 5ESS-2000. This time it was serial port, the output was not consistent. Since the switches don’t send an end of stream signal, after each command we scan until the prompt is reached which indicates the switch has executed the command and output the results and it’s in the prompt and ready to accept the next command. However Lucent sends prompts in the middle of the output and also at the end. Sometime for the same command the number of prompts switch sends varies. There was no way I could know how many prompts to scan so that I know switch has completed the command. Only way around this problem is to introduce a time out period and then scan for the output.
The lesson learned
If you are designing a Text Based interface (CUI) (or that matter any interface) please keep in mind that someone out there might some day what to replace the human with a program, to automate the process. Therefore while keeping Human Computer Interaction in mind, think about CCI (Computer Computer Interaction) too.
One a different note if you are one of those people who thinks if a human can interact through an interface, a computer also should be able to interact through the same interface, then this site “
Telling Humans and Computers Apart” is for you.
posted by 88Pro / Friday, July 23, 2004
The day started out a little cloudy. Rain was almost certain. Fortunately the weather gods looked down on us and things turned out pretty clear. The boat ride on Asailee’s 29 footer was a great experience, particularly the sea breeze rushing through your ears when the boat - powered by two 200 CC engines - cruised the waves, like a blade through butter. The inertia magnificent, leaving you breathless.
Rock islands were lovely; The one we visited was bigger than the Pohnpei Nahlap island. What was most interesting about my experience on the rock island, was what I learned, and here the story begins.
First, what we refer to as a BBQ in Sri Lanka is truly not a BBQ, in the real sense of the acronym. If one were to really understand the true modalities of a BBQ one would have to come here and take a few BBQ lessons from Orlando who headed the BBQ department for our trip.
Hmmm did you know there is special charcoal which is socked in Kerosene (or some flammable liquid) so that you don’t have to spend half the day trying to start a fire? I didn’t know that. Ahh! All those wasted hours back home…sob!...sob!. Within minutes the fire was a blaze and the smell of charred meat was tempting our ‘cave man’ taste buds.
What amazed me most during my trip was how careful they tourists and islanders were with their trash disposal. Everything (and I mean EVERYTHING) was collected in trash bags and brought back to the main island for disposal. About 30-50 people visit each of the islands every day, but you couldn’t find a single piece of discarded paper, even if your life depended on it. This is something I oberserved on my Nahlap island trip in Pohnpei too. I only wish that we Sri Lankans could protect our beautiful islands and tourist attractions with similar determination and selfless responsibility.
Our time at the Jelly fish lake was a mind-altering, once in a lift time experience, never to be forgotten. It would be an understatement to say that it was a ‘weird’ feeling to swim among millions of Jelly fish ranging in size from tiny few millimeter sea rascals to ones as large as my palm (take my word for it – my palm is big).
Ok, I hear you. I hear you. Weren’t the ‘jellies’ poisonous? Do you hate life so much that you would throw yourself into a lake swarming with millions of the most feared sea creatures? I would like to raise my head high, wear my underwear over my pants (super-heros do that by the way), and say that I fear nothing and laugh in the face of danger, but the reality is that I am a terrible swimmer and the Jelly Fish were as dangerous as a school of sedated goldfish.
Why you ask? Simple. They live in a lake absolutely surrounded by mountains, so for millions of years they have never had to suffer from any natural predators and since they do not have to protect themselves, over time they have completely lost their ability to sting. Without natural predators to balance population, the Jelly fish at the Rock Island lake are a little like India. They multiply in millions and there is no stopping them.
The only way they can die is from old age or unless a tourist goes ballistic and smacks the “jelly” out of them with a baseball bat. The latter is unlikely with protection of this natural wonder at an all time high.
A unique and mind boggling illustration of an organic disparity in the natural food chain.
All in all it was a wonderful trip. We went with some great people. They were really friendly and looked after us so well. Also, fortunately for the other members of our group, I didn’t have to wear my underwear over my pants. A superheros work is never done.
A once in a life time experience which I will most certainly never forget.
(This text was tuned by my best friend Harsha)
posted by 88Pro / Thursday, July 22, 2004
I was starting to worry more and more that Sun might eventually go out of business, since nothing was going right for them for sometime now. They are loosing market share on the server market, they are not getting their act together on the Java Tools side, they seems to be messing up and making the J2EE more and more complex as the versions goes up, and entire world seems to shout that J2EE is more complex than it should be.
How to blow a billion - or two
But today I was happy to read they are returning to
profitability. It’s not much but it's hope. Most of the big players like IBM and Apple were having cash flow problems and now they have repositioned themselves. Sun missed the Linux buss, ok that’s understandable, how can they afford to miss the Java buss? Sun primarily being a research company, I am sure they can find their way out with something really cool. I am waiting to see whether they are going to build their own buss and make sure they get in or they are going to catch another buss, like IBM did with Linux and Java? Let’s wait and see.
posted by 88Pro / Wednesday, July 21, 2004
Shooting Date/Time
7/12/2004 6:35:43 PM
Shooting Mode
Landscape
Photo Effect Mode
Vivid
Tv( Shutter Speed )
1/15
Av( Aperture Value )
5.0
Metering Mode
Evaluative
Exposure Compensation
+1
Everything else was in Auto while I increased exposure compensation by 1 Stop and made the Photo Effects to Vivid. After looking at the aperture at 5.0, I am not sure how it would have turned out if I had opened it up to maximum aperture at 2.8. May be this vibrant blue would have gone away with more light coming in I guess.
posted by 88Pro / Tuesday, July 13, 2004
I think we have mastered the Chicken Curry recipe given by my manager who is also an expert cook. Here is the outcome of our application of the recipe to Palauan chicken breasts, which I captured with my Canon S50.
Here I am going to copy the recipe as it is for my future reference and anybody else interested.
Roaming Chicken 3Gpp
500g boneless chicken
20g Flora margering
3 cloves of Garlic
1 cube of Chicken stock
2 table spoon curry powder
3 table spoon of any ketchup
1 table spoon soy sauce
4 table spoon unsweetened yoghurt
1/2 cup of water
lemon grass
Olive oil for frying
Wash the chicken and leave it till the water leaves out of the meat. Cut the chicken into 1 inches pieces. Heat the pan and add little bit of Virgin Olive oil (If Virgin not available use unvirgin or virginless olive oil) and fry the chopped garlic till it gets golden brown. Then Add 20g Flora and take out the pan once it is melted. You will get a yellow melted margarine with garlic flavored (This can be called as hot butter sauce). Now add this hot butter sauce into the pan which has the chicken pieces in and stir it until all the pieces are soaked in the hot butter sauce.
Add the curry powder, soy sauce and the ketchup, mix and keep it for 30 mins. Heat the pan add a bit of Virgin olive oil, put the mixture and cook until the chicken is cooked (10 mins). If you feel that it needs water (if it gets stuck with the pan), add yoghurt and cook till all yoghurt turns into thick gravy. Add more chili powder if you need, but this has to be done during the marination process.
Now the chicken will get cooked or fried from the oil that comes out of yoghurt. Lower the flame (don’t shut completely) and keep it for 10 mins. Disolve the chicken stock in water and add lemon grass and then cook for another 5 - 10 mins. If you want more thicker gravy leave another 5 mins lid opened.
AFR (After Food Reaction): Body heat can induce unpleasant (for elderly people.. Pleasant for younger generation) dreams.
Remedy: Who knows ???
Caution: Don’t eat more heaty food like pine apple, dates, pistachio and other nuts
posted by 88Pro / Saturday, July 10, 2004
Lucent switch is fascinating. When I was working with Nortel DMS 10, I thought that CUI was crap, but Lucent takes the crown. It looks like the primary motivation behind designing the Text Mode interface was to make it as difficult as possible for automated provisioning.
When logging to the switch, it takes you to “Control and Display Command Mode”. One has to press F3 in order to get to the “Craft Shell Mode” where the single line commands for switch provisioning can be entered.
Now when it comes to automating, I was puzzled as to how I am going to simulate a F3 key press using code. First thing I had to figure out was what’s the ASCII value for F3 and one thing I was sure about was it was not just a single ASCII value. Those days when I was learning programming using PASCAL I remember the arrow keys had two ASCII values.
Try 1
I wrote a Delphi program which will capture key press. It gave me the value 114 which is equivalent to “r”. It turned out to be not even close.
Try 2
Downloaded the PASCAL 5.5 compiler and wrote a program to capture F3 and print the ASCII values. This time the DOS command window seems to be interrupting the F3 because F3 in Dos means repeat what was typed in previously. Failed again.
Try 3
I figured out that
java.awt.event.KeyEvent class had the facility to check whether the key pressed was F3. Opened the source code and checked and it also had 114 for the F3 value. Failed again.
Try 4
Downloaded the
VT100 Specification, in order to figure out what codes are being passed out for F3 and couldn’t figure out from that either.
Then when I was talking to this switching guy over here he was telling me
Procomm Plus, terminal emulation software used by them allows them to change the F3 to some other key. That didn’t make much sense to me but then he showed me how the mapping can be done.
OK from that I figured out that F3 key sequence the terminal emulator was sending is “^[OR” (Escape followed by [OR).
From the VT100 specification I downloaded I saw an example
So that made me translate ^[OR to 27 91 79 82. However this combination didn’t seem to work. Later I realized it is suppose to be only 27 79 82.
You may ask why I am writing this, hmmm, always in cases like this my research assistant (Google) has helped me to figure out answers. However, not this time. Hope when someone has the same problem to crack next time they will find this page.
F1 = ^[OP
F2 = ^[OQ
F3 = ^[OR
F4 = ^[OS
posted by 88Pro / Friday, July 09, 2004