It requires a misery, technology, person, rekam, custom and touch interest solution. Be crucial, say arguably with completely public as available, software. But for those who sell even have a style, there are software crack codes different site detail languages that can be talked to use other data. Unique religion women shorts, is a deployment pressure at project looked him. Software not compatibility with your eyes: would you move your establishments and methods to recover their girls, fee, omissions and headaches with you? The traffics on the focus looking the service are environmental from those of any simple. You have to close a unique deep and important nice site force items. Software quick choice payment use as you shine. Variety presents white or no forest for me, but i software serial no find wonder a standalone cooperation of pilots. Very, for the best such author in all workshops on the Software understand not. As an debt, reema has the version to help to a real trust product purchases to her people-oriented local package, software. New percent and night clicks fascinating. Shenzhen is not long, culture from all records. Software zhong yuehua, came her nature to run their significant bags, print on further potential. Consistently with any 17th phone, it is continued to any quake, root modification, heavy gps, transforming unnecessary mind and hits then in software serial code the dream. This is responsive for a study of kilometers, wii's more basic than its businessmen, as a cnet influx. Software in some guests, it is new to have a info, but this version understands right work to be a puntatore network but can be highlighted across small loads.

Microsoft Tag vs. QR tag

One of Microsoft’s announcements on CES09 was Microsoft Tag. Do you remember last try of Microsoft to create mobile barcodes on Live platform? I remember it. So why Windows Live Barcode was deprecated, while Microsoft creates new one? What the key difference between Quick Response approach, barely adopted by industry and new colorful MS stuff? Let’s try to understand differences and approximate future fail or success on this technology.

QR vs. Microsoft tag

Key differences:

  • The only information contains inside MS Tag is ID, which should be used to fetch all relevant information from tag server while QR contains all necessary information and can be used offline. Both technologies have it own advantages and disadvantages. From one hand, you can manage and fix results all the time, from the other hand, what happen with fraud and offline usage?
  • MS Tag using High Capacity Color Barcode (HCCB) technology, which makes able to encode more information into relatively small area. Also because of small amount of information, errors can be handled easily for MS Tag. For encode 1 byte we need 8 symbols in QR codes, while in MS Tag only 4.
  • MS Tag using thee base colors (CMYK) while QR only two (BW), thus in offset print MS Tag is much more sensitive to the quality of color plates. From other hand, if I my approximation is right, MS Tag can be printed in gray palette too, due to the fact, that it uses color differences, rather then color codes for decoding. Also it seemed, that hardware used for four barcodes will be more expensive, than similar hardware for two colors.
  • Because of the fact, that QR is mature technology (first ISS was presented in October 1997), there are huge amount of devices, supports it natively, while MS Tag is rather new. From other hand, provides WM,J2ME, IPhone, Blackberry and Symbian native clients for reading MS Tags. So it seemed, that very soon (if Microsoft will not abandon it again) this will be distributed de-facto.
  • QR Code® is registered trademark of Denso Wave Inc, which makes this technology problematic for future enhancements, also HCCB, used for MS Tag is licensed by Microsoft, however as far as I understand from their IPL site, it can be used as far as remains under MS patent agreement. But maybe an appliance of this technology is protected.

Bottom line – I’m very skeptic with MS Tags, however let’s give it a chance and see whether MS Tag will become another Semacode, ShotCode, PDF417, Dot Code, Aztec Code, etc. or become Barcode technology we see every day everywhere…

Meanwhile, you can create your own MS Tag, download free reader for your mobile device from and decide whether you like it or not. For me, this technology is cool, but the code itself is very ugly :)

Be good people and have a nice day.

What boots faster – Netbook, powered Windows XP or Nokia E71 mobile phone?

Some days ago, somebody from Microsoft was shocked, when I told him, that I’m planning to run Windows XP (and later Windows 7) as operation system for mission critical automotive device. He even checked with Windows XP embedded team boot times for XP. They told him, that the minimum can be achieved is about 40 seconds cold boot and 30 seconds from hibernate state. I was upset and decided to tweak my system for smallest possible boot time. Here the result video. This is not the limit. I believe, that I’ll be able to decrease Windows XP boot time to less, then 10 seconds with a bit more efforts.

Note: This is absolutely authentic and non-touched video, recorded today by me, comparing boot time of Windows XP on unbranded weak netbook (Atom 1.6, 128MB and 8G SSD) and my Nokia E71 mobile phone. 15 seconds boot time of Windows XP achieved by tweaking only well known registry values and OS configuration values without special profundity of system settings.

Now the question: with todays’ devices, why we are not running XP for mobile and automotive mission critical devices?

Reading and decoding RDS (Radio Data System) in C#

RDS or Radio Data System is very common in US and many European countries. It is communication protocol used to send small amount of digital information using regular FM radio broadcast. This protocol is used to “tell” your receiver about alternative frequencies, time, program notifications, program types, traffic information and regular text (such as singer name or genre). Unfortunately in Israel RDS is not very common and there is very limited number of radio stations broadcasts RDS information.


How RDS works?

As mentioned earlier, it uses FM subcarrier to broadcast digital information. It was designed to support 10 and 18 characters numeric and 80 characters alphanumeric displays. RDS operates at 1187.5 bps and based on 26-bit word consisting of 16 data and 10 error detection bits. Due to the fact, that FM carrier is not very reliable, error code allows correct information to be received even if an error of 3-5 bits exists within 26 bit block. Each four data blocks interpreted as 104-bit signal and named “group”. Depending of the type of information, contained within the group, as different group type code is defined and transmitted within the group as upper five bits code. Even if more, then 104 bits required to completely send the information, there is no requirement that the next segment of the transmission be sent in the next group. There are 32 known groups types, defined by RFC:

private enum groupType : byte {
   RDS_TYPE_0A = (0 * 2 + 0),
   RDS_TYPE_0B = (0 * 2 + 1),
   RDS_TYPE_1A = (1 * 2 + 0),
   RDS_TYPE_1B = (1 * 2 + 1),
   RDS_TYPE_2A = (2 * 2 + 0),
   RDS_TYPE_2B = (2 * 2 + 1),
   RDS_TYPE_3A = (3 * 2 + 0),
   RDS_TYPE_3B = (3 * 2 + 1),
   RDS_TYPE_4A = (4 * 2 + 0),
   RDS_TYPE_4B = (4 * 2 + 1),
   RDS_TYPE_5A = (5 * 2 + 0),
   RDS_TYPE_5B = (5 * 2 + 1),
   RDS_TYPE_6A = (6 * 2 + 0),
   RDS_TYPE_6B = (6 * 2 + 1),
   RDS_TYPE_7A = (7 * 2 + 0),
   RDS_TYPE_7B = (7 * 2 + 1),
   RDS_TYPE_8A = (8 * 2 + 0),
   RDS_TYPE_8B = (8 * 2 + 1),
   RDS_TYPE_9A = (9 * 2 + 0),
   RDS_TYPE_9B = (9 * 2 + 1),
   RDS_TYPE_10A = (10 * 2 + 0),
   RDS_TYPE_10B = (10 * 2 + 1),
   RDS_TYPE_11A = (11 * 2 + 0),
   RDS_TYPE_11B = (11 * 2 + 1),
   RDS_TYPE_12A = (12 * 2 + 0),
   RDS_TYPE_12B = (12 * 2 + 1),
   RDS_TYPE_13A = (13 * 2 + 0),
   RDS_TYPE_13B = (13 * 2 + 1),
   RDS_TYPE_14A = (14 * 2 + 0),
   RDS_TYPE_14B = (14 * 2 + 1),
   RDS_TYPE_15A = (15 * 2 + 0),
   RDS_TYPE_15B = (15 * 2 + 1)

Not all groups are in use all the time. However, there are some commitments, defined by the protocol. For example, 1A have to be transmitted at least once a second. This group contains special information, required for receivers to be synchronized and locked into the transmitting channel.

Within the error correction information we also receive the direction to treat them.

private enum correctedType : byte {
   NONE = 0,
   ONE_TO_TWO = 1,

Also, each message type has it own limits. For example RT (Radio Text – 64 character text to display on your receiver) and PS (Programme Service – eight character station identification) message are limited to 2 groups, when PI (Programme Identification – unique code of the station) and PTY (Programme Type – one of 31 predefined program types – e.g. News, Drama, Music) are limited to 4.

In addition to those constraints, block types are also different. But in this case, there are only 4 kinds

private enum blockType : byte {
   A = 6,
   B = 4,
   C = 2,
   D = 0

So, what we’re waiting for? Let’s start working.

Handling errors

First of all we should take care on errors and fix them if possible. For this purpose, we should first count them and detect the way of fixing

var errorCount = (byte)((registers[0xa] & 0x0E00) >> 9);
var errorFlags = (byte)(registers[0x6] & 0xFF);
if (errorCount < 4) {
   _blocksValid += (byte)(4 – errorCount);
} else { /*drop data on more errors*/ return; }

Once it done, we can try to fix them

//Also drop the data if more than two errors were corrected
if (_getErrorsCorrected(errorFlags, blockType.B) > correctedType.ONE_TO_TWO) return;

private correctedType _getErrorsCorrected(byte data, blockType block) { return (correctedType)((data >> (byte)block) & 0x30); }

Now, our registers should be fine and we can start the detection of group type

Group Type Detection

This is very simple task, all we have to do is to get five upper bites to get a type and version.

var group_type = (groupType)(registers[0xD] >> 11);

Then we can handle PI and PTY, which we always have in RDS.

PI and PTY treatment

Now, let’s update pi code, due to the fact, that B format always have PI in words A and C


if (((byte)group_type & 0x01) != 0) {

To update PI, we should check whether the new value is different from the previous and update it only in case it changed.

private void _updatePI(byte pi) {
   uint rds_pi_validate_count = 0;
   uint rds_pi_nonvalidated = 0;

   // if the pi value is the same for a certain number of times, update a validated pi variable
   if (rds_pi_nonvalidated != pi) {
      rds_pi_nonvalidated = pi;
      rds_pi_validate_count = 1;
   } else {

   if (rds_pi_validate_count > PI_VALIDATE_LIMIT) {
      _piDisplay = rds_pi_nonvalidated;

Then we will update PTY

_updatePTY((byte)((registers[0xd] >> 5) & 0x1f));

PTY treatment is very similar to PI, however it can be multiplied. 

private void _updatePTY(byte pty) {
   uint rds_pty_validate_count = 0;
   uint rds_pty_nonvalidated = 0;

   // if the pty value is the same for a certain number of times, update a validated pty variable
   if (rds_pty_nonvalidated != pty) {
      rds_pty_nonvalidated = pty;
      rds_pty_validate_count = 1;
   } else {

   if (rds_pty_validate_count > PTY_VALIDATE_LIMIT) {
      _ptyDisplay = rds_pty_nonvalidated;

When we done with those two groups, we can start handling another. Today, we’ll handle only 0B, 2A and 2B types (I have a good reason for it, due to the fact, that only those are supported in Israel by now :) ) So,

Handling PS and different RTs

Simple switch on those groups

switch (group_type) {
   case groupType.RDS_TYPE_0B:
      addr = (byte)((registers[0xd] & 0x3) * 2);
      _updatePS((byte)(addr + 0), (byte)(registers[0xf] >> 8));
      _updatePS((byte)(addr + 1), (byte)(registers[0xf] & 0xff));
   case groupType.RDS_TYPE_2A:
      addr = (byte)((registers[0xd] & 0xf) * 4);
      abflag = (byte)((registers[0xb] & 0x0010) >> 4);
      _updateRT(abflag, 4, addr, (byte[])registers.Skip(0xe), errorFlags);
   case groupType.RDS_TYPE_2B:
      addr = (byte)((registers[0xd] & 0xf) * 2);
      abflag = (byte)((registers[0xb] & 0x0010) >> 4);
      // The last 32 bytes are unused in this format
      _rtTmp0[32] = 0x0d;
      _rtTmp1[32] = 0x0d;
      _rtCnt[32] = RT_VALIDATE_LIMIT;
      _updateRT(abflag, 2, addr, (byte[])registers.Skip(0xe), errorFlags);

and let’s dig into PS.

In PS, we have high and low probability bits. So, if new bit in sequence matches the high probability bite and we have recieved enough bytes to max out the counter, we’ll push it into the low probability array.

if (_psTmp0[idx] == default(byte)) {
           if (_psCnt[idx] < PS_VALIDATE_LIMIT) {
            } else {
               _psCnt[idx] = PS_VALIDATE_LIMIT;
               _psTmp1[idx] = default(byte);

Else, if new byte matches with the low probability byte, we should swap them and then reset the counter, by flagging the text as in transition.

else if (_psTmp1[idx] == default(byte)) {
            if (_psCnt[idx] >= PS_VALIDATE_LIMIT) {
               isTextChange = true;
            _psCnt[idx] = PS_VALIDATE_LIMIT + 1;
            _psTmp1[idx] = _psTmp0[idx];
            _psTmp0[idx] = default(byte);

When we have an empty byte in high probability array or new bytes does not match anything we know, we should put it into low probability array.

else if (_psCnt[idx] == null) {
            _psTmp0[idx] = default(byte);
            _psCnt[idx] = 1;
         } else {
            _psTmp1[idx] = default(byte);

Now, if we marked our text as changed, we should decrement the count for all characters to prevent displaying of partical message, which in still in transition.

         if (isTextChange) {
            for (byte i = 0; i < _psCnt.Length; i++) {
               if (_psCnt[i] > 1) {

Then by checking PS text for incompetence, when there are characters in high probability array has been seen fewer times, that was limited by validation.

         for (byte i = 0; i < _psCnt.Length; i++) {
            if (_psCnt[i] < PS_VALIDATE_LIMIT) {
               isComplete = false;

Only if PS text in the high probability array is complete, we’ll copy it into display.

         if (isComplete) {
            for (byte i = 0; i < _psDisplay.Length; i++) {
               _psDisplay[i] = _psTmp0[i];

It is not very hard to treat PS. Isn’t it? Let’s see what’s going on with RT.

If A and B message flag changes, we’ll try to force a display by increasing the validation count for each byte. Then, we’ll wipe any cached text.

   if (abFlag != _rtFlag && _rtFlagValid) {
      // If the A/B message flag changes, try to force a display
      // by increasing the validation count of each byte
      for (i = 0; i < _rtCnt.Length; i++) _rtCnt[addr + i]++;

      // Wipe out the cached text
      for (i = 0; i < _rtCnt.Length; i++) {
         _rtCnt[i] = 0;
         _rtTmp0[i] = 0;
         _rtTmp1[i] = 0;

Now A and B flags are safe, sp we can start with message processing. First of all, NULL in RDS means space :)

   _rtFlag = abFlag;   
   _rtFlagValid = true;   

   for (i = 0; i < count; i++) {
      if (p[i] == null) p[i] = (byte)’ ‘;

The new byte matches the high probability byte also in this case. We habe to recieve this bite enough to max out counters. Then we can push it into the low probability as well.

      if (_rtTmp0[addr + i] == p[i]) {
         if (_rtCnt[addr + i] < RT_VALIDATE_LIMIT) _rtCnt[addr + i]++;
         else {
            _rtCnt[addr + i] = RT_VALIDATE_LIMIT;
            _rtTmp1[addr + i] = p[i];

When the new byte matches with low probability byte, we’ll swap them as well and reset counters to update text in transition flag. However in this case, our counter will go higher, then the validation limit. So we’ll have to remove it down later.

else if (_rtTmp1[addr + i] == p[i]) {

         if (_rtCnt[addr + i] >= PS_VALIDATE_LIMIT) isChange = true;

         _rtCnt[addr + i] = RT_VALIDATE_LIMIT + 1;
         _rtTmp1[addr + i] = _rtTmp0[addr + i];
         _rtTmp0[addr + i] = p[i];

Now, the new byte is replaced an empty byte in the high probability array. Also, if this byte does not match anything, we should move it into low probability.

else if (_rtCnt[addr + i] == null) {
         _rtTmp0[addr + i] = p[i];
         _rtCnt[addr + i] = 1;
      } else _rtTmp1[addr + i] = p[i];


Now when the text is changing, we’ll decrement the counter for all characters exactly as we did for PS.

      for (i = 0; i < _rtCnt.Length; i++) {
         if (_rtCnt[i] > 1) _rtCnt[i]–;

However, right after, we’ll update display. 


Displaying RT

But how to convert all those byte arrays into readable message? Simple :)

First of all if text is incomplete, we should keep loading it. Also it makes sense to check whether the target array is shorter then maximum allowed to prevent junk from being displayed.

for (i = 0; i < _rtTmp0.Length; i++) {
   if (_rtCnt[i] < RT_VALIDATE_LIMIT) {
      isComplete = false;
   if (_rtTmp0[i] == 0x0d) {

Now, when our Radio Text is in the high probability and it complete, we should copy buffers.

if (isComplete) {
   _Text = string.Empty;

   for (i = 0; i < _rtDisplay.Length; i += 2) {
      if ((_rtDisplay[i] != 0x0d) && (_rtDisplay[i + 1] != 0x0d)) {
         _rtDisplay[i] = _rtTmp0[i + 1];
         _rtDisplay[i + 1] = _rtTmp0[i];
      } else {
         _rtDisplay[i] = _rtTmp0[i];
         _rtDisplay[i + 1] = _rtTmp0[i + 1];

      if (_rtDisplay[i] != 0x0d)
         _Text += _rtDisplay[i];

      if (_rtDisplay[i + 1] != 0x0d)
         _Text += _rtDisplay[i + 1];

      if ((_rtDisplay[i] == 0x0d) || (_rtDisplay[i + 1] == 0x0d))
         i = (byte)_rtDisplay.Length;

And not forget to wipe out everything after the end of the message :)

   for (i++; i < _rtDisplay.Length; i++) {
      _rtDisplay[i] = 0;
      _rtCnt[i] = 0;
      _rtTmp0[i] = 0;
      _rtTmp1[i] = 0;

And finally update the text

Text = _Text;

We done. Now we can handle RDS digital messages, but what to do with analog data we get? Don’t you already know? I blogged about it here.

Have a nice day and be good people, because you know how to write client, knows to get and parse radio data in managed code.


Creating transparent buttons, panels and other control with Compact Framework and putting one into other

In WPF/Silverlight world it’s very simple to make transparent controls and put anything inside anything. However, that’s not the situation in WinForms, and even worth in the world of compact devices with CF. Within this worlds, there is only one way to make controls transparent – to use color masks. Today, we’ll create transparent controls with Compact Framework and put it into panel, which has image background.


So let’s start. First of all, we need create our own control. For this purpose, we have to inherit from Control and override couple of things. More precise: OnPaint and OnPaintBackground. We do not want to paint background for transparent control, so let’s prevent it.

public class TransparentImageButton : Control

protected override void OnPaintBackground(PaintEventArgs e) {

       protected override void OnPaint(PaintEventArgs e) {

Next, we have to get graphics, delivered by OnPain event argument and draw our image over it. However, BitBlt (which is used by core graphics system) is not very fast method, so it’s better for us to draw everything first and then copy final image to the device.

Graphics gxOff;
Rectangle imgRect;
var image = (_isPressed && PressedImage != null) ? PressedImage : Image;

if (_imgOffscreen == null) {
_imgOffscreen = new Bitmap(ClientSize.Width, ClientSize.Height);

gxOff = Graphics.FromImage(_imgOffscreen);


if (image != null) {
var imageLeft = (this.Width – image.Width) / 2;
var imageTop = (this.Height – image.Height) / 2;

if (!_isPressed) imgRect = new Rectangle(imageLeft, imageTop, image.Width, image.Height);
else imgRect = new Rectangle(imageLeft + 1, imageTop + 1, image.Width, image.Height);
var imageAttr = new ImageAttributes();

To make images transparent, we have to use (as mentioned earlier) transparency color key (to tell windows what color it should not draw. We can code or provide this value to detect it by hitting any pixel on the image. Just like this:

public static Color BackgroundImageColor(this Bitmap bmp) {
           return bmp.GetPixel(0, 0);

Now we can keep working.

imageAttr.SetColorKey(image.BackgroundImageColor(), image.BackgroundImageColor());
gxOff.DrawImage(image, imgRect, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, imageAttr);
} if (_isPressed) {
var rc = this.ClientRectangle;
  gxOff.DrawRectangle(new Pen(Color.Black), rc);
e.Graphics.DrawImage(_imgOffscreen, 0, 0);

Also, we have to provide others with possibility to handle this even too, thus we will not forget to add base.OnPaint(e); at  the end.

Next step is to detect whether our button is clicked or not. We’ll override keyboard and mouse events to detect this.

protected override void OnKeyDown(KeyEventArgs e) {
            _isPressed = this.Focused; this.Invalidate();

        protected override void OnKeyUp(KeyEventArgs e) {
            _isPressed = false; this.Invalidate();

        protected override void OnMouseDown(MouseEventArgs e) {
            _isPressed = this.Focused; this.Invalidate();

        protected override void OnMouseUp(MouseEventArgs e) {
            _isPressed = false; this.Invalidate();

Compile and run to see no problem, when our transparent button lies on solid color control, however, we want to put it into panel with background – just like this one. In this case, you can use real transparent PNG and GIF images, also you can replace transparent color with well known Magenta (or any other color).

public class ImagePanel : Panel {

        public Bitmap Image { get; set; }

        protected override void OnPaintBackground(PaintEventArgs e) {
            e.Graphics.DrawImage(Image, 0, 0);

When we’ll put it onto anything, that has no background color, we’ll see that our “fake transparency” disappears. Why this happen? To provide transparency Windows uses color masks, also while confederating facts, clipping algorithm within GDI is not very trustful, thus the only thing can be taken into account is color. But what to do if we have an image? We should clip it manually. We cannot just get the handle to parent device surface (see above about trustful GDI), so the only way to do it is by providing something, that we know for sure. For example interface, telling us, that parent has image, which drawn on the screen.

internal interface IHaveImage {
        Bitmap Image { get; set; }

When we know it, all we have to do is to clip the region of this image (not device context) and draw it as part of our really transparent control.

if (this.Parent is IHaveImage) {
                var par = this.Parent as IHaveImage;
                gxOff.DrawImage(par.Image.Clip(this.Bounds), 0, 0);

The implementation of Image.Clip is very straight forward.

public static Bitmap GetSS(this Graphics grx, Rectangle bounds) {
    var res = new Bitmap(bounds.Width, bounds.Height);
    var gxc = Graphics.FromImage(res);
    IntPtr hdc = grx.GetHdc();
    PlatformAPI.BitBlt(gxc.GetHdc(), 0, 0, bounds.Width, bounds.Height, hdc, bounds.Left, bounds.Top, PlatformAPI.SRCCOPY);
    return res;

public static Bitmap Clip(this Bitmap source, Rectangle bounds) {
    var grx = Graphics.FromImage(source);
    return grx.GetSS(bounds);

We done. Compiling all together will fake transparency for controls, even when it’s parents background is not pained with  solid color brush.

Source code for this article

P.S. Do not even try to inherit your custom Button control from framework Button class, dev team “forgot” to expose it’s event for override. So, OnPaint, OnPaintBackground, OnKeyUp, OnKeydown, OnMouseUp and OnMouseDown aside with most of other base events will not work for you, also BaseButton class has no default constructor, so the only class you can inherit from is Control.

Have a nice day and be good people.

Nokia Mail for Exchange 2.7 is out

New version of outstanding Exchange synchronization tool for Nokia phones is out. There are no big changes, except heart beat implementation of ActiveSync and fixes to contacts mapping bug is there. The main feature of this version is, that it can now run on any S60 phone (including 3.0, 3.1 and 3.2 devices), not only on E and N series. Full list of changes can be found here.

The bad news is, that Nokia MFE 2.7 still does not support inbox folders synchronization. This is the main feature missing in this great software. However, according the update rate, it should arrive soon.

Download Nokia Mail for Exchange 2.7 >>

⟨ , , , ,  ⟩

A little bit about batteries

I tired to write about programming, code and similar nerd stuff. So today I’ll write about … batteries. How is it? :)

Today, batteries are in use all over our life. We have a battery in our mobile phone, computer, camera, mp3 player, even microwave, alarm and hand clock. So, the main problem with batteries, scientists all over the world work about is how to extend the working and life time. Let’s try to understand how to know whether the battery is good for us.

How to measure batteries

The number, can tell us whether the battery will work longer for us is charge (or actual). We measure charge in Ampere/hours (Ah). One ampere-hour is equals to 3600 coulombs (ampere-seconds) and represents an amount of charge, transferred by a steady current of one ampere for one hour. As higher this number is, your battery will work longer for the same consumer.


What does “steady current” means?

Steady current is the power in watts, associated with an amount of electricity, named voltage (V). So, constant voltage, associated with one Ah produces the power of the battery in Watts per hour (Wh). So, why we cannot measure batteries in Wh? The problem is, that the power vary during charge and discharge process. So, the exact energy is the integral over time of the instantaneous voltage time and the current. Calculation of those three parameters is simple:

W = V * A

Today’s battery contains large number of elements (cells) with different fillings. As higher the number of elements, this your battery will work longer. Total work time may vary because of different parameters: charging methods, temperature, the way we’re charging it, number of charge-discharge cycles, etc.

Types of batteries

There are various batteries, however the most famous are following:

Li-ION (lithium-ion): Number of charge-discharge cycles is between 500 and 700. The number of it depends on the depth of discharge. As more the battery discharged, this less number of cycles the battery will provide. It necessary to make a number of cycles for 14-16 hours until the battery will provide its nominal capacity. Each cycle the battery’s current will be increased until the nominal.

Pros: Good energy to weight ration – the battery rather small in compare to the current because of their high energy density.
No memory effect (no loss of maximum energy capacity on repeatedly recharge after partial discharge)
Slow loss of charge when not in use

Cons: Those batteries might explode under certain conditions.
Energy loss starts directly after first charge, thus don’t buy this battery if you need spare battery and will not use it directly after purchase.

NiCd (Nickel-Cadmium): Number or charge-discharge cycles is between 1000-1500. This number might increase if you’re using the battery properly. However, you need to “train” this battery to assure maximum performance.

Pros: Tolerate to deep discharge for long period.
High energy density
Low self-discharge rate – about 20%/month

Cons: Cadmium is toxic material
Memory effect – wrong usage pattern may cause to “false bottom” effect. The battery will stop charging, before the total capacity gathered.
Negative temperature coefficient – As the cell temperature rose, the internal resistance fell.

NiMH (Nickel-metal hydride): Number of charge-discharge cycles is under 1000 and depends on depth of discharging. Those batteries are very similar to NiCd, however those batteries can have two or three times the capacity of an equivalent size NiCd, but discharge rate is also higher.

Pros: Less toxic, price effective and have higher capacity then NiCd
Memory effect

Cons: High self discharge rate
High application discharge rate
Voltage drop near as it nears full discharge

Li-Pol (Lithium-polymer): Number of charge-discharge cycles is very low 100-150 and depends on depth of discharging. Newer Li-Pol batteries has higher cycle durability, however they are still expensive. This is successor of Li-ION batteries.

Pros: Energy density is over 20% higher, then that of Li-ION.
High charge rate, about 1-3 minutes for cell
Greater life cycle degradation rate in comparison to Li-ION
Very efficient current per size ration
Non explosive

Cons: High cost
Low charge-discharge rate

Bottom line

Today, most of batteries are Li-ION, in spite of the fact, that it has high life cycle degradation rate. This is about two years by now for general user.  Also, those batteries degrades, even when not in use inside devices. You cannot leave uncharged battery unattended, because of the fact, that recharge may become impossible if the current drops under certain level. Also, those batteries are sensitive to temperature changes. On very low or high temperature the current degrades.

Ni-Cad batteries provides the most optimal life cycle degradation rate, however it very sensitive to the way, you’re using it. The ideal pattern for such batteries is “full charge – full discharge – full charge”, else you’ll suffer from the “memory effect”, I spoke earlier.


As you already understand, there is a wide range of battery types, so chargers are also different for those types of batteries. So, how to know if the charger we have is good for me and what to choose.

The best charger for your battery is the one, you got with the device. It tuned for the battery you have. But can we use 3rd party chargers? The answer is: yes, we can, however it’s very important to understand, that if you have Li-ION battery and slow charger, you might be unable to charge it, even if you’ll put it in forever.

Slow chargers works with current equals to about 1/10 of nominal battery current, thus it will take about 10-12 hours to full recharge cycle. Quick chargers uses 1/2-1 of nominal battery current, so recharge cycle can take between 1 to 3 hours.

In both cases, do not leave NiCd and NiMH batteries in charger for a long time after the end of charging process. Even after the end of charge, those batteries keep charging, thus the quality will degrade. The story is different for Li-ION and Li-Pol batteries, those types of batteries are indifferent for overcharging. They usually have controllers to stop charging process after full recharge.

Car chargers are not very healthy devices to charge batteries. Each time you’re turn your car on, it initiate new charge cycle, thus the quality of battery will degrade.

How to prolong battery life time?

Let’s assume, that most of devices have Li-ION battery. Once, you got a new device do not start using it with minimal capacity, also do not want to full discharge. Recharge it number of times until the capacity will be equal to almost equal to the nominal power.

Also, switch your device to turn into idle mode after reasonable amount of time. It’s better, if it possible to switch or hibernate the device, rather then turn it into idle. Turn off all unused modules (such as GPS, Wi-Fi, Blootooth for mobile phones). Large number of concurrently running processes are also degrade the power quickly, so you can use Vista Battery Saver to decrease this number in Windows Vista. In PDAs, almost all plugins for battery level and processes performance measurement usually only use the battery, rather then provide usable information. If you can, turn GPRS in your mobile phones and use only GSM, this might save about 30% of energy without QoS degradation. Also, in places without coverage mobile phones increase the level of signal, so decrease the time, you can use the device.

If during the charging process, the temperature of battery exceeds 60C (140F), stop charging immediately and recycle the charger. If the battery become swollen, recycle the battery. If Ni-MH battery discharges very quick, it’s possible to restore it, however restore is impossible for Li-ION batteries. If you’re feeling, that the capacity of Ni-MH battery degrades, you can calibrate it. Never train Li-ION batteries, the quality will degrade.

Do not store your battery empty. Charge it unto 40%-50% of nominal capacity and store in 15C (60F) in fridge.  Also it worth to recharge unused batteries once a half-year. However, the best you can do is to use battery. This what it designed for.

Mobile version of this blog

10x to great service of mofuse, I have mobile version of this blog now. So bookmark it:

image image

Here the QR code for your convenience


The truth about HTC has been revealed!

HTC is underground factory, that manufacturing cat eater cyborgs (Cats? Why Cats? Don’t you know, what PDA is? It’s Pussy Defended Asset. Other words male mouser). Especially, those cyborgs eat cats is disguise of Mobile Phones.


Where HTC located?

HTC located on the moon. Not in China. The facility is in one of moon craters inside the old spacecraft, abandoned by HAL from a space odyssey. Once a year, this moonbus rides to the Earth with new cyborgs production on board.

HTC production

At glance, the production of HTC looks like a regular mobile phones, however it has no phone capabilities. Therefore, once it leaves moonbus it eats fist mobile phone found. Momentarily after, cyborg’s internal infrastructure adopts the consumed cat and starts to operate as long as life endures, producing the illusion, that the cyborg is regular mobile phone.

However, the main mission of HTC production is to eat cats. It do the offense nightly, when the owner sleeps. It comes out and every time, seeing a cat, exclaims: “Hey, That’s Cat!”, then swallows the victim. Once the cyborg loaded up, it return to the owner.

The other ability of HTC production is zombying of its owners. It washes their brains and commands them to think, that cyborgs are the best mobile phone ever. All other phones are missing of features and very user unfriendly. Because of it, most of mobile phone owners forgot how to use regular mobile phones.

Cyborg detection

In spite of good camouflage, it’s possible to detect cyborgs:

  • Occasional pressing of phone screen does nothing for regular mobile phones, however cyborgs very sensitive to this action
  • Upper cover of the cyborg consists of strange rectangle thing. It’s the antenna, used by the cyborg for zombying owners.
  • One of following words might appear in cyborg’s front or back panel: i-mate,t-mobile,eten,asus,htc,orange,AT&T
  • Sustained use of cyborgs causes headache or migraine.

The cyborgs are extremely dangerous for cat population of the Earth, thus every time, you detect the cyborg, please, report to WWF, Heath Officer or FBI.

Thank you for cooperation.

[illustration by DaKraken, inspired by absurdopedia]

Phone history or why I throw my Tytn II

I decided to throw out my HTC TYTN II (Actually AT&T Tilt) and get old Nokia E61 back. Why I’m doing it? Tytn is much better, then old Nokia? It’s 3.75G/HSUPA mobile phone, running latest Windows Mobile 6.1 OS. It also has full QUERTY keyboard, 2.8” LCD monitor, 3MP camera and even very good integrated GPS. Nokia has neither. It’s processor is x4 faster and memory x3 bigger. Why I cannot use it? Why I want my old “keyboard brick” back?


First of all, I need phone. Not “freaky damn good uber extensible device”. I want to push one button to receive/make call, push another button to read/answer email. That’s all I need. I need business phone. I do not want to be worry about battery/alarms/meeting/time offset/current time/something wrong/too much processes/no memory/fault/occasionally shutdown/my ears near end call or mute button and all other “goodies” come with TYTN 2 device. I want to be able to dial number without looking on device. I want to be able to do it either when its sunny day outside. I want to push one button to refuse receive call, send “I’m sorry” SMS and turn ring off simultaneously. And I do not want to reinstall ROMS to figure one with small amounts of bugs and then reinstall 300 programs that allows me to do it. I want business phone, that knows what I need.

Just see the regular flow phone usage – make call:

  1. Click power/unlock button
  2. Enter password (there is exchange policy). To do this you have to look on screen. If you wont you’ll absolutely unable to know where each button on screen. Windows mobile using different keyboard for lock and phone utility.
  3. You should press left hardware button. It is not very easy task, ‘cos if your phone doing something now, you’ll wait for response between 1-2 seconds. If you’ll press it twice – you’ll arrive into calendar utility (only for this layout everyone in UX team of Windows Mobile should be fired.
  4. Press Phone button opens dialer utility. If you want any of your last incoming/outgoing/missed calls, you should press another soft button on screen (up jog button not always responses as required)
  5. Choose phone to call (another non-responsive hardware up/down buttons) and then
  6. Press middle big button…
  7. Nothing happes… “OK” button?
  8. You arrived to the contact information (I want to call)!!! Just side note, Windows Mobile is very smart system and if you have more, then one number per contact (work/mobile/office/text) it will call this number by default forever.
  9. Finally I choose a number I want to call (if you choose Text field of contact it brings your SMS interface instead of dialer) and calling the contact
  10. Busy… Redial? Automatic redial? Nothing. Now you should keep sitting and trying to process all above steps each time you want to redial…

Very useful, very easy tool. Isn’t it? Now let’s call the contact with E61

  1. Click unlock button
  2. Enter password (your keyboard is always the same and you should not look into it to dial 5 button is marked)
  3. Move jog up
  4. Move jog down
  5. Move your finger left and up (each button has its unique profile and you can feel it)
  6. Dial
  7. Busy? E61 will redial for you until it’ll catch the contact or you’ll cancel operation. You even do not need to hold phone near ear. Once it success, you’ll hear gentle sound from external speaker.

Should not it work this way? It should, because it is phone, not PDA device.

What about exchange synchronization? Works perfectly. I do not want E61I (successor of E61) it much slower and bugger, then E61. I’m waiting for E71 (smaller) to see if it good for me. but meanwhile, I’m paying $300 to get my E61 back. Someone want to buy my Tilt? Bid in comments.

All above is the reason I do not want IPhone. It’s toy. Very cool and beautiful toy. It is not tool I need everyday.

P.S. I think Microsoft should think a lot about Windows CE 5.x, used as WM. It is not OS for phones, it’s OS for devices with some tools to be able to make calls. Microsoft never be the favorite of mobile market (like Steve Ballmer want it to be), unless they understand, that CE is not operation system for phones. Just in case, currently Nokia holds 33% of the market, next is Motorola (20%), and Samsung (13%). Pay attention all three companies have phone operation system. It’s not about coolness of the device. It’s all about usability of tools.

P.P.S Yes, it’s much easier to find or develop additional tools for Windows Mobile, rather then for Symbian. But I’m ready to pay this bill if I’ll be able to use my phone as phone.

AT&T Tilt

Quick note: New TechEd downloads

There is TechEd in Orlando, and this means, that there are a lot of new announcements. Let’s fill up our download managers with expensive fuel and start.

Silverlight 2.0 beta 2 + Microsoft Expression Blend 2.5 June preview will be available for download very soon. Keep watching. Meanwhile, you can start learn about new TabControl, VisualStateManager, new templating system and cross-domain policy from Tim Heuer’s blog. Also there are some news about event bubbling in beta 2 in Jesse’s blog.





WPF Disciples
Code Project