Developers working on Symbian code have always had problems when it came to testing their apps.  The process is quite a bit cumbersome:

  1. Build your code – Cross compile it for ARMV5 / ARM-GCCE Release
  2. Make your sis installer (unsigned)
  3. Upload the SIS to symbiansigned.com using the Symbian Online Signed program
  4. Click on the confirmation link in your email
  5. Wait for your app to be signed by symbian and recieve the email
  6. Download the app
  7. Install and test (mostly only to realise that you have made the mistake of not installing theCActiveScheduler::Add(this) in your ConstructL. ;-)

The process works… nevertheless, its very very very cumbersome and timeconsuming.  And the debug that you are left with is plain text-statements that you write to a log file and dump it onto the filesystem.  While this method may be good enough for some small apps using the in-built emulator, testing GSM activity and live testing of the application is not quite possible or comfortable there.

There is however, another really good way to debug your app and step thru code and read symbian variable values right from the comfort zone of your PC. Say hello to ODD or On-Device-Debug.

On-Device Debugging has been a prominent feature of Symbian IDE’s right since the Metrowerks CodeWarrior days! Yes, its been there… but back then, prior to Symbian OS 9.0 / S60 3.0, it was used more for JTAG based debugging.

Now, with Carbide, virtually any app can be set to debug mode and tested with ODD. And in this post, I will show you how:

Requirements: ;-)

  1. Carbide 2.0 – The eclipse based IDE is at v2.0. Its free and is absolutely amazing to use. Next best thing since notepad for writing symbian code!!!
  2. S60v3/S60v5 device – For the purpose of this article and impending demo, I am using a Nokia 6210 navigator but any S60v3/S60v5 device should work. (Ideally this is the case but I do not have non-Nokia S60V3/S60v5 devices to test and confirm it…
  3. USB cable / Bluetooth – The code you want to test runs on the device… and you need something to transfer data between the PC and the device… So BT / USB data cable it will be.

SETUP:



And the Steps for getting your ODD setup in place:

First, install Nokia PC suite on your PC.  This dude is important as PC suite contains the basic connectivity drivers for your device.  Without that, your phone wouldnt be able to connect to the PC.

Next up, Fire up carbide. The On-Device debug mode is needed to be setup from the help menu. So… head over to Help -> On-Device Connections.On-Device Connections...You will be presented with a menu like so:New ConnectionSelect between Bluetooth and USB for connecting to your device. The other 2 connectivity methods Serial and TRK2.x are, well, not covered in this tutorial. But just a heads up, Serial connection is when you have a serial cable connecting your device to a physical COM port (so 1990′s) and the TRK2.x is for the TRK debugger which uses the elusive and exhorbitantly costly impossible-to-buy-for-a-indi-dev JTAG cable. So, there… We use either Bluetooth or USB 2.0 cable options to connect with our device. In my case here, its USB.

TRK:

Click on next and head over directly to the install remote agents tab.  This will let us install the TRK client onto the devices. This is a sis file that is tailored for every single S60 version since 3.0.  Lets talk a little bit about the TRK client here.  This app is basically what helps you pause your code and step through when the code is executing on the device.Install Remote AgentsSelect the Application TRK 3.x.x Installer. and click on the install button and fire up the PC Suite installer, proceed to install it.  I would prefer you install the TRK app on the phone memory rather than the mass memory or memory card.

We do not need the Carbide Profiler 2.0 installers. But, Just for FYI sakes, they are apps used to profile processor performance and load.  I seriously do not know what purpose it exactly serves. If you do know, do help me by dropping in a comment :)

Connection:

Once you are done with the installation, fire up the TRK application on the device. Select Options -> Settings and select USB / Bluetooth as your connection method is.  In my case here, its USB.

dodd-1 dodd-2

Once you are connected, the TRK app will show the Status as connected like so…

dodd-3

Here, connected means that the cable is connected to the device.  It DOES NOT mean that you are connected to carbide in any way.  Why it is so… I have no idea!

Now, on carbide, switch to the Set Connection Settings tab in the connection properties window.  In the Connection Settings dialog box, click on the drop-down and you should currently see your device assigned to one of the com ports.COM Connection SettingsSelect the com port your device is detected in, the TRK version installed on your device and click on initiate testing.Connection Successful A connection successful message would mean that your TRK on the device is detected and you are good to go.  If it fails, its mostly the COM port being selected wrong.  I really have no idea how to fix this, but yeah, a trial and error run with some com ports should work always! :-)

Hit Finish, And we’re good to go do some code-debugging on carbide!!! :-D

To take a look at the remote connections, Hit Window –> Show View –> Other. Expand the Carbide.C++ list, select Remote Connections and click on OK. You will be presented with a list of remote connections you currently have.Remote ConnectionsRemote ConnectionsDebugging:

To start with debugging, open your Symbian C++ project and in build options, select Phone debug (GCCE). Hit the build.Phone Debug (GCCE)Once the build is fine, hit debug. Since we do not have a debug configuration for GCCE Phone debug, carbide will ask us to create a new configuration like so:New Debug ConfigurationSelect the Application TRK Launch Configuration, and click on next. The remote connection we created earlier is listed and selected automatically. Proceed to the next step where it asks for the SIS file to be installed. Carbide has already filled up the necessary information. We just need to add a few things.

Now, click on the Modify Sis builder settings for build configuration link just below the Sis File dialog box.  This will open a new dialog box where the only things we need to modify are as below:

  • Enable the partial Upgrade checkbox. This will help quickstart the debug as the whole sis file is not re-created and signed. Only the delta is sent across to be debugged again…
  • Select the configuration and click on Edit. You will notice that the Self Sign sis file option is selected already.

Good, now wind up and head out… Once you hit finish, carbide starts up the debugger and switches to the debug perspective. The application will be packaged, signed, transferred to the device, installed on the C/ E drive that you choose, and started up.  Provided you have already set a breakpoint, the code will execute till that point and you have control to step through then on.Debug ModeSo, there you go… On Device Debugging for S60 apps on Carbide.  Have fun coding…

Chao!

I’ve come across more than a couple of instances in the recent past (the most recent being prashanth) where people had trouble setting up Mail For Exchange (MFE) on their Nokia S60 devices.  So, I decided to do a step-by-step howto on how to get it installed, setup and running on your S60 phone.

I have used a Nokia 6210 Navigator (S60 FP2 device) for supporting this blog post, but any other S60 3rd edition / 5th edition device would conform to more or less the same process.  Now, here goes…

There are two ways you can start off your setup of MFE on your S60 device:

  1. Hunt down the MFE icon hiding somewhere in the Installations / Applicaitons folder and start off the setup process…
  2. Start setup from the Messaging app and move forward to install MFE and continue the setup.  We will be looking at this approach in the blog post.

The only difference between the two approaches is that in the first one already has MFE installed on your device and you just go ahead and type in your magic keywords and it just works!  In the second case, you type in the parameters and then it proceeds to install MFE (whose sis file Nokia has happily stored somewhere on your phone) and then apply the magic and get going!!!



So… starting with it…

  1. Open the messaging app -> New mailbox.  Select Yes for the question it asks.
    Scr000007 Scr000008
  2. You should now be presented with the E-mail setup wizard.  Start it off… we’re just a few more steps away :-)
    Scr000009
  3. The wizard will then show you a disclaimer.  Just accept it to move to the next step.  It will then check your GPRS (NOT WAP, GPRS = DATA = THE COSTLY WALA CONNEXUN ;-) ) connectivity to the internet and then the setup part of your process starts.
    Scr000010Scr000011
  4. Continuing on… The next set of screens prompts you to enter the Email ID, password.
    Scr000012Scr000014
  5. At this point, we’re halfway through the process.  The wizard will now show a list of protocols that are “possibly” supported by your email id.  One of them is POP3 / IMAP4 (which is the defacto thingy, but not what we’re interested in) and the other being, Mail For Exchange.  This is shown in the screenshots below:
    Scr000015 Scr000016
  6. Once MFE is selected, you will be presented with dialogues to enter your Windows Username and the Windows Domain Name against which you authenticate yourself in your organization.
    Scr000017 Scr000018 Scr000019
  7. In the next dialog, you have to enter your mail server URL.  This is the URL of the exchange server you have at work.
    Scr000020
  8. At this point, the installation of MFE starts on you system and proceeds to show you the Sync settings menu.
    Scr000021 Scr000022 Scr000023
  9. Pressing the center softkey on the Content synced settings item brings up the detailed settings for your MFE setup that you have done.  Here, you can tweak your Peak, off peak settings, Sync when roaming settings, and all the works…I’ll leave it to the screenshots below to do the explanations…
    Scr000025 Scr000026 Scr000027 Scr000028 Scr000029 Scr000030 Scr000031
  10. Once you are satisfied with the settings changes you have made to the profile, Select Options –> Full resync.  This will clear out any pre-existing sync data and refresh it with the latest data from the exchange server.
    Scr000032 Scr000033
  11. Once the Full sync is done, the MFE profile you just created gets saved and you can see the status of the sync process as it happens.
    Scr000034 Scr000035 Scr000037 Scr000038 Scr000039
  12. After closing the wizard, you must be able to see a Mail for Exchange folder in your Messaging application.  This indicates that you have an MFE profile setup on your phone.  Once the sync is complete from the previous step, you will see a new mail indication on the Home screen as indicated by a small ‘@’ icon in the top right near the battery indicator.

    You can haz push corporate emailz!!!

    Scr000040 Scr000042

  13. Another feature that MFE provides is the Company directory lookup.  This is basically the Addressbook feature that Outlook provides when you type the name of the recipient and press Ctrl + K.  The app is named Comp. Dir.
    Scr000044 Scr000045

So there ends the step-by-step walkthrough for setting up MFE on your S60 devices.

Now comes the interesting part, Troubleshooting.

  • If your sync has suddenly stopped working, chances are that your backend has cut you off for a while a.k.a. maintenance.
  • Another common issue is the MFE not working after a FOTA upgrade.  This is rectified by deleting your existing MFE profile and creating a new one with the same settings.
  • If your MFE setup keeps harping about the server being wrong (step 7 in how-to above), try it with the https://mail.yourmailserver.com url.

I hope this helps someone with regard to setting up MFE.  Until the next post… Chao!

Get Adobe Flash playerPlugin by wpburn.com wordpress themes
© 2010 Cruisemaniac.com Suffusion WordPress theme by Sayontan Sinha