Documentation ¶
Overview ¶
Package ax25 provides net.Conn interface for AX.25 connections through TNCs and axports (on Linux).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoLibax25 = errors.New("AX.25 support not included in this build")
Functions ¶
Types ¶
type Address ¶
func AddressFromString ¶
type Beacon ¶
type Beacon interface { Now() error Every(d time.Duration) error LocalAddr() net.Addr RemoteAddr() net.Addr Message() string }
func NewAX25Beacon ¶
type Config ¶
type Config struct { HBaud Baudrate // Baudrate for packet channel [1200/9600]. TXDelay time.Duration // Time delay between PTT ON and start of transmission [(0 - 120) * 10ms]. PacketLength uint8 // Maximum length of the data portion of a packet [0 - 255 bytes]. Persist uint8 // Parameter to calculate probability for the PERSIST/SLOTTIME method [0-255]. SlotTime time.Duration // Period of random number generation intervals for the PERSIST/SLOTTIME method [0-255 * 10ms]. MaxFrame uint8 // Maximum number of packets to be transmitted at one time. FRACK time.Duration // Interval from one transmission until retry of transmission [0-250 * 1s]. ResponseTime time.Duration // ACK-packet transmission delay [0-255 * 100ms]. }
type Conn ¶
type Conn struct { io.ReadWriteCloser // contains filtered or unexported fields }
func DialAX25Timeout ¶
func (*Conn) RemoteAddr ¶
type KenwoodConn ¶
type KenwoodConn struct{ Conn }
KenwoodConn implements net.Conn using a Kenwood (or similar) TNC in connected transparent mode.
Tested with Kenwood TH-D72 and TM-D710 in "packet-mode".
TODO: github.com/term/goserial does not support setting the line flow control. Thus, KenwoodConn is not suitable for sending messages > the TNC's internal buffer size.
We should probably be using software flow control (XFLOW), as hardware flow is not supported by many USB->RS232 adapters including the adapter build into TH-D72 (at least, not using the current linux kernel module.
func DialKenwood ¶
func DialKenwood(dev, mycall, targetcall string, config Config, logger *log.Logger) (*KenwoodConn, error)
Dial a packet node using a Kenwood (or similar) radio over serial
func (*KenwoodConn) Close ¶
func (c *KenwoodConn) Close() error