PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

help with serial port


Your Ad Here

Your Ad Here

I need help, i can't figure out why this code doesnt work. I am using linux. All i want to be able to do is write some text to an LCD attached to my serial port on a linux machine. The LCD is serial and I know it works, baud is 2400 1N8. Attached to com 2. can someone tell me whats up with this code?? code definitions *definitions *definitions *

* insert the brackets for each include *

int fd;

int openport() {

Downloading to an MP3 player Organisation: Free Agent via Linux OS and Wine Emulator
You have gotten a lot of information ... I'll just back up a step and make sure your MP3 player is actually supported. My MP3 player actually has a built in...

struct termios options;

fd = open("-dev-ttyS1", ORDWR ONOCTTY ONDELAY );

if (fd == -1) { fprintf(stderr, "openport: Unable to opendev-ttyS1 - %s-n", strerror(errno)); } else { fcntl(fd, FSETFL, FNDELAY );

if ( tcgetattr(fd, &options ) ) { fputs("fehler-n", stderr); exit (-1); }

cfsetispeed(&options, B2400); cfsetospeed(&options, B2400);

options.ccflag &= ~PARENB; options.ccflag &= ~CSTOPB; options.ccflag &= ~CSIZE; options.ccflag = CS8;

options.clflag = (ICANON ECHO ECHOE);

-options.ccflag = (CLOCAL CREAD);-options.ccflag = PARENB;* no parity *--options.ccflag = 0;-options.ccflag = ~CSTOPB;-options.ccflag = CS8;* 7 data bits *--options.ccflag = CRTSCTS;

* Enable data to be processed as raw input *--options.clflag &= ~(ICANON ECHO ISIG);

* Set the new options for the port *if ( tcsetattr( fd, TCSANOW, &options ) ) { fputs("fehler-n", stderr); exit (-1); }

} return (fd); } int main() {

Mozilla Thunderbird Linux
Paragon NTFS for Linux 1.1 - Soft.comParagon NTFS for Linux is designed to mount NTFS parbreastions under Linux operating ... System Requirements...

int n=0;

openport();

n = write( fd, "outsp00 25-n", 13 ); fputs("Error-n", stderr);

* Close the serial port *close(fd);

return 1; }

Downloading to an MP3 player
On Sat, 08 Oct 2005 19:58:12 -0400, Saul Lubkin Hi Saul, I sent a reply to youre email to me. Here is my fstab ... # This file is edited by fstab-sync - see...

-code



Your Ad Here

List | Previous | Next

Mozilla Thunderbird Linux

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

buffering on named pipes