Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Read Messages From 6210 Nokia Mobile

Posted on 2004-08-14
1
Medium Priority
?
307 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 10

Accepted Solution

by:
_Katka_ earned 1000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

610 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