// Just dump everything we see on the line into a file // need to link with serials.c to get coms stuff and logfile // we usually talk to /dev/ttyS05 for the radio modem // and log to a file called basecoms.log #include #include // need this to set the serial speed like B9600 #include #include main () { int fd, n; unsigned char byte; FILE *store_file; // open port initialise_coms("/dev/ttyS5", B9600, "basecoms.log"); store_file = fopen ("packets", "a"); while (1){ fprintf(store_file, "%x\n", getbyte()); fflush(store_file); } }