FYI- ttyAM2 is not the correct /dev entry. You should be
using /dev/ttyTS0
--- In "Eduardo Mendiola" <>
wrote:
>
> Hi,
>
> I'm able to read a serial device on COM2 (/dev/ttyAM2) by opening
> the port with
>
> fd = open("/dev/ttyAM1", O_RDWR | O_NOCTTY | O_NDELAY);
>
> and then, initializing it with (9600,8,n,1):
>
> struct termios options;
> // Get the current options for the port...
> tcgetattr(fd, &options);
>
> // Set the baud rates to 19200...
> cfsetispeed(&options, B9600);
> cfsetospeed(&options, B9600);
>
> // Set the new options for the port...
> tcsetattr(fd, TCSANOW, &options);
>
> // Enable the receiver and set local mode...
> options.c_cflag = 2096;
> options.c_lflag = 0;
> options.c_iflag = 4;
> options.c_oflag = 0;
> options.c_cflag |= (CLOCAL | CREAD);
> options.c_cflag &= ~PARENB; // No Parity
> options.c_cflag &= ~CSTOPB; // 1 Stop bit
> options.c_cflag &= ~CSIZE; // No Bit mask for size
> options.c_cflag |= CS8; // Size 8 bits
> options.c_cflag &= ~CRTSCTS; // disable XON/XOFF
>
> // Set the new options for the port...
> tcsetattr(fd, TCSANOW, &options);
>
> When I try to do the same on COM3 (TS-7KV = /dev/ttyAM2),
> no characters are read.
>
> The ts7kvserial driver is loaded.
>
> Am I missing something specific to the TS-7KV?
>
> Thanks,
>
> Eduardo
>
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/
|