473,243 Members | 1,600 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,243 software developers and data experts.

running a c program thruogh hyperterminal

hi Ppl,

I'm doing a project wherein i got to run a c program to read a text string from a cell phone.the cell phone is connected via data cable and my c program has to read an incoming message using AT commands which i got to send out using the hyperterminal.how do i make a c program to run through hyperterminal.
cud anyone help me plzzzz.

Jan 31 '08 #1
1 6018
9,065 Expert Mod 8TB
You don't make a C program that runs through hyperterminal, you make a C program that opens the serial port itself and sends the AT commands and reads the replies.

Are you sure you want to use C rather than C++??

If you are using C then the WIN32 API function calls you will need to look into are

BuildCommDCB Fills a specified DCB structure with values specified in a device-control string.
BuildCommDCBAndTimeouts Translates a device-definition string into appropriate device-control block codes and places them into a device control block.
ClearCommBreak Restores character transmission for a specified communications device and places the transmission line in a nonbreak state.
ClearCommError Retrieves information about a communications error and reports the current status of a communications device.
CommConfigDialog Displays a driver-supplied configuration dialog box.
EscapeCommFunction Directs a specified communications device to perform an extended function.
GetCommConfig Retrieves the current configuration of a communications device.
GetCommMask Retrieves the value of the event mask for a specified communications device.
GetCommModemStatus Retrieves modem control-register values.
GetCommProperties Retrieves information about the communications properties for a specified communications device.
GetCommState Retrieves the current control settings for a specified communications device.
GetCommTimeouts Retrieves the time-out parameters for all read and write operations on a specified communications device.
GetDefaultCommConfig Retrieves the default configuration for the specified communications device.
PurgeComm Discards all characters from the output or input buffer of a specified communications resource.
SetCommBreak Suspends character transmission for a specified communications device and places the transmission line in a break state.
SetCommConfig Sets the current configuration of a communications device.
SetCommMask Specifies a set of events to be monitored for a communications device.
SetCommState Configures a communications device according to the specifications in a device-control block.
SetCommTimeouts Sets the time-out parameters for all read and write operations on a specified communications device.
SetDefaultCommConfig Sets the default configuration for a communications device.
SetupComm Initializes the communications parameters for a specified communications device.
TransmitCommChar Transmits a specified character ahead of any pending data in the output buffer of the specified communications device.
WaitCommEvent Waits for an event to occur for a specified communications device.

Help on these available here.

You will also need the general IO functions below

CloseHandle Closes an open object handle.
CreateFile Creates or opens a file, directory, physical disk, volume, console buffer, tape drive, communications resource, mailslot, or named pipe.
ReadFile Reads data from a file, starting at the position that is indicated by a file pointer. This function can operate synchronously and asynchronously.
ReadFileEx Reads data from a file asynchronously.
WriteFile Writes data to a file at a position that a file pointer specifies. This function can operate synchronously and asynchronously.
WriteFileEx Writes data to a file. This function reports the completion status asynchronously by calling a specified completion routine when writing is completed or canceled and when the calling thread is in an alertable wait state.

Help on these available here.

If rather than C you are going to use C++ or C# then are other options open to you if you use the .NET framework.
Jan 31 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

by: Gerry Sutton | last post by:
Is it possible to automate and script the windows Hyperterminal utility with Python?
by: VB Programmer | last post by:
I want to create a custom console application that is similar to HyperTerminal. Given an ip/port it will connect via TCP and allow the users to type commands to a certain piece of hardware...
by: Cc | last post by:
hi, i would like to call hyperterminal function from vb.net, how do i do that? for example I using hyperterminal to transfer file between pc through modem, so now i would like to controll it in...
by: Dzemal Tipura | last post by:
I need control that work like HyperTerminal made in vb 2003 or 2005 is there anything like that? thx
by: dinh1410 | last post by:
I've read many material and all your direction in this forum, but I still can't capture the caller id. I use SmartLink 56TS V.90 & X2, and my phone line is caller id enabled (when people call me,...
by: C a r l o s A n t o n i o | last post by:
Hello, I have to submit a file via HyperTerminal using my PC's internal modem on a daily basis. Does anybodoy know how to accomplish this in VS2005? Any language is good, VB preferred. ...
by: dyc | last post by:
I'm quite new to use the microsoft visuol studio....all the things I need to learn by myself...so hope can get some help from this forum.. My problem is how do I transmit data using VB language...
by: max232 | last post by:
Guys, I'm trying to send some stuff to a remote device via RS232. Before coding it I want to test the string is sent and received OK via Hyperterminal. The string is T or 16 54 0D in hex. But how...
by: calvinLYP | last post by:
Is it possible to write a program to invoke the hyper terminal? In the sense the program will allow user to enter phone number(maybe plus some others parameters like data bits,baud rate) before it...
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.