Linux HAM/Amateur Radio development
 help / color / mirror / Atom feed
From: Matti Aarnio <matti.aarnio@zmailer.org>
To: linux-hams@vger.kernel.org
Subject: Re: mkiss kernel driver problems
Date: Thu, 1 Oct 2009 17:33:17 +0300	[thread overview]
Message-ID: <20091001143317.GD22922@mea-ext.zmailer.org> (raw)
In-Reply-To: <20091001115809.GC22922@mea-ext.zmailer.org>

On Thu, Oct 01, 2009 at 02:58:09PM +0300, Matti Aarnio wrote:
> Mostly the mkiss line discipline module seems to work, but..
> 
>   mkiss: ax0: crc mode is auto.
>   mkiss: ax0: Switchting to crc-smack
> 
> that typo (extra 't') is obvious, but I am wondering,
> why it has growing error counter:

Aargh..  error rate is near 4/256 - meaning I forgot to KISS encode
the SMACK CRC bytes...  

But this Brown Paper Bag  type "user error" is no excuse for
that kernel typo.


Why do I need to feed AX.25 frames from user program to kernel
with SMACK code variant?  My  aprx  software reads async serial
ports itself, and does all manner of port re-init in case of
for example an USB serial dongle needing it.

To live with kernel AX.25 network, serial ports that are not
attached to kernel with kissattach/mkiss do need to be fed
to kernel.  However the feed method may sometimes write incomplete
frame to kernel, and having 1-(2^-16) change of spotting that
is better than without SMACK -- plain KISS has 0 change of spotting
incomplete frame.

What I really would like is to use socket to feed to kernel
AX.25 packets that I got from somewhere, but somehow it does
look like it is not possible at all.  I would do AX.25 socket
creation,  bind() it with callsign I want, and then to send()
using that socket _without_ destination address having ever
been defined.  But I do not think that is really possible, all
sockets are "application" side, never "network devices".
Or can somebody come up with a fancy way to use for example
the raw socket for this ?

That is, a socket which says "I am device N0NNN-5", and sends
raw AX.25 frame to kernel AX.25 "network."

Heck..  I would like to bridge AX.25 network using SCTP's
reliable datagram protocol (or IP/UDP).  The Bridge software
would reside in userspace, but how could I pass a packet
most easily to kernel without going via pty+kiss mess ?


> ax0       Link encap:AMPR AX.25  HWaddr OH2MQK-1
>           UP BROADCAST RUNNING NOARP  MTU:512  Metric:1
>           RX packets:9325 errors:152 dropped:0 overruns:0 frame:0
>           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:10
>           RX bytes:622232 (607.6 KiB)  TX bytes:0 (0.0 b)
> 
> I am feeding this interface from my own software via pty interface,
> where the client side is turned on to KISS line discipline.
> 
> My own software is not complaining about incomplete writes,
> thus I wonder what the kernel is doing ?  Also my software
> is sending on only AX.25 frames that it considers to be valid.
> 
> Does anybody remember how the  mkiss.c  is supposed to work?

  73 de Matti, OH2MQK

      reply	other threads:[~2009-10-01 14:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-01 11:58 mkiss kernel driver problems Matti Aarnio
2009-10-01 14:33 ` Matti Aarnio [this message]

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=20091001143317.GD22922@mea-ext.zmailer.org \
    --to=matti.aarnio@zmailer.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox