Monday, 1 April 2013

Editorial


Last month was indeed an eventful month for the year 2013 so far. Some of us were busy practicing for Family day performances, few of us were busy with arrangements and the rest were all excited to be part of the family day. I hope all of you had a blast on that evening. We have a write-up from Praveena about the event (in this issue), for those of you who missed the event you need not be disappointed as you shall can get update and those were part of the event, can re-live the moment.

Lot has happened on the political front which we as common man would be interested in. DMK withdrew its support to UPA 2 government at the centre. Now MMS (read Manmohan Singh) team have to rely on more Ms (read Mulayam and Mayawati), it has to be seen if these Ms turn to be real Yama (read M). Mulayam Singh has already sounded off the bugle of early elections for the Parliament. Taking the cue BJP has come out with its so called Team 2014. So all mango people get ready!

Another thing that has been debated long and many times is - pardon for Sanjay Dutta a.k.a Munna bhai. So much has been said and debated that it caused tuff guy like Sanjay Dutt to break down in the press conference or did he need a zappi? J This month we would like to resume one practice that we had dropped for last 3 issues – polls. We bring to you a poll on this very same question, request all of you to vote.

Enough of politics, this magazine brings to you huge share of knowledge. We have a tribute to the great Master Blaster. We have inputs on Dutch Culture by none other than Ankur. Sandeep introduces us with Fort Rajgad, expect more information about forts in next issues. Pradnya and Sanket pick up from where they left last on their articles on Paper Quilling and Windows 8 programming, respectively. Nilesh introduces with AT commands for modem. Nimisha and Saneea give us some yummy yummy, mouth-watering recipes.

Finally I would sign off with an appeal to all our readers, to put on your writing hats and contribute for the magazine.

Happy reading and writing!

From Management Team’s desks

Fore mostly we would like to thank all who organized, who participated and who performed and made Family Day event a huge success. Our interactions with family members in attendance have been really good. They enjoyed the evening and appreciated efforts that have gone in arranging the event. Some went on records appreciating the performances put up by all of you. Martin has specially flown in for being part of Family Day. He was thrilled to see performances, meet families and got a glimpse of Indian culture and family values. At the end he expressed that he was excited to be part of conversations with various family members.

At the same time will like to congratulate all those who were nominated and awarded for their exceptional performances throughout last quarter, semester and year. People who have been long associated with Decos were also given a token of appreciation for their long service.

Last month was very busy month for all of us because of appraisal meetings. We would like to thank you all for participating constructively in this process. We are happy that the process was taken up and finished in time. Credit for this goes to you all.

We would like to apprise you all about new business lead from our existing customers - Fact 24 and Munro. Fact 24 has requested us to submit a proposal for mobile application. During Munro customer Sander’s India visit, 4 new projects have been discussed; out these one is mobile application. In addition to these projects, Architects team is working on few other proposals that may result in new business.

In March we achieved one more milestone by submitting a mobile app - Opportunity Tracker Tool (developed for Tomfor) in Apple's app store. At the time of publishing this issue of Envision it was pending review at Apple and we are hopeful this would be released in App store next month.

Family Day 2013

- Praveena Sail

Our Family Day this year was a grand affair!! The royal ambience of Hotel O proved to be a perfect setting to gather & share moments of joy with family.
Each year, we look forward to this day when we gather not as employees & colleagues, but as members of a Big Happy family. This day reminds us of the bond that we share, the unconditional support that we extend to each other & the always there spirit of our family.
Although our family day each year is special, this year the variety of programs made it especially memorable. The guests arriving were all smiles with the gifts, flowers & toffees which the welcome committee ensured were in plenty. The function began with humble prayers to the almighty by lighting a lamp. Srinivas being the host took the audience through the entire event with details wherever required & also share some light hearted moments with everyone. Martin shared some vital information about the Organisation with everyone. This was followed by Ankur’s introduction to the fun side of the Organisation. Both of them acknowledged the support of all the family members.
Our family day is also an opportunity to recognize & value employees’ contributions in their own fields & thus towards the organizational development. The half yearly, quarterly & annual awards were given away to the rightly deserving employees. A special acknowledgement with auspicious silver coins & certificates for the employees who have been associated with the Organisation for more than 5 years was a bonus. After these formal functions, began the cultural event. An amazing sequence of wonderful performances kept all the family members hooked to their chairs. The highlight of the cultural event however was the fashion show & fancy dress put by the children. Brilliant grace & confidence showed while they walked up the ramp.
The other performances included singing performances by Sandeep Yadav, Rahul Bhushan, Akshay Muley, Deepali More & Jaishree Bhautmage. The girls’ gang & the boys’ team mesmerized the audience with their entertaining dance performances. Dipti ensured no one moved while she rocked the stage with her dance. The Family day came to an end by a sincere vote of thanks by Mitesh & of course with a large spread of steaming dinner.
The Family day ensured we all spent quality time with each other & was definitely a huge hit. All in all, a day well spent it was.

Family Day 2013 Photos







Awards and recognition

At the family day 2013 few of us were awarded for their exceptional contributions. Here are the list of people who won awards

Living Decos - awarded annually
  1. Praveena Sail
Best Customer Satisfaction - awarded biannually
  1. ITyX Team
Best Anchor - awarded biannually
  1. Anita Swarup
Best Quality Team - awarded biannually
  1. GNO Team
Star of the Quarter - awarded quarterly
  1. Vaibhav Shitole
  2. Parag Bhangale
Walking the extra mile - awarded quarterly
  1. Hitesh Patadia
  2. Bhushan Patil
Best Rookie - awarded quarterly
  1. Zishan Khan
Special Mention
  1. Parashar Smart
  2. Yogesh Chaudhary
Long term service award (awarded for service minimum of 5 years)

  1. Yogesh Choudhary
  2. Rajesh Patil
  3. Ankur Parikh
  4. Balbir Singh
  5. Sharjeel Ahmed
  6. Parashar Smart
  7. Vijay R. Kankhare
  8. Prashant Baban Mandhare
  9. Mitesh Kadvani
  10. Sunil Chauhan
  11. Sanjay Dhende
  12. Nikunj Banker
  13. Kumar Neelabh
  14. Sanket K Mistry
  15. Kanu Dhakhada
  16. Sandeep Pandit Pawar
  17. Sudhir D Bhagat
  18. Dharmesh Makwana
  19. Niranjan Patel
  20. Praveena Sail
  21. Himanshu Pandey
  22. Hitesh Patadia
  23. Suraj Punugade
  24. Rashid Ali Ansari
  25. Nitin Ghaghada


Congratulation to all the award winners!

Hearty congratulations to Vaibhav Shitole for completing his OCPJP (1Z0-851) certification.

Rajgad - King of Forts


The literal meaning of the word Rajgad is the king of Forts. It was capital of the Maratha Empire (Hindavi Swarajya) ruled by  Chhatrapati Shivaji Maharaj almost 26 years. Rajgad Fort is one of the grand forts of the Sahaydris. Being trekkers delight the fortifications of Rajgad fort built with the treasure found on the adjacent Torna fort is for most parts still intact. Rajgad fort is a must visit for a trekking enthusiast especially if you are from Pune.    This majestic fort offers a panoramic view of the surroundings and the best time to visit the Rajgad fort is after monsoons. The sturdy construction of the fort makes us realize the grandeur and the glory of the famous Maratha Empire in Maharashtra. Rajgad is tristar shaped with each end having the grand machis and the bale killa or citadel at the center. The diameter of the fort at the base is 40 Kms and hence difficult to capture.


History of the fort:
During the Bahamani reign, Rajgad was called “Murumbdev”. In 1490 Ahmed Bahiri, founder of the Nizamshahi dynasty of Ahmednagar, conquered the fort. The Nazamshahi ruled the fort for the next 125 years with no attack on the fort.

It was Chhatrapati Shivaji Maharaj who renamed Murumbdev as Kille Rajgad. Shivaji stayed on Rajgad more than any other forts in Maharashtra and Rajgad has witnessed many a historic moments. The birth of Rajaram Chhatrapati, the death of Shivaji's Queen Saibai, the return of Shivaji from Agra, the antyayatra of Tanaji Malusare to his Konkan village, the burial of Afzal Khan's head in the Mahadarwaja walls of Ballekilla, the walls of Rajgad has many tales to tell! 

Main parts of the fort are:
Citadel / Balle-Killa:
Bale Killa is the highest point on the Rajgad fort. There are more than one route to the Bale Killa that one can take. The most used path to the Bale Killa is the deviation on the way to 'Suvela machi'. The climb up the Bale Killa is slightly tricky, though protected with railings one needs to be very careful while climbing up the bale killa. From its summit one can see the entire Rajgad fort. 'Bale Killa' is the highest point of the fort which has remains of residential buildings, water cisterns and caves. One can see the whole fort and the vast surrounding expanse. It’s easy to spot Torna, Sinhagad and Purandar from Bale Killa. There are three plateaus on Rajgad Fort - 'Sanjeevani' , 'Suvela' and 'Padmavati'. 'Nedh' giant hole in the rock carved by the force of wind is on the 'Suvela Machi'.



Suvela Machi:
After Shivaji Maharaj captured the Murumbdev fort, he constructed a strong and sturdy machi on the eastern part of the fort and named it as Suvela machi. Suvela machi was constructed in three stages. The machi narrows down along its length. At the start of the machi, there is a hill which is called as ‘Duba’. As you take a left from ‘Duba’, and proceed ahead, you get to see various military camps of the past. To the left you will notice an idol of Lord Hanuman which is facing south, and a cistern near it. The verandas near to it were owned by Yesaji Kank, Tanaji Malusare and Shlimbkar, who were Maratha sardars. The way straight ahead from this place leads to the 2nd stage of machi whereas a leftward route leads to Kaleshwar fortified place. A little ahead from this fortified place is a courtyard on right hand side. From here the actual fortification starts.

The fortification is bifurcated into two stages and at the end of each stage, is a fortified place, which is armored one. There is also a provision for underground escape paths. As you proceed towards the 2nd stage, we get to see a rock having a hole of approximately 3.0m in diameter. This rock is known as ‘Nedh’ or ‘Hatti Prastar’. At the base of this rock, there is an idol of Lord Ganesha and through it; you reach the Gupta Darwaja or the secret doorway. This door is also known as ‘Madhe’ darwaja. 

Sanjivani Machi:
Then came the construction of Sanjivani Machi also done by Shivaji Maharaj. The machi extends approx. 2 ½ kms long and has been constructed in three phases. For every stage of construction, an armored fortified place was being provided. As you climb down the first stage of machi then upon traveling backwards towards North, you get to see a trio of fortified places being constructed. It is believed that there could be huge cannons in existence during those glorious days.

One gets to see many cisterns on this machi. Also remains of castles can be noticed. Sanjivani machi has in all 19 fortified places. It also has an underground escape route. It leads directly to outermost fortification.

Trek Routes:
The fort is 42 km to the south west of Pune, about 15–16 km west of Nasrapur, in the Sahyadris range. The trek route to Rajgad is moderately difficult. The duration of the trek would be approximately 3hrs depending on an individual’s pace of trekking. The Gunjawane 'Chor Darwaja' route is the most popular trekking route & shortest to Rajgad. Bale Killa is further ahead and the climb up the Bale Killa though protected with railings is slightly more difficult.

Food and Accommodation:
There are no hotels available nearby and hence you will have to arrange your own food. Ample drinking water is available in the Padmavati Lake on the fort. As for the accommodation, you can merrily stay in the Padmavati Temple on the fort.

A tribute to Sachin Tendulkar (My Hero, Idol)

- Chirag Desai


“We have seen many heroes, we have seen many legends but there is only one Master blaster “.

Yes, you guessed it right! I am talking about none other than Sir Sachin Ramesh Tendulkar.

We call him “God of cricket” and I have never wondered why we call him so because I have seen him perform miracles on the field often for the country.

Paying tribute to Sachin Tendulkar in any way is a matter of pride. When I searched on Google about Sachin Tendulkar, I found thousands of different tribute articles and I suddenly started wondering how to draft something different. But the answer to that came from my Facebook account. (Wink)

As we all know that fans around the world always do some unusual things for their heroes. I can also count myself as one among his numerous fans. I have been collecting photographs of every century he  has scored with its details. It is not that unusual but still takes a lot of effort and passion to do it continuously for more than 15 years. I started maintaining these records and photos in my little school notebook which was replaced by a computer and then a laptop to my Facebook account where I have uploaded an album which has 100 photographs of hundred centuries he has scored till date.

So, I thought that this is the best way to pay tribute to him and that is how I will do it here as well. :)

Sachin Tendulkar has created countless records out of which the record of making 100 centuries (now, 101) in international cricket is by far the best. I can think of nobody getting even close to that record. But, Sachin does not think so. He said in an interview that Virat Kohli is the one he sees beating that record. :)

So just sit back and enjoy as we walk through the career records of our legend over the years. He has scored through this video in which I have put together all the photographs that I have collected.



“WOW”. I am sure that is what you must have said after watching the video. I get goose bumps every time I see him play.

Sachin Tendulkar has millions of fans all over the world. But, I wish I could be “Sunil Kumar Choudhry”. If you are wondering who that is then let me tell you that he happens to be the biggest fan of Sachin Tendulkar. As a result of that, the legend promised him that he will get tickets to all international matches that India play in India. Sunil Kumar Choudhry recently said in an interview that Sachin has kept his promise and he gets tickets for the matches before anyone else. What a lucky man! J

I also consider myself a bit lucky because I met him once and I sat beside him at a VIP’s house and I still remember the line I said to him. I said “E Sachin, taru autograph aap” which means “Hey Sachin, give me your autograph (rude)”. He just smiled at me, pinched my cheeks and signed my little bat. I was around 10 years at that time. I still have my plastic bat on which he signed that night. Lucky, ain’t I? (Wink)

Sachin has won many national honors which includes Padma Vibhushan, Padma Shri, Rajiv Gandhi Khel Ratna award, Arjuna award, Cricketer of the year awards from ICC and many more and still he is the most humble man in the cricketing fraternity. Different cricketers around the world have praised his humbleness both on and off the cricket field.

A lot of cricketers have retired when they were at the peak of their career and also when the team has done well in the series or something like that. So, a lot of experts advised Sachin to retire when India won the World Cup in 2011 which was his ultimate dream. But for all those people, Sachin had an amazing answer. He said in an interview that “Why should I retire when I am in form and I am scoring runs. This is the time to serve my nation better when I am playing well.” What a beautiful answer. This shows his passion for the game as well as his love for the nation.

Finally, Sachin announced his retirement from One Day Series’ on 23rd December last year, which came as a big shock to his millions of fans including me of course. His motive of retirement from One Day Series’ and T20 format is not that he has lost passion for the game but because he wanted to promote young talent and he wanted to build the team for the World Cup which will be playing in Australia and New Zealand in 2015. He conveyed this message to the BCCI through the retirement letter. I still feel sad that I will never be able to see that “10” number jersey again on the field for the One Day matches but then I calm myself down thinking that he will play the test matches for India.

We should feel proud and be thankful to God that we lived in his playing era. And I can write endless things about him ...but, I will have to conclude and I will do it with one of the quotes that someone had said about him.

“Commit all your sins when Sachin Tendulkar is batting because even God will be busy watching him bat.” :)

Long live Sachin! Cheers.



Dutch Culture - An insight

- Ankur Parikh


What is Dutch culture?
As I have been travelling regularly to Europe, it was possible for me to experience the different cultural and behavior aspects, especially Dutch.  Though you start to get used to some of these aspects, it is still possible for me to list down some of them. 

It is important for me to put a disclaimer that these are my own observations, may be limited to particular event/person, and may not be generalized to every individual/event.

High confidence
I find most (probably all) Dutch/”Western Europeans” highly confident in their behavior.  Such behavior could be due to their upbringing:
  • My colleague Marc’s daughter saves from pocket money and at times helps her grandmother (to get a Euro or two) to buy new iPod. Next on her list is iPhone.  She is 8 years old as of today.
  • On queen’s day, they have a tradition of organizing a market, where children can sell their old toys for 1 or 2 EUR.  They are even happy to negotiate to make a deal.  It was my first experience of being in Netherlands on Queens’ day to experience this.
  • Never saw a mother of Dutch child helping her child to eat meal.  Even when child is spilling food on cloths or their hands/face get dirty.  Most of the parents would not ask, if the child is hungry.  Children need to ask for food themselves, if they are hungry.
  • When they reach the teenage (between 14 and 18) all parents are aware that sooner or later, they will leave the home to be independent. 


Critical towards quality
Quite commonly, I have seen Dutch people criticize almost anything to a higher expectation. 

Dutch railways has on-time performance rate of “minutes” as compared to Japanese on-time performance rate of “seconds”.  Their public bus service is of excellent quality, along with great respect, friendly nature and high quality service by driver.  Still, I have seen (too) many Dutch people being critical towards their public transport system.

I can share many such examples of similar criticism related to their traffic congestion, weather, gadgets, governments, innovation and many more subjects.

Vacation is important
They consume their bulk of holidays during the summer period.  One of Paul’s friend (and now mine too) Paul Baak is planning for his August 2013 vacation in India since November 2012.  Our colleague Roel, Gert-Jaap, Joost and others enjoy skiing and goes for it regularly every year, even when at times family may not find it convenient to join.  Vacation is not considered as visiting family, attending marriage or spending time to relax at home.  4 weeks of July/August (summer time) are important for them.  Except during the period of huge financial crisis (like 2008-09), most people would go for such vacation, to enjoy their family time, recharge their energy and have an experience of seeing a new place.  Most of the Dutch colleagues have finalized their vacation destination for July in the beginning of the year.

Need Variety and Ready to Try
When one of the colleagues learned that people go to Gym for 6 days a week, he was surprised.  When I asked reason for being surprised, he expressed that he would prefer his sport/exercise routine to have variety to avoid boredom.  Thus, he would go for jogging when sun is shining, play tennis for one day a week, go for swimming on one of the days and go to Gym for one day (or max two).

Same is the case with their lunch in office, which they buy from super market every day.  They get about 30 different choices/varieties of bread and like to try them instead of being stuck to one choice.  Similarly, they seem to have tried more Apps than most of us (please exclude Sanket and Balbir from the list :)).

When I was in Netherlands recently, went out for dinner with a friend.  He searched for vegetarian food options and selected one (http://www.bontekraai.nl/), which he had never tried.  The place was not flashy and shining, but we decided to try it.  And, it was a good experience of enjoying home-made beer and vegetable curry over there.  I would confess that with a Dutch friend in India, I would have resisted in trying in a similar option in Pune.

And many more….
Though, it is possible add many more details on cultural and behavioral aspects, above are most noticeable ones.  I hope that those who visited Netherlands would be able to identify with some of them.

Developing Windows 8 Store Application: App Life Cycle, App Data and App State


- Sanket Mistry

In Part 2, we saw essential controls to use while developing Windows Store Application. In this article we will be touching some core fundamentals of Windows store. We shall look at Application Life Cycle in Window Store since, that is something new and as a developer one should carefully handle it. Then we will take a look at application I made during my learning on Windows Store App. At last we will see new keyword supported by C# i.e. async.

App Life Cycle and State

In Windows 8, you can launch a bunch of apps and switch between them without having to worry about slowing down the system or running the battery down. That's because the system automatically suspends (and sometimes terminates) apps that are running in the background for you. A well-designed app can be suspended, terminated, and re-launched by the system and seem as though it were running the entire time.

When you start your app it goes into running state. An app can be suspended when the user switches away from it or when Windows enters a low power state. While your app is suspended, it continues to reside in memory so that users can quickly and reliably switch between suspended apps, resuming them. When your app is suspended and then resumed, you don't have to write any extra code to make it look as though it had been running the entire time. But Windows can also terminate a suspended app at any time to free up memory for other apps or to save power. When your app is terminated, it stops running and is unloaded from memory.

When the user closes an app by pressing Alt+F4 or using the close gesture, the app is suspended for 10 seconds and then terminated. Windows notifies your app when it suspends it, but doesn't provide additional notification when it terminates the app. That means your app must handle the suspended event and use it to save its state and release its exclusive resources and file handles immediately.

To create a good user experience, you want your app to look like it never stopped running. The app needs to retain any data the user entered, settings they changed, and so on. That means you need to save your app's state when it's suspended, in case Windows terminates it, so that you can restore its state later. There are two types of data for you to manage in your app: app data and session data. Windows Store provides an API for managing the same via SuspendManager. We will see how we can use it in Windows Store App.

When you create new Windows Store Application, IDE will automatically add following line that will make App enabled for saving/loading state.

            if (rootFrame == null)
            {
                // Create a Frame to act as the navigation context and navigate to the first page
                rootFrame = new Frame();
                HelloWorld.Common.SuspensionManager.RegisterFrame(rootFrame, "appFrame");
            ...

Windows provides a Windows.Storage.ApplicationData object to help you manage your app data. This object has a RoamingSettings property that returns an ApplicationDataContainer. You can use this ApplicationDataContainer to store app data that persists across sessions. Let's store the user's name in the roaming ApplicationDataContainer as the user types it in.

1.  Windows.Storage.ApplicationDataContainer roamingSettings =
2.                  Windows.Storage.ApplicationData.Current.RoamingSettings;
3.              roamingSettings.Values["EmailAddress"] = emailInput.Text;
4. 

Session data is temporary data that is relevant to the user’s current session in your app. A session ends when the user closes the app using the close gesture or Alt + F4, reboots the computer, or logs off the computer. You restore it only if Windows suspends and terminates the app. You need to save the navigation state of the app Frame, so the app can be restored to the same page is was on, and so the SuspensionManager knows which page to restore the state of. You also need to save the state of the page itself. This is where you save the date. You use the SuspensionManager class to save session state in the Application.Suspending event handler.

When you create new Windows Store App, It creates SuspensionManager class for you, so you would not have to remember all these really. However, it is up to us to decide what part of App data you would like to store. Yes, we have save the state now, but How to restore it? Let’s take a look at restoring data we saved.

Once, your app gets activated, you can restore App State from LoadState in each page.

1.  protected override void LoadState(Object navigationParameter, Dictionary<String, Object> pageState)
2.          {
3.              // Restore values stored in session state.
4.              if (pageState != null && pageState.ContainsKey("greetingOutputText"))
5.              {
6.                 greetingOutput.Text = pageState["greetingOutputText"].ToString();
7.              }
8. 
9.              // Restore values stored in app data.
10.              Windows.Storage.ApplicationDataContainer roamingSettings =
11.                   Windows.Storage.ApplicationData.Current.RoamingSettings;
12.              if (roamingSettings.Values.ContainsKey("userName"))
13.               {
14.                   nameInput.Text = roamingSettings.Values["userName"].ToString();
15.               }
16.          }
17.  

As shown above, you can then restore state from RoamSettings/Localsettings. OK, Now we have done saving state and loading state. But How to de test it? We can do so by simulating states from Visual Studio.


You can test various state and its transition directly. This gives developer a good control over App and its Life Cycle. Once must be very careful in choosing what amount of Data to save inside date.

Async is your partner!


Windows Store App is always about user experience. And Microsoft is promoting usage of async as and when required in Windows Store Application.

The async modifier indicates that the method, lambda expression, or anonymous method that it modifies is asynchronous. Such methods are referred to as async methods. An async method provides a convenient way to do potentially long-running work without blocking the caller's thread. The caller of an async method can resume its work without waiting for the async method to finish. Typically, a method modified by the async keyword contains at least one await expression or statement. The method runs synchronously until it reaches the first await expression, at which point it is suspended until the awaited task is complete. In the meantime, control is returned to the caller of the method. If the method does not contain an await expression or statement, then it executes synchronously. I found nice simple example on MSDN for using async.

// Three things to note in the signature: 
//  - The method has an async modifier.  
//  - The return type is Task or Task<T>. (See "Return Types" section.)
//    Here, it is Task<int> because the return statement returns an integer. 
//  - The method name ends in "Async."
async Task<int> AccessTheWebAsync()
{ 
    // You need to add a reference to System.Net.Http to declare client.
    HttpClient client = new HttpClient();
 
    // GetStringAsync returns a Task<string>. That means that when you await the 
    // task you'll get a string (urlContents).
    Task<string> getStringTask = client.GetStringAsync("http://msdn.microsoft.com");
 
    // You can do work here that doesn't rely on the string from GetStringAsync.
    DoIndependentWork();
 
    // The await operator suspends AccessTheWebAsync. 
    //  - AccessTheWebAsync can't continue until getStringTask is complete. 
    //  - Meanwhile, control returns to the caller of AccessTheWebAsync. 
    //  - Control resumes here when getStringTask is complete.  
    //  - The await operator then retrieves the string result from getStringTask. 
    string urlContents = await getStringTask;
 
    // The return statement specifies an integer result. 
    // Any methods that are awaiting AccessTheWebAsync retrieve the length value. 
    return urlContents.Length;
}

In order to call async method, you may use await keyword as shown below.
string urlContents = await client.GetStringAsync();
 
The await operator is applied to a task in an asynchronous method to suspend the execution of the method until the awaited task completes. The task represents ongoing work. The task to which the await operator is applied typically is the return value from a call to a method that implements the Task-Based Asynchronous Pattern. Examples include values of type Task or Task<TResult>.

You can refer to http://msdn.microsoft.com/en-us/library/vstudio/hh191443.aspx for more details on async operator. That is for this article, I will see you again with more Windows Store Goodies. Happy Coding! :)

AT Commands for Modem


- Nilesh Pasalkar

AT commands are used to control MODEMs. AT is the abbreviation for Attention. These commands come from Hayes commands that were used by the Hayes smart modems. The Hayes commands started with AT to indicate the attention from the MODEM. The dial up and wireless MODEMs (devices that involve machine to machine communication) need AT commands to interact with a computer. These include the Hayes command set as a subset, along with other extended AT commands.

AT commands with a GSM/GPRS MODEM or mobile phone can be used to access the following information and services:
  • Information and configuration pertaining to mobile device or MODEM and SIM card.
  • SMS services.
  • MMS services.
  • Fax services.
  • Data and Voice link over mobile network.

Now we will learn about how to send & receive SMS using modem AT commands.
To send SMS and receive SMS we can use following commands in sequence…
  • Initialize Modem to open port.
  • Set SMS center number using AT command.
  • Send SMS either using Direct SMS send or Queue up SMS in SMS Queue.

Modem initialization:
Open port on which the modem is connected.
We can open the modem using serial port communication, we can use the following settings of serial port to open connections with modem.
Baud rate = 19200
Data bits = 8
Stop bits = 1
Com parity= 0

The above mentioned settings have been tested on Siemens MC35i modem.

Set SMS center number:
Once you initialize then open the port connection with the modem. You have to set the SMS center number of provider to send SMS.

You can use following the AT commands to set SMS center number…

Syntax
Test Command
AT+CSCA=?
Response(s)
OK
Read Command
AT+CSCA?
Response(s)
+CSCA: <SMS centre number> OK
Write Command
AT+CSCA=<SMS centre number>
Response(s)
OK

Command Description
Write command updates on the SMSC address, through which mobile originated SMs are transmitted. In the text mode, Setting is used by send and write commands. In PDU mode, setting is used by the same commands, but only when the length of the SMSC address coded into <pdu> parameter equals zero.
Notes
  • In case of using no parameter after AT+CSCA= the content of <sca> will be deleted
  • This command writes the service centre address to non-volatile memo
  • The SMS service centre address should be entered as specified by the service provider

Send SMS:
After setting SMS center number we can send SMS to receiving party using AT command as below…

Test Command
AT+CMGS=?
Response(s)
OK
Write Command
If text mode (see AT+CMGF=1)
AT+CMGS=<da>[, <toda>]<CR> Text can be entered. <CTRL-Z>/<ESC>
Response(s)
+CMGS: <mr>[, <scts>]
OK
If sending fails see notes below.
Write Command
If PDU mode (see AT+CMGF=0)
AT+CMGS=<length><CR> PDU can be entered. <CTRL-Z>/<ESC>
Response(s)
+CMGS: <mr>[, <ackpdu>]
OK
If sending fails see notes below.

Command Description
The write command transmits a short message from TE to network (SMS-SUBMIT).
After invoking the write command wait for the prompt ">" and then start to write the message. To send the message simply enters <CTRL-Z>. After the prompt, a timer will be started to observe the input. To abort sending, use <ESC> hence  abortion is acknowledged with "OK", though the message will not be sent. The message reference <mr> is returned to the TE on successful message delivery. The value can be used to identify the message in a delivery status report provided as an unsolicited result code.

There are few more useful AT-Commands as below…

AT+CMGD:
Description: This command can be used to delete the SMS received.
Syntax: AT+CMGD <index>
Test Command
AT+CMGD=?
Response(s)
OK
Write Command
AT+CMGD=<index>
Response(s)
OK
ERROR
+CMS ERROR
The specified indexed message will get delete after execution of this command.

AT+CMGL:
Description: This command list down the message received as per mentioned criteria in parameter <stats>

Test Command
AT+CMGL=?
Response(s)
+CMGL: (list of supported <stat>s)
OK

We can read or list down SMS from their status as below…
Description
text mode (<mode>=1)
Received unread messages
"REC UNREAD"
Received read messages
"REC READ"
Stored unsent messages
"STO UNSENT"
Stored sent messages
"STO SENT"
All messages
"ALL"


You can also list the message specifying number.
Test Command
AT+CMGL=?
Response(s)
+CMGL: (<index>/<length>)
OK
e.g.
AT+CMGL=10
<index>
Integer type; value in the range of location numbers supported by the associated memory

<length>
Message Length
Integer type value indicating in the text mode (AT+CMGF=1) the length of the message body <data> (or<cdata>) in characters; or in PDU mode (AT+CMGF=0), the length of the actual TP data unit in octets (i.e. the RP layer SMSC address octets are not counted in the length) In text mode, the maximum length of an SMS depends on the used coding scheme: It is 160 characters if the 7 bit GSM coding scheme is used, and 140 characters according to the 8 bit GSM coding scheme. If the SMS message format is ''text mode'' (AT+CMGF=1) and the character set is set to ''UCS2'' with AT+CSCS and the SMS is also coded as "UCS2" (see <dcs> of AT+CSMP), then the length is in octets instead of characters.