Onur,
You can modify it that way, although that presumes you are going to run login, I thought you wanted to comment it out.
A rather simple c program to set the serial port baud rate would be
#include <termios.h> int main(int argc, char **argv) { int fd = open(argv[1]); // open the port setSpeed(B9600); close(fd); } int setSpeed( int fd, int speed ) { struct termios ttyset; if ( tcgetattr(fd,&ttyset) < 0 ) return -1;
if ( cfsetispeed(&ttyset,speed) < 0) return -1; if ( cfsetospeed(&ttyset,speed) < 0 ) return -1;
if ( tcsetattr(fd, TCSANOW, &ttyset ) < 0 ) return -1;
return 0; } On 15-Jan-06, at 1:32 PM, Onur T wrote:
Excellent thanks. One last question, If I want to modify the default settings for /dev/ttyAM0 from 115200 to 9600, is it sufficient to modify the two lines in inittab that refer to ttyAM0? Or is there something else I want to modify. ?
SPONSORED LINKS
YAHOO! GROUPS LINKS
- Visit your group "ts-7000" on the web.
- To unsubscribe from this group, send an email to:
=Unsubscribe
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|