리눅스에서 장비와 통신을 하기위해 시리얼 통신 프로그램을 만들어야해서
여기저기 자료와 샘플을 구해서 실행하는데 수신은 되도 송신을 게속 안되네요.
아시는 분들은 꼭 좀 해결 방법을 알려주시면 정말 감사하겠습니다.
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <termios.h>
#include <stdio.h>
#define BAUDRATE B9600
#define DEVICE "/dev/ttyS0"
int fd,res,i;
struct termios oldtio, newtio;
char buf[15]={0};
int main(void)
{
fd=open(DEVICE,O_RDWR | O_NOCTTY );