[openbeosnetteam] Serial PPP
- From: "David Reid" <dreid@xxxxxxxxxxxx>
- To: "OpenBeOS Network Team" <openbeosnetteam@xxxxxxxxxxxxx>
- Date: Sat, 18 May 2002 13:13:55 +0100
Guys,
Managed to get the ppp/serial_ppp stuff to actually compose a return packet
and then try to send it back along the wire. Only problem is that it doesn't
seem to ever send the packets it builds! I call write and it returns the
correct value, but nothing is ever seen at the other end of the link!
Anyone got any ideas? I'm hesitant about posting code until this part works
as without it it doesn't really do anything!
This is the code I use to setup the port...
ioctl(me->devid, TCGETA, (char *)&options);
options.c_cflag &= ~CBAUD;
options.c_cflag |= B19200;
options.c_cflag |= (CLOCAL | CREAD);
options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
options.c_oflag &= ~OPOST;
options.c_cc[VMIN] = 0;
options.c_cc[VTIME] = 10;
rv = ioctl(me->devid, TCSETA, &options);
if (rv != 0) {
printf("async serial: tcsetattr gave an error!\n");
return(-1);
}
Mean anything to anyone? It reads data no problem, and obviously the code is
extremely primitive and in need of a total rewrite when someone has time :)
david
Other related posts:
- » [openbeosnetteam] Serial PPP