Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   at commands in c++ (http://www.chiefdelphi.com/forums/showthread.php?t=35735)

daroch 03-03-2005 05:13

at commands in c++
 
Hi.
I'm new in c++ and I want you to help me.
I need a simple program what sends one at command to gsm modem.
I don't know how to open and use com port and that's the biggest problem.

I'll be grateful if you send me this code.

DARO
admin@statsms.net

ace123 04-03-2005 01:01

Re: at commands in c++
 
First of all this is a forum related to the FIRST robotics competition, not programming in general.

I don't know exactly the answer to your question, but to use the COM port in Windows, I think that you output to an imaginary file called "COM1" or "COMx" (x=port number) and read inputs from that file.
FILE *read=fopen("COM1","rb"); // Read from COM1
FILE *write=fopen("COM1","wb"); // Write to COM1

This gives you only raw access to the serial/com port (so you can do basic reads and writes to some devices plugged in).

If you want to do advanced stuff like use your modem to connect to numbers or something, then I have no idea how to use it. You would probably have to use a library to use your modem. Maybe microsoft has some functions to access it.

I would just search on google; I'm sure somebody has this.


All times are GMT -5. The time now is 04:42.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi