Thanks. I tried all possibilities and suggestions discussed in the forum
related to the serial ports in TS-7800, ultimately I end up writing a simple
native C application which is working perfectly ok with 2 other ARM boards,
X86, 86-64, etc. When I debugged using the native gdb supplied in BSP (I
love this feature), the program is hanging for ever in the C read(FD,
buffer, length) library call. Here is a tailored version of my application,
any suggestion is greatly appreciated. Time is running out on my end, I need
to make a suggestion to the bosses on the board selection.
::open("/dev/ttyS1", O_RDWR | O_NOCTTY | O_NDELAY );
//I tried this too
//::open("/dev/ttyS1", O_RDWR | O_NOCTTY | O_NONBLOCK );
//I tried this too
//::open("/dev/ttyS1", O_RDWR | O_NOCTTY | O_NONBLOCK | O_NDELAY);
And I tried many combinations.
int ReadData(char* buffer, unsigned int length)
{
if(m_fd < 0){
__MESSAGE("Port not open for reading\n","");
return -1;
}
int bytesRead = ::read(m_fd, buffer, length);
if( bytesRead < 0 ){
__MESSAGE("No data read: %s\n", bytesRead);
buffer[0] = '\0';
}else{
buffer[bytesRead] = '\0';
}
return bytesRead;
}
int WriteData(const char* buffer, unsigned int length)
{
if(m_fd < 0){
__MESSAGE("Port not open for writing\n", "");
return -1;
}
return ::write(m_fd, buffer, length);
}
________________________________________
From: On Behalf Of
naturalwatt
Sent: Thursday, July 24, 2008 4:39 AM
To:
Subject: [ts-7000] Re: None of the serial port s are detected.
--- In Frank <> wrote:
>
> Best guess is the ports are being held open by getty. By default, ttyS0
> and ttyS1 are grabbed by the getty process. getty is what gives you the
> serial port terminal access (if needed). With a null modem cable you
> could use something like Windows HyperTerm to log onto your 7800.
>
> In your /etc/inittab file, you will see these two lines about 2/3 down:
>
> # By default, run gettys on both serial ports
> T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100
> T1:23:respawn:/sbin/getty -L ttyS1 115200 vt100
>
> To gain access to ttyS1, as root, edit this file and comment out the
> 'T1' entry:
>
> # By default, run gettys on both serial ports
> T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100
> # T1:23:respawn:/sbin/getty -L ttyS1 115200 vt100
>
> Save the file, reboot, and you should be all set.
>
You don't need to reboot after editting inittab. just type init q.
------------------------------------
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/
|