From: ggb112 <gerard.borg@anu.edu.au>
To: linux-hams@vger.kernel.org
Subject: mkiss serial errors
Date: Wed, 19 Jan 2005 10:17:09 +1100 [thread overview]
Message-ID: <41ED98F5.8080702@anu.edu.au> (raw)
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
reply other threads:[~2005-01-18 23:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41ED98F5.8080702@anu.edu.au \
--to=gerard.borg@anu.edu.au \
--cc=linux-hams@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.