--- In "Devashish" <> wrote:
>
> I am working on the TS-7260 for the first time.I am trying out this
> program which does read/write operations on the RS-485 port provided.
> The problem with this program is that it is able to write properly
> onto the port but unable to read from the port.
> Please help me out.....
> Enclosed is the C code.....
> Please reply in case you need more details.
> Thanking you.
As a reference, I've posted my initialisation of the port as
http://pastebin.com/m2b4219aa
When reading/writing, I open the port as:
fd = open(port, O_RDWR )
When writing:
int flags=TIOCM_RTS;
ioctl(fd, TIOCMBIS, &flags );
ret = write(fd, data, sizeof(data));
usleep(ret*500); // based on the linespeed 19200
ioctl(fd, TIOCMBIC, &flags );
When reading:
ret = read(fd, &rxchar, 1);
I hope it gives you any hints on using the port.
wimpunk.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|