V
Vivek Menon
Hi,
I am using a C program to write/read from a serial port. The writing
part is working perfectly fine. However, I am not able to read the
values correctly and display them. To debug this issue I am also seeing
the values on minicom. Now I have used fcntl() function and then read
refp = fcntl(fd, F_SETFL, 0);
res = read(fd,buf,1024); /* Read the value sent on the serial port
buf[res]=0; /* set end of string, so we can printf */
printf(":%s:%d\n", buf, res);
On minicom I see about more than 256 characters. I need to store all of
them as a string and then process that string. However when I run the
program, the printf statement only displays 8 or 16 characters.
Is there a fix for this issue??
BTW I have used both Canonical and non-canonical processing without any
evident results.
Thanks,
Vivek
I am using a C program to write/read from a serial port. The writing
part is working perfectly fine. However, I am not able to read the
values correctly and display them. To debug this issue I am also seeing
the values on minicom. Now I have used fcntl() function and then read
refp = fcntl(fd, F_SETFL, 0);
res = read(fd,buf,1024); /* Read the value sent on the serial port
buf[res]=0; /* set end of string, so we can printf */
printf(":%s:%d\n", buf, res);
On minicom I see about more than 256 characters. I need to store all of
them as a string and then process that string. However when I run the
program, the printf statement only displays 8 or 16 characters.
Is there a fix for this issue??
BTW I have used both Canonical and non-canonical processing without any
evident results.
Thanks,
Vivek