Autor Beitrag
chukalv
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 44



BeitragVerfasst: Mo 19.12.05 18:57 
Is it possible to get/delete SMS`s from an Samsung C-100 mobile phone through a com port? In which direction should I start to search or think to get this ready?



Sorry about egnlsih. I understand german..
Bunbury
ontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 115



BeitragVerfasst: Do 22.12.05 01:50 
.

Grundsätzlich geht das bei jedem Mobiltelephon, sofern es dafür auch ein entsprechendes Schnittstellenkabel gibt. Selber Löten ist nicht einfach, weil der Com-Port auf +/-12V Pegel funktioniert und viele Handys nur mit 0 und 3V arbeiten und die Signale zudem invertiert werden müssen. Also besser Datenkabel kaufen.

Wenn das vorhanden ist, ist das Ganze relativ simpel: fast alle Handys verstehen einige grundsätzliche AT-Befehle mit denen man auch SMS auslesen kann. Eine Liste findest Du hier: www.nobbi.com/atgsm.htm

Allerdings sind die SMS-Nachrichten im 7-Bit PDU-Modus codiert - das zu entschlüsseln ist nicht für jeden ganz einfach. Eine Erklärung wie dieses Format aussieht gibts hier: www.nobbi.com/sms_pdu.htm

Viel Spass!

MfG
Bunbury

Sorry about german. I understand your "egnlsih".

.
chukalv Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 44



BeitragVerfasst: Do 22.12.05 12:57 
Thanks user profile iconBunbury for the answer. Read some more information about the AT commands. Here is a more detailed list with the commands - gatling.ikk.sztaki.hu/~kissg/gsm/at+c.html . As I`m experimenting with Samsung C-100 there are a lot of AT commands listed there.
I`ve already have an USB data cable and I`ve insalled the "usb to com" driver so that the PC thinks that it`s a com cable (or something like that)
I`ve tested some shareware components like mCore and they are working fantastic.
And found a component "Text2PDU" that makes easier the translation from text to PDU very easy..
BUT. I would like to send and receive the AT commands on myself and not to use shareware components.
Can somebody please explaint how is theall thing really working? And how can I send the AT commands? Is it possible to do that with components like Tcomport and in what format should the messages be sent?


Thanks!



Sorry about mu english. I understand german.
Bunbury
ontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 115



BeitragVerfasst: Do 22.12.05 14:39 
.

You can simply search this forum for "ComPort" or similar. There are a lot of very good threads where the procedure is exactly explained.
On Windows 9x-Systems it was easy to transmitt/receive data via the comport, simply writing or reading bytes from any hardwareadress. On NT-Kernel based systems like XP or 2000 you have to use the Windows-API-Functions because of the heavy hardwarerestrictions.
Especially if you want to use an COMtoUSB adapter this way is inevitable.

If you got access to the Comport you can directly send the ASCII-characters, or binary values for any character according to any AT-command and your mobile will answer PDU-Data. To decode the PDU-Data it's useful to recieve binary and not ASCII.

But you will read all this at the other threads.

wbr
Bunbury

P.S: where are u from?

.
chukalv Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 44



BeitragVerfasst: Do 22.12.05 16:00 
Read almost all the topics that are connected with com ports. But I don`t get clear HOW exactly these AT commands have to be sent?
I tried The Tcomport component.
I did that like this:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
procedure TForm1.ComPortRxChar(Sender: TObject; Count: Integer);
var
  Str: String;
begin
  ComPort.ReadStr(Str, Count);
  Memo.Text := Memo.Text + Str;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
ComPort.Open;
ComPort.WriteStr('AT+GMI'); // the AT+GMI is command for getting the manufacturer, should answer "Samsung"
end;

Nothing happens and the TComport don`t gets any answers from the phone...
What am I doing wrong? Do I send the command incorectlly?

P.S.
Yes. The mobile phone is working. With other software it`s answering
And I am from Latvia (to North from Germany;)
Bunbury
ontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 115



BeitragVerfasst: Do 22.12.05 18:55 
.

So you sent "AT+GMI" try: "AT+CGMI" instead. And I did not found in code which Baudrate was set. I'm not sure at the moment, but I think 2400 Baud was used by all mobiles.
If this does not work at all, you should check your connection and what is really sent.

The easiest way is a cross-link (zero-modem) cable if you have a second Com port. Then you can send via com1 and receive data (use any terminalprogramm) from com2.

If you do not have such a cable you can simply connect pin2 of one Com Port to pin3 of the other an vice versa. (pinnumbers for Plugs with 9 pins).

If your operating system blocks your transfer, there is often no Error-Message sent, it just blocks your traffic. You will find out using such a cable.

wbr
Bunbury

.