All of lore.kernel.org
 help / color / mirror / Atom feed
* mkiss serial errors
@ 2005-01-18 23:17 ggb112
  0 siblings, 0 replies; only message in thread
From: ggb112 @ 2005-01-18 23:17 UTC (permalink / raw)
  To: linux-hams

Hi all

I am trying to run mkiss directly over a serial wireless link and I plan 
to do FEC to fix up the lost bits. With
78% packet loss I only have a BER of .1%.. so it should be doable. I am 
using the inbuilt flex CRC to detect
packet errors. Packets are of arbitrary length up to mtu=150 and consist 
of 10 bit frames with 8 data bits
as is usual for mkiss. If there are no lost serial frames then I could 
probably do FEC.

However I notice that often  if there is a CRC error then the packet has 
1 or 2 less bytes than was trasnmitted. These
must have been dropped somewhere and I suspect that it was by the serial 
port receiving the data. However mkiss does not
seem to report serial errors.

To be specific, the snippet of code responsible for reporting serial 
errors in mkiss.c is as follows
(see ax25_receive_buf  inside mkiss.c)

        /* Read the characters out of the buffer */
        while (count--) {
                if (fp != NULL && *fp++) {
                        if (!test_and_set_bit(AXF_ERROR, &ax->flags))
                                ax->rx_errors++;
                        cp++;
                        continue;
                }

                kiss_unesc(ax, *cp++);
        }

The if(fp!=NULL && *fp++) statement is never satisfied. Here fp is a 
point to a pointer of serial error flags from tty_io.c .

I cannot understand from the man page for test_and_clear_bit how this 
all works. BTW this snippet of code is identical to that in slip.c


Does anyone know how to make this code report serial errors or if not: 
extract serial errors from mkiss or the kernel

Many thanks

Gerard Borg


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-01-18 23:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-18 23:17 mkiss serial errors ggb112

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.