I am trying to get RS485 running on one of the expansion card ports.
I have the 4 port serial card. My RS485 device is hooked up to COM C,
which has the RS485 option enabled ( the jumper is on.)
When I try to turn on RS485 using
if(proto == RS485HD) {
int mcr, ret;
mcr = AUTO485HD;
//mcr = AUTO485FD //for full duplex
ret = ioctl (fd, TIOC_SBCS485, &mcr);
if(Mb_verbose)
printf("setting RS parameters returned %d: fd: %d, request: %d,
value: %d\n",ret, fd, TIOC_SBCS485, mcr);
}
I always get back a -1 status, meaning that the ioctl call failed.
setting ok:
device /dev/ttyS2
speed 9600
data bits 8
stop bits 1
parity 0
ioctl failed: Invalid argument
setting RS parameters returned -1: fd: 3, request: 1074025585, value: 4
I can't figure out why this is failing.... Anyone have RS485 running
on the expansion card? Could someone shed some light on this?
Thanks,
--Yan
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/CFFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|