ts-7000
[Top] [All Lists]

[ts-7000] Re: TS7200 COM2 - ttyAM1 Issues

To:
Subject: [ts-7000] Re: TS7200 COM2 - ttyAM1 Issues
From: "bonjelo2000" <>
Date: Thu, 05 Feb 2009 10:01:16 -0000
Hi,

 I am attempting to communicate with a device.

I use the folowing write and read commands.  The write appears to work
in that the device responds correctly to the appropriate command sent.
The read command always returns a -1.

  i=write(fd_com,cSendBuf,iSendLen);

  sleep(1);

  iReturnLen=read(fd_com,cRecBuf,6);


int  comm_init ()
{
  struct termios termConf;
  bzero (&termConf, sizeof (struct termios));

  tcgetattr(fd_com, &termConf);

  termConf.c_cflag = B38400 | CREAD | CLOCAL;
  termConf.c_cflag |= PARENB;
  termConf.c_cflag &= ~PARODD;
  termConf.c_cflag &= ~CSIZE;
  termConf.c_cflag |= CS8;
  termConf.c_cflag |= CRTSCTS;
 
  fd_com = open(PORT, O_RDWR | O_NOCTTY | O_NDELAY);
  if (fd_com < 0)
    {
      return FAILURE;
    }

  tcsetattr(fd_com, TCSADRAIN, &termConf);      // Set the new options for
the port...
  
  return SUCCESS;
}



-----------------------------------------------------
So what are you trying to do?

I don't understand what you mean by "read commands"?

did you write a program to use COM2, or are you trying to use
it as a login port?






------------------------------------

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/

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU