Solved

Read Messages From 6210 Nokia Mobile

Posted on 2004-08-14
1
302 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 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

Independent Software Vendors: 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

Suggested Solutions

Title # Comments Views Activity
Magic Software info 18 152
CheckListBox usage 3 96
Drag & Drop... Data from one grid to another 2 53
Firemonkey allowing RTL on android 6 75
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

739 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