473,386 Members | 1,702 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,386 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.

thanks,
Rylan
Jan 31 '08 #1
1 6033
Banfa
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

2
by: Gerry Sutton | last post by:
Is it possible to automate and script the windows Hyperterminal utility with Python?
1
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...
1
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...
2
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
1
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,...
7
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. ...
0
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...
0
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...
3
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.