Aug 142009

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!

Posted by Cruisemaniac Tagged with: , , , , , , , , , , , ,
Jun 222009


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!

Posted by The Cruisemaniac Tagged with: , , , , , , ,
Jan 292009

NokiaA lot of people down here in India did not even know of the Security flaw in Nokia devices in all probability.  The company called F-Secure, that makes Antivirus software for Symbian phones had demonstrated an SMS based flaw during in Nokia’s devices during the 25th Chaos Communication Congress in Berlin.  You can read about it here, here and see a video of this exploit in action here.

The flaw, named “Curse of Silence” was demonstrated on Nokia’s Series60 2nd Edition, 3rd Edition phones (FP1 included).  It worked this way: People sent a carefully and very very painstakingly typed series of messages to an E-Series / N-Series phone.  And voila, the affected device would stop communicating  with the outside world using SMS.  You could only make / receive voice calls.  And the only known way out for this hack was to hard reset the phone.

What happened as a result of this was the noise in the Nokia forums, which obviously happens…  And then, F-Secure chose to act.  They released a patch for the flaw saying that they could protect the devices if users agreed to shell out 60$ USD for it.  Crazy!

And then the noise level in the forums grew even further, and people started to blast Nokia for making such a mistake in their production devices and then Nokia chose to act.  They just released a free application download which would clean up your phone if your device is infected. And keep you secure.  This also probably answers the various firmware upgrades Nokia has been pushing out for most of its models lately.

What I particularly wanted to point out with this post are the following:

  1. The fact that Nokia actually listens to its users.  The security flaw is not major.  If you take a look at the video from the link posted above, it shows how strenuous it is to actually hack into the system.
  2. People will always complain.  Listening to the complaints and having to put up with all that noise AND take what is important for both an organization and its customers (loyal and otherwise) is real mastery!
  3. It shows one straight thing from the management perspective: You may have the first mover advantage for a situation.  But, when the playground is not yours, you dont get to play according to your rules. F – Secure! :-D
  4. F-Secure sucks!!! Nokia needs to stop teaming up with F-Secure and stop listing them in their Download! application.
  5. Nokia rocks!
  6. Nokia rocks! and, lastly
  7. Nokia rocks!!!

So yeah, all is well in the Nokia and Symbian and Smartphones world! :-D   You can continue to send out confidential mail, love-ka-mail and all other sorts of yeee-mail… and listen to “?? ?????? ?? ???? ???…” or any other song of your choice on your cool Nokia phone while getting traffucked in any city that you are in.

But do remember, you do need to periodically backup your phone.  There is the software part that Nokia and its team of hard-working, dedicated, engineers can take care of… And there’s the “idiot using the box” that you can choose / not choose to be. :-|

And, in other unrelated news, Apple’s multitouch patent got through…  I feel really sorry for the Palm-Pre!!! They need some really awesome magic from the Harry Potter world to rewire the stuff!

Last, but definitely not the least, thanks to Ricky Cadden of SymbianGuru for the update / info.

There! Another lovely blog post done! :-)

Posted by The Cruisemaniac Tagged with: , , , , , ,
Feb 272008

Google’s native Search application for Nokia devices is out… And it is plain Uber-Kewl!!! Sense and Sensibility! With a couple of questions from my side!!! B-) The application needs to be downloaded from mobile.google.com.

I pulled it up and gave it a test run on my mobile and here are the screen-shots:

The app loads automatically and displays this beautiful image on the screen… Aaaah! bliss!!!

It opens up to the Ctrl key on the E61i / Pencil key on other S60 3rd edition devices.

By the time you enter the search text, the internet connection is initiated in the background. More on this later…

And voila! The search results are displayed using the S60 OSS web browser!

screenshot0005.jpg

Local Cinema search too!!! We cant book tickets using google yet!

screenshot0006.jpg

The app integrates maps too…

screenshot0007.jpg

Driving directions dint work for me though…

 Now that the screen-shots are done, I have my set of questions that I want answers for…

  1. The Google search application selects my internet access point all by itself.  It does not have any settings… and the application does not ask me about the access point.  How does it know that I use Mobile Office???
  2. Adding to point number 1, the search application basically opens the browser with a parameter being google.com/search?q=’search stringWhy does it need to have gprs / wifi running in the background???  The browser on opening proceeds to ask the user about the access point all again…
  3. Currently the google search app only searches google.com.  Is in-device search in the pipe???

With that ends a nice blog post after quite some time!!!…

Due credit to bhuwan for the info…  Thanx pal!

Posted by The Cruisemaniac Tagged with: , , , , , ,
Get Adobe Flash playerPlugin by wpburn.com wordpress themes