Skip to content

Dev #410

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 156 commits into from
Oct 28, 2023
Merged

Dev #410

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
156 commits
Select commit Hold shift + click to select a range
45cad0f
cmake: Avoid try_run when cross-compiling
ew1abz Mar 30, 2020
4a1aa2b
Issue 296 - Avoid potential buffer overflow.
wb2osz Nov 5, 2020
a207287
Issue 298 - Add beacon SOURCE option to override AX.25 source.
wb2osz Nov 7, 2020
714d03f
Bump version number up to 1.7 development.
wb2osz Nov 7, 2020
e272ff8
Issue 269 - Morse code 'I' was sent wrong.
wb2osz Nov 8, 2020
48b9bac
When decoding a third party traffic packet, decode the payload.
wb2osz Nov 14, 2020
adebd06
Issue 297 - FORCE_SSE is always active on i386/amd64
wb2osz Nov 14, 2020
791982a
Merge pull request #261 from ew1abz/dev
wb2osz Nov 14, 2020
fdf660a
New "-d d" command line option for APRStt debug.
wb2osz Nov 22, 2020
9922f17
New AFSK demodulators.
wb2osz Nov 28, 2020
c1e1960
More consistent results.
wb2osz Nov 28, 2020
07fdc75
Raise upper limits.
wb2osz Nov 28, 2020
042a0c4
Addded options to transmit steady tones at various frequencies
BehemothTheKitten Dec 23, 2020
feb1034
Implement DNS-SD publishing of KISS over TCP service on Linux and Mac
hessu Dec 27, 2020
1d67b44
Issue 150 - Check whether platform provides strlcpy & strlcat
wb2osz Dec 31, 2020
52e3a5b
Display speed and altitude in both metric and Imperial units.
wb2osz Dec 31, 2020
8bca486
Merge pull request #305 from BehemothTheKitten/x_fm_calibrate
wb2osz Dec 31, 2020
1cad6ed
Allow radio channel number for -x transmit calibration tone option.
wb2osz Jan 1, 2021
085e837
Enhanced transmit calibration tone option (-x) with channel and tone …
wb2osz Jan 1, 2021
6f95752
Merge branch 'feature/dns-sd' of git://github.com/hessu/direwolf into…
wb2osz Jan 2, 2021
14d6eed
Merge branch 'hessu-feature/dns-sd' into dev
wb2osz Jan 2, 2021
5d02e0b
Issue 292 - Remove serial port speed restriction for Mac OSX.
wb2osz Jan 2, 2021
6513efd
Fix UNITTEST for MacOSX.
wb2osz Jan 2, 2021
81447ed
Comments about units.
wb2osz Jan 2, 2021
8683ddc
Allow multiple TCP KISS ports and option for single radio channel.
wb2osz Jan 5, 2021
7ac1262
Fix Linux build.
wb2osz Jan 5, 2021
667e9ca
Quick hack until I can handle multiple KISS TCP ports properly.
wb2osz Jan 5, 2021
a1afcbb
Limited support for CM108/CM119 GPIO PTT on Windows.
wb2osz Feb 7, 2021
04b32c4
Limited support for CM108/CM119 GPIO support on Windows.
wb2osz Feb 7, 2021
677117b
add sndio support
jg1uaa Feb 25, 2021
c18b562
add sndio support (CMake)
jg1uaa Feb 25, 2021
0c285a0
cosme
jg1uaa Feb 25, 2021
e449e39
Update comments.
wb2osz Mar 13, 2021
09de2f6
Declare cm108 functions explicitly.
jmkristian Mar 14, 2021
7fa91dd
Merge pull request #326 from jmkristian/w6jmk-cm108
wb2osz Mar 16, 2021
44df4a7
Issue 325 - When building regex for Windows, don't repeatedly define …
wb2osz Apr 11, 2021
12de518
Mention installation with Mac Ports.
wb2osz Apr 11, 2021
73d5d13
Recognize Windows form of device path.
wb2osz Apr 11, 2021
0e68a77
Pull Request 322 - SNDIO support for BSD.
wb2osz Apr 11, 2021
6370b26
Pull request 322 - SNDIO support for BSD.
wb2osz Apr 11, 2021
b66c21d
Fix broken hyperlink in README.
wb2osz Apr 11, 2021
6bfd228
Fix errors in comments
dforsi Sep 19, 2021
d10ccb6
Fix errors in strings
dforsi Sep 19, 2021
edc5707
Fix errors in man pages
dforsi Sep 19, 2021
1b3ed76
Add a comment about bundling multiple frames in single transmission.
wb2osz Sep 21, 2021
257d2e3
New get/set methods for packet object.
wb2osz Sep 21, 2021
b777627
More debug code.
wb2osz Sep 21, 2021
1712fbc
cleanup
wb2osz Sep 21, 2021
3220931
Race condition when starting up with transmit queue not empty. Large…
wb2osz Sep 21, 2021
023f675
Avoid serial port write error for Windows,
wb2osz Sep 21, 2021
8619b74
Pull request 353 - Fix spelling errors.
wb2osz Sep 29, 2021
17b9336
Merge branch 'dev' of http://github.com/wb2osz/direwolf into dev
wb2osz Sep 29, 2021
53e9ff7
Add IL2P.
wb2osz Oct 22, 2021
9016fa5
Make IL2P test scripts executable.
wb2osz Oct 22, 2021
6442466
Shut off confusing debug message.
wb2osz Nov 12, 2021
049614d
Fix IL2P for 9600 bps.
wb2osz Nov 23, 2021
9b9744b
Speed up 9600 demodulator.
wb2osz Nov 23, 2021
45cd680
First rough approximation of ICHANNEL.
wb2osz Dec 10, 2021
eef35cf
Issue 367 - AGW monitoring must handle binary data.
wb2osz Dec 19, 2021
65869bc
Issue 366 - Remove 0x from pid in monitor header.
wb2osz Dec 19, 2021
5dbe2ce
Allow speed for GPSNMEA configuration.
wb2osz Dec 29, 2021
42314b7
gpsd 3.23 (API 12) compatibility and cleanups.
wb2osz Jan 2, 2022
366e0ab
Clean up
wb2osz Jan 3, 2022
0f2b241
More error checking for messages.
wb2osz Jan 17, 2022
dcabb8f
Digipeat noid
wb2osz Jan 30, 2022
89021dd
Cleanups
wb2osz Feb 16, 2022
26727bb
Pull request 301
wb2osz Feb 16, 2022
27019b4
The constant thorn in my side.
wb2osz Feb 16, 2022
4f6ca0d
Update tocalls.txt and symbols-new.txt
wb2osz Feb 21, 2022
e108147
Fix ttgrid corner and various cleanups.
wb2osz Feb 25, 2022
0bd31ae
Clean up warnings.
wb2osz Feb 27, 2022
bb16c72
Fix spelling errors
dforsi Mar 22, 2022
a558348
UTF-8 in config file experiment.
wb2osz Mar 23, 2022
3dd125e
UTF-8 discussion
wb2osz Mar 23, 2022
06d6cab
Special ATGP digipeating hack.
wb2osz Mar 23, 2022
368bc42
Spelling errors.
wb2osz Mar 23, 2022
18c65f4
Note for future experiment.
wb2osz Mar 23, 2022
722fefb
Compile warnings.
wb2osz Mar 23, 2022
f97c024
More FX.25 tests.
wb2osz Mar 23, 2022
c9ffbd7
Merge branch 'dev' of http://github.com/wb2osz/direwolf into dev
wb2osz Mar 23, 2022
59288b7
Pull Request 394 - fix compilation on musl
wb2osz May 24, 2022
d11bd6f
pull request 355 - verb correction
wb2osz May 24, 2022
30869c7
Issues 405 & 406 and other improvements in message interpretation.
wb2osz Jul 4, 2022
429d095
Issue 417 - Allow UTF-8 characters for Mac audio device names.
wb2osz Sep 25, 2022
acace8c
Variable speed for gen_packets.
wb2osz Oct 1, 2022
d0fc24a
Just comments.
wb2osz Oct 1, 2022
8913a85
clean up
wb2osz Oct 1, 2022
3973627
Remove cmake warnings about slight name mismatches.
wb2osz Nov 25, 2022
07ea828
Assorted minor cleanups.
wb2osz Nov 25, 2022
17d3d0a
Increase max AFSK filter size.
wb2osz Dec 18, 2022
1d452fe
Tested compatibility with gpsd 3.25.
wb2osz Jan 15, 2023
9553abc
Tested compatibility with gpsd 3.25.
wb2osz Jan 15, 2023
399ffcc
Add in a couple missing includes to clean up build warnings
bjpetit Jan 7, 2023
ef573f2
Pull request 439 - Fix audio level display for B demodulator.
wb2osz Jan 23, 2023
031c937
Issue 444 - Command line -x calibrate tones are reversed
wb2osz Jan 28, 2023
fedfef9
Fix spellling (#409)
dforsi Jan 28, 2023
0f92f46
github actions implementation (#396)
ra1nb0w Jan 28, 2023
04ecdbc
Complete the new ICHANNEL feature.
wb2osz Jan 30, 2023
8e28902
Notes for future.
wb2osz Jan 30, 2023
c25629a
Merge branch 'dev' of http://github.com/wb2osz/direwolf into dev
wb2osz Jan 30, 2023
8cb73d2
More documentation references.
wb2osz Mar 5, 2023
8a97887
Cleanup.
wb2osz Mar 5, 2023
b4b7b13
Improve error message.
wb2osz Mar 5, 2023
cac83f2
Improve error message.
wb2osz Mar 5, 2023
dbb4777
More comments.
wb2osz Mar 5, 2023
7573f99
Improve error message.
wb2osz Mar 5, 2023
eb813e5
Reduce noise.
wb2osz Mar 5, 2023
11468f2
Improve error message.
wb2osz Mar 5, 2023
019ff3b
Update config.c
wb2osz Apr 7, 2023
75ccf18
Improve config error checking.
wb2osz Apr 7, 2023
4cd63df
Use channel rather than port when dumping KISS frame.
wb2osz Apr 26, 2023
4ac666d
Clean up atest EAS receive.
wb2osz Apr 30, 2023
110b85a
Add EAS to gen_packets.
wb2osz May 1, 2023
5fb4081
Remove capability to download tocalls.txt, etc.
wb2osz May 2, 2023
8000e46
Issue 427 - callsign order for AGW protocol 'Y'.
wb2osz May 4, 2023
8e32286
Issue 275 - AGW 'd' would not abort a connect attempt in progress.
wb2osz May 7, 2023
b172734
Issue 401 - Avoid receiving own transmission due to audio crosstalk.
wb2osz May 8, 2023
24a06ae
1.7 dev version G
wb2osz May 8, 2023
92a2097
New warnings for gcc 11.3.
wb2osz May 11, 2023
f8b9cae
Improved error messages.
wb2osz May 14, 2023
577b2b3
Automated test case for EAS SAME.
wb2osz May 14, 2023
b1b3e85
Remove Ubuntu 18 from automated test build.
wb2osz May 14, 2023
0058145
Minor typo.
wb2osz May 14, 2023
e53fa0c
Fix Windows 11 build.
wb2osz May 14, 2023
a3d3143
+x permission
wb2osz May 14, 2023
415a08d
Add AIOC to list for cm108 ptt.
wb2osz May 17, 2023
d6ae84d
Set AIOC HID permission.
wb2osz May 21, 2023
4008153
Silently ignore AGW protocol application login.
wb2osz May 21, 2023
f9cf42b
Better interpretation of bulletin identifiers.
wb2osz Jun 3, 2023
e84a622
Look past third party header for packet filtering.
wb2osz Jun 14, 2023
fed79a7
Mention IL2P transmit for channels besides first.
wb2osz Jul 17, 2023
c5ad945
Fix IL2PTX config parsing (#483)
arodland Jul 17, 2023
9d2ded2
Add TH-D75 and another seen on APRS Thursday.
wb2osz Aug 7, 2023
790c8ab
Additional documentation location.
wb2osz Aug 7, 2023
80bbf5a
FIX_BITS default to 0.
wb2osz Aug 7, 2023
dfc063f
Minor clarifications.
wb2osz Aug 7, 2023
2434e5f
Minor cleanups.
wb2osz Aug 8, 2023
a87b72e
Handle slow Hamlib init. This change adds a retry loop to the (#484)
bjpetit Aug 8, 2023
7a8e432
Issue 486. Maybe.
wb2osz Aug 16, 2023
a08d093
Add FEC type to station heard line.
wb2osz Sep 10, 2023
ba0313c
Add FTM-500D to recognized device identifers.
wb2osz Sep 10, 2023
877d1c7
Fix build on Alpine Linux. issues 150, 319, 344.
wb2osz Sep 23, 2023
3c73a6b
Revert "Fix build on Alpine Linux. issues 150, 319, 344."
wb2osz Sep 23, 2023
ab834f3
Second attempt to fix build on Alpine Linux. issues 150, 319, 344.
wb2osz Sep 25, 2023
6bd296b
glibc 2.38 has strlcpy and strlcat but cmake does not detect it.
wb2osz Oct 14, 2023
6b76e1d
Don't let t1v get out of control.
wb2osz Oct 14, 2023
88e2222
Better keyword for preemptive digipeating.
wb2osz Oct 14, 2023
34ba203
Clean up sample direwolf.conf file.
wb2osz Oct 14, 2023
786e433
Fix comment.
wb2osz Oct 14, 2023
fae30a6
Move to new directory.
wb2osz Oct 14, 2023
7b9325e
Documentation update for release 1.7.
wb2osz Oct 27, 2023
091670a
New device identifier location.
wb2osz Oct 28, 2023
9807304
Bump version to 1.7 release.
wb2osz Oct 28, 2023
62e4566
Change version to 1.7 release.
wb2osz Oct 28, 2023
6ed85d1
User Guide for release 1.7.
wb2osz Oct 28, 2023
2260df1
Release Notes 1.7.
wb2osz Oct 28, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add IL2P.
  • Loading branch information
wb2osz committed Oct 22, 2021
commit 53e9ff7908621307cd9d46d6f54f5a1e06102ff7
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

### New Features: ###

- Improved Layer 2 Protocol [(IL2P)](https://en.wikipedia.org/wiki/FX.25_Forward_Error_Correction). Use "-I 1" to enable transmit for first channel.

- Limited support for CM109/CM119 GPIO PTT on Windows.

- Dire Wolf now advertises itself using DNS Service Discovery. This allows suitable APRS / Packet Radio applications to find a network KISS TNC without knowing the IP address or TCP port. Thanks to Hessu for providing this. Currently available only for Linux and Mac OSX. [Read all about it here.](https://github.com/hessu/aprs-specs/blob/master/TCP-KISS-DNS-SD.md)
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ Dire Wolf now includes [FX.25](https://en.wikipedia.org/wiki/FX.25_Forward_Error

![](fx25.png)

Dire Wolf is a modern software replacement for the old 1980's style TNC built with special hardware.
Version 1.7 adds [IL2P](https://en.wikipedia.org/wiki/Improved_Layer_2_Protocol), a different method of FEC with less overhead.



### Dire Wolf is a modern software replacement for the old 1980's style TNC built with special hardware. ###

Without any additional software, it can perform as:

Expand Down
10 changes: 9 additions & 1 deletion man/direwolf.1
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,15 @@ Divide audio sample by n for first channel.

.TP
.BI "-X " "n"
1 to enable FX.25 transmit.
1 to enable FX.25 transmit. 16, 32, 64 for specific number of check bytes.

.TP
.BI "-I " "n"
Enable IL2P transmit. n=1 is recommended. 0 uses weaker FEC.

.TP
.BI "-i " "n"
Enable IL2P transmit, inverted polarity. n=1 is recommended. 0 uses weaker FEC.

.TP
.BI "-d " "x"
Expand Down
12 changes: 12 additions & 0 deletions man/gen_packets.1
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,18 @@ Force G3RUH modem regardless of data rate.
.BI "-J "
2400 bps QPSK compatible with MFJ-2400.

.TP
.BI "-X " "n"
1 to enable FX.25 transmit. 16, 32, 64 for specific number of check bytes.

.TP
.BI "-I " "n"
Enable IL2P transmit. n=1 is recommended. 0 uses weaker FEC.

.TP
.BI "-i " "n"
Enable IL2P transmit, inverted polarity. n=1 is recommended. 0 uses weaker FEC.


.TP
.BI "-m " "n"
Expand Down
47 changes: 47 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ list(APPEND direwolf_SOURCES
hdlc_rec2.c
hdlc_send.c
igate.c
il2p_codec.c
il2p_scramble.c
il2p_rec.c
il2p_payload.c
il2p_init.c
il2p_header.c
il2p_send.c
kiss_frame.c
kiss.c
kissserial.c
Expand Down Expand Up @@ -289,12 +296,20 @@ target_link_libraries(log2gpx
list(APPEND gen_packets_SOURCES
gen_packets.c
ax25_pad.c
ax25_pad2.c
fx25_encode.c
fx25_extract.c
fx25_init.c
fx25_send.c
hdlc_send.c
fcs_calc.c
gen_tone.c
il2p_codec.c
il2p_scramble.c
il2p_payload.c
il2p_init.c
il2p_header.c
il2p_send.c
morse.c
dtmf.c
textcolor.c
Expand All @@ -321,14 +336,22 @@ list(APPEND atest_SOURCES
demod_9600.c
dsp.c
fx25_extract.c
fx25_encode.c
fx25_init.c
fx25_rec.c
hdlc_rec.c
hdlc_rec2.c
il2p_codec.c
il2p_scramble.c
il2p_rec.c
il2p_payload.c
il2p_init.c
il2p_header.c
multi_modem.c
rrbb.c
fcs_calc.c
ax25_pad.c
ax25_pad2.c
decode_aprs.c
dwgpsnmea.c
dwgps.c
Expand Down Expand Up @@ -421,6 +444,29 @@ if(WIN32 OR CYGWIN)
endif()


# TNC interoperability testing for AX.25 connected mode.
# tnctest
list(APPEND tnctest_SOURCES
tnctest.c
textcolor.c
dtime_now.c
serial_port.c
)

add_executable(tnctest
${tnctest_SOURCES}
)

target_link_libraries(tnctest
${MISC_LIBRARIES}
Threads::Threads
)

if(WIN32 OR CYGWIN)
target_link_libraries(tnctest ws2_32)
endif()


# List USB audio adapters than can use GPIO for PTT.
# Originally for Linux only (using udev).
# Version 1.7 adds it for Windows. Needs hidapi library.
Expand Down Expand Up @@ -520,6 +566,7 @@ install(TARGETS gen_packets DESTINATION ${INSTALL_BIN_DIR})
install(TARGETS atest DESTINATION ${INSTALL_BIN_DIR})
install(TARGETS ttcalc DESTINATION ${INSTALL_BIN_DIR})
install(TARGETS kissutil DESTINATION ${INSTALL_BIN_DIR})
install(TARGETS tnctest DESTINATION ${INSTALL_BIN_DIR})
install(TARGETS appserver DESTINATION ${INSTALL_BIN_DIR})
if(UDEV_FOUND OR WIN32 OR CYGWIN)
install(TARGETS cm108 DESTINATION ${INSTALL_BIN_DIR})
Expand Down
6 changes: 5 additions & 1 deletion src/atest.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This file is part of Dire Wolf, an amateur radio packet TNC.
//
// Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2019 John Langner, WB2OSZ
// Copyright (C) 2011, 2012, 2013, 2014, 2015, 2016, 2019, 2021 John Langner, WB2OSZ
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -82,6 +82,7 @@
#include "ptt.h"
#include "dtime_now.h"
#include "fx25.h"
#include "il2p.h"
#include "hdlc_rec.h"


Expand Down Expand Up @@ -189,6 +190,7 @@ static int h_opt = 0; // Hexadecimal display of received packet.
static char P_opt[16] = ""; // Demodulator profiles.
static int d_x_opt = 1; // FX.25 debug.
static int d_o_opt = 0; // "-d o" option for DCD output control. */
static int d_2_opt = 0; // "-d 2" option for IL2P details. */
static int dcd_count = 0;
static int dcd_missing_errors = 0;

Expand Down Expand Up @@ -389,6 +391,7 @@ int main (int argc, char *argv[])
switch (*p) {
case 'x': d_x_opt++; break; // FX.25
case 'o': d_o_opt++; break; // DCD output control
case '2': d_2_opt++; break; // IL2P debug out
default: break;
}
}
Expand Down Expand Up @@ -539,6 +542,7 @@ int main (int argc, char *argv[])
}

fx25_init (d_x_opt);
il2p_init (d_2_opt);

start_time = dtime_now();

Expand Down
20 changes: 19 additions & 1 deletion src/audio.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,11 @@ struct audio_s {
float recv_ber; /* Receive Bit Error Rate (BER). */
/* Probability of inverting a bit coming out of the modem. */

int fx25_xmit_enable; /* Enable transmission of FX.25. */
//int fx25_xmit_enable; /* Enable transmission of FX.25. */
/* See fx25_init.c for explanation of values. */
/* Initially this applies to all channels. */
/* This should probably be per channel. One step at a time. */
/* v1.7 - replaced by layer2_xmit==LAYER2_FX25 */

int fx25_auto_enable; /* Turn on FX.25 for current connected mode session */
/* under poor conditions. */
Expand Down Expand Up @@ -156,6 +157,23 @@ struct audio_s {
/* Might try MFJ-2400 / CCITT v.26 / Bell 201 someday. */
/* No modem. Might want this for DTMF only channel. */

enum layer2_t { LAYER2_AX25 = 0, LAYER2_FX25, LAYER2_IL2P } layer2_xmit;

// IL2P - New for version 1.7.
// New layer 2 with FEC. Much less overhead than FX.25 but no longer backward compatible.
// Only applies to transmit.
// Listening for FEC sync word should add negligible overhead so
// we leave reception enabled all the time as we do with FX.25.
// TODO: FX.25 should probably be put here rather than global for all channels.

int fx25_strength; // Strength of FX.25 FEC.
// 16, 23, 64 for specific number of parity symbols.
// 1 for automatic selection based on frame size.

int il2p_max_fec; // 1 for max FEC length, 0 for automatic based on size.

int il2p_invert_polarity; // 1 means invert on transmit. Receive handles either automatically.

enum v26_e { V26_UNSPECIFIED=0, V26_A, V26_B } v26_alternative;

// Original implementation used alternative A for 2400 bbps PSK.
Expand Down
4 changes: 3 additions & 1 deletion src/ax25_pad.c
Original file line number Diff line number Diff line change
Expand Up @@ -2751,6 +2751,7 @@ unsigned short ax25_m_m_crc (packet_t pp)
unsigned char fbuf[AX25_MAX_PACKET_LEN];
int flen;

// TODO: I think this can be more efficient by getting the packet content pointer instead of copying.
flen = ax25_pack (pp, fbuf);

crc = 0xffff;
Expand Down Expand Up @@ -2803,7 +2804,8 @@ unsigned short ax25_m_m_crc (packet_t pp)
*
*------------------------------------------------------------------*/

#define MAXSAFE 500
//#define MAXSAFE 500
#define MAXSAFE AX25_MAX_INFO_LEN

void ax25_safe_print (char *pstr, int len, int ascii_only)
{
Expand Down
60 changes: 54 additions & 6 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ static int check_via_path (char *via_path)
*
*--------------------------------------------------------------------*/

#define MAXCMDLEN 256
#define MAXCMDLEN 1200


static char *split (char *string, int rest_of_line)
Expand Down Expand Up @@ -770,6 +770,10 @@ void config_init (char *fname, struct audio_s *p_audio_config,
p_audio_config->achan[channel].num_freq = 1;
p_audio_config->achan[channel].offset = 0;

p_audio_config->achan[channel].layer2_xmit = LAYER2_AX25;
p_audio_config->achan[channel].il2p_max_fec = 1;
p_audio_config->achan[channel].il2p_invert_polarity = 0;

p_audio_config->achan[channel].fix_bits = DEFAULT_FIX_BITS;
p_audio_config->achan[channel].sanity_test = SANITY_APRS;
p_audio_config->achan[channel].passall = 0;
Expand Down Expand Up @@ -2252,7 +2256,7 @@ void config_init (char *fname, struct audio_s *p_audio_config,
* 0 = off, 1 = auto mode, others are suggestions for testing
* or special cases. 16, 32, 64 is number of parity bytes to add.
* Also set by "-X n" command line option.
* Current a global setting. Could be per channel someday.
* V1.7 changed from global to per-channel setting.
*/

else if (strcasecmp(t, "FX25TX") == 0) {
Expand All @@ -2265,13 +2269,15 @@ void config_init (char *fname, struct audio_s *p_audio_config,
}
n = atoi(t);
if (n >= 0 && n < 200) {
p_audio_config->fx25_xmit_enable = n;
p_audio_config->achan[channel].fx25_strength = n;
p_audio_config->achan[channel].layer2_xmit = LAYER2_FX25;
}
else {
p_audio_config->fx25_xmit_enable = 1;
p_audio_config->achan[channel].fx25_strength = 1;
p_audio_config->achan[channel].layer2_xmit = LAYER2_FX25;
text_color_set(DW_COLOR_ERROR);
dw_printf ("Line %d: Unreasonable value for FX.25 transmission mode. Using %d.\n",
line, p_audio_config->fx25_xmit_enable);
line, p_audio_config->achan[channel].fx25_strength);
}
}

Expand Down Expand Up @@ -2304,6 +2310,48 @@ void config_init (char *fname, struct audio_s *p_audio_config,
}
}

/*
* IL2PTX [ + - ] [ 0 1 ] - Enable IL2P transmission. Default off.
* "+" means normal polarity. Redundant since it is the default.
* (command line -I for first channel)
* "-" means inverted polarity. Do not use for 1200 bps.
* (command line -i for first channel)
* "0" means weak FEC. Not recommended.
* "1" means stronger FEC. "Max FEC." Default if not specified.
*/

else if (strcasecmp(t, "IL2PTX") == 0) {

p_audio_config->achan[channel].layer2_xmit = LAYER2_IL2P;
p_audio_config->achan[channel].il2p_max_fec = 1;
p_audio_config->achan[channel].il2p_invert_polarity = 0;

while ((t = split(NULL,0)) != NULL) {
for (char *c = t; *t != '\0'; c++) {
switch (*c) {
case '+':
p_audio_config->achan[channel].il2p_invert_polarity = 0;
break;
case '-':
p_audio_config->achan[channel].il2p_invert_polarity = 1;
break;
case '0':
p_audio_config->achan[channel].il2p_max_fec = 0;
break;
case '1':
p_audio_config->achan[channel].il2p_max_fec = 1;
break;
default:
text_color_set(DW_COLOR_ERROR);
dw_printf ("Line %d: Invalid parameter '%c' fol IL2PTX command.\n", line, *c);
continue;
break;
}
}
}
}


/*
* ==================== APRS Digipeater parameters ====================
*/
Expand Down Expand Up @@ -5399,7 +5447,7 @@ static int beacon_options(char *cmd, struct beacon_s *b, int line, struct audio_
while ((t = split(NULL,0)) != NULL) {

char keyword[20];
char value[200];
char value[1000];
char *e;
char *p;

Expand Down
Loading