thanks.
i did it according to instruction.
i read the input buffer till i get -1.
even, after restarting, when i scan input buffer with incomm i found some data in dm array.
second most important thing is that, whatever data i send through external device (pc) serially, i do not found that data but lot of characters which do not have any significance with data sent.
e.g. i sent '92' from my pc.
when i scan input buffer using incomm i found following data in dm array :
48,88,62,2A,58,22,10,16...... there were 74 such numbers / characters in array. but nothing was there which shows atleast some relation with 92.
for serial communication with pc, protocol was set
(by 'setprotocol' command) to NONE (10)