Solved

Read Messages From 6210 Nokia Mobile

Posted on 2004-08-14
1
297 Views
Last Modified: 2010-04-05
Hi,

I want to read messages from my mobile and do some calculation on this messages, then save it on my PC.

Note: I used for this connection (Nokia PC Suite 4).
0
Comment
Question by:Mugahied
1 Comment
 
LVL 10

Accepted Solution

by:
_Katka_ earned 250 total points
ID: 11803469
Hi,

1) download this component: http://17slon.com/gp/gp/twircommsocket.htm
2) install it to Delphi as package
3) add the TWIrCommSocket component to your project
4) modify your code like this:

uses WSocket,WIrCOMMSocket;

var
  DeviceList: TIrdaDevicesInfo; // global list of IR enabled devices (e.g. your cell phone)
  RecievedText: AnsiString; // string holder for all recieved data

procedure TForm1.Button1Click(Sender:TObject); // where connection to IR enabled device is done
var
  I:Integer;
begin
   IRConnect1.Close; // as a prevention close possible connection to device
   FreeAndNil(DeviceList); // clears list of devices
   DeviceList := IRConnect1.GetConnectedDevices; // list of all IR enabled devices (in your case Nokia 6210)
   IRConnect1.DeviceID := DeviceList[0].irdaDeviceID; // in case you'll have just one cell phone in range
   IRConnect1.Connect;
end;
   
procedure TForm1.Button2Click(Sender:TObject); // where SMS messages are listed
begin
   IRConnect1.SendStr('AT+CMGL'#13#10); // list of SMSs
// alternatively you can use
   IRConnect1.SendStr('AT+CMGR=?'#13#10); // determine count of SMSs
   IRConnect1.SendStr('AT+CMGR=0'#13#10); // reads first SMS
end;

procedure TForm1.IRConnect1DataAvailable(Sender: TObject;  Error: Word); // (this is IRConnect1 event) where results of previously sended commands are caught
begin
  RecievedText := RecievedText + IRConnect1.RecieveStr;
// alternatively you can use TMemo to view the messages
  Memo1.Text := RecievedText;
end;

Legend:

Form1 = your form name
Memo1 = your memo name for cell phone output
Button1 = your button name for connection attempt
Button2 = your button name for retrieving SMS
IRConnect1 = your TWIrCommSocket name

because all recieved data are in textual format, you'll have to recognize them from RecievedText variable,
but that's not that hard. Just look in Memo1 and you'll know what's going on.

regards,
Kate
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now