473,383 Members | 1,759 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,383 software developers and data experts.

Serial Port commmunications

Hi everyone!

I need your help! I'm writting a program to comunicates a PC with a
PinPad trought serial port... I'm using _bios_serialcom from bios.h...
But when I tried to send some data it doesn't work and the return code
from _bios_serialcom starts with 8... I don't know what I'm doing
wrong... Any help would be appreciate!

Here is my fuction sendcommand:

sendcommand(unsigned serial_port, char *pString, short nStringLen)
{
short i;
short nComStatus;

for(i = 0; i < nStringLen; i++)
nComStatus = _bios_serialcom(_COM_SEND, serial_port, pString[i]);

return(nComStatus);
}
Thanks in advance!

Mar 6 '06 #1
2 1566
Hugo wrote:
Hi everyone!

I need your help! I'm writting a program to comunicates a PC with a
PinPad trought serial port... I'm using _bios_serialcom from bios.h...
But when I tried to send some data it doesn't work and the return code
from _bios_serialcom starts with 8... I don't know what I'm doing
wrong... Any help would be appreciate!

Here is my fuction sendcommand:

sendcommand(unsigned serial_port, char *pString, short nStringLen)
{
short i;
short nComStatus;

for(i = 0; i < nStringLen; i++)
nComStatus = _bios_serialcom(_COM_SEND, serial_port, pString[i]);

return(nComStatus);
}
Thanks in advance!

Since the standard C language knows not of concepts like `serial port',
you'll have to ask this in a forum specific to your platform.[1]

HTH,
--ag

[1] Had you read the FAQ (easily found, GIYF) or lurked (as any
prospective poster should) you would have known this. Now you do.

--
Artie Gold -- Austin, Texas
http://goldsays.blogspot.com
"You can't KISS* unless you MISS**"
[*-Keep it simple, stupid. **-Make it simple, stupid.]
Mar 6 '06 #2
Hugo wrote:
Hi everyone!

I need your help! I'm writting a program to comunicates a PC with a
PinPad trought serial port... I'm using _bios_serialcom from bios.h...
But when I tried to send some data it doesn't work and the return code
from _bios_serialcom starts with 8... I don't know what I'm doing
wrong... Any help would be appreciate!


<snip>

Standard C (which is what we discus here) does not have bios.h or
_bios_serialcom. You need to ask in a group dedicated to your system
whatever that may be. For more information on this group, see the link
in my sig and the other things it links to.
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc
Mar 7 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: ^CeFoS^ | last post by:
Hello to everybody, I've done an application that draws in a frame the trajectory of a robot. The robot position is readed through the serial port, and several commands are wrote through the...
2
by: willie | last post by:
Hi, I'm writing a program which requires the use of three serial ports and one parallel port. My application has a scanning devices on each port, which I can access fine with pyserial. ...
3
by: collinm | last post by:
hi i send a command to a led display, the led display is suppose to return me some character i write a string on a serial port void ledDisplayExist() { char msg={'\0', '\0', '\0', '\0',...
13
by: Al the programmer | last post by:
I need to access the serial ports on my webserver from an asp.net page. I have no problem accessing the serial ports from a windows form application, but the code doesn't work in asp.net. I have...
4
by: joe bloggs | last post by:
I am writing a mobile application to interface with a legacy system and I am planning to use web services to communicate with this system. The legacy system receives data through a serial port. ...
4
by: Frank | last post by:
Hello, how to get information about all serial ports in the PC? I use the following code, but i got only the data of the FIRST serial port. All other serial port information are not available...
13
by: Rob | last post by:
Hi all, I am fairly new to python, but not programming and embedded. I am having an issue which I believe is related to the hardware, triggered by the software read I am doing in pySerial. I...
4
by: rowan | last post by:
I'm writing a driver in Python for an old fashioned piece of serial equipment. Currently I'm using the USPP serial module. From what I can see all the serial modules seem to set the timeout when...
6
by: terry | last post by:
Hi, I am trying to send a character to '/dev/ttyS0' and expect the same character and upon receipt I want to send another character. I tired with Pyserial but in vain. Test Set up: 1. Send...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

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.