There are quite a few different reasons why you might receive the wrong character.
You are telling very little about your hardware setup, so I can only give general advice for how you can find the error.
The most common is that you haven't configured the port correctly.
Make dead sure you have set the baud rate, data bits, parity and stop bits correctly.
Some devices, for example a barcode scanner, might use 7 data bits and even parity.
So check the documentation for the device you are communicating with.
If you have the possibility, you could connect your smart device to a PC where you run HyperTerminal or something, and then send data from the PC to your device.
This way you can debug your software on the smart device in a controlled way.
Another good debug tool is a little hardware sniffer. Plug that in between your devices and listen to the communication with a PC and a terminal program.
See
An RS232 "spy" cable[
^] for an example.
If you work on a Windows PC, PortMon is an exellent tool for checking the low level communication. It's a free tool and can be downloaded from here:
Portmon for Windows[
^]
I doubt you can use this on your smart device, though.
[UPDATE]
Ok, so you are communicating over IrDA. Well at least that excludes a problem with the cable.
If I understand you correctly you have 3 devices.
1. An XP laptop(?), called XP
2. A smart device, called SD
3. An electronic card, called EC
(All of them have an IrDA port.)
Use the matrix below and test the result of connecting the 3 devices the different combinations.
I find it helpful to write down what you have tried, because after a wile it is easy to get lost and try the same combination more than once.
If you need you can expand the matrix and add combinations of hardware and software you have tested.
It is weird if you can communicate between the XP - SD and get a good result and the XP - EC but not the SD - EC.
Especially if you are using the same port settings, such as baudrate and parity.