Compare commits

...

349 Commits

Author SHA1 Message Date
wb2osz 390d4a8c27
Update ci.yml
Upload artifact v2 doesn't work anymore.
2024-09-13 11:53:01 -04:00
Rafael Gustavo da Cunha Pereira Pinto 69407ccf84 Update codeql-analysis.yml 2024-05-06 14:30:42 -04:00
Rafael Gustavo da Cunha Pereira Pinto 41e7851376 Update codeql-analysis-python.yml 2024-05-06 14:30:42 -04:00
Rafael Gustavo da Cunha Pereira Pinto c5c7d4a44d Update codeql-analysis-python.yml 2024-05-06 14:30:42 -04:00
Rafael Gustavo da Cunha Pereira Pinto e7b4650935 Update codeql-analysis.yml 2024-05-06 14:30:42 -04:00
Rafael Gustavo da Cunha Pereira Pinto 21048d5d1a Create codeql-analysis-python.yml 2024-05-06 14:30:42 -04:00
Rafael Gustavo da Cunha Pereira Pinto 3aa8097461 removing python from codeql-analysis.yml 2024-05-06 14:30:42 -04:00
Rafael Gustavo da Cunha Pereira Pinto 3f3fed216b Update codeql-analysis.yml 2024-05-06 14:30:42 -04:00
Rafael Gustavo da Cunha Pereira Pinto 9ae4edcabf Update codeql-analysis.yml 2024-05-06 14:30:42 -04:00
Rafael Gustavo da Cunha Pereira Pinto 7935054ee3 Update codeql-analysis.yml 2024-05-06 14:30:42 -04:00
Rafael Gustavo da Cunha Pereira Pinto c499496bbc Update CMakeLists.txt 2024-05-06 14:30:42 -04:00
Rafael Gustavo da Cunha Pereira Pinto 0a1670f7c2 Update codeql-analysis.yml 2024-05-06 14:30:42 -04:00
Rafael Gustavo da Cunha Pereira Pinto 7552105282 Update codeql-analysis.yml to v2 2024-05-06 14:30:42 -04:00
wb2osz de293a1f25 Merge remote-tracking branch 'origin/dev' 2023-10-28 16:03:04 +01:00
wb2osz 2260df15a5 Release Notes 1.7. 2023-10-28 15:01:48 +01:00
wb2osz 6ed85d12b1 User Guide for release 1.7. 2023-10-28 02:03:55 +01:00
wb2osz 62e4566cc9 Change version to 1.7 release. 2023-10-28 02:03:19 +01:00
wb2osz 9807304d63 Bump version to 1.7 release. 2023-10-28 01:10:20 +01:00
wb2osz 091670a917 New device identifier location. 2023-10-28 01:00:50 +01:00
wb2osz 7b9325ecb6 Documentation update for release 1.7. 2023-10-27 23:31:57 +01:00
wb2osz fae30a6035 Move to new directory. 2023-10-14 22:34:32 +01:00
wb2osz 786e43322f Fix comment. 2023-10-14 17:45:39 +01:00
wb2osz 34ba203532 Clean up sample direwolf.conf file. 2023-10-14 17:39:42 +01:00
wb2osz 88e2222db6 Better keyword for preemptive digipeating. 2023-10-14 17:37:46 +01:00
wb2osz 6b76e1d98d Don't let t1v get out of control. 2023-10-14 17:34:46 +01:00
wb2osz 6bd296bd7e glibc 2.38 has strlcpy and strlcat but cmake does not detect it. 2023-10-14 17:31:07 +01:00
wb2osz ab834f338b Second attempt to fix build on Alpine Linux. issues 150, 319, 344. 2023-09-25 03:17:15 +01:00
wb2osz 3c73a6b2b2 Revert "Fix build on Alpine Linux. issues 150, 319, 344."
This reverts commit 877d1c7707.
2023-09-22 22:43:12 -04:00
wb2osz 877d1c7707 Fix build on Alpine Linux. issues 150, 319, 344. 2023-09-23 02:48:28 +01:00
wb2osz ba0313ca78 Add FTM-500D to recognized device identifers. 2023-09-11 00:08:58 +01:00
wb2osz a08d0939b5 Add FEC type to station heard line. 2023-09-11 00:07:36 +01:00
wb2osz 7a8e4320ac Issue 486. Maybe. 2023-08-16 15:00:10 +01:00
Brent Petit a87b72e040
Handle slow Hamlib init. This change adds a retry loop to the (#484)
rig_open call. If the rig_open continues to fail after 5 tries,
exit.
2023-08-08 13:48:53 -04:00
wb2osz 2434e5f13b Minor cleanups. 2023-08-08 17:34:06 +01:00
wb2osz dfc063f905 Minor clarifications. 2023-08-08 00:14:47 +01:00
wb2osz 80bbf5a553 FIX_BITS default to 0. 2023-08-08 00:02:44 +01:00
wb2osz 790c8ab723 Additional documentation location. 2023-08-07 23:51:08 +01:00
wb2osz 9d2ded2eec Add TH-D75 and another seen on APRS Thursday. 2023-08-07 23:47:48 +01:00
Andrew Rodland c5ad945c3c
Fix IL2PTX config parsing (#483)
We were checking `*t` for end of string instead of `*c`, but `t` never changes, so we would run off of the end of the buffer and output a very large number of config errors before eventually crashing.
2023-07-17 13:21:22 -04:00
wb2osz fed79a7978 Mention IL2P transmit for channels besides first. 2023-07-17 02:28:16 +01:00
wb2osz e84a622515 Look past third party header for packet filtering. 2023-06-14 01:37:08 +01:00
wb2osz f9cf42b291 Better interpretation of bulletin identifiers. 2023-06-03 20:24:30 +01:00
wb2osz 4008153334 Silently ignore AGW protocol application login. 2023-05-21 21:32:54 +01:00
wb2osz d6ae84daad Set AIOC HID permission. 2023-05-21 21:27:48 +01:00
wb2osz 415a08da1e Add AIOC to list for cm108 ptt. 2023-05-18 00:17:39 +01:00
wb2osz a3d3143d21 +x permission 2023-05-15 00:45:02 +01:00
wb2osz e53fa0c110 Fix Windows 11 build. 2023-05-14 23:33:06 +01:00
wb2osz 0058145eff Minor typo. 2023-05-14 23:32:05 +01:00
wb2osz b1b3e854be Remove Ubuntu 18 from automated test build. 2023-05-14 23:30:44 +01:00
wb2osz 577b2b3cf2 Automated test case for EAS SAME. 2023-05-14 23:27:45 +01:00
wb2osz f8b9cae461 Improved error messages. 2023-05-14 23:25:02 +01:00
wb2osz 92a2097d30 New warnings for gcc 11.3. 2023-05-11 21:29:45 +01:00
wb2osz 24a06aef9e 1.7 dev version G 2023-05-08 03:23:26 +01:00
wb2osz b1727345e0 Issue 401 - Avoid receiving own transmission due to audio crosstalk. 2023-05-08 02:27:59 +01:00
wb2osz 8e32286604 Issue 275 - AGW 'd' would not abort a connect attempt in progress. 2023-05-07 02:38:00 +01:00
wb2osz 8000e46c02 Issue 427 - callsign order for AGW protocol 'Y'. 2023-05-04 18:56:09 +01:00
wb2osz 5fb4081c86 Remove capability to download tocalls.txt, etc. 2023-05-02 02:27:15 +01:00
wb2osz 110b85a781 Add EAS to gen_packets. 2023-05-01 02:41:05 +01:00
wb2osz 4ac666df6a Clean up atest EAS receive. 2023-04-30 21:48:51 +01:00
wb2osz 4cd63df5be Use channel rather than port when dumping KISS frame. 2023-04-26 01:07:05 +01:00
wb2osz 75ccf181f9 Improve config error checking. 2023-04-07 16:29:27 -04:00
wb2osz 019ff3bda6 Update config.c 2023-04-07 14:14:32 -04:00
wb2osz 11468f26f8 Improve error message. 2023-03-05 15:38:06 +00:00
wb2osz eb813e5804 Reduce noise. 2023-03-05 15:12:49 +00:00
wb2osz 7573f996c4 Improve error message. 2023-03-05 15:11:00 +00:00
wb2osz dbb4777ba7 More comments. 2023-03-05 15:10:05 +00:00
wb2osz cac83f2506 Improve error message. 2023-03-05 15:07:46 +00:00
wb2osz b4b7b1388d Improve error message. 2023-03-05 15:06:48 +00:00
wb2osz 8a978876bd Cleanup. 2023-03-05 15:06:07 +00:00
wb2osz 8cb73d2507 More documentation references. 2023-03-05 15:04:31 +00:00
wb2osz c25629a286 Merge branch 'dev' of http://github.com/wb2osz/direwolf into dev 2023-01-30 03:09:23 +00:00
wb2osz 8e289025d7 Notes for future. 2023-01-30 03:03:30 +00:00
wb2osz 04ecdbc6fc Complete the new ICHANNEL feature. 2023-01-30 02:50:17 +00:00
ra1nb0w 0f92f463f4
github actions implementation (#396)
* Create codeql-analysis.yml

* cmake: add support for Visual Studio 2019

* enable github actions (aka continuous integration)

basic implementation to enable github actions with:
- triggered each push or pull request
- built on ubuntu (multiple version), macOS, windows
- the binary has debug facilities enabled
- ignore any commit/push on the .github folder
- run all tests
- create an archive with binaries (available for 90 days)
- can manually triggered setting custom cmake flags

* cmake: fix MSVC check

* github actions: remove ubuntu 18.04; add ubuntu 22.04

* github actions: fix windows ci

---------

Co-authored-by: wb2osz <wb2osz@comcast.net>
2023-01-28 16:07:56 -05:00
dforsi fedfef92cd
Fix spellling (#409)
Fixed with
codespell --skip external,symbols*.txt,tocalls.txt,./cmake/* --ignore-words-list clen,convers,dout,feets,fo,inout,ist,ot,parm,pres,ro,siz,usng,xwindows --summary

running first with only --write-changes and then adding --interactive=2

Co-authored-by: Daniele Forsi <iu5hkx@gmail.com>
2023-01-28 15:58:09 -05:00
wb2osz 031c937cdb Issue 444 - Command line -x calibrate tones are reversed 2023-01-28 16:36:51 +00:00
wb2osz ef573f2acf Pull request 439 - Fix audio level display for B demodulator. 2023-01-23 23:11:34 +00:00
Brent Petit 399ffcccb3 Add in a couple missing includes to clean up build warnings 2023-01-16 10:43:25 -05:00
wb2osz 9553abc28e Tested compatibility with gpsd 3.25. 2023-01-15 22:54:11 +00:00
wb2osz 1d452fe1ab Tested compatibility with gpsd 3.25. 2023-01-15 21:55:08 +00:00
wb2osz 17d3d0a621 Increase max AFSK filter size. 2022-12-18 20:19:37 +00:00
wb2osz 07ea828c28 Assorted minor cleanups. 2022-11-25 22:59:36 +00:00
wb2osz 397362787f Remove cmake warnings about slight name mismatches. 2022-11-25 21:26:23 +00:00
wb2osz 8913a852fd clean up 2022-10-01 02:32:43 +01:00
wb2osz d0fc24aa5d Just comments. 2022-10-01 02:28:10 +01:00
wb2osz acace8cd9a Variable speed for gen_packets. 2022-10-01 01:08:28 +01:00
wb2osz 429d095665 Issue 417 - Allow UTF-8 characters for Mac audio device names. 2022-09-25 22:30:19 +01:00
wb2osz 30869c7afc Issues 405 & 406 and other improvements in message interpretation. 2022-07-04 02:11:55 +01:00
wb2osz d11bd6f3f2 pull request 355 - verb correction 2022-05-24 02:23:05 +01:00
wb2osz 59288b7c56 Pull Request 394 - fix compilation on musl 2022-05-24 02:03:37 +01:00
wb2osz c9ffbd71c3 Merge branch 'dev' of http://github.com/wb2osz/direwolf into dev 2022-03-23 19:25:58 -04:00
wb2osz f97c024a90 More FX.25 tests. 2022-03-24 00:22:19 +01:00
wb2osz 722fefbda6 Compile warnings. 2022-03-24 00:21:12 +01:00
wb2osz 18c65f48a8 Note for future experiment. 2022-03-24 00:19:51 +01:00
wb2osz 368bc42337 Spelling errors. 2022-03-24 00:15:04 +01:00
wb2osz 06d6cabb58 Special ATGP digipeating hack. 2022-03-24 00:12:01 +01:00
wb2osz 3dd125e1e3 UTF-8 discussion 2022-03-24 00:10:21 +01:00
wb2osz a558348635 UTF-8 in config file experiment. 2022-03-24 00:07:31 +01:00
wb2osz 7d3c1d100e
Create codeql-analysis.yml 2022-03-23 18:38:53 -04:00
Daniele Forsi bb16c725b9 Fix spelling errors
Fixed with:
codespell --ignore-words-list=dout,feets,fo,inout,ist,ot,parm,usng src --write-changes --interactive=2
and manual editing.
2022-03-22 20:10:29 -04:00
wb2osz 0bd31ae16e Clean up warnings. 2022-02-27 15:30:16 +00:00
wb2osz e108147655 Fix ttgrid corner and various cleanups. 2022-02-25 22:29:07 +00:00
wb2osz 4f6ca0d389 Update tocalls.txt and symbols-new.txt 2022-02-21 16:30:03 +00:00
wb2osz 27019b4793 The constant thorn in my side. 2022-02-16 02:55:19 +00:00
wb2osz 26727bbace Pull request 301 2022-02-16 02:43:29 +00:00
wb2osz 89021dd50c Cleanups 2022-02-16 02:42:15 +00:00
wb2osz dcabb8f7a5 Digipeat noid 2022-01-30 20:00:43 +00:00
wb2osz 0f2b241763 More error checking for messages. 2022-01-17 22:10:47 +00:00
wb2osz 366e0ab6e0 Clean up 2022-01-03 15:36:07 +00:00
wb2osz 42314b7219 gpsd 3.23 (API 12) compatibility and cleanups. 2022-01-02 02:55:11 +00:00
wb2osz 5dbe2ce136 Allow speed for GPSNMEA configuration. 2021-12-29 17:30:20 -05:00
wb2osz 65869bc643 Issue 366 - Remove 0x from pid in monitor header. 2021-12-19 16:30:45 -05:00
wb2osz eef35cf891 Issue 367 - AGW monitoring must handle binary data. 2021-12-19 21:06:42 +00:00
wb2osz 45cd680b90 First rough approximation of ICHANNEL. 2021-12-09 22:30:31 -05:00
wb2osz 9b9744ba15 Speed up 9600 demodulator. 2021-11-22 21:15:17 -05:00
wb2osz 049614d16c Fix IL2P for 9600 bps. 2021-11-22 21:10:31 -05:00
wb2osz 6442466a5d Shut off confusing debug message. 2021-11-11 20:01:30 -05:00
wb2osz 9016fa5fe6 Make IL2P test scripts executable. 2021-10-22 19:09:35 -04:00
wb2osz 53e9ff7908 Add IL2P. 2021-10-22 17:29:20 -04:00
wb2osz 17b9336ce0 Merge branch 'dev' of http://github.com/wb2osz/direwolf into dev 2021-09-29 18:41:02 -04:00
wb2osz 8619b74c7b Pull request 353 - Fix spelling errors. 2021-09-29 18:28:17 -04:00
wb2osz 023f675caa Avoid serial port write error for Windows, 2021-09-21 13:29:29 -04:00
wb2osz 3220931439 Race condition when starting up with transmit queue not empty. Larger buffers. 2021-09-21 13:22:27 -04:00
wb2osz 1712fbcfb9 cleanup 2021-09-21 13:20:10 -04:00
wb2osz b77762780f More debug code. 2021-09-21 13:00:36 -04:00
wb2osz 257d2e3544 New get/set methods for packet object. 2021-09-21 12:56:45 -04:00
wb2osz 1b3ed76584 Add a comment about bundling multiple frames in single transmission. 2021-09-21 12:53:17 -04:00
Daniele Forsi edc5707cfe Fix errors in man pages
Errors found with codespell.
2021-09-19 21:25:00 +02:00
Daniele Forsi d10ccb6cc0 Fix errors in strings
Errors found with codespell.
2021-09-19 21:25:00 +02:00
Daniele Forsi 6bfd22811c Fix errors in comments
Errors found with codespell.
2021-09-19 21:25:00 +02:00
wb2osz b66c21d39b Fix broken hyperlink in README. 2021-04-10 21:21:37 -04:00
wb2osz 6370b26d85 Pull request 322 - SNDIO support for BSD. 2021-04-10 21:14:26 -04:00
wb2osz 0e68a7712a Pull Request 322 - SNDIO support for BSD. 2021-04-10 20:47:46 -04:00
wb2osz 73d5d139b4 Recognize Windows form of device path. 2021-04-10 20:46:13 -04:00
wb2osz 12de518fa9 Mention installation with Mac Ports. 2021-04-10 20:45:13 -04:00
wb2osz 44df4a7612 Issue 325 - When building regex for Windows, don't repeatedly define the global variable re_syntax_options. 2021-04-10 20:00:47 -04:00
wb2osz 7fa91dd551
Merge pull request #326 from jmkristian/w6jmk-cm108
Windows USE_CM108
2021-03-15 20:37:27 -04:00
John Kristian 09de2f6681 Declare cm108 functions explicitly. 2021-03-13 18:00:24 -08:00
wb2osz e449e39d4d Update comments. 2021-03-12 19:50:25 -05:00
SASANO Takayoshi 0c285a0c6d cosme
rewrite

    int err;
    err = poll_sndio();
    if (err < 0) {
        :

to

    if (poll_sndio() < 0) {
        :
2021-02-26 06:57:59 +09:00
SASANO Takayoshi c18b562409 add sndio support (CMake) 2021-02-25 20:36:34 +09:00
SASANO Takayoshi 677117bff0 add sndio support 2021-02-25 20:35:41 +09:00
wb2osz 04b32c41c2 Limited support for CM108/CM119 GPIO support on Windows. 2021-02-07 16:28:26 -05:00
wb2osz a1afcbbafe Limited support for CM108/CM119 GPIO PTT on Windows. 2021-02-07 16:19:34 -05:00
wb2osz 667e9caaf2 Quick hack until I can handle multiple KISS TCP ports properly. 2021-01-04 21:25:49 -05:00
wb2osz 7ac1262fdf Fix Linux build. 2021-01-04 21:03:00 -05:00
wb2osz 8683ddcbd6 Allow multiple TCP KISS ports and option for single radio channel. 2021-01-04 19:43:00 -05:00
wb2osz fe6cba2b0d
Merge pull request #309 from df7cb/telemetry-python3
scripts/telemetry-toolkit/telem-volts.py: Port to python3
2021-01-03 17:47:36 -05:00
Christoph Berg a30f90956b scripts/telemetry-toolkit/telem-volts.py: Port to python3 2021-01-03 22:45:36 +01:00
wb2osz 81447ed49f Comments about units. 2021-01-01 21:12:07 -05:00
wb2osz 6513efd052 Fix UNITTEST for MacOSX. 2021-01-01 21:09:25 -05:00
wb2osz 5d02e0ba0e Issue 292 - Remove serial port speed restriction for Mac OSX. 2021-01-01 21:03:04 -05:00
wb2osz 14d6eed205 Merge branch 'hessu-feature/dns-sd' into dev 2021-01-01 19:57:06 -05:00
wb2osz 6f95752cab Merge branch 'feature/dns-sd' of git://github.com/hessu/direwolf into hessu-feature/dns-sd 2021-01-01 19:55:58 -05:00
wb2osz 085e837a26 Enhanced transmit calibration tone option (-x) with channel and tone selection. 2020-12-31 19:57:31 -05:00
wb2osz 1cad6edb42 Allow radio channel number for -x transmit calibration tone option. 2020-12-31 19:49:55 -05:00
wb2osz 8bca4862b0
Merge pull request #305 from BehemothTheKitten/x_fm_calibrate
Steady FM deviation calibration tones for -x
2020-12-31 15:04:53 -05:00
wb2osz 52e3a5b3af Display speed and altitude in both metric and Imperial units. 2020-12-31 14:42:27 -05:00
wb2osz 1d67b44669 Issue 150 - Check whether platform provides strlcpy & strlcat
or if we need to provide our own.
2020-12-30 22:32:09 -05:00
Heikki Hannikainen feb1034cca Implement DNS-SD publishing of KISS over TCP service on Linux and Mac
This allows client applications to locate the IP addresses and the port of
the KISS TCP service, allowing the end user to just select a Dire Wolf from
a list instead of trying to guess its dynamic IP address and typing it in
manually.  This is especially convenient on mobile devices.

On Linux, the standard Avahi daemon is used via dbus and the avahi-client
library.  Building with it requires installing the development header
package; README.md is updated accordingly.

On Mac, the MacOS dnssd API is used:
https://developer.apple.com/documentation/dnssd?language=objc

I don't have Windows, but more recent Windows 10 builds apparently have
a working DNS-SD mDNS implementation that can be used on 64-bit builds.
2020-12-28 20:38:09 +00:00
BehemothTheKitten 042a0c44ed Addded options to transmit steady tones at various frequencies
(including 1200/2200Hz) to -x command line argument in Direwolf.
This is useful for calibrating FM deviation using a meter,
devcal, or manually. See:

https://groups.io/g/direwolf/topic/setting_deviation/78633292

Options are:

-x a: alternating mark/space tones (original functionality)
-x m or -x 1: steady mark tone (e.g. 1200Hz)
-x s or -x 2: steady space tone (e.g. 2200Hz)
-x p: set PTT only - for RTL-SDR adjustments

Scope tested with mark_freq>=300Hz and space_freq<=5000Hz.
Returns an error message if mark/space frequencies are set
to 0.
2020-12-23 14:52:32 -06:00
wb2osz 07fdc7544f Raise upper limits. 2020-11-27 22:21:07 -05:00
wb2osz c1e19601f5 More consistent results. 2020-11-27 21:56:19 -05:00
wb2osz 9922f176b2 New AFSK demodulators.
'A' uses mark and space filters but simpler and cleaner
than earlier attempts.
New 'B' uses a different technique where the demodulated
signal is proportional to the frequency.
2020-11-27 21:25:35 -05:00
wb2osz fdf660a7f1 New "-d d" command line option for APRStt debug. 2020-11-21 20:13:51 -05:00
wb2osz 791982a5e4
Merge pull request #261 from ew1abz/dev
cmake: Avoid try_run when cross-compiling
2020-11-14 10:54:43 -05:00
wb2osz adebd06a05 Issue 297 - FORCE_SSE is always active on i386/amd64 2020-11-14 10:14:43 -05:00
wb2osz 48b9bac872 When decoding a third party traffic packet, decode the payload. 2020-11-13 20:46:57 -05:00
wb2osz e272ff87c8 Issue 269 - Morse code 'I' was sent wrong. 2020-11-07 21:09:25 -05:00
wb2osz 714d03f1d8 Bump version number up to 1.7 development. 2020-11-07 18:38:10 -05:00
wb2osz 8ac14f86f5 Mention cmake scripts contributor. 2020-11-07 18:12:46 -05:00
wb2osz a20728762b Issue 298 - Add beacon SOURCE option to override AX.25 source. 2020-11-07 17:43:47 -05:00
wb2osz 4a1aa2b148 Issue 296 - Avoid potential buffer overflow. 2020-11-05 18:51:00 -05:00
wb2osz 413855e791 Merge branch 'dev' to master for release 1.6. 2020-10-27 20:45:30 -04:00
wb2osz bfc708d014 Final User Guide for release 1.6. 2020-10-27 20:25:09 -04:00
wb2osz 37f148ef25 Misc. RPi documentation updates for release 1.6. 2020-10-27 20:15:28 -04:00
wb2osz 7cd027fcda Issue 295 - Yet another incompatible change for the libgps API. 2020-10-27 18:04:07 -04:00
wb2osz 512e8f88a9 Avoid compiler error. 2020-10-26 20:41:49 -04:00
wb2osz fb888577fb Cleanup sample direwolf.conf file. 2020-10-26 20:23:40 -04:00
wb2osz 91bc2d9627 ADEVICE example for Mac OSX and misc. cleanup. 2020-10-25 22:52:57 -04:00
wb2osz e8f1133226 Increase tocalls limit. 2020-10-25 22:01:09 -04:00
wb2osz 79d80ccb8e Change from development to release version. 2020-10-25 21:38:51 -04:00
wb2osz 3960942488 Fix compile warnings on Mac. 2020-10-25 21:35:19 -04:00
wb2osz 3a5f72acab direwolf man page: AIS, EAS, FX.25, text colors. 2020-10-25 19:28:45 -04:00
wb2osz ff34d92776 EAS to APRS message converter and Ham Radio of Things (HRoT). 2020-10-24 19:45:43 -04:00
wb2osz 3a6a35785f More examples of applications. 2020-10-24 19:44:21 -04:00
wb2osz a10c2175fe Latest tocalls.txt. 2020-10-24 19:39:31 -04:00
wb2osz fda6f52437 Add another example to use FX.25. 2020-10-24 19:37:14 -04:00
wb2osz b12e56fef4 Add link to more information. 2020-10-24 19:33:58 -04:00
wb2osz 3e4c28231a Packaging for both 32 and 64 bit Windows platforms. 2020-10-24 19:01:20 -04:00
wb2osz c0fc5f052d Increase default for time since message addressee heard. 2020-10-24 11:38:44 -04:00
wb2osz adae04b05f Finish up overview of changes for 1.6. 2020-10-21 22:54:51 -04:00
wb2osz 7d4a49aecb Issue 290 - Add capability to set serial port speed for hamlib. 2020-10-21 22:07:19 -04:00
wb2osz f0bd085a13 Makefile to help transition people to new build procedure for 1.6. 2020-10-21 21:53:45 -04:00
wb2osz 0775e4b6a2 Misc. documentation updates. 2020-10-21 21:50:28 -04:00
wb2osz 0ed3cd2863 Clarify, simplify. 2020-07-25 10:30:34 -04:00
wb2osz 96fdf71069 Make build instructions more explicit. 2020-07-25 10:02:41 -04:00
wb2osz 909b703b7e FX.25 enable value 1 now selects appropriate tag for frame length. 2020-06-22 17:04:03 -04:00
wb2osz 4b0395aeaf Remove speed warning for special cases. 2020-06-20 21:15:44 -04:00
wb2osz d747620257 Add another search location for tocalls.txt. 2020-06-20 21:06:00 -04:00
wb2osz 74cf91cc98 Issue 241 - Catch up with new gpsd incompatbilities. 2020-06-20 20:49:00 -04:00
wb2osz e2b32d1d2a EAS SAME reception. 2020-06-13 21:33:10 -04:00
wb2osz 5fd8120de7 Add AIS documentation. 2020-06-01 23:08:12 -04:00
wb2osz e9482ca0b2 Mention FX.25 compatibility with UZ7HO soundmodem. 2020-06-01 21:02:02 -04:00
wb2osz 45136a91eb AIS Reception enhancements. 2020-05-26 21:20:37 -04:00
wb2osz 0edb44efc3 Build procedure updates. 2020-05-21 22:21:33 -04:00
wb2osz 6be428bea1 More comments. 2020-05-21 22:19:45 -04:00
wb2osz dc40b461d0 Add troubleshooting tip to error message. 2020-05-21 22:18:33 -04:00
wb2osz 0661e23f21 Issue 271 - DCD dropping at wrong time. 2020-05-21 21:37:34 -04:00
wb2osz 74a5c34a94 AIS refinements. 2020-04-25 07:59:06 -04:00
wb2osz b99f9f33c2
Merge pull request #268 from mdomsch/systemd
Add rpm spec and systemd files
2020-04-25 07:18:55 -04:00
Matt Domsch 3135bb570b Add rpm spec and systemd files 2020-04-24 10:00:06 -05:00
wb2osz f293186403 Issue 266 - Default compile options now allow the result to run on a
wider range of CPUs rather than optimizing for the build machine.
2020-04-22 19:39:24 -04:00
wb2osz b41b4445fb AIS reception. 2020-04-19 00:59:32 -04:00
wb2osz 0dc7cba1c5 AIS reception. 2020-04-19 00:50:18 -04:00
wb2osz 65d8d265cd More complete monitoring messages to AGW client app. 2020-04-13 21:07:10 -04:00
wb2osz c15903edb9 Issue 252 - Direwolf segments large frames when sending AX.25 version 2.0 packets.
Instead, it should simply divide the data into packets without segment headers,
on an AX.25 version 2.0 connection.
2020-04-13 20:54:42 -04:00
wb2osz e654ca46a6 Documenation updates for 1.6. 2020-04-03 21:09:23 -04:00
Vladimir K 45cad0ff78 cmake: Avoid try_run when cross-compiling 2020-03-29 19:12:43 -07:00
wb2osz cab47cfc48 -h command line option for help. 2020-03-21 19:02:39 -04:00
wb2osz 1484350465 Pull request 259 - Identify '{{' as user defined experimental. 2020-03-21 18:06:57 -04:00
wb2osz fde5bf6816 Update tocalls.txt. 2020-02-20 20:40:46 -05:00
wb2osz e54b851633 FreeBSD build fixes. 2020-01-26 19:55:53 -05:00
wb2osz c2b231494a Proper detection for udev. 2020-01-19 18:44:25 -05:00
wb2osz 7e44139eb3 Better error checking and helpful message. 2020-01-19 18:42:50 -05:00
wb2osz 4e816f8f8d chmod +x script 2020-01-16 20:57:12 -05:00
wb2osz 033d509920 Remove non-ASCII characters. 2020-01-15 06:54:56 -05:00
wb2osz 63b78c9fae More commentary on the FX.25 audio recordings found.
We need some better test cases.
2020-01-12 22:48:40 -05:00
wb2osz 1f2a5cfdb8 FX.25 2020-01-05 20:08:22 -05:00
wb2osz f08ed518b3
Merge pull request #236 from mdomsch/include-stddef
Include <stddef.h> everywhere ptrdiff_t is used
2019-12-07 15:12:38 -05:00
Matt Domsch 2d4a8f4907 Include <stddef.h> everywhere ptrdiff_t is used
ptrdiff_t is defined in <stddef.h>
2019-12-04 21:38:12 -06:00
wb2osz d5cec4dc84 Fix compiler warnings for platforms where size of long is different than size of pointer. 2019-11-30 20:20:13 -05:00
wb2osz ff9eca682e Overhaul PSK demodulator. 2019-11-30 19:20:55 -05:00
wb2osz b382e5fb0f Add -lrt to Linux link so it will work with CentOS 6. 2019-11-29 16:40:27 -05:00
wb2osz 249f5bd471 Clean out old obsolete demodulators. 2019-11-27 22:42:33 -05:00
wb2osz 747224ce57 Remove obsolete 'F' demodulator. 2019-11-27 21:26:59 -05:00
wb2osz 03939d25ba Fix CentOS 6 build. 2019-11-27 20:36:51 -05:00
wb2osz 6e92a4fa48 Fix build for CentOS. 2019-11-25 22:14:46 -05:00
wb2osz 362d19e073 Remove obsolete files. 2019-11-24 11:29:16 -05:00
wb2osz f73faec0b5 Move from groups.yahoo.com to groups.io and minor typo. 2019-11-23 22:13:40 -05:00
wb2osz 690ed3e1d6 CentOS build issues. 2019-11-23 20:06:57 -05:00
wb2osz c94628f547 Update build instructions for cmake. 2019-11-23 11:30:27 -05:00
wb2osz 4444d3be5f
Merge pull request #227 from ra1nb0w/cmake-dev
move to cmake, ctest, cpack to build direwolf
2019-11-23 10:56:37 -05:00
Davide Gerhard 4de597a89e
cmake: fix portaudio discovery 2019-11-13 16:07:23 +01:00
Davide Gerhard 1cf5a22333
cmake: implement basic cpack functionality
to create ZIP package run

    cpack

to add new generator modify CPACK_GENERATOR variable.

NOTE: pay attention on CPU flags optimization when you redistribuite
the package (segmentation fault)
2019-11-13 15:57:11 +01:00
Davide Gerhard 1ab26c66e2
cmake: not build ctest binaries as default
unit test binaries are disabled by default now.
To enable it use either

cmake -DUNITTEST=1 ..

or

cmake -DCMAKE_BUILD_TYPE=DEBUG

where CMAKE_BUILD_TYPE must be different from "RELEASE"
see https://cmake.org/cmake/help/v3.0/variable/CMAKE_BUILD_TYPE.html
2019-11-12 14:28:29 +01:00
Davide Gerhard 8fd4bebf45
install udev rules on /etc and not ${CMAKE_INSTALL_PREFIX}/etc
This should works fine also with cpack and packaging seen that they
are using DESTDIR.

CPACK:
- from 2.8.3 CPACK_SET_DESTDIR is default to ON
- if you have trouble read CPACK_PACKAGING_INSTALL_PREFIX
2019-11-09 09:21:47 +01:00
Davide Gerhard 8cd1f87ef6
cmake: windows build fixes
works with cygwin and x86_64-w64-mingw32-gcc/x86_64-w64-mingw32-g++
from the package installer of cygwin.
To use that add the following lines to .bash_profile

export CC=x86_64-w64-mingw32-gcc
export CXX=x86_64-w64-mingw32-g++

you also need cmake from cygwin
2019-11-09 08:31:35 +01:00
Davide Gerhard 184b2af329
cmake: change install-conf script with configure_file()
in this way, If the input file is modified the build system will
re-run CMake to re-configure the file and generate the build system
again.
2019-11-09 08:26:37 +01:00
Davide Gerhard 0e5049c08a
cmake: implements tests using CTest suite
the new tests are implemented with CTest suite of CMake.
To enable the tests you need to run cmake with -DBUILD_TESTING=ON
There are optional tests (that might not work) that can be enabled with
-DOPTIONAL_TEST=ON

So, to enable all tests and run it use the following command

mkdir build
cmake -DBUILD_TESTING=ON -DOPTIONA_TEST=ON ..
make
ctest

to debug the errors use

ctest --debug

You can always find all tests binary on build/test/

Implementation:
- check-modem* tests are implemented with shell script because it
  requires to execute many commands and therefore will be easy to
  manage. The file is configured at configuration time.
- for single binary we verify the exit status (default = 0) so you
  only need to build the binary and add it to add_test()
2019-11-09 08:26:37 +01:00
Davide Gerhard de98f26229
walk96: fix builing errors (api mismatch) 2019-11-09 08:26:37 +01:00
Davide Gerhard 6f8ac80afd
igate: fix build errors 2019-11-09 08:26:37 +01:00
Davide Gerhard d06b644630
cmake: move install-conf target to conf/install_conf.cmake file
this way permit to use cmake language to manipulate the target and
avoid restriction imposed by CMAKE_COMMAND command mode
2019-11-09 08:26:36 +01:00
Davide Gerhard df22522126
cmake: fix cpu flags autodiscovery and terminal for raspberry
- we set cpu flags for CXX and C
- raspberry "only" has lxterminal not xterm
2019-11-09 08:26:36 +01:00
Davide Gerhard a1c16a67ef
cmake: new build tool
this step unify the builing system for all platforms (windows, linux,
osx and *BSD)

* Requirements:

  - gcc/clang (C/C++ compiler) (in debian build-essential)
  - cmake (in debian cmake)
  - git if you build from source (in debian git)
  - posix threads

** Requirements on *BSD/macOS:

  - portaudio

** Optional Requirements:

  - gpsd (in debian libgps-dev)
  - libhamlib (in debian libhamlib-dev)

** Optional Requirements in Linux

  - udev (in debian libudev-dev)
  - alsa (in debian libasound2-dev)

* Main changes:

  - version is now set only on CMakeLists.txt and automatically used
    on the code
  - cpu flags are auto-discovered in the default build and it works
    on gcc/clang/msvc on x86/x86_64/arm; you can force cpu flags with
    -DFORCE_SSE=1 for example (see CMakeLists.txt on root)
  - use a more "complex" tag on generic.conf to facilitate parsing
    by cmake (not more platform dependent). Now it is %C% or %R% for
    example
  - target `tocalls-symbols` is now called `data-update`
  - created debian/ directory to contains files to use debuild

* Example to build:

mkdir build && cd build
cmake ..
make
make install
make install-conf

then you have the binary files on src/ and in the system directory

* CMake options (see the head of CMakeLists.txt)

  - FORCE_SSE force sse instruction
  - FORCE_SSSE3 force ssse3 instruction
  - FORCE_SSE41 force ssse4.1 instruction
  - OPTIONAL_TEST compile optional test (might be broken)
  - BUILD_TESTING enable tests (ctest framework)
  - CMAKE_INSTALL_PREFIX if you want to change your install path
    prefix

for example:

  cmake .. -DOPTIONAL_TEST=ON
2019-11-09 08:26:33 +01:00
Davide Gerhard bc582cf24f
version: use version from cmake
in this way there is not mismatch
2019-11-09 08:26:08 +01:00
Davide Gerhard 8c9741b3e4
configuration file: update tag to facilitate the parsing
to facilitate the parsing con cmake move from single letter like C to
tag like %C%
2019-11-09 08:26:08 +01:00
Davide Gerhard e35964ec98
add new search location for symbols-new.txt and tocalls.txt
seen that we moved data in the data/ directory we need to add the new
patch to source code.
2019-11-09 08:26:07 +01:00
Davide Gerhard 05828dc65f
reshape the repository moving objects to folders based on subject 2019-11-09 08:26:01 +01:00
wb2osz edafba9fe6 Mitigate impact of cmake defining NDEBUG. 2019-11-08 21:00:12 -05:00
wb2osz d9d6bb4257 Better error message for unprintable data type indicator. 2019-11-08 20:36:10 -05:00
wb2osz a7a84269fc 64 bit target for Windows. 2019-11-03 10:01:07 -05:00
wb2osz 29c48ddcc8 Update discussion group location. 2019-10-16 21:49:40 -04:00
wb2osz 69fc783a17 More error checking for valid AX.25 format. 2019-10-14 19:13:11 -04:00
wb2osz 357f2e633c Recognize more ALSA audio "card" formats for matching to
corresponding HID devices for PTT.
2019-10-14 19:10:55 -04:00
wb2osz 316c8d8194 Replace defective strsep. 2019-10-14 19:08:49 -04:00
wb2osz 3765f26554 Default to no colors if output is not terminal. 2019-09-30 22:04:49 -04:00
wb2osz 10ad90b3db Another alternative for text colors. 2019-09-30 22:00:14 -04:00
wb2osz e6c721a58d Better error checking. 2019-09-30 21:55:48 -04:00
wb2osz 37cb5440a6 Better error messages. 2019-09-30 21:51:40 -04:00
wb2osz c72d06c285 Issue 220. Recognize MIC-E encoding for Yaesu FT3D, Anytone D578UV, and Anytone D878UV. 2019-08-27 06:50:55 -04:00
wb2osz e219426a37 Better support for OpenBSD and FreeBSD.
Combination of pull requests 92 & 192.
2019-07-07 21:58:22 -04:00
wb2osz c59053536e Add short delay after enabling GPIO pin. Issue #176 2019-07-07 11:29:23 -04:00
wb2osz edaf661bb1 Detect MINGW, as well as CYGWIN, for Windows build environment. #76 2019-07-07 08:44:06 -04:00
wb2osz e0c2c31181 Compatibility with GPSD API 8. #214 2019-07-07 08:24:51 -04:00
wb2osz ca7db91da2 Text color improvements. 2019-07-06 20:34:51 -04:00
wb2osz e962246fd2 Fix compiler warning. 2019-07-06 17:31:16 -04:00
wb2osz 342989b100 Issue 210. USB Audio GPIO bytes reversed. 2019-07-05 21:08:23 -04:00
wb2osz ce6c617203 Typo in comment. 2019-06-30 19:51:26 -04:00
wb2osz 742d046c40 Clarifying comments. 2019-06-30 19:46:00 -04:00
wb2osz 698ca1ea87 Use same text color escape sequences for ARM and other.
Add "-t 2" option for better results with PuTTY.
2019-06-29 21:28:51 -04:00
wb2osz 4c5004b6a1 Fix new warnings for gcc 8.3. 2019-06-29 10:00:40 -04:00
wb2osz 90921b9376 cut-n-paste error. 2019-05-19 21:41:05 -04:00
wb2osz a32064571d Make file omissions. 2019-05-19 21:17:49 -04:00
wb2osz b37fda96fb 2400 bps PSK compatibility with MFJ-2400. 2019-05-19 20:57:56 -04:00
wb2osz ad12fa86d6 Replace channel valid boolean with more versatile enum. 2019-05-13 06:25:12 -04:00
wb2osz d6ea439f98 New features for version 1.6. 2019-04-21 19:57:11 -04:00
wb2osz a5f3de2222 Fix compile warning. 2019-04-21 19:52:18 -04:00
wb2osz a4d87e4013 New function to generate APRS "message." 2019-04-21 19:36:20 -04:00
wb2osz 7fc9f31fbc More comments about GNSS. 2019-04-21 19:31:41 -04:00
wb2osz d828a8abe3 Add description for raw GPS data. 2019-04-21 19:27:44 -04:00
wb2osz aea1eb7b41 Better error message for invalid channel which could
be caused by use of SMACK rather than standard KISS.
2019-04-21 19:17:06 -04:00
wb2osz c559f0d443 Clarifying comment. 2019-04-21 19:14:52 -04:00
wb2osz 792569b991 More error checking. 2019-04-21 19:13:18 -04:00
wb2osz 8a2138e16b More transmit timing debug code. 2019-04-21 19:09:41 -04:00
wb2osz bfa7f4af93 Get necessary libasound header files. Pull request 189. 2019-02-17 22:00:30 -05:00
wb2osz a1e2d1c3a8 Issue 196 - Compatibility with GPSD API 7. 2019-02-17 21:49:51 -05:00
wb2osz d0cad72955 gcc 9 warnings. 2019-02-17 21:43:03 -05:00
wb2osz 7b5fc163dc More error checking. 2019-02-17 21:11:40 -05:00
wb2osz f1b54df647 Issue 196 - Compatibility with GPSD API 7. 2019-02-17 21:04:49 -05:00
wb2osz 71b3ca0047 AX.25 Throughput: Why is 9600 bps Packet Radio only twice as fast
as 1200?
2019-01-22 22:05:29 -05:00
wb2osz 2d3a04d0f1 New document: Why is 9600 only twice as fast as 1200 ? 2019-01-22 21:59:41 -05:00
wb2osz ab3796905e New document: Why is 9600 only twice as fast as 1200 ? 2019-01-22 21:49:20 -05:00
wb2osz e3dc8bbf1b New "-g" option for direwolf and atest to force G3RUH modem and override
default for the speed.   atest -h will display frame as hexadecimal
bytes.
2019-01-21 11:07:20 -05:00
wb2osz c7dcfd141e Latest symbols-new.txt and tocalls.txt 2019-01-06 12:06:16 -05:00
wb2osz a46471bf36 Fix counting of packets in transmit queue. 2019-01-06 12:04:02 -05:00
wb2osz 1a2de05e71 Better error message. 2019-01-06 11:59:14 -05:00
wb2osz 07f2174be4 Add ability to handle multiple audio files with one command. 2019-01-06 11:57:25 -05:00
wb2osz 08a691a02d Issue 169 - Fix AGW protocol 'Y' command. 2019-01-06 11:52:45 -05:00
wb2osz a5211f48fb Issue 169 - Fix AGW protocol 'Y' command. 2019-01-06 11:47:17 -05:00
wb2osz 41a85d87a7 Issue 169 - Fix AGW protocol 'Y' command. 2019-01-06 11:45:14 -05:00
wb2osz e1a4716857 Rename sock.c to dwsock.c to avoid confusion. 2019-01-06 11:35:08 -05:00
wb2osz ab40b1169e Rename sock.c to dwsock.c to avoid confusion. 2019-01-06 11:29:24 -05:00
wb2osz ecf5fd1d59 Issue 186 - Copy KISS frames between TCP KISS clients. 2019-01-01 19:59:58 -05:00
wb2osz c13375a9ab Merge branch 'dev' of https://github.com/wb2osz/direwolf into dev 2019-01-01 16:00:54 -05:00
wb2osz 84efe8c59b Issue 187. Updated MicroModem performance. 2019-01-01 15:56:44 -05:00
Annaliese McDermond 91d5b90e2a Fix transmit failures when using virtual devices
Direwolf does not send a continuous stream to the audio device.
It merely sends samples when it has a transmission to accomplish.
This seems to work okay on hardware devices, but is causing an
issue when working against a virtual device like plug or dmix
because the vitual device seems to get into a weird state while
direwolf is not sending samples.  This causes it to error out
with -EBADFD on every transmission after the first.

Direwolf tries to recover from this error by running
snd_pcm_recover() on the output device.  Inspecting the code of
this function revealed that it was a noop on any errors other
than -EPIPE or -ESTRPIPE, so it had no hope of fixing any issues
other than a buffer underrun or a suspended device.

This patch breaks things out so that we only run snd_pcm_recover()
on -EPIPE or -ESTRPIPE, and for any other error we go ahead and
just try to prepare the device again.  This appears to work to
make transmissions subsequent to the first work correctly on
virtual devices.  We handle -EBADFD differently merely so that
we don't print the error message for a quasi-expected condition.

This problem could also possibly be solved by unprotecting the
snd_pcm_prepare() on line 1174 of audio.c and just preparing the
device whether it apparently needs it or not, but I'm wary of the
unintended consequences of doing so in cases where the code is
currently working.  Much more testing would be necessary for that
solution.  This solution should only touch cases that are not working
currently regardless.
2018-12-02 19:59:03 -05:00
wb2osz a200f3da7e Add link to separate repository with presentations. 2018-11-25 15:41:04 -05:00
wb2osz b915842c9f Add link to separate repository with presentations. 2018-11-25 15:36:26 -05:00
wb2osz 9eaf9e361c Merge branch 'jedahan-macOS' into dev 2018-11-24 17:52:08 -05:00
wb2osz 20f9e15b8b Merge branch 'macOS' of git://github.com/jedahan/direwolf into jedahan-macOS 2018-11-24 17:51:28 -05:00
wb2osz 79df808d5d Issue 151 - Add support for Multi-GNSS NMEA sentences. 2018-11-24 17:20:45 -05:00
wb2osz c5526524b6 Begin version 1.6 development. 2018-11-24 16:57:05 -05:00
wb2osz 4590e21934 Include errno.h rather than sys/errno.h 2018-11-23 16:33:45 -05:00
wb2osz c0abb4b216 Release 1.5. 2018-10-08 10:15:21 -04:00
wb2osz da0a33ef2a Version 1.5 2018-10-08 09:49:18 -04:00
Jonathan Dahan e0fcdb8835 macOS: default to latest macOS if version string isnt found 2018-10-01 14:26:22 -04:00
Jonathan Dahan 9a98aed96e macOS: use INSTALLDIR in makefile to find libraries 2018-10-01 14:26:22 -04:00
Jonathan Dahan 9665fa845b macOS: use march=native in build 2018-10-01 14:26:22 -04:00
Jonathan Dahan 331b5774f9 macOS: remove -fslp-vectorize-aggressive as it is deprecated 2018-10-01 14:26:22 -04:00
wb2osz 11071bb06a Improve error message for audio output failure. 2018-09-12 06:31:42 -04:00
wb2osz be705987e2 Merge branch 'joshbuhler-jb_macBuildFixes' into dev
Mac build fixes - Pull request 140
2018-08-05 21:20:12 -04:00
wb2osz f864874771 Merge branch 'jb_macBuildFixes' of git://github.com/joshbuhler/direwolf into joshbuhler-jb_macBuildFixes
Mac build fixes - Pull request 140
2018-08-05 21:14:48 -04:00
wb2osz 220e7dd1c4 Issue 132 continued. If a client app tried to send connected data when
the transmitter was already on, the packet would get stuck in the outgoing
data queue.
2018-08-05 11:20:27 -04:00
wb2osz 4ecaf478cf Issue 132 - Sometimes, when outgoing frames would exceeed the "window" size
(MAXFRAME or EMAXFRAME) they would get stuck in a queue and not be released later.
2018-07-02 14:17:02 -04:00
wb2osz 38ab57afa4 New NOXID option to avoid wasting time to listed station(s)
which understand SABME but not XID.
2018-07-02 12:18:23 -04:00
wb2osz 22f645756d Add 100 baud AFSK default tones. 2018-07-02 12:02:28 -04:00
wb2osz e51002ac0c Add block diagram to README. 2018-05-23 11:47:00 -04:00
wb2osz 6874a5d897 Minor documentation updates. 2018-05-23 11:21:44 -04:00
wb2osz 8280971f55 Minor documentation updates. 2018-05-23 11:20:48 -04:00
wb2osz 4814011498 Minor documentation updates. 2018-05-23 11:18:34 -04:00
Josh Buhler b40d3fa134 ignore file tweaks 2018-04-03 19:56:45 -06:00
Josh Buhler 49ea703af1 Makefile tweaks
Uses the changes from pull request #71 by schuyler from the main direwolf repo
2018-04-03 19:56:02 -06:00
Josh Buhler 09a984a790 MSG_NOSIGNAL is not available on macOS 2018-04-03 19:54:34 -06:00
Josh Buhler 995fc89866 Fixes path used to find SDK 2018-04-03 16:49:38 -06:00
WB2OSZ 23ea24641d Fix download links to be master rather than dev branch. 2017-04-26 20:17:24 -04:00
WB2OSZ 612c2dc928 Merge remote-tracking branch 'origin/dev'
Put version 1.4 into master branch.
2017-04-26 20:03:55 -04:00
WB2OSZ 6207e2eb3e Add Outpost Packet Message Manager to list of compatible software. Requires version 1.4. 2017-01-02 17:53:56 -05:00
WB2OSZ 11e9e18e97 The github "issues" section is for reporting software defects and enhancement requests. It is NOT a place to ask questions or have general discussions. Please use one of the locations above. 2016-09-21 09:20:58 -04:00
345 changed files with 28584 additions and 10261 deletions

162
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,162 @@
name: 'build direwolf'
on:
# permit to manually trigger the CI
workflow_dispatch:
inputs:
cmake_flags:
description: 'Custom CMAKE flags'
required: false
push:
paths-ignore:
- '.github/**'
pull_request:
paths-ignore:
- '.github/**'
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: 'Windows Latest MinGW 64bit',
os: windows-latest,
cc: 'x86_64-w64-mingw32-gcc',
cxx: 'x86_64-w64-mingw32-g++',
ar: 'x86_64-w64-mingw32-ar',
windres: 'x86_64-w64-mingw32-windres',
arch: 'x86_64',
build_type: 'Release',
cmake_extra_flags: '-G "MinGW Makefiles"'
}
- {
name: 'Windows 2019 MinGW 32bit',
os: windows-2019,
cc: 'i686-w64-mingw32-gcc',
cxx: 'i686-w64-mingw32-g++',
ar: 'i686-w64-mingw32-ar',
windres: 'i686-w64-mingw32-windres',
arch: 'i686',
build_type: 'Release',
cmake_extra_flags: '-G "MinGW Makefiles"'
}
- {
name: 'macOS latest',
os: macos-latest,
cc: 'clang',
cxx: 'clang++',
arch: 'x86_64',
build_type: 'Release',
cmake_extra_flags: ''
}
- {
name: 'Ubuntu latest Debug',
os: ubuntu-latest,
cc: 'gcc',
cxx: 'g++',
arch: 'x86_64',
build_type: 'Debug',
cmake_extra_flags: ''
}
- {
name: 'Ubuntu 22.04',
os: ubuntu-22.04,
cc: 'gcc',
cxx: 'g++',
arch: 'x86_64',
build_type: 'Release',
cmake_extra_flags: ''
}
- {
name: 'Ubuntu 20.04',
os: ubuntu-20.04,
cc: 'gcc',
cxx: 'g++',
arch: 'x86_64',
build_type: 'Release',
cmake_extra_flags: ''
}
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 8
- name: dependency
shell: bash
run: |
# this is not perfect but enought for now
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get update
sudo apt-get install libasound2-dev libudev-dev libhamlib-dev gpsd
elif [ "$RUNNER_OS" == "macOS" ]; then
# just to simplify I use homebrew but
# we can use macports (latest direwolf is already available as port)
brew install portaudio hamlib gpsd
elif [ "$RUNNER_OS" == "Windows" ]; then
# add the folder to PATH
echo "C:\msys64\mingw32\bin" >> $GITHUB_PATH
fi
- name: create build environment
run: |
cmake -E make_directory ${{github.workspace}}/build
- name: configure
shell: bash
working-directory: ${{github.workspace}}/build
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
export CC=${{ matrix.config.cc }}
export CXX=${{ matrix.config.cxx }}
export AR=${{ matrix.config.ar }}
export WINDRES=${{ matrix.config.windres }}
fi
cmake $GITHUB_WORKSPACE \
-DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} \
-DCMAKE_C_COMPILER=${{ matrix.config.cc }} \
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }} \
-DCMAKE_CXX_FLAGS="-Werror" -DUNITTEST=1 \
${{ matrix.config.cmake_extra_flags }} \
${{ github.event.inputs.cmake_flags }}
- name: build
shell: bash
working-directory: ${{github.workspace}}/build
run: |
if [ "$RUNNER_OS" == "Windows" ]; then
export CC=${{ matrix.config.cc }}
export CXX=${{ matrix.config.cxx }}
export AR=${{ matrix.config.ar }}
export WINDRES=${{ matrix.config.windres }}
fi
cmake --build . --config ${{ matrix.config.build_type }} \
${{ github.event.inputs.cmake_flags }}
- name: test
continue-on-error: true
shell: bash
working-directory: ${{github.workspace}}/build
run: |
ctest -C ${{ matrix.config.build_type }} \
--parallel 2 --output-on-failure \
${{ github.event.inputs.cmake_flags }}
- name: package
shell: bash
working-directory: ${{github.workspace}}/build
run: |
if [ "$RUNNER_OS" == "Windows" ] || [ "$RUNNER_OS" == "macOS" ]; then
make package
fi
- name: archive binary
uses: actions/upload-artifact@v4
with:
name: direwolf_${{ matrix.config.os }}_${{ matrix.config.arch }}_${{ github.sha }}
path: |
${{github.workspace}}/build/direwolf-*.zip
${{github.workspace}}/build/direwolf.conf
${{github.workspace}}/build/src/*
${{github.workspace}}/build/CMakeCache.txt
!${{github.workspace}}/build/src/cmake_install.cmake
!${{github.workspace}}/build/src/CMakeFiles
!${{github.workspace}}/build/src/Makefile

View File

@ -0,0 +1,64 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL - Python"
on:
push:
branches: [ dev ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ dev ]
schedule:
- cron: '25 8 * * 4'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
setup-python-dependencies: true
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

74
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@ -0,0 +1,74 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL - CPP"
on:
push:
branches: [ dev ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ dev ]
schedule:
- cron: '25 8 * * 4'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
setup-python-dependencies: true
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
- run: |
mkdir build
cd build
cmake -DUNITTEST=1 ..
make
make test
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3

6
.gitignore vendored
View File

@ -105,3 +105,9 @@ $RECYCLE.BIN/
# Windows shortcuts # Windows shortcuts
*.lnk *.lnk
/use_this_sdk
*.dSYM
# cmake
build/
tmp/

View File

@ -1,25 +1,141 @@
# Revision History # # Revision History #
## Version 1.5 -- Beta Test 2 -- February 2018 ##
## Version 1.7 -- October 2023 ##
### New Documentation: ###
Additional documentation location to slow down growth of main repository. [https://github.com/wb2osz/direwolf-doc](https://github.com/wb2osz/direwolf-doc) . These are more oriented toward achieving a goal and understanding, as opposed to the User Guide which describes the functionality.
- ***APRS Digipeaters***
- ***Internal Packet Routing***
- ***Radio Interface Guide***
- ***Successful IGate Operation***
- ***Understanding APRS Packets***
### New Features: ###
- New ICHANNEL configuration option to map a KISS client application channel to APRS-IS. Packets from APRS-IS will be presented to client applications as the specified channel. Packets sent, by client applications, to that channel will go to APRS-IS rather than a radio channel. Details in ***Internal-Packet-Routing.pdf***.
- New variable speed option for gen_packets. For example, "-v 5,0.1" would generate packets from 5% too slow to 5% too fast with increments of 0.1. Some implementations might have imprecise timing. Use this to test how well TNCs tolerate sloppy timing.
- Improved Layer 2 Protocol [(IL2P)](https://en.wikipedia.org/wiki/FX.25_Forward_Error_Correction). Compatible with Nino TNC for 1200 and 9600 bps. Use "-I 1" on command line to enable transmit for first channel. For more general case, add to config file (simplified version, see User Guide for more details):
> After: "CHANNEL 1" (or other channel)
>
> Add: "IL2PTX 1"
- Limited support for CM108/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)
- The transmit calibration tone (-x) command line option now accepts a radio channel number and/or a single letter mode: a = alternate tones, m = mark tone, s = space tone, p = PTT only no sound.
- The BEACON configuration now recognizes the SOURCE= option. This replaces the AX.25 source address rather than using the MYCALL value for the channel. This is useful for sending more than 5 analog telemetry channels. Use two, or more, source addresses with up to 5 analog channels each.
- For more flexibility, the FX.25 transmit property can now be set individually by channel, rather than having a global setting for all channels. The -X on the command line applies only to channel 0. For other channels you need to add a new line to the configuration file. You can specify a specific number of parity bytes (16, 32, 64) or 1 to choose automatically based on packet size.
> After: "CHANNEL 1" (or other channel)
>
> Add: "FX25TX 1" (or 16 or 32 or 64)
### Bugs Fixed: ### ### Bugs Fixed: ###
- Strange failures when trying to use multiple KISS client applications over TCP. Only Linux was affected. - The t/m packet filter incorrectly included bulletins. It now allows only "messages" to specific stations. Use of t/m is discouraged. i/180 is the preferred filter for messages to users recently heard locally.
- Packet filtering now skips over any third party header before classifying packet types.
- Fixed build for Alpine Linux.
### Notes: ###
The Windows binary distribution now uses gcc (MinGW) version 11.3.0.
The Windows version is built for both 32 and 64 bit operating systems.
Use the 64 bit version if possible; it runs considerably faster.
## Version 1.6 -- October 2020 ##
### New Build Procedure: ###
## Version 1.5 -- Beta Test -- January 2018 ## - Rather than trying to keep a bunch of different platform specific Makefiles in sync, "cmake" is now used for greater portability and easier maintenance. This was contributed by Davide Gerhard.
- README.md has a quick summary of the process. More details in the ***User Guide***.
### New Features: ###
- "-X" option enables FX.25 transmission. FX.25 reception is always enabled so you don't need to do anything special. "What is FX.25?" you might ask. It is forward error correction (FEC) added in a way that is completely compatible with an ordinary AX.25 frame. See new document ***AX25\_plus\_FEC\_equals\_FX25.pdf*** for details.
- Receive AIS location data from ships. Enable by using "-B AIS" command line option or "MODEM AIS" in the configuration file. AIS NMEA sentences are encapsulated in APRS user-defined data with a "{DA" prefix. This uses 9600 bps so you need to use wide band audio, not what comes out of the speaker. There is also a "-A" option to generate APRS Object Reports.
- Receive Emergency Alert System (EAS) Specific Area Message Encoding (SAME). Enable by using "-B EAS" command line option or "MODEM EAS" in the configuration file. EAS SAME messages are encapsulated in APRS user-defined data with a "{DE" prefix. This uses low speed AFSK so speaker output is fine.
- "-t" option now accepts more values to accommodate inconsistent handling of text color control codes by different terminal emulators. The default, 1, should work with most modern terminal types. If the colors are not right, try "-t 9" to see the result of the different choices and pick the best one. If none of them look right, file a bug report and specify: operating system version (e.g. Raspbian Buster), terminal emulator type and version (e.g. LXTerminal 0.3.2). Include a screen capture.
- "-g" option to force G3RUH mode for lower speeds where a different modem type may be the default.
- 2400 bps compatibility with MFJ-2400. See ***2400-4800-PSK-for-APRS-Packet-Radio.pdf*** for details
- "atest -h" will display the frame in hexadecimal for closer inspection.
- Add support for Multi-GNSS NMEA sentences.
### Bugs Fixed: ###
- Proper counting of frames in transmit queue for AGW protocol 'Y' command.
### New Documentation: ###
- ***AX.25 + FEC = FX.25***
- ***AIS Reception***
- ***AX.25 Throughput: Why is 9600 bps Packet Radio only twice as fast as 1200?***
- [***Ham Radio of Things (HRoT) - IoT over Ham Radio***](https://github.com/wb2osz/hrot)
- [***EAS SAME to APRS Message Converter***](https://github.com/wb2osz/eas2aprs)
- [***Dire Wolf PowerPoint Slide Show***](https://github.com/wb2osz/direwolf-presentation)
### Notes: ###
The Windows binary distribution now uses gcc (MinGW) version 7.4.0.
The Windows version is built for both 32 and 64 bit operating systems.
Use the 64 bit version if possible; it runs considerably faster.
## Version 1.5 -- September 2018 ##
### New Features: ### ### New Features: ###
- PTT using GPIO pin of CM108/CM119 (e.g. DMK URI, RB-USB RIM), Linux only. - PTT using GPIO pin of CM108/CM119 (e.g. DMK URI, RB-USB RIM), Linux only.
- More efficient error recovery for AX.25 connected mode. Better generation and processing of REJ and SREJ to reduce unnecessary duplicate "**I**" frames.
- More efficient error recovery for AX.25 connected mode. Better generation and processing of REJ and SREJ to reduce unnecessary duplicate I frames. - New configuration option, "**V20**", for listing stations known to not understand AX.25 v2.2. This will speed up connection by going right to SABM and not trying SABME first and failing.
- New configuration option, V20, for listing stations known to not understand AX.25 v2.2. This will speed up connection by going right to SABM and not trying SABME first and failing.
- New "**NOXID**" configuration file option to avoid sending XID command to listed station(s). If other end is a partial v2.2 implementation, which recognizes SABME, but not XID, we would waste a lot of time resending XID many times before giving up. This is less drastic than the "**V20**" option which doesn't even attempt to use v2.2 with listed station(s).
- New application "**kissutil**" for troubleshooting a KISS TNC or interfacing to an application via files. - New application "**kissutil**" for troubleshooting a KISS TNC or interfacing to an application via files.
@ -45,6 +161,11 @@
- PACLEN configuration item no longer restricts length of received frames. - PACLEN configuration item no longer restricts length of received frames.
- Strange failures when trying to use multiple KISS client applications over TCP. Only Linux was affected.
- Under certain conditions, outgoing connected mode data would get stuck in a queue and not be transmitted. This could happen if client application sends a burst of data larger than the "window" size (MAXFRAME or EMAXFRAME option).
- Little typographical / spelling errors in messages. - Little typographical / spelling errors in messages.
@ -55,7 +176,9 @@
- Updates describing cheap SDR frequency inaccuracy and how to compensate for it. - Updates describing cheap SDR frequency inaccuracy and how to compensate for it.
### Notes: ###
Windows binary distribution now uses gcc (MinGW) version 6.3.0.
---------- ----------

414
CMakeLists.txt Normal file
View File

@ -0,0 +1,414 @@
cmake_minimum_required(VERSION 3.5.0)
project(direwolf)
# configure version
set(direwolf_VERSION_MAJOR "1")
set(direwolf_VERSION_MINOR "7")
set(direwolf_VERSION_PATCH "0")
set(direwolf_VERSION_SUFFIX "Development")
# options
# See Issue 297.
option(FORCE_SSE "Compile with SSE instruction only" ON)
option(FORCE_SSSE3 "Compile with SSSE3 instruction only" OFF)
option(FORCE_SSE41 "Compile with SSE4.1 instruction only" OFF)
option(OPTIONAL_TEST "Compile optional test (might be broken)" OFF)
# UNITTEST option must be after CMAKE_BUILT_TYPE
# where cmake find custom modules
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
# fix c standard used on the project
set(CMAKE_C_STANDARD 99)
# Set additional project information
set(COMPANY "wb2osz")
add_definitions("-DCOMPANY=\"${COMPANY}\"")
set(APPLICATION_NAME "Dire Wolf")
add_definitions("-DAPPLICATION_NAME=\"${APPLICATION_NAME}\"")
set(APPLICATION_MAINTAINER="John Langner, WB2OSZ")
set(COPYRIGHT "Copyright (c) 2019 John Langner, WB2OSZ. All rights reserved.")
add_definitions("-DCOPYRIGHT=\"${COPYRIGHT}\"")
set(IDENTIFIER "com.${COMPANY}.${APPLICATION_NAME}")
add_definitions("-DIDENTIFIER=\"${IDENTIFIER}\"")
# raspberry as only lxterminal not xterm
if(NOT (WIN32 OR CYGWIN))
find_program(BINARY_TERMINAL_BIN lxterminal)
if(BINARY_TERMINAL_BIN)
set(APPLICATION_DESKTOP_EXEC "${BINARY_TERMINAL_BIN} -e ${CMAKE_PROJECT_NAME}")
else()
set(APPLICATION_DESKTOP_EXEC "xterm -e ${CMAKE_PROJECT_NAME}")
endif()
endif()
find_package(Git)
if(GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git/")
# we can also use `git describe --tags`
execute_process(COMMAND "${GIT_EXECUTABLE}" rev-parse --short HEAD
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
RESULT_VARIABLE res
OUTPUT_VARIABLE out
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(NOT res)
string(REGEX REPLACE "^v([0-9]+)\.([0-9]+)\.([0-9]+)-" "" git_commit ${out})
set(direwolf_VERSION_SUFFIX "-${git_commit}")
set(direwolf_VERSION_COMMIT "${git_commit}")
endif()
endif()
# set variables
set(direwolf_VERSION "${direwolf_VERSION_MAJOR}.${direwolf_VERSION_MINOR}.${direwolf_VERSION_PATCH}${direwolf_VERSION_SUFFIX}")
message(STATUS "${APPLICATION_NAME} Version: ${direwolf_VERSION}")
add_definitions("-DIREWOLF_VERSION=\"${direwolf_VERSION}\"")
add_definitions("-DMAJOR_VERSION=${direwolf_VERSION_MAJOR}")
add_definitions("-DMINOR_VERSION=${direwolf_VERSION_MINOR}")
if(direwolf_VERSION_COMMIT)
add_definitions("-DEXTRA_VERSION=${direwolf_VERSION_COMMIT}")
endif()
set(CUSTOM_SRC_DIR "${CMAKE_SOURCE_DIR}/src")
set(CUSTOM_EXTERNAL_DIR "${CMAKE_SOURCE_DIR}/external")
set(CUSTOM_MISC_DIR "${CUSTOM_EXTERNAL_DIR}/misc")
set(CUSTOM_REGEX_DIR "${CUSTOM_EXTERNAL_DIR}/regex")
set(CUSTOM_HIDAPI_DIR "${CUSTOM_EXTERNAL_DIR}/hidapi")
set(CUSTOM_GEOTRANZ_DIR "${CUSTOM_EXTERNAL_DIR}/geotranz")
set(CUSTOM_DATA_DIR "${CMAKE_SOURCE_DIR}/data")
set(CUSTOM_SCRIPTS_DIR "${CMAKE_SOURCE_DIR}/scripts")
set(CUSTOM_TELEMETRY_DIR "${CUSTOM_SCRIPTS_DIR}/telemetry-toolkit")
set(CUSTOM_CONF_DIR "${CMAKE_SOURCE_DIR}/conf")
set(CUSTOM_DOC_DIR "${CMAKE_SOURCE_DIR}/doc")
set(CUSTOM_MAN_DIR "${CMAKE_SOURCE_DIR}/man")
set(CUSTOM_TEST_DIR "${CMAKE_SOURCE_DIR}/test")
set(CUSTOM_TEST_SCRIPTS_DIR "${CUSTOM_TEST_DIR}/scripts")
set(CUSTOM_SHELL_SHABANG "#!/bin/sh -e")
# cpack variables
set(CPACK_GENERATOR "ZIP")
set(CPACK_STRIP_FILES true)
set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
# This has architecture of the build machine, not the target platform.
# e.g. Comes out as x86_64 when building for i686 target platform.
#set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${direwolf_VERSION}_${CMAKE_SYSTEM_PROCESSOR}")
# We don't know the target yet so this is set after FindCPUflags.
set(CPACK_PACKAGE_CONTACT "https://github.com/wb2osz/direwolf")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Dire Wolf is an AX.25 soundcard TNC, digipeater, APRS IGate, GPS tracker, and APRStt gateway")
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_SOURCE_DIR}/README.md")
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
set(CPACK_SOURCE_IGNORE_FILES "${PROJECT_BINARY_DIR};/.git/;.gitignore;menu.yml;.travis.yml;.appveyor.yml;default.nix;.envrc;TODOs.org;/.scripts/")
SET(CPACK_PACKAGE_VERSION "${direwolf_VERSION}")
SET(CPACK_PACKAGE_VERSION_MAJOR "${direwolf_VERSION_MAJOR}")
SET(CPACK_PACKAGE_VERSION_MINOR "${direwolf_VERSION_MINOR}")
SET(CPACK_PACKAGE_VERSION_PATCH "${direwolf_VERSION_PATCH}")
SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libasound2,libgps23")
# if we don't set build_type
if(NOT DEFINED CMAKE_BUILD_TYPE OR "${CMAKE_BUILD_TYPE}" STREQUAL "")
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
endif()
message(STATUS "Build type set to: ${CMAKE_BUILD_TYPE}")
message("CMake system: ${CMAKE_SYSTEM_NAME}")
# Unittest should be on for dev builds and off for releases.
if(CMAKE_BUILD_TYPE MATCHES "Release")
option(UNITTEST "Build unittest binaries." OFF)
else()
option(UNITTEST "Build unittest binaries." ON)
endif()
# set compiler
include(FindCompiler)
# find cpu flags (and set compiler)
include(FindCPUflags)
if(${ARCHITECTURE} MATCHES "x86")
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${direwolf_VERSION}_i686")
else()
set(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${direwolf_VERSION}_${ARCHITECTURE}")
endif()
# auto include current directory
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# set OS dependent variables
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(LINUX TRUE)
configure_file("${CMAKE_SOURCE_DIR}/cmake/cpack/${CMAKE_PROJECT_NAME}.desktop.in"
"${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.desktop" @ONLY)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
set(FREEBSD TRUE)
configure_file("${CMAKE_SOURCE_DIR}/cmake/cpack/${CMAKE_PROJECT_NAME}.desktop.in"
"${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.desktop" @ONLY)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD")
set(OPENBSD TRUE)
set(HAVE_SNDIO TRUE)
elseif(APPLE)
if("${CMAKE_OSX_DEPLOYMENT_TARGET}" STREQUAL "")
message(STATUS "Build for macOS target: local version")
else()
message(STATUS "Build for macOS target: ${CMAKE_OSX_DEPLOYMENT_TARGET}")
endif()
# prepend path to find_*()
set(CMAKE_FIND_ROOT_PATH "/opt/local")
set(CMAKE_MACOSX_RPATH ON)
message(STATUS "RPATH support: ${CMAKE_MACOSX_RPATH}")
# just blindly enable dns-sd
set(USE_MACOS_DNSSD ON)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_MACOS_DNSSD")
elseif (WIN32)
if(C_MSVC)
if (NOT VS2015 AND NOT VS2017 AND NOT VS2019)
message(FATAL_ERROR "You must use Microsoft Visual Studio 2015, 2017 or 2019 as compiler")
else()
# compile with full multicore
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /MP")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
set(CUSTOM_SHELL_BIN "")
endif()
endif()
endif()
if (C_CLANG OR C_GCC)
# _BSD_SOURCE is deprecated we need to use _DEFAULT_SOURCE.
#
# That works find for more modern compilers but we have issues with:
# Centos 7, gcc 4.8.5, glibc 2.17
# Centos 6, gcc 4.4.7, glibc 2.12
#
# CentOS 6 & 7: Without -D_BSD_SOURCE, we get Warning: Implicit declaration of
# functions alloca, cfmakeraw, scandir, setlinebuf, strcasecmp, strncasecmp, and strsep.
# When a function (like strsep) returns a pointer, the compiler instead assumes a 32 bit
# int and sign extends it out to be a 64 bit pointer. Use the pointer and Kaboom!
#
# CentOS 6: We have additional problem. Without -D_POSIX_C_SOURCE=199309L, we get
# implicit declaration of function clock_gettime and the linker can't find it.
#
# It turns out that -D_GNU_SOURCE can be used instead of both of those. For more information,
# see https://www.gnu.org/software/libc/manual/html_node/Feature-Test-Macros.html
#
# Why was this not an issue before? If gcc is used without the -std=c99 option,
# it is perfectly happy with clock_gettime, strsep, etc. but with the c99 option, it no longer
# recognizes a bunch of commonly used functions. Using _GNU_SOURCE, rather than _DEFAULT_SOURCE
# solves the problem for CentOS 6 & 7. This also makes -D_XOPEN_SOURCE= unnecessary.
# I hope it doesn't break with newer versions of glibc.
#
# I also took out -Wextra because it spews out so much noise a serious problem was not noticed.
# It might go back in someday when I have more patience to clean up all the warnings.
#
# TODO:
# Try error checking -fsanitize=bounds-strict -fsanitize=leak
# Requires libubsan and liblsan, respectively.
###set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wvla -ffast-math -ftree-vectorize -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE ${EXTRA_FLAGS}")
if(FREEBSD)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wvla -ffast-math -ftree-vectorize -D_DEFAULT_SOURCE ${EXTRA_FLAGS}")
else()
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wvla -ffast-math -ftree-vectorize -D_GNU_SOURCE -fsanitize=bounds-strict ${EXTRA_FLAGS}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wvla -ffast-math -ftree-vectorize -D_GNU_SOURCE ${EXTRA_FLAGS}")
endif()
#
#
# -lm is needed for functions in math.h
if (LINUX)
# We have another problem with CentOS 6. clock_gettime() is in librt so we need -lrt.
# The clock_* functions were moved into gnu libc for version 2.17.
# https://sourceware.org/ml/libc-announce/2012/msg00001.html
# If using gnu libc 2.17, or later, the -lrt is no longer needed but doesn't hurt.
# I'm making this conditional on LINUX because it is not needed for BSD and MacOSX.
link_libraries("-lrt -lm")
else()
link_libraries("-lm")
endif()
elseif (C_MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -W3 -MP ${EXTRA_FLAGS}")
endif()
if (C_CLANG)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ferror-limit=1")
elseif (C_GCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fmax-errors=1")
endif()
# set installation directories
if (WIN32 OR CYGWIN)
set(INSTALL_BIN_DIR ".")
set(INSTALL_DOC_DIR "doc")
set(INSTALL_CONF_DIR ".")
set(INSTALL_SCRIPTS_DIR "scripts")
set(INSTALL_MAN_DIR "man")
set(INSTALL_DATA_DIR "data")
else()
set(INSTALL_BIN_DIR "bin")
set(INSTALL_DOC_DIR "share/doc/${CMAKE_PROJECT_NAME}")
set(INSTALL_CONF_DIR "${INSTALL_DOC_DIR}/conf")
set(INSTALL_SCRIPTS_DIR "${INSTALL_DOC_DIR}/scripts")
if(FREEBSD)
set(INSTALL_MAN_DIR "man/man1")
else()
set(INSTALL_MAN_DIR "share/man/man1")
endif()
set(INSTALL_DATA_DIR "share/${PROJECT_NAME}")
endif(WIN32 OR CYGWIN)
# requirements
include(CheckSymbolExists)
# Some platforms provide their own strlcpy & strlcat. (BSD, MacOSX)
# Others don't so we provide our own. (Windows, most, but not all Linux)
# Here we detect whether these are provided by the OS and set a symbol
# so that:
# (1) libgps does not supply its own version.
# (2) we know whether we need to supply our own copy.
#
# This was all working fine until these were added to the gnu c library 2.38.
# References:
# - https://www.gnu.org/software/libc/sources.html
# - https://sourceware.org/git/?p=glibc.git;a=blob_plain;f=NEWS;hb=HEAD
#
# This test is not detecting them for glibc 2.38 resulting in a conflict.
# Why? Are they declared in a different file or in some strange way?
#
# This is how they are declared in include/string.h:
#
# extern __typeof (strlcpy) __strlcpy;
# libc_hidden_proto (__strlcpy)
# extern __typeof (strlcat) __strlcat;
# libc_hidden_proto (__strlcat)
#
# Apparently cmake does not recognize this style.
# Keep this here for BSD type systems where it behaves as expected.
# We will need to add a hack in direwolf.h to define these if glibc version >= 2.38.
check_symbol_exists(strlcpy string.h HAVE_STRLCPY)
if(HAVE_STRLCPY)
add_compile_options(-DHAVE_STRLCPY)
endif()
check_symbol_exists(strlcat string.h HAVE_STRLCAT)
if(HAVE_STRLCAT)
add_compile_options(-DHAVE_STRLCAT)
endif()
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
find_package(GPSD)
if(GPSD_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_GPSD")
else()
set(GPSD_INCLUDE_DIRS "")
set(GPSD_LIBRARIES "")
endif()
find_package(hamlib)
if(HAMLIB_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_HAMLIB")
else()
set(HAMLIB_INCLUDE_DIRS "")
set(HAMLIB_LIBRARIES "")
endif()
if(LINUX)
find_package(ALSA REQUIRED)
if(ALSA_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_ALSA")
endif()
find_package(udev)
if(UDEV_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_CM108")
endif()
find_package(Avahi)
if(AVAHI_CLIENT_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_AVAHI_CLIENT")
endif()
elseif (HAVE_SNDIO)
find_package(sndio REQUIRED)
if(SNDIO_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_SNDIO")
endif()
elseif (NOT WIN32 AND NOT CYGWIN)
find_package(Portaudio REQUIRED)
if(PORTAUDIO_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_PORTAUDIO")
endif()
else()
set(ALSA_INCLUDE_DIRS "")
set(ALSA_LIBRARIES "")
set(UDEV_INCLUDE_DIRS "")
set(UDEV_LIBRARIES "")
# Version 1.7 supports CM108/CM119 GPIO PTT for Windows.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_CM108")
set(PORTAUDIO_INCLUDE_DIRS "")
set(PORTAUDIO_LIBRARIES "")
set(SNDIO_INCLUDE_DIRS "")
set(SNDIO_LIBRARIES "")
endif()
# manage and fetch new data
add_subdirectory(data)
# external libraries
add_subdirectory(${CUSTOM_GEOTRANZ_DIR})
add_subdirectory(${CUSTOM_REGEX_DIR})
add_subdirectory(${CUSTOM_HIDAPI_DIR})
add_subdirectory(${CUSTOM_MISC_DIR})
# direwolf source code and utilities
add_subdirectory(src)
# ctest
if(UNITTEST)
message(STATUS "Build unit test binaries")
include(CTest)
enable_testing()
add_subdirectory(test)
endif(UNITTEST)
# manage scripts
add_subdirectory(scripts)
# manage config
add_subdirectory(conf)
# install basic docs
install(FILES ${CMAKE_SOURCE_DIR}/CHANGES.md DESTINATION ${INSTALL_DOC_DIR})
install(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION ${INSTALL_DOC_DIR})
install(FILES ${CMAKE_SOURCE_DIR}/external/LICENSE DESTINATION ${INSTALL_DOC_DIR}/external)
add_subdirectory(doc)
add_subdirectory(man)
# install desktop link
if (LINUX OR FREEBSD)
install(FILES ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.desktop DESTINATION share/applications)
install(FILES ${CMAKE_SOURCE_DIR}/cmake/cpack/${CMAKE_PROJECT_NAME}_icon.png DESTINATION share/pixmaps)
endif()
############ uninstall target ################
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/include/uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P
${CMAKE_CURRENT_BINARY_DIR}/uninstall.cmake)
############ packaging ################
add_subdirectory(cmake/cpack)

View File

@ -1,16 +1,36 @@
# Select proper Makefile for operating system.
# The Windows version is built with the help of Cygwin.
# In my case, I see CYGWIN_NT-6.1-WOW so we don't check for all:
# equal to some value. Your mileage my vary. @echo "The build procedure has changed in version 1.6."
@echo "In general, it now looks like this:"
win := $(shell uname | grep CYGWIN) @echo " "
dar := $(shell uname | grep Darwin) @echo "Download the source code:"
@echo " "
ifneq ($(win),) @echo " cd ~"
include Makefile.win @echo " git clone https://www.github.com/wb2osz/direwolf"
else ifeq ($(dar),Darwin) @echo " cd direwolf"
include Makefile.macosx @echo " "
else @echo "Optional - Do this to get the latest development version"
include Makefile.linux @echo "rather than the latest stable release."
endif @echo " "
@echo " git checkout dev"
@echo " "
@echo "Build it. There are two new steps not used for earlier releases."
@echo " "
@echo " mkdir build && cd build"
@echo " cmake .."
@echo " make -j4"
@echo " "
@echo "Install:"
@echo " "
@echo " sudo make install"
@echo " make install-conf"
@echo " "
@echo "You will probably need to install additional applications and"
@echo "libraries depending on your operating system."
@echo "More details are in the README.md file."
@echo " "
@echo "Questions?"
@echo " "
@echo " - Extensive documentation can be found in the 'doc' directory."
@echo " - Join the discussion forum here: https://groups.io/g/direwolf"
@echo " "

View File

@ -1,988 +0,0 @@
#
# Makefile for Linux version of Dire Wolf.
#
APPS := direwolf decode_aprs text2tt tt2text ll2utm utm2ll aclients atest log2gpx gen_packets ttcalc kissutil cm108
all : $(APPS) direwolf.desktop direwolf.conf
@echo " "
@echo "Next step - install with:"
@echo " "
@echo " sudo make install"
@echo " "
CC := gcc
# Just for fun, let's see how clang compares to gcc. First install like this:
# sudo apt-get update
# apt-cache search clang
# sudo apt-get install clang-3.5
#
# CC := clang-3.5
# _XOPEN_SOURCE=600 and _DEFAULT_SOURCE=1 are needed for glibc >= 2.24.
# Explanation here: https://github.com/wb2osz/direwolf/issues/62
# There are a few source files where it had been necessary to define __USE_XOPEN2KXSI,
# __USE_XOPEN, or _POSIX_C_SOURCE. Doesn't seem to be needed after adding this.
# The first assignment to CFLAGS and LDFLAGS uses +=, rather than :=, so
# we will inherit options already set in build environment.
# Explanation - https://github.com/wb2osz/direwolf/pull/38
CFLAGS += -O3 -pthread -Igeotranz -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE=1 -Wall
# That was fine for a recent Ubuntu and Raspbian Jessie.
# However, Raspbian wheezy was then missing declaration for strsep and definition of fd_set.
CFLAGS += -D_BSD_SOURCE
LDFLAGS += -lm -lpthread -lrt
#
# The DSP filters spend a lot of time spinning around in little
# loops multiplying and adding arrays of numbers. The Intel "SSE"
# instructions, introduced in 1999 with the Pentium III series,
# can speed this up considerably.
#
# SSE2 instructions, added in 2000, don't seem to offer any advantage.
#
#
# Let's take a look at the effect of the compile options.
#
#
# Times are elapsed time to process Track 2 of the TNC test CD.
#
# i.e. "./atest 02_Track_2.wav"
# Default demodulator type is new "E" added for version 1.2.
#
#
# ---------- x86 (32 bit) ----------
#
#
# gcc 4.6.3 running on Ubuntu 12.04.05.
# Intel(R) Celeron(R) CPU 2.53GHz. Appears to have only 32 bit instructions.
# Probably from around 2004 or 2005.
#
# When gcc is generating code for a 32 bit x86 target, it assumes the ancient
# i386 processor. This is good for portability but bad for performance.
#
# The code can run considerably faster by taking advantage of the SSE instructions
# available in the Pentium 3 or later.
#
# seconds options comments
# ------ ------- --------
# 524
# 183 -O2
# 182 -O3
# 183 -O3 -ffast-math (should be same as -Ofast)
# 184 -Ofast
# 189 -O3 -ffast-math -march=pentium
# 122 -O3 -ffast-math -msse
# 122 -O3 -ffast-math -march=pentium -msse
# 121 -O3 -ffast-math -march=pentium3 (this implies -msse)
# 120 -O3 -ffast-math -march=native
#
# Note that "-march=native" is essentially the same as "-march=pentium3."
#
# If the compiler is generating code for the i386 target, we can
# get much better results by telling it we have at least a Pentium 3.
arch := $(shell echo | gcc -E -dM - | grep __i386__)
ifneq ($(arch),)
CFLAGS += -march=pentium3
endif
#
# ---------- x86_64 ----------
#
#
# gcc 4.8.2 running on Ubuntu 14.04.1.
# Intel Core 2 Duo from around 2007 or 2008.
#
# 64 bit target implies that we have SSE and probably even better vector instructions.
#
# seconds options comments
# ------ ------- --------
# 245
# 75 -01
# 72 -02
# 71 -03
# 73 -O3 -march=native
# 42 -O3 -ffast-math
# 42 -Ofast (note below)
# 40 -O3 -ffast-math -march=native
#
#
# Note that "-Ofast" is a newer option roughly equivalent to "-O3 -ffast-math".
# I use the longer form because it is compatible with older compilers.
#
# Why don't I don't have "-march=native?"
# Older compilers don't recognize "native" as one of the valid options.
# One article said it was added with gcc 4.2 but I haven't verified that.
#
# ---------- How does clang compare? - Ubuntu x86_64 ----------
#
# I keep hearing a lot about "clang." Let's see how it compares with gcc.
# Simply use different compiler and keep all options the same.
#
# test case: atest 02_Track_2.wav
#
# gcc 4.8.4: 988 packets decoded in 40.503 seconds. 38.3 x realtime
# 988 packets decoded in 40.403 seconds. 38.4 x realtime
#
# clang 3.8.0-2: 988 packets decoded in 77.454 seconds. 20.0 x realtime
# 988 packets decoded in 77.232 seconds. 20.1 x realtime
#
# I'm not impressed. Almost twice as long. Maybe we need to try some other compiler options.
# -march=native did not help.
# Makefile.macosx, which uses clang, has these:
# -fvectorize -fslp-vectorize -fslp-vectorize-aggressive
# Those did not help.
#
useffast := $(shell gcc --help -v 2>/dev/null | grep ffast-math)
ifneq ($(useffast),)
CFLAGS += -ffast-math
endif
#
# ---------- ARM - Raspberry Pi 1 models ----------
#
# Raspberry Pi (before RPi model 2), ARM11 (ARMv6 + VFP2)
# gcc (Debian 4.6.3-14+rpi1) 4.6.3
#
#
# seconds options comments
# ------ ------- ---------
# 892 -O3
# 887 -O3 -ffast-math
# x -O3 -ffast-math -march=native (error: bad value for -march switch)
# 887 -O3 -ffast-math -mfpu=vfp
# 890 -O3 -ffast-math -march=armv6zk -mcpu=arm1176jzf-s -mfloat-abi=hard -mfpu=vfp
#
#
# The compiler, supplied with Raspbian, is configured with these options which are
# good for the pre version 2 models.
# --with-arch=armv6 --with-fpu=vfp --with-float=hard
#
# Run "gcc --help -v 2" and look near the end.
#
#
#
# ---------- ARM - Raspberry Pi 2 ----------
#
# Besides the higher clock speed, the Raspberry Pi 2 has the NEON instruction set
# which which should make things considerably faster.
#
#
# seconds options comments
# ------ ------- ---------
# 426 -O3 -ffast-math (already more than twice as fast)
# 429 -O3 -mfpu=neon
# 419 -O3 -mfpu=neon -funsafe-math-optimizations
# 412 -O3 -ffast-math -mfpu=neon
# 413 -O3 -ffast-math -mfpu=neon-vfpv4
# 430 -O3 -ffast-math -mfpu=neon-vfpv4 -march=armv7-a
# 412 -O3 -ffast-math -mfpu=neon-vfpv4 -mtune=arm7
# 410 -O3 -ffast-math -mfpu=neon-vfpv4 -funsafe-math-optimizations
#
# gcc -march=armv7-a -mfpu=neon-vfpv4
#
# I expected the -mfpu=neon option to have a much larger impact.
# Adding -march=armv7-a makes it slower!
#
# If you compile with the RPi 2 specific options above and try to run it on the RPi
# model B (pre version 2), it will die with "illegal instruction."
#
# Dire Wolf is known to work on the BeagleBone, CubieBoard2, CHIP, etc.
# The best compiler options will depend on the specific type of processor
# and the compiler target defaults.
#
neon := $(shell cat /proc/cpuinfo | grep neon)
ifneq ($(neon),)
CFLAGS += -mfpu=neon
endif
#
# You would expect "-march=native" to produce the fastest code.
# Why don't I use it here?
#
# 1. In my benchmarks, above, it has a negligible impact if any at all.
# 2. Some older versions of gcc don't recognize "native" as a valid choice.
# 3. Results are less portable. Not a consideration if you are
# building only for your own use but very important for anyone
# redistributing a "binary" version.
#
# If you are planning to distribute the binary version to other
# people (in some ham radio software collection, RPM, or DEB package),
# avoid fine tuning it for your particular computer. It could
# cause compatibility issues for those with older computers.
#
# ---------- How does clang compare? - ARM - Raspberry Pi 2 ----------
#
# I keep hearing a lot about "clang." Let's see how it compares with gcc.
# Simply use different compiler and keep all options the same.
#
# test case: atest 02_Track_2.wav
#
# gcc 4.9.2-10: 988 packets decoded in 353.025 seconds. 4.4 x realtime
# 988 packets decoded in 352.752 seconds. 4.4 x realtime
#
# clang 3.5.0-10: 988 packets decoded in 825.879 seconds. 1.9 x realtime
# 988 packets decoded in 831.469 seconds. 1.9 x realtime
#
# There might be a different set of options which produce faster code
# but the initial test doesn't look good. About 2.3 times as slow.
# If you want to use OSS (for FreeBSD, OpenBSD) instead of
# ALSA (for Linux), comment out (or remove) the line below.
# TODO: Can we automate this somehow?
alsa = 1
ifeq ($(wildcard /usr/include/pthread.h),)
$(error /usr/include/pthread.h does not exist. Install it with "sudo apt-get install libc6-dev" or "sudo yum install glibc-headers" )
endif
ifneq ($(alsa),)
CFLAGS += -DUSE_ALSA
LDFLAGS += -lasound
ifeq ($(wildcard /usr/include/alsa/asoundlib.h),)
$(error /usr/include/alsa/asoundlib.h does not exist. Install it with "sudo apt-get install libasound2-dev" or "sudo yum install alsa-lib-devel" )
endif
endif
# Enable GPS if header file is present.
# Finding libgps.so* is more difficult because it
# is in different places on different operating systems.
enable_gpsd := $(wildcard /usr/include/gps.h)
ifneq ($(enable_gpsd),)
CFLAGS += -DENABLE_GPSD
LDFLAGS += -lgps
endif
# Enable hamlib support if header file is present.
enable_hamlib := $(wildcard /usr/include/hamlib/rig.h /usr/local/include/hamlib/rig.h)
ifneq ($(enable_hamlib),)
CFLAGS += -DUSE_HAMLIB
LDFLAGS += -lhamlib
endif
# Should enabling of this feature be strongly encouraged or
# is it quite specialized and of interest to a small audience?
# If, for some reason, can obtain the libudev-dev package, or
# don't want to install it, comment out the next 3 lines.
#ifeq ($(wildcard /usr/include/libudev.h),)
#$(error /usr/include/libudev.h does not exist. Install it with "sudo apt-get install libudev-dev" or "sudo yum install libudev-devel" )
#endif
# Enable cm108 PTT support if libudev header file is present.
enable_cm108 := $(wildcard /usr/include/libudev.h)
ifneq ($(enable_cm108),)
CFLAGS += -DUSE_CM108
LDFLAGS += -ludev
endif
# Name of current directory.
# Used to generate zip file name for distribution.
z := $(notdir ${CURDIR})
# -------------------------------- Main application -----------------------------------------
direwolf : direwolf.o config.o recv.o demod.o dsp.o demod_afsk.o demod_psk.o demod_9600.o hdlc_rec.o \
hdlc_rec2.o multi_modem.o rdq.o rrbb.o dlq.o \
fcs_calc.o ax25_pad.o ax25_pad2.o xid.o \
decode_aprs.o symbols.o server.o kiss.o kissserial.o kissnet.o kiss_frame.o hdlc_send.o fcs_calc.o \
gen_tone.o audio.o audio_stats.o digipeater.o cdigipeater.o pfilter.o dedupe.o tq.o xmit.o morse.o \
ptt.o beacon.o encode_aprs.o latlong.o encode_aprs.o latlong.o textcolor.o \
dtmf.o aprs_tt.o tt_user.o tt_text.o igate.o waypoint.o serial_port.o log.o telemetry.o \
dwgps.o dwgpsnmea.o dwgpsd.o dtime_now.o mheard.o ax25_link.o cm108.o \
misc.a geotranz.a
$(CC) -o $@ $^ $(LDFLAGS)
@echo " "
ifneq ($(enable_gpsd),)
@echo "\t>\tThis includes support for gpsd."
else
@echo "\t>\tThis does NOT include support for gpsd."
endif
ifneq ($(enable_hamlib),)
@echo "\t>\tThis includes support for hamlib."
else
@echo "\t>\tThis does NOT include support for hamlib."
endif
ifneq ($(enable_cm108),)
@echo "\t>\tThis includes support for CM108/CM119 PTT."
else
@echo "\t>\tThis does NOT include support for CM108/CM119 PTT."
endif
@echo " "
# Optimization for slow processors.
demod.o : fsk_fast_filter.h
demod_afsk.o : fsk_fast_filter.h
fsk_fast_filter.h : gen_fff
./gen_fff > fsk_fast_filter.h
gen_fff : demod_afsk.c dsp.c textcolor.c
echo " " > tune.h
$(CC) $(CFLAGS) -DGEN_FFF -o $@ $^ $(LDFLAGS)
#
# The destination field is often used to identify the manufacturer/model.
# These are not hardcoded into Dire Wolf. Instead they are read from
# a file called tocalls.txt at application start up time.
#
# The original permanent symbols are built in but the "new" symbols,
# using overlays, are often updated. These are also read from files.
#
# You can obtain an updated copy by typing "make tocalls-symbols".
# This is not part of the normal build process. You have to do this explicitly.
#
# The locations below appear to be the most recent.
# The copy at http://www.aprs.org/tocalls.txt is out of date.
#
.PHONY: tocalls-symbols
tocalls-symbols :
cp tocalls.txt tocalls.txt~
wget http://www.aprs.org/aprs11/tocalls.txt -O tocalls.txt
-diff -Z tocalls.txt~ tocalls.txt
cp symbols-new.txt symbols-new.txt~
wget http://www.aprs.org/symbols/symbols-new.txt -O symbols-new.txt
-diff -Z symbols-new.txt~ symbols-new.txt
cp symbolsX.txt symbolsX.txt~
wget http://www.aprs.org/symbols/symbolsX.txt -O symbolsX.txt
-diff -Z symbolsX.txt~ symbolsX.txt
# ---------------------------------------- Other utilities included ------------------------------
# Separate application to decode raw data.
# First three use .c rather than .o because they depend on DECAMAIN definition.
decode_aprs : decode_aprs.c kiss_frame.c ax25_pad.c dwgpsnmea.o dwgps.o dwgpsd.o serial_port.o symbols.o textcolor.o fcs_calc.o latlong.o log.o telemetry.o tt_text.o misc.a
$(CC) $(CFLAGS) -DDECAMAIN -o $@ $^ $(LDFLAGS)
# Convert between text and touch tone representation.
text2tt : tt_text.c misc.a
$(CC) $(CFLAGS) -DENC_MAIN -o $@ $^ $(LDFLAGS)
tt2text : tt_text.c misc.a
$(CC) $(CFLAGS) -DDEC_MAIN -o $@ $^ $(LDFLAGS)
# Convert between Latitude/Longitude and UTM coordinates.
ll2utm : ll2utm.c geotranz.a textcolor.o misc.a
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
utm2ll : utm2ll.c geotranz.a textcolor.o misc.a
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
# Convert from log file to GPX.
log2gpx : log2gpx.c textcolor.o misc.a
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
# Test application to generate sound.
gen_packets : gen_packets.c ax25_pad.c hdlc_send.c fcs_calc.c gen_tone.c morse.c dtmf.c textcolor.c dsp.c misc.a
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
# Unit test for AFSK demodulator
atest : atest.c demod.o demod_afsk.o demod_psk.o demod_9600.o \
dsp.o hdlc_rec.o hdlc_rec2.o multi_modem.o rrbb.o \
fcs_calc.o ax25_pad.o decode_aprs.o dwgpsnmea.o \
dwgps.o dwgpsd.o serial_port.o telemetry.o dtime_now.o latlong.o symbols.o tt_text.o textcolor.o \
misc.a
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
# Multiple AGWPE network or serial port clients to test TNCs side by side.
aclients : aclients.c ax25_pad.c fcs_calc.c textcolor.o misc.a
$(CC) $(CFLAGS) -g -o $@ $^
# Talk to a KISS TNC.
# Note: kiss_frame.c has conditional compilation on KISSUTIL.
kissutil : kissutil.c kiss_frame.c ax25_pad.o fcs_calc.o textcolor.o serial_port.o dtime_now.o sock.o misc.a
$(CC) $(CFLAGS) -g -DKISSUTIL -o $@ $^ $(LDFLAGS)
# List USB audio adapters than can use GPIO for PTT.
cm108 : cm108.c textcolor.o misc.a
$(CC) $(CFLAGS) -g -DCM108_MAIN -o $@ $^ $(LDFLAGS)
# Touch Tone to Speech sample application.
ttcalc : ttcalc.o ax25_pad.o fcs_calc.o textcolor.o misc.a
$(CC) $(CFLAGS) -g -o $@ $^
# ----------------------------------------- Libraries --------------------------------------------
# UTM, USNG, MGRS conversions.
geotranz.a : error_string.o mgrs.o polarst.o tranmerc.o ups.o usng.o utm.o
ar -cr $@ $^
error_string.o : geotranz/error_string.c
$(CC) $(CFLAGS) -c -o $@ $^
mgrs.o : geotranz/mgrs.c
$(CC) $(CFLAGS) -c -o $@ $^
polarst.o : geotranz/polarst.c
$(CC) $(CFLAGS) -c -o $@ $^
tranmerc.o : geotranz/tranmerc.c
$(CC) $(CFLAGS) -c -o $@ $^
ups.o : geotranz/ups.c
$(CC) $(CFLAGS) -c -o $@ $^
usng.o : geotranz/usng.c
$(CC) $(CFLAGS) -c -o $@ $^
utm.o : geotranz/utm.c
$(CC) $(CFLAGS) -c -o $@ $^
# Provide our own copy of strlcpy and strlcat because they are not included with Linux.
# We don't need the others in that same directory.
misc.a : strlcpy.o strlcat.o
ar -cr $@ $^
strlcpy.o : misc/strlcpy.c
$(CC) $(CFLAGS) -I. -c -o $@ $^
strlcat.o : misc/strlcat.c
$(CC) $(CFLAGS) -I. -c -o $@ $^
# ------------------------------------- Installation ----------------------------------
# Generate apprpriate sample configuration file for this platform.
# Originally, there was one sample for all platforms. It got too cluttered
# and confusing saying, this is for windows, and this is for Linux, and this ...
# Trying to maintain 3 different versions in parallel is error prone.
# We now have a single generic version which can be used to generate
# the various platform specific versions.
# generic.conf should be checked into source control.
# direwolf.conf should NOT. It is generated when compiling on the target platform.
direwolf.conf : generic.conf
egrep '^C|^L' generic.conf | cut -c2-999 > direwolf.conf
# Where should we install it?
# Something built from source and installed locally would normally go in /usr/local/...
# If not specified on the make command line, this is our default.
DESTDIR ?= /usr/local
# However, if you are preparing a "binary" DEB or RPM package, the installation location
# would normally be /usr/... instead. In this case, use a command line like this:
#
# make DESTDIR=/usr install
# Command to "install" to system directories. Use "ginstall" for Mac.
INSTALL=install
# direwolf.desktop was previously handcrafted for the Raspberry Pi.
# It was hardcoded with lxterminal, /home/pi, and so on.
# In version 1.2, try to customize this to match other situations better.
# TODO: Test this better.
direwolf.desktop :
@echo "Generating customized direwolf.desktop ..."
@echo '[Desktop Entry]' > $@
@echo 'Type=Application' >> $@
ifneq ($(wildcard /usr/bin/lxterminal),)
@echo "Exec=lxterminal -t \"Dire Wolf\" -e \"$(DESTDIR)/bin/direwolf\"" >> $@
else ifneq ($(wildcard /usr/bin/lxterm),)
@echo "Exec=lxterm -hold -title \"Dire Wolf\" -bg white -e \"$(DESTDIR)/bin/direwolf\"" >> $@
else
@echo "Exec=xterm -hold -title \"Dire Wolf\" -bg white -e \"$(DESTDIR)/bin/direwolf\"" >> $@
endif
@echo 'Name=Dire Wolf' >> $@
@echo 'Comment=APRS Soundcard TNC' >> $@
@echo 'Icon=$(DESTDIR)/share/direwolf/pixmaps/dw-icon.png' >> $@
@echo "Path=$(HOME)" >> $@
@echo '#Terminal=true' >> $@
@echo 'Categories=HamRadio' >> $@
@echo 'Keywords=Ham Radio;APRS;Soundcard TNC;KISS;AGWPE;AX.25' >> $@
# Installation into $(DESTDIR), usually /usr/local/... or /usr/...
# Needs to be run as root or with sudo.
.PHONY: install
install : $(APPS) direwolf.conf tocalls.txt symbols-new.txt symbolsX.txt dw-icon.png direwolf.desktop
#
# Applications, not installed with package manager, normally go in /usr/local/bin.
# /usr/bin is used instead when installing from .DEB or .RPM package.
#
$(INSTALL) -D --mode=755 direwolf $(DESTDIR)/bin/direwolf
$(INSTALL) -D --mode=755 decode_aprs $(DESTDIR)/bin/decode_aprs
$(INSTALL) -D --mode=755 text2tt $(DESTDIR)/bin/text2tt
$(INSTALL) -D --mode=755 tt2text $(DESTDIR)/bin/tt2text
$(INSTALL) -D --mode=755 ll2utm $(DESTDIR)/bin/ll2utm
$(INSTALL) -D --mode=755 utm2ll $(DESTDIR)/bin/utm2ll
$(INSTALL) -D --mode=755 aclients $(DESTDIR)/bin/aclients
$(INSTALL) -D --mode=755 log2gpx $(DESTDIR)/bin/log2gpx
$(INSTALL) -D --mode=755 gen_packets $(DESTDIR)/bin/gen_packets
$(INSTALL) -D --mode=755 atest $(DESTDIR)/bin/atest
$(INSTALL) -D --mode=755 ttcalc $(DESTDIR)/bin/ttcalc
$(INSTALL) -D --mode=755 kissutil $(DESTDIR)/bin/kissutil
$(INSTALL) -D --mode=755 cm108 $(DESTDIR)/bin/cm108
$(INSTALL) -D --mode=755 dwespeak.sh $(DESTDIR)/bin/dwspeak.sh
#
# Telemetry Toolkit executables. Other .conf and .txt files will go into doc directory.
#
$(INSTALL) -D --mode=755 telemetry-toolkit/telem-balloon.pl $(DESTDIR)/bin/telem-balloon.pl
$(INSTALL) -D --mode=755 telemetry-toolkit/telem-bits.pl $(DESTDIR)/bin/telem-bits.pl
$(INSTALL) -D --mode=755 telemetry-toolkit/telem-data.pl $(DESTDIR)/bin/telem-data.pl
$(INSTALL) -D --mode=755 telemetry-toolkit/telem-data91.pl $(DESTDIR)/bin/telem-data91.pl
$(INSTALL) -D --mode=755 telemetry-toolkit/telem-eqns.pl $(DESTDIR)/bin/telem-eqns.pl
$(INSTALL) -D --mode=755 telemetry-toolkit/telem-parm.pl $(DESTDIR)/bin/telem-parm.pl
$(INSTALL) -D --mode=755 telemetry-toolkit/telem-seq.sh $(DESTDIR)/bin/telem-seq.sh
$(INSTALL) -D --mode=755 telemetry-toolkit/telem-unit.pl $(DESTDIR)/bin/telem-unit.pl
$(INSTALL) -D --mode=755 telemetry-toolkit/telem-volts.py $(DESTDIR)/bin/telem-volts.py
#
# Misc. data such as "tocall" to system mapping.
#
$(INSTALL) -D --mode=644 tocalls.txt $(DESTDIR)/share/direwolf/tocalls.txt
$(INSTALL) -D --mode=644 symbols-new.txt $(DESTDIR)/share/direwolf/symbols-new.txt
$(INSTALL) -D --mode=644 symbolsX.txt $(DESTDIR)/share/direwolf/symbolsX.txt
#
# For desktop icon.
#
$(INSTALL) -D --mode=644 dw-icon.png $(DESTDIR)/share/direwolf/pixmaps/dw-icon.png
$(INSTALL) -D --mode=644 direwolf.desktop $(DESTDIR)/share/applications/direwolf.desktop
#
# Documentation. Various plain text files and PDF.
#
$(INSTALL) -D --mode=644 CHANGES.md $(DESTDIR)/share/doc/direwolf/CHANGES.md
$(INSTALL) -D --mode=644 LICENSE-dire-wolf.txt $(DESTDIR)/share/doc/direwolf/LICENSE-dire-wolf.txt
$(INSTALL) -D --mode=644 LICENSE-other.txt $(DESTDIR)/share/doc/direwolf/LICENSE-other.txt
#
# ./README.md is an overview for the project main page.
# Maybe we could stick it in some other place.
# doc/README.md contains an overview of the PDF file contents and is more useful here.
#
$(INSTALL) -D --mode=644 doc/README.md $(DESTDIR)/share/doc/direwolf/README.md
$(INSTALL) -D --mode=644 doc/2400-4800-PSK-for-APRS-Packet-Radio.pdf $(DESTDIR)/share/doc/direwolf/2400-4800-PSK-for-APRS-Packet-Radio.pdf
$(INSTALL) -D --mode=644 doc/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf $(DESTDIR)/share/doc/direwolf/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf
$(INSTALL) -D --mode=644 doc/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf $(DESTDIR)/share/doc/direwolf/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf
$(INSTALL) -D --mode=644 doc/A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf $(DESTDIR)/share/doc/direwolf/A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf
$(INSTALL) -D --mode=644 doc/APRS-Telemetry-Toolkit.pdf $(DESTDIR)/share/doc/direwolf/APRS-Telemetry-Toolkit.pdf
$(INSTALL) -D --mode=644 doc/APRStt-Implementation-Notes.pdf $(DESTDIR)/share/doc/direwolf/APRStt-Implementation-Notes.pdf
$(INSTALL) -D --mode=644 doc/APRStt-interface-for-SARTrack.pdf $(DESTDIR)/share/doc/direwolf/APRStt-interface-for-SARTrack.pdf
$(INSTALL) -D --mode=644 doc/APRStt-Listening-Example.pdf $(DESTDIR)/share/doc/direwolf/APRStt-Listening-Example.pdf
$(INSTALL) -D --mode=644 doc/Bluetooth-KISS-TNC.pdf $(DESTDIR)/share/doc/direwolf/Bluetooth-KISS-TNC.pdf
$(INSTALL) -D --mode=644 doc/Going-beyond-9600-baud.pdf $(DESTDIR)/share/doc/direwolf/Going-beyond-9600-baud.pdf
$(INSTALL) -D --mode=644 doc/Raspberry-Pi-APRS.pdf $(DESTDIR)/share/doc/direwolf/Raspberry-Pi-APRS.pdf
$(INSTALL) -D --mode=644 doc/Raspberry-Pi-APRS-Tracker.pdf $(DESTDIR)/share/doc/direwolf/Raspberry-Pi-APRS-Tracker.pdf
$(INSTALL) -D --mode=644 doc/Raspberry-Pi-SDR-IGate.pdf $(DESTDIR)/share/doc/direwolf/Raspberry-Pi-SDR-IGate.pdf
$(INSTALL) -D --mode=644 doc/Successful-APRS-IGate-Operation.pdf $(DESTDIR)/share/doc/direwolf/Successful-APRS-IGate-Operation.pdf
$(INSTALL) -D --mode=644 doc/User-Guide.pdf $(DESTDIR)/share/doc/direwolf/User-Guide.pdf
$(INSTALL) -D --mode=644 doc/WA8LMF-TNC-Test-CD-Results.pdf $(DESTDIR)/share/doc/direwolf/WA8LMF-TNC-Test-CD-Results.pdf
#
# Various sample config and other files go into examples under the doc directory.
# When building from source, these can be put in home directory with "make install-conf".
# When installed from .DEB or .RPM package, the user will need to copy these to
# the home directory or other desired location.
#
$(INSTALL) -D --mode=644 direwolf.conf $(DESTDIR)/share/doc/direwolf/examples/direwolf.conf
$(INSTALL) -D --mode=755 dw-start.sh $(DESTDIR)/share/doc/direwolf/examples/dw-start.sh
$(INSTALL) -D --mode=644 sdr.conf $(DESTDIR)/share/doc/direwolf/examples/sdr.conf
$(INSTALL) -D --mode=644 telemetry-toolkit/telem-m0xer-3.txt $(DESTDIR)/share/doc/direwolf/examples/telem-m0xer-3.txt
$(INSTALL) -D --mode=644 telemetry-toolkit/telem-balloon.conf $(DESTDIR)/share/doc/direwolf/examples/telem-balloon.conf
$(INSTALL) -D --mode=644 telemetry-toolkit/telem-volts.conf $(DESTDIR)/share/doc/direwolf/examples/telem-volts.conf
#
# "man" pages
#
$(INSTALL) -D --mode=644 man1/aclients.1 $(DESTDIR)/share/man/man1/aclients.1
$(INSTALL) -D --mode=644 man1/atest.1 $(DESTDIR)/share/man/man1/atest.1
$(INSTALL) -D --mode=644 man1/decode_aprs.1 $(DESTDIR)/share/man/man1/decode_aprs.1
$(INSTALL) -D --mode=644 man1/direwolf.1 $(DESTDIR)/share/man/man1/direwolf.1
$(INSTALL) -D --mode=644 man1/gen_packets.1 $(DESTDIR)/share/man/man1/gen_packets.1
$(INSTALL) -D --mode=644 man1/kissutil.1 $(DESTDIR)/share/man/man1/kissutil.1
$(INSTALL) -D --mode=644 man1/ll2utm.1 $(DESTDIR)/share/man/man1/ll2utm.1
$(INSTALL) -D --mode=644 man1/log2gpx.1 $(DESTDIR)/share/man/man1/log2gpx.1
$(INSTALL) -D --mode=644 man1/text2tt.1 $(DESTDIR)/share/man/man1/text2tt.1
$(INSTALL) -D --mode=644 man1/tt2text.1 $(DESTDIR)/share/man/man1/tt2text.1
$(INSTALL) -D --mode=644 man1/utm2ll.1 $(DESTDIR)/share/man/man1/utm2ll.1
#
# Set group and mode of HID devices corresponding to C-Media USB Audio adapters.
# This will allow us to use the CM108/CM119 GPIO pins for PTT.
#
$(INSTALL) -D --mode=644 99-direwolf-cmedia.rules /etc/udev/rules.d/99-direwolf-cmedia.rules
#
@echo " "
@echo "If this is your first install, not an upgrade, type this to put a copy"
@echo "of the sample configuration file (direwolf.conf) in your home directory:"
@echo " "
@echo " make install-conf"
@echo " "
# Put sample configuration & startup files in home directory.
# This step would be done as ordinary user.
# Some people like to put the direwolf config file in /etc/ax25.
# Note that all of these are also in $(DESTDIR)/share/doc/direwolf/examples/.
# The Raspberry Pi has ~/Desktop but Ubuntu does not.
# TODO: Handle Linux variations correctly.
# Version 1.4 - Add "-n" option to avoid clobbering existing, probably customized, config files.
# dw-start.sh is greatly improved in version 1.4.
# It was moved from isntall-rpi to install-conf because it is not just for the RPi.
.PHONY: install-conf
install-conf : direwolf.conf
cp -n direwolf.conf ~
cp -n sdr.conf ~
cp -n telemetry-toolkit/telem-m0xer-3.txt ~
cp -n telemetry-toolkit/telem-*.conf ~
chmod +x dw-start.sh
cp -n dw-start.sh ~
ifneq ($(wildcard $(HOME)/Desktop),)
@echo " "
@echo "This will add a desktop icon on some systems."
@echo "This is known to work on Raspberry Pi but might not be compatible with other desktops."
@echo " "
@echo " make install-rpi"
@echo " "
endif
.PHONY: install-rpi
install-rpi :
ln -f -s $(DESTDIR)/share/applications/direwolf.desktop ~/Desktop/direwolf.desktop
# ---------------------------------- Automated Smoke Test --------------------------------
# Combine some unit tests into a single regression sanity check.
check : dtest ttest tttexttest pftest tlmtest lltest enctest kisstest pad2test xidtest dtmftest check-modem1200 check-modem300 check-modem9600 check-modem19200 check-modem2400 check-modem4800
# Can we encode and decode at popular data rates?
check-modem1200 : gen_packets atest
./gen_packets -n 100 -o /tmp/test12.wav
./atest -F0 -PE -L63 -G71 /tmp/test12.wav
./atest -F1 -PE -L70 -G75 /tmp/test12.wav
rm /tmp/test12.wav
check-modem300 : gen_packets atest
./gen_packets -B300 -n 100 -o /tmp/test3.wav
./atest -B300 -F0 -L68 -G69 /tmp/test3.wav
./atest -B300 -F1 -L73 -G75 /tmp/test3.wav
rm /tmp/test3.wav
check-modem9600 : gen_packets atest
./gen_packets -B9600 -n 100 -o /tmp/test96.wav
./atest -B9600 -F0 -L50 -G54 /tmp/test96.wav
./atest -B9600 -F1 -L55 -G59 /tmp/test96.wav
rm /tmp/test96.wav
check-modem19200 : gen_packets atest
./gen_packets -r 96000 -B19200 -n 100 -o /tmp/test19.wav
./atest -B19200 -F0 -L55 -G59 /tmp/test19.wav
./atest -B19200 -F1 -L60 -G64 /tmp/test19.wav
rm /tmp/test19.wav
check-modem2400 : gen_packets atest
./gen_packets -B2400 -n 100 -o /tmp/test24.wav
./atest -B2400 -F0 -L70 -G78 /tmp/test24.wav
./atest -B2400 -F1 -L80 -G87 /tmp/test24.wav
rm /tmp/test24.wav
check-modem4800 : gen_packets atest
./gen_packets -B2400 -n 100 -o /tmp/test48.wav
./atest -B2400 -F0 -L70 -G79 /tmp/test48.wav
./atest -B2400 -F1 -L80 -G90 /tmp/test48.wav
rm /tmp/test48.wav
# Unit test for inner digipeater algorithm
.PHONY : dtest
dtest : digipeater.c dedupe.c pfilter.c \
ax25_pad.o fcs_calc.o tq.o textcolor.o \
decode_aprs.o dwgpsnmea.o dwgps.o dwgpsd.o serial_port.o latlong.o telemetry.o symbols.o tt_text.o misc.a
$(CC) $(CFLAGS) -DDIGITEST -o $@ $^ $(LDFLAGS)
./dtest
rm dtest
# Unit test for APRStt tone sequence parsing.
.PHONY : ttest
ttest : aprs_tt.c tt_text.c latlong.o textcolor.o misc.a geotranz.a misc.a
$(CC) $(CFLAGS) -DTT_MAIN -o $@ $^ $(LDFLAGS)
./ttest
rm ttest
# Unit test for APRStt tone sequence / text conversions.
.PHONY: tttexttest
tttexttest : tt_text.c textcolor.o misc.a
$(CC) $(CFLAGS) -DTTT_TEST -o $@ $^ $(LDFLAGS)
./tttexttest
rm tttexttest
# Unit test for Packet Filtering.
.PHONY: pftest
pftest : pfilter.c ax25_pad.o textcolor.o fcs_calc.o decode_aprs.o dwgpsnmea.o dwgps.o dwgpsd.o serial_port.o latlong.o symbols.o telemetry.o tt_text.o misc.a
$(CC) $(CFLAGS) -DPFTEST -o $@ $^ $(LDFLAGS)
./pftest
rm pftest
# Unit test for telemetry decoding.
.PHONY: tlmtest
tlmtest : telemetry.c ax25_pad.o fcs_calc.o textcolor.o misc.a
$(CC) $(CFLAGS) -DTEST -o $@ $^ $(LDFLAGS)
./tlmtest
rm tlmtest
# Unit test for location coordinate conversion.
.PHONY: lltest
lltest : latlong.c textcolor.o misc.a
$(CC) $(CFLAGS) -DLLTEST -o $@ $^ $(LDFLAGS)
./lltest
rm lltest
# Unit test for encoding position & object report.
.PHONY: enctest
enctest : encode_aprs.c latlong.c textcolor.c misc.a
$(CC) $(CFLAGS) -DEN_MAIN -o $@ $^ $(LDFLAGS)
./enctest
rm enctest
# Unit test for KISS encapsulation.
.PHONY: kisstest
kisstest : kiss_frame.c
$(CC) $(CFLAGS) -DKISSTEST -o $@ $^ $(LDFLAGS)
./kisstest
rm kisstest
# Unit test for constructing frames besides UI.
.PHONY: pad2test
pad2test : ax25_pad2.c ax25_pad.c fcs_calc.o textcolor.o misc.a
$(CC) $(CFLAGS) -DPAD2TEST -o $@ $^ $(LDFLAGS)
./pad2test
rm pad2test
# Unit Test for XID frame encode/decode.
.PHONY: xidtest
xidtest : xid.c textcolor.o misc.a
$(CC) $(CFLAGS) -DXIDTEST -o $@ $^ $(LDFLAGS)
./xidtest
rm xidtest
# Unit Test for DTMF encode/decode.
.PHONY: dtmftest
dtmftest : dtmf.c textcolor.o
$(CC) $(CFLAGS) -DDTMF_TEST -o $@ $^ $(LDFLAGS)
./dtmftest
rm dtmftest
# ----------------------------- Manual tests and experiments ---------------------------
# These are not included in a normal build. Might be broken.
# Unit test for IGate
itest : igate.c textcolor.c ax25_pad.c fcs_calc.c textcolor.o misc.a
$(CC) $(CFLAGS) -DITEST -o $@ $^
./itest
# Unit test for UDP reception with AFSK demodulator.
# Temporary during development. Might not be useful anymore.
udptest : udp_test.c demod.o dsp.o demod_afsk.o demod_psk.o demod_9600.o hdlc_rec.o hdlc_rec2.o multi_modem.o rrbb.o \
fcs_calc.o ax25_pad.o decode_aprs.o symbols.o textcolor.o misc.a
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
./udptest
# For demodulator tweaking experiments.
# Dependencies of demod*.c, rather than .o, are intentional.
demod.o : tune.h
demod_afsk.o : tune.h
demod_9600.o : tune.h
demod_psk.o : tune.h
tune.h :
echo " " > tune.h
testagc : atest.c demod.c dsp.c demod_afsk.c demod_psk.c demod_9600.c hdlc_rec.o hdlc_rec2.o multi_modem.o rrbb.o \
fcs_calc.o ax25_pad.o decode_aprs.o telemetry.o dtime_now.o latlong.o symbols.o tune.h textcolor.o misc.a
$(CC) $(CFLAGS) -o atest $^ $(LDFLAGS)
./atest 02_Track_2.wav | grep "packets decoded in" > atest.out
testagc96 : atest.c fsk_fast_filter.h tune.h demod.c demod_afsk.c demod_psk.c demod_9600.c \
dsp.o hdlc_rec.o hdlc_rec2.o multi_modem.o \
rrbb.o fcs_calc.o ax25_pad.o decode_aprs.o \
dwgpsnmea.o dwgps.o dwgpsd.o serial_port.o latlong.o \
symbols.o tt_text.o textcolor.o telemetry.o dtime_now.o \
misc.a
rm -f atest96
$(CC) $(CFLAGS) -o atest96 $^ $(LDFLAGS)
./atest96 -B 9600 ../walkabout9600c.wav | grep "packets decoded in" >atest.out
#./atest96 -B 9600 noisy96.wav | grep "packets decoded in" >atest.out
#./atest96 -B 9600 19990303_0225_9600_8bis_22kHz.wav | grep "packets decoded in" >atest.out
#./atest96 -B 9600 19990303_0225_9600_16bit_22kHz.wav | grep "packets decoded in" >atest.out
#./atest96 -B 9600 -P + z8-22k.wav| grep "packets decoded in" >atest.out
#./atest96 -B 9600 test9600.wav | grep "packets decoded in" >atest.out
echo " " > tune.h
# ------------------------------- Source distribution ---------------------------------
# probably obsolete and can be removed after move to github.
.PHONY: dist-src
dist-src : README.md CHANGES.md
doc/User-Guide.pdf doc/Raspberry-Pi-APRS.pdf \
doc/Raspberry-Pi-APRS-Tracker.pdf doc/APRStt-Implementation-Notes.pdf \
dw-start.sh dwespeak.bat dwespeak.sh \
tocalls.txt symbols-new.txt symbolsX.txt direwolf.spec
rm -f fsk_fast_filter.h
echo " " > tune.h
rm -f ../$z-src.zip
(cd .. ; zip $z-src.zip \
$z/README.md \
$z/CHANGES.md \
$z/LICENSE* \
$z/doc/User-Guide.pdf \
$z/doc/Raspberry-Pi-APRS.pdf \
$z/doc/Raspberry-Pi-APRS-Tracker.pdf \
$z/doc/APRStt-Implementation-Notes.pdf \
$z/doc/APRS-Telemetry-Toolkit.pdf \
$z/Makefile* \
$z/*.c $z/*.h \
$z/regex/* $z/misc/* $z/geotranz/* \
$z/man1/* \
$z/generic.conf \
$z/tocalls.txt $z/symbols-new.txt $z/symbolsX.txt \
$z/dw-icon.png $z/dw-icon.rc $z/dw-icon.ico \
$z/dw-start.sh $z/direwolf.spec \
$z/dwespeak.bat $z/dwespeak.sh \
$z/telemetry-toolkit/* )
# -----------------------------------------------------------------------------------------
.PHONY: clean
clean :
rm -f $(APPS) gen_fff tune.h fsk_fast_filter.h *.o *.a direwolf.desktop
depend : $(wildcard *.c)
makedepend -f $(lastword $(MAKEFILE_LIST)) -- $(CFLAGS) -- $^
#
# The following is updated by "make depend"
#
# DO NOT DELETE

View File

@ -1,572 +0,0 @@
#
# Makefile for Macintosh 10.6+ version of Dire Wolf.
#
# TODO: This is a modified version of Makefile.linux and it
# has fallen a little behind. For example, it is missing the check target.
# It would be more maintainable if we could use a single file for both.
# The differences are not that great.
# Maybe the most of the differences could go in to platform specific include
# files rather than cluttering it up with too many if blocks.
# Changes:
#
# 16 Dec 2015
# 1. Added condition check for gps/gpsd code. Commented out due to 32/64 bit
# library issues. Macports gpsd build problem.
# 2. SDK version checks are now performed by a bash script 'search_sdks.sh'.
# This should resolve the varied locations Apple stored the SDKs on the different
# Xcode/OS versions. Executing 'make' on the first pass asks the operator
# which SDK he/she wishes to use. Executing 'make clean' resets the SDK
# selection and operator intervention is once again required. Selected SDK
# information resides in a file named './use_this_sdk' in the current working
# directory.
# 3. Removed fsk_fast_filter.h from atest receipe, clang compiler was having
# a hissy fit. Not check with GCC.
APPS := direwolf decode_aprs text2tt tt2text ll2utm utm2ll aclients atest log2gpx gen_packets ttcalc kissutil
all : $(APPS) direwolf.conf
@echo " "
@echo "Next step install with: "
@echo " "
@echo " sudo make install"
@echo " "
@echo " "
SYS_LIBS :=
SYS_MIN :=
#SDK := $(shell find /Developer -maxdepth 1 -type d -name "SDKs")
#$(info $$SDK = ${SDK})
#ifeq (${SDK},/Developer/SDKs)
# SDK := $(shell find /Developer/SDKs -maxdepth 1 -type d -name "MacOSX10.8.sdk")
# ifeq (${SDK},/Developer/SDKs/MacOSX10.8.sdk)
# SYS_LIBS := -isystem /Developer/SDKs/MacOSX10.8.sdk
# SYS_MIN := -mmacosx-version-min=10.8
# else
# SDK := $(shell find /Developer/SDKs -maxdepth 1 -type d -name "MacOSX10.9.sdk")
# ifeq (${SDK},/Developer/SDKs/MacOSX10.9.sdk)
# SYS_LIBS := -isystem /Developer/SDKs/MacOSX10.9.sdk
# SYS_MIN := -mmacosx-version-min=10.9
# else
# SDK := $(shell find /Developer/SDKs -maxdepth 1 -type d -name "MacOSX10.10.sdk")
# ifeq (${SDK},/Developer/SDKs/MacOSX10.10.sdk)
# SYS_LIBS := -isystem /Developer/SDKs/MacOSX10.10.sdk
# SYS_MIN := -mmacosx-version-min=10.10
# endif
# endif
# endif
#endif
SYS_LIBS := $(shell ./search_sdks.sh)
EXTRA_CFLAGS :=
DARWIN_CC := $(shell which clang)
ifeq (${DARWIN_CC},)
DARWIN_CC := $(shell which gcc)
EXTRA_CFLAGS :=
else
EXTRA_CFLAGS := -fvectorize -fslp-vectorize -fslp-vectorize-aggressive -pthread
endif
# Change as required in support of the available libraries
#CC := $(DARWIN_CC) -m64 $(SYS_LIBS) $(SYS_MIN)
CC := $(DARWIN_CC) -m32 $(SYS_LIBS) $(SYS_MIN)
# _XOPEN_SOURCE=600 and _DEFAULT_SOURCE=1 are needed for glibc >= 2.24.
# Explanation here: https://github.com/wb2osz/direwolf/issues/62
CFLAGS := -Os -pthread -Igeotranz -D_XOPEN_SOURCE=600 -D_DEFAULT_SOURCE=1 $(EXTRA_CFLAGS)
# That was fine for a recent Ubuntu and Raspbian Jessie.
# However, Raspbian wheezy was then missing declaration for strsep and definition of fd_set.
CFLAGS += -D_BSD_SOURCE
# $(info $$CC is [${CC}])
# If the compiler is generating code for a 32 bit target (-m32), we can
# get much better results by telling it we have at least a Pentium 3
# which hass the SSE instructions.
CFLAGS += -march=core2 -msse4.1 -std=gnu99
#CFLAGS += -march=pentium3 -sse
# Add -ffastmath in only if compiler version recognizes it.
useffast := $(shell gcc --help -v 2>/dev/null | grep ffast-math)
ifneq ($(useffast),)
CFLAGS += -ffast-math
endif
#CFLAGS += -D_FORTIFY_SOURCE
# Use PortAudio Library
# Force static linking of portaudio if the static library is available.
PA_LIB_STATIC := $(shell find /opt/local/lib -maxdepth 1 -type f -name "libportaudio.a")
#$(info $$PA_LIB_STATIC is [${PA_LIB_STATIC}])
ifeq (${PA_LIB_STATIC},)
LDLIBS += -L/opt/local/lib -lportaudio
else
LDLIBS += /opt/local/lib/libportaudio.a
endif
# Include libraries portaudio requires.
LDLIBS += -framework CoreAudio -framework AudioUnit -framework AudioToolbox
LDLIBS += -framework Foundation -framework CoreServices
CFLAGS += -DUSE_PORTAUDIO -I/opt/local/include
# Uncomment following lines to enable GPS interface & tracker function.
# Not available for MacOSX (as far as I know).
# Although MacPorts has gpsd, wonder if it's the same thing. Add the check
# just in case it works.
# Well never mind, issue with Macports with 64bit libs ;-( leave the check in
# until (if ever) Macports fixes the issue.
#GPS_HEADER := $(shell find /opt/local/include -maxdepth 1 -type f -name "gps.h")
#ifeq (${GPS_HEADER},)
#GPS_OBJS :=
#else
#CFLAGS += -DENABLE_GPSD
#LDLIBS += -L/opt/local/lib -lgps -lgpsd
#GPS_OBJS := dwgps.o dwgpsnmea.o dwgpsd.o
#endif
# Name of current directory.
# Used to generate zip file name for distribution.
z := $(notdir ${CURDIR})
# Main application.
direwolf : direwolf.o aprs_tt.o audio_portaudio.o audio_stats.o ax25_link.o ax25_pad.o ax25_pad2.o beacon.o \
config.o decode_aprs.o dedupe.o demod_9600.o demod_afsk.o demod_psk.o \
demod.o digipeater.o cdigipeater.o dlq.o dsp.o dtime_now.o dtmf.o dwgps.o \
encode_aprs.o encode_aprs.o fcs_calc.o fcs_calc.o gen_tone.o \
geotranz.a hdlc_rec.o hdlc_rec2.o hdlc_send.o igate.o kiss_frame.o \
kiss.o kissserial.o kissnet.o latlong.o latlong.o log.o morse.o multi_modem.o \
waypoint.o serial_port.o pfilter.o ptt.o rdq.o recv.o rrbb.o server.o \
symbols.o telemetry.o textcolor.o tq.o tt_text.o tt_user.o xid.o xmit.o \
dwgps.o dwgpsnmea.o mheard.o
$(CC) $(CFLAGS) -o $@ $^ -lpthread $(LDLIBS) -lm
# Optimization for slow processors.
demod.o : fsk_fast_filter.h
demod_afsk.o : fsk_fast_filter.h
fsk_fast_filter.h : gen_fff
./gen_fff > fsk_fast_filter.h
gen_fff : demod_afsk.c dsp.c textcolor.c
echo " " > tune.h
$(CC) $(CFLAGS) -DGEN_FFF -o $@ $^ $(LDFLAGS)
# UTM, USNG, MGRS conversions.
geotranz.a : error_string.o mgrs.o polarst.o tranmerc.o ups.o usng.o utm.o
ar -cr $@ $^
error_string.o : geotranz/error_string.c
$(CC) $(CFLAGS) -c -o $@ $^
mgrs.o : geotranz/mgrs.c
$(CC) $(CFLAGS) -c -o $@ $^
polarst.o : geotranz/polarst.c
$(CC) $(CFLAGS) -c -o $@ $^
tranmerc.o : geotranz/tranmerc.c
$(CC) $(CFLAGS) -c -o $@ $^
ups.o : geotranz/ups.c
$(CC) $(CFLAGS) -c -o $@ $^
usng.o : geotranz/usng.c
$(CC) $(CFLAGS) -c -o $@ $^
utm.o : geotranz/utm.c
$(CC) $(CFLAGS) -c -o $@ $^
# Generate apprpriate sample configuration file for this platform.
direwolf.conf : generic.conf
egrep '^C|^M' generic.conf | cut -c2-999 > direwolf.conf
# Where should we install it?
# Macports typically installs in /opt/local so maybe you want to use that instead.
INSTALLDIR := /usr/local
#INSTALLDIR := /opt/local
# TODO: Test this better.
# Optional installation into INSTALLDIR.
# Needs to be run as root or with sudo.
# Command to "install" to system directories. "install" for Linux. "ginstall" for Mac.
INSTALL=ginstall
.PHONY: install
install : $(APPS) direwolf.conf tocalls.txt symbols-new.txt symbolsX.txt dw-icon.png
#
# Applications.
#
$(INSTALL) direwolf $(INSTALLDIR)/bin
$(INSTALL) decode_aprs $(INSTALLDIR)/bin
$(INSTALL) text2tt $(INSTALLDIR)/bin
$(INSTALL) tt2text $(INSTALLDIR)/bin
$(INSTALL) ll2utm $(INSTALLDIR)/bin
$(INSTALL) utm2ll $(INSTALLDIR)/bin
$(INSTALL) aclients $(INSTALLDIR)/bin
$(INSTALL) log2gpx $(INSTALLDIR)/bin
$(INSTALL) gen_packets $(INSTALLDIR)/bin
$(INSTALL) atest $(INSTALLDIR)/bin
$(INSTALL) ttcalc $(INSTALLDIR)/bin
$(INSTALL) kissutil $(INSTALLDIR)/bin
$(INSTALL) dwespeak.sh $(INSTALLDIR)/bin
#
# Telemetry Toolkit executables. Other .conf and .txt files will go into doc directory.
#
$(INSTALL) telemetry-toolkit/telem-balloon.pl $(INSTALLDIR)/bin
$(INSTALL) telemetry-toolkit/telem-bits.pl $(INSTALLDIR)/bin
$(INSTALL) telemetry-toolkit/telem-data.pl $(INSTALLDIR)/bin
$(INSTALL) telemetry-toolkit/telem-data91.pl $(INSTALLDIR)/bin
$(INSTALL) telemetry-toolkit/telem-eqns.pl $(INSTALLDIR)/bin
$(INSTALL) telemetry-toolkit/telem-parm.pl $(INSTALLDIR)/bin
$(INSTALL) telemetry-toolkit/telem-unit.pl $(INSTALLDIR)/bin
$(INSTALL) telemetry-toolkit/telem-volts.py $(INSTALLDIR)/bin
#
# Misc. data such as "tocall" to system mapping.
#
$(INSTALL) -D --mode=644 tocalls.txt $(INSTALLDIR)/share/direwolf/tocalls.txt
$(INSTALL) -D --mode=644 symbols-new.txt $(INSTALLDIR)/share/direwolf/symbols-new.txt
$(INSTALL) -D --mode=644 symbolsX.txt $(INSTALLDIR)/share/direwolf/symbolsX.txt
$(INSTALL) -D --mode=644 dw-icon.png $(INSTALLDIR)/share/direwolf/dw-icon.png
#
# Documentation. Various plain text files and PDF.
#
$(INSTALL) -D --mode=644 README.md $(INSTALLDIR)/share/doc/direwolf/README.md
$(INSTALL) -D --mode=644 CHANGES.md $(INSTALLDIR)/share/doc/direwolf/CHANGES.md
$(INSTALL) -D --mode=644 LICENSE-dire-wolf.txt $(INSTALLDIR)/share/doc/direwolf/LICENSE-dire-wolf.txt
$(INSTALL) -D --mode=644 LICENSE-other.txt $(INSTALLDIR)/share/doc/direwolf/LICENSE-other.txt
#
# ./README.md is an overview for the project main page.
# doc/README.md contains an overview of the PDF file contents and is more useful here.
#
$(INSTALL) -D --mode=644 doc/README.md $(INSTALLDIR)/share/doc/direwolf/README.md
$(INSTALL) -D --mode=644 doc/2400-4800-PSK-for-APRS-Packet-Radio.pdf $(INSTALLDIR)/share/doc/direwolf/2400-4800-PSK-for-APRS-Packet-Radio.pdf
$(INSTALL) -D --mode=644 doc/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf $(INSTALLDIR)/share/doc/direwolf/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf
$(INSTALL) -D --mode=644 doc/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf $(INSTALLDIR)/share/doc/direwolf/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf
$(INSTALL) -D --mode=644 doc/A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf $(INSTALLDIR)/share/doc/direwolf/A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf
$(INSTALL) -D --mode=644 doc/APRS-Telemetry-Toolkit.pdf $(INSTALLDIR)/share/doc/direwolf/APRS-Telemetry-Toolkit.pdf
$(INSTALL) -D --mode=644 doc/APRStt-Implementation-Notes.pdf $(INSTALLDIR)/share/doc/direwolf/APRStt-Implementation-Notes.pdf
$(INSTALL) -D --mode=644 doc/APRStt-interface-for-SARTrack.pdf $(INSTALLDIR)/share/doc/direwolf/APRStt-interface-for-SARTrack.pdf
$(INSTALL) -D --mode=644 doc/APRStt-Listening-Example.pdf $(INSTALLDIR)/share/doc/direwolf/APRStt-Listening-Example.pdf
$(INSTALL) -D --mode=644 doc/Bluetooth-KISS-TNC.pdf $(INSTALLDIR)/share/doc/direwolf/Bluetooth-KISS-TNC.pdf
$(INSTALL) -D --mode=644 doc/Going-beyond-9600-baud.pdf $(INSTALLDIR)/share/doc/direwolf/Going-beyond-9600-baud.pdf
$(INSTALL) -D --mode=644 doc/Raspberry-Pi-APRS.pdf $(INSTALLDIR)/share/doc/direwolf/Raspberry-Pi-APRS.pdf
$(INSTALL) -D --mode=644 doc/Raspberry-Pi-APRS-Tracker.pdf $(INSTALLDIR)/share/doc/direwolf/Raspberry-Pi-APRS-Tracker.pdf
$(INSTALL) -D --mode=644 doc/Raspberry-Pi-SDR-IGate.pdf $(INSTALLDIR)/share/doc/direwolf/Raspberry-Pi-SDR-IGate.pdf
$(INSTALL) -D --mode=644 doc/Successful-APRS-IGate-Operation.pdf $(INSTALLDIR)/share/doc/direwolf/Successful-APRS-IGate-Operation.pdf
$(INSTALL) -D --mode=644 doc/User-Guide.pdf $(INSTALLDIR)/share/doc/direwolf/User-Guide.pdf
$(INSTALL) -D --mode=644 doc/WA8LMF-TNC-Test-CD-Results.pdf $(INSTALLDIR)/share/doc/direwolf/WA8LMF-TNC-Test-CD-Results.pdf
#
# Sample config files also go into the doc directory.
# When building from source, these can be put in home directory with "make install-conf".
# When installed from .DEB or .RPM package, the user will need to copy these to
# the home directory or other desired location.
# Someone suggested that these could go into an "examples" subdirectory under doc.
#
$(INSTALL) -D --mode=644 direwolf.conf $(INSTALLDIR)/share/doc/direwolf/direwolf.conf
$(INSTALL) -D --mode=644 telemetry-toolkit/telem-m0xer-3.txt $(INSTALLDIR)/share/doc/direwolf/telem-m0xer-3.txt
$(INSTALL) -D --mode=644 telemetry-toolkit/telem-balloon.conf $(INSTALLDIR)/share/doc/direwolf/telem-balloon.conf
$(INSTALL) -D --mode=644 telemetry-toolkit/telem-volts.conf $(INSTALLDIR)/share/doc/direwolf/telem-volts.conf
#
# "man" pages
#
$(INSTALL) -D --mode=644 man1/aclients.1 $(INSTALLDIR)/man/man1/aclients.1
$(INSTALL) -D --mode=644 man1/atest.1 $(INSTALLDIR)/man/man1/atest.1
$(INSTALL) -D --mode=644 man1/decode_aprs.1 $(INSTALLDIR)/man/man1/decode_aprs.1
$(INSTALL) -D --mode=644 man1/direwolf.1 $(INSTALLDIR)/man/man1/direwolf.1
$(INSTALL) -D --mode=644 man1/gen_packets.1 $(INSTALLDIR)/man/man1/gen_packets.1
$(INSTALL) -D --mode=644 man1/ll2utm.1 $(INSTALLDIR)/man/man1/ll2utm.1
$(INSTALL) -D --mode=644 man1/log2gpx.1 $(INSTALLDIR)/man/man1/log2gpx.1
$(INSTALL) -D --mode=644 man1/text2tt.1 $(INSTALLDIR)/man/man1/text2tt.1
$(INSTALL) -D --mode=644 man1/tt2text.1 $(INSTALLDIR)/man/man1/tt2text.1
$(INSTALL) -D --mode=644 man1/utm2ll.1 $(INSTALLDIR)/man/man1/utm2ll.1
#
@echo " "
@echo "If this is your first install, not an upgrade, type this to put a copy"
@echo "of the sample configuration file (direwolf.conf) in your home directory:"
@echo " "
@echo " make install-conf"
@echo " "
# TODO: Should we put the sample direwolf.conf file somewhere like
# /usr/share/doc/direwolf/examples and add that to the
# end of the search path list?
# That would make it easy to see user customizations compared to the
# latest sample.
# These would be done as ordinary user.
.PHONY: install-conf
install-conf : direwolf.conf
cp direwolf.conf ~
cp telemetry-toolkit/telem-m0xer-3.txt ~
cp telemetry-toolkit/telem-*.conf ~
# Separate application to decode raw data.
# First three use .c rather than .o because they depend on DECAMAIN definition.
decode_aprs : decode_aprs.c kiss_frame.c ax25_pad.c dwgpsnmea.o dwgps.o dwgpsd.o serial_port.o symbols.o textcolor.o fcs_calc.o latlong.o log.o telemetry.o tt_text.o
$(CC) $(CFLAGS) -DDECAMAIN -o $@ $^ -lm
# Convert between text and touch tone representation.
text2tt : tt_text.c
$(CC) $(CFLAGS) -DENC_MAIN -o $@ $^
tt2text : tt_text.c
$(CC) $(CFLAGS) -DDEC_MAIN -o $@ $^
# Convert between Latitude/Longitude and UTM coordinates.
ll2utm : ll2utm.c geotranz.a
$(CC) $(CFLAGS) -o $@ $^ -lm
utm2ll : utm2ll.c geotranz.a
$(CC) $(CFLAGS) -o $@ $^ -lm
# Convert from log file to GPX.
log2gpx : log2gpx.c
$(CC) $(CFLAGS) -o $@ $^ -lm
# Test application to generate sound.
gen_packets : gen_packets.c ax25_pad.c hdlc_send.c fcs_calc.c gen_tone.c morse.c dtmf.c textcolor.c dsp.c
$(CC) $(CFLAGS) -o $@ $^ $(LDLIBS) -lm
demod.o : tune.h
demod_afsk.o : tune.h
demod_9600.o : tune.h
demod_psk.o : tune.h
tune.h :
echo " " > tune.h
testagc : atest.c demod.c dsp.c demod_afsk.c demod_9600.c hdlc_rec.c hdlc_rec2.o multi_modem.o rrbb.o \
fcs_calc.c ax25_pad.c decode_aprs.c telemetry.c dtime_now.o latlong.c symbols.c tune.h textcolor.c
$(CC) $(CFLAGS) -o atest $^ -lm
./atest 02_Track_2.wav | grep "packets decoded in" > atest.out
# Unit test for demodulators
atest : atest.c demod.c dsp.c demod_afsk.c demod_psk.c demod_9600.c hdlc_rec.c hdlc_rec2.o multi_modem.o rrbb.o \
fcs_calc.c ax25_pad.c decode_aprs.c dwgpsnmea.o dwgps.o serial_port.o telemetry.c dtime_now.o latlong.c symbols.c textcolor.c tt_text.c
$(CC) $(CFLAGS) -o $@ $^ -lm
#atest : atest.c fsk_fast_filter.h demod.c dsp.c demod_afsk.c demod_psk.c demod_9600.c hdlc_rec.c hdlc_rec2.o multi_modem.o rrbb.o \
# fcs_calc.c ax25_pad.c decode_aprs.c dwgpsnmea.o dwgps.o serial_port.o telemetry.c latlong.c symbols.c textcolor.c tt_text.c
# $(CC) $(CFLAGS) -o $@ $^ -lm
# Unit test for inner digipeater algorithm
dtest : digipeater.c pfilter.o ax25_pad.o dedupe.o fcs_calc.o tq.o textcolor.o \
decode_aprs.o dwgpsnmea.o dwgps.o serial_port.o latlong.o telemetry.o symbols.o tt_text.o
$(CC) $(CFLAGS) -DTEST -o $@ $^
./dtest
# Unit test for APRStt.
ttest : aprs_tt.c tt_text.c latlong.c geotranz.a
$(CC) $(CFLAGS) -DTT_MAIN -o $@ $^
# Unit test for IGate
itest : igate.c textcolor.c ax25_pad.c fcs_calc.c
$(CC) $(CFLAGS) -DITEST -o $@ $^
./itest
# Unit test for UDP reception with AFSK demodulator
udptest : udp_test.c demod.c dsp.c demod_afsk.c demod_9600.c hdlc_rec.c hdlc_rec2.c multi_modem.c rrbb.c fcs_calc.c ax25_pad.c decode_aprs.c symbols.c textcolor.c
$(CC) $(CFLAGS) -o $@ $^ -lm
./udptest
# Unit test for telemetry decoding.
tlmtest : telemetry.c ax25_pad.c fcs_calc.c textcolor.c
$(CC) $(CFLAGS) -o $@ $^ -lm
./tlmtest
# Multiple AGWPE network or serial port clients to test TNCs side by side.
aclients : aclients.c ax25_pad.c fcs_calc.c textcolor.c
$(CC) $(CFLAGS) -g -o $@ $^
# Talk to a KISS TNC.
# Note: kiss_frame.c has conditional compilation on KISSUTIL.
kissutil : kissutil.c kiss_frame.c ax25_pad.o fcs_calc.o textcolor.o serial_port.o dtime_now.o sock.o
$(CC) $(CFLAGS) -g -DKISSUTIL -o $@ $^
# Touch Tone to Speech sample application.
ttcalc : ttcalc.o ax25_pad.o fcs_calc.o textcolor.o
$(CC) $(CFLAGS) -g -o $@ $^
depend : $(wildcard *.c)
makedepend -f $(lastword $(MAKEFILE_LIST)) -- $(CFLAGS) -- $^
.PHONY: clean
clean :
rm -f $(APPS) gen_fff \
fsk_fast_filter.h *.o *.a use_this_sdk
echo " " > tune.h
.PHONY: dist-mac
dist-mac: direwolf decode_aprs text2tt tt2text ll2utm utm2ll aclients log2gpx gen_packets \
tocalls.txt symbols-new.txt symbolsX.txt dw-icon.png
rm -f ../direwolf_dist_bin.zip
(cd .. ; zip direwolf_dist_bin.zip \
$(INSTALLDIR)/bin/direwolf \
$(INSTALLDIR)/bin/decode_aprs \
$(INSTALLDIR)/bin/text2tt \
$(INSTALLDIR)/bin/tt2text \
$(INSTALLDIR)/bin/ll2utm \
$(INSTALLDIR)/bin/utm2ll \
$(INSTALLDIR)/bin/aclients \
$(INSTALLDIR)/bin/log2gpx \
$(INSTALLDIR)/bin/gen_packets \
$(INSTALLDIR)/bin/atest \
$(INSTALLDIR)/bin/ttcalc \
$(INSTALLDIR)/bin/kissutil \
$(INSTALLDIR)/bin/dwespeak.sh \
$(INSTALLDIR)/share/direwolf/tocalls.txt \
$(INSTALLDIR)/share/direwolf/config/direwolf.conf \
$(INSTALLDIR)/share/direwolf/symbols-new.txt \
$(INSTALLDIR)/share/direwolf/symbolsX.txt \
$(INSTALLDIR)/share/direwolf/dw-icon.png \
$(INSTALLDIR)/share/doc/direwolf/README.md \
$(INSTALLDIR)/share/doc/direwolf/CHANGES.md \
$(INSTALLDIR)/share/doc/direwolf/LICENSE-dire-wolf.txt \
$(INSTALLDIR)/share/doc/direwolf/LICENSE-other.txt \
$(INSTALLDIR)/share/doc/direwolf/User-Guide.pdf \
$(INSTALLDIR)/share/doc/direwolf/Raspberry-Pi-APRS.pdf \
$(INSTALLDIR)/share/doc/direwolf/Raspberry-Pi-APRS-Tracker.pdf \
$(INSTALLDIR)/share/doc/direwolf/APRStt-Implementation-Notes.pdf \
$(INSTALLDIR)/share/doc/direwolf/APRS-Telemetry-Toolkit.pdf \
$(INSTALLDIR)/man/man1/aclients.1 \
$(INSTALLDIR)/man/man1/atest.1 \
$(INSTALLDIR)/man/man1/decode_aprs.1 \
$(INSTALLDIR)/man/man1/direwolf.1 \
$(INSTALLDIR)/man/man1/gen_packets.1 \
$(INSTALLDIR)/man/man1/kissutil.1 \
$(INSTALLDIR)/man/man1/ll2utm.1 \
$(INSTALLDIR)/man/man1/log2gpx.1 \
$(INSTALLDIR)/man/man1/text2tt.1 \
$(INSTALLDIR)/man/man1/tt2text.1 \
$(INSTALLDIR)/man/man1/utm2ll.1 \
)
# Package it up for distribution.
.PHONY: dist-src
dist-src : README.md CHANGES.md \
doc/User-Guide.pdf doc/Raspberry-Pi-APRS.pdf \
doc/Raspberry-Pi-APRS-Tracker.pdf doc/APRStt-Implementation-Notes.pdf \
dw-start.sh dwespeak.bat dwespeak.sh \
tocalls.txt symbols-new.txt symbolsX.txt direwolf.spec
rm -f fsk_fast_filter.h
echo " " > tune.h
rm -f ../$z-src.zip
(cd .. ; zip $z-src.zip \
$z/README.md \
$z/CHANGES.md \
$z/LICENSE* \
$z/doc/User-Guide.pdf \
$z/doc/Raspberry-Pi-APRS.pdf \
$z/doc/Raspberry-Pi-APRS-Tracker.pdf \
$z/doc/APRStt-Implementation-Notes.pdf \
$z/Makefile* \
$z/*.c $z/*.h \
$z/regex/* $z/misc/* $z/geotranz/* \
$z/man1/* \
$z/generic.conf \
$z/tocalls.txt $z/symbols-new.txt $z/symbolsX.txt \
$z/dw-icon.png $z/dw-icon.rc $z/dw-icon.ico \
$z/dw-start.sh $z/direwolf.spec \
$z/dwespeak.bat $z/dwespeak.sh \
$z/telemetry-toolkit/* )
#
# The destination field is often used to identify the manufacturer/model.
# These are not hardcoded into Dire Wolf. Instead they are read from
# a file called tocalls.txt at application start up time.
#
# The original permanent symbols are built in but the "new" symbols,
# using overlays, are often updated. These are also read from files.
#
# You can obtain an updated copy by typing "make tocalls-symbols".
# This is not part of the normal build process. You have to do this explicitly.
#
# The locations below appear to be the most recent.
# The copy at http://www.aprs.org/tocalls.txt is out of date.
#
.PHONY: tocalls-symbols
tocalls-symbols :
cp tocalls.txt tocalls.txt~
wget http://www.aprs.org/aprs11/tocalls.txt -O tocalls.txt
-diff -Z tocalls.txt~ tocalls.txt
cp symbols-new.txt symbols-new.txt~
wget http://www.aprs.org/symbols/symbols-new.txt -O symbols-new.txt
-diff -Z symbols-new.txt~ symbols-new.txt
cp symbolsX.txt symbolsX.txt~
wget http://www.aprs.org/symbols/symbolsX.txt -O symbolsX.txt
-diff -Z symbolsX.txt~ symbolsX.txt

View File

@ -1,695 +0,0 @@
#
# Makefile for native Windows version of Dire Wolf.
#
#
# This is built in the Cygwin environment but with the
# compiler from http://www.mingw.org/ so there is no
# dependency on extra DLLs.
#
# The MinGW/bin directory must be in the PATH for the
# compiler. e.g. export PATH=/cygdrive/c/MinGW/bin:$PATH
#
# Failure to have the path set correctly will result in the
# obscure message: Makefile.win:... recipe for target ... failed.
#
# Type "which gcc" to make sure you are getting the right one!
#
all : direwolf decode_aprs text2tt tt2text ll2utm utm2ll aclients log2gpx gen_packets atest ttcalc tnctest kissutil
# People say we need -mthreads option for threads to work properly.
# They also say it creates a dependency on mingwm10.dll but I'm not seeing that.
# Maybe that is for pthreads. We are using the Windows threads.
# -Ofast was added in gcc 4.6 which was the MinGW version back in 2012.
CC := gcc
CFLAGS := -Ofast -march=pentium3 -msse -Iregex -Iutm -Igeotranz -mthreads -DUSE_REGEX_STATIC -Wall -Wlogical-op
AR := ar
CFLAGS += -g
# TEMP EXPERIMENT - DO NOT RELEASE
#CFLAGS += -fsanitize=undefined
# For version 1.4, we upgrade from gcc 4.6.2 to 4.9.3.
# gcc 4.8 adds these. Try them just for fun.
# No, it needs libasan which is not on Windows.
#CFLAGS += -fsanitize=address -fno-omit-frame-pointer
# Helpful for the demodulators. Overkill for non-hot spots.
#CFLAGS += -Wdouble-promotion
# Don't have the patience for this right now.
#CFLAGS += -Wextra
# Continue working on these.
CFLAGS += -Wsign-compare
CFLAGS += -Wuninitialized
CFLAGS += -Wold-style-declaration
# CFLAGS += -fdelete-null-pointer-checks -Wnull-dereference ---not recognized
#CFLAGS += -Wold-style-definition
#-Wmissing-prototypes
#
# Let's see impact of various optimization levels.
# Benchmark results with MinGW gcc version 4.6.2.
#
# seconds options, comments
# ------ -----------------
# 119.8 -O2 Used for version 0.8
# 92.1 -O3
# 88.7 -Ofast (should be same as -O3 -ffastmath)
# 87.5 -Ofast -march=pentium
# 74.1 -Ofast -msse
# 72.2 -Ofast -march=pentium -msse
# 62.0 -Ofast -march=pentium3 (this implies -msse)
# 61.9 -Ofast -march=pentium3 -msse
#
# A minimum of Windows XP is required due to some of the system
# features being used. XP requires a Pentium processor or later.
# The DSP filters can be sped up considerably with the SSE instructions.
# The SSE instructions were introduced in 1999 with the
# Pentium III series.
# SSE2 instructions, added in 2000, don't seem to offer any advantage.
#
# For version 0.9, a Pentium 3 or equivalent is now the minimum required
# for the prebuilt Windows distribution.
# If you insist on using a computer from the previous century,
# you can compile this yourself with different options.
#
# -------------------------------------- Main application --------------------------------
# Not sure why this is here.
demod.o : fsk_demod_state.h
demod_9600.o : fsk_demod_state.h
demod_afsk.o : fsk_demod_state.h
demod_psk.o : fsk_demod_state.h
direwolf : direwolf.o config.o recv.o demod.o dsp.o demod_afsk.o demod_psk.o demod_9600.o hdlc_rec.o \
hdlc_rec2.o multi_modem.o rdq.o rrbb.o dlq.o \
fcs_calc.o ax25_pad.o ax25_pad2.o xid.o \
decode_aprs.o symbols.o server.o kiss.o kissserial.o kissnet.o kiss_frame.o hdlc_send.o fcs_calc.o \
gen_tone.o morse.o audio_win.o audio_stats.o digipeater.o cdigipeater.o pfilter.o dedupe.o tq.o xmit.o \
ptt.o beacon.o dwgps.o encode_aprs.o latlong.o textcolor.o \
dtmf.o aprs_tt.o tt_user.o tt_text.o igate.o waypoint.o serial_port.o log.o telemetry.o \
dwgps.o dwgpsnmea.o dtime_now.o mheard.o ax25_link.o cm108.c \
dw-icon.o regex.a misc.a geotranz.a
$(CC) $(CFLAGS) -o $@ $^ -lwinmm -lws2_32
dw-icon.o : dw-icon.rc dw-icon.ico
windres dw-icon.rc -o $@
# Optimization for slow processors.
demod.o : fsk_fast_filter.h
demod_afsk.o : fsk_fast_filter.h
fsk_fast_filter.h : gen_fff
./gen_fff > fsk_fast_filter.h
gen_fff : demod_afsk.c dsp.c textcolor.c
echo " " > tune.h
$(CC) $(CFLAGS) -DGEN_FFF -o $@ $^
#
# The destination field is often used to identify the manufacturer/model.
# These are not hardcoded into Dire Wolf. Instead they are read from
# a file called tocalls.txt at application start up time.
#
# The original permanent symbols are built in but the "new" symbols,
# using overlays, are often updated. These are also read from files.
#
# You can obtain an updated copy by typing "make tocalls-symbols".
# This is not part of the normal build process. You have to do this explicitly.
#
# The locations below appear to be the most recent.
# The copy at http://www.aprs.org/tocalls.txt is out of date.
#
.PHONY: tocalls-symbols
tocalls-symbols :
cp tocalls.txt tocalls.txt~
wget http://www.aprs.org/aprs11/tocalls.txt -O tocalls.txt
-diff tocalls.txt~ tocalls.txt
cp symbols-new.txt symbols-new.txt~
wget http://www.aprs.org/symbols/symbols-new.txt -O symbols-new.txt
-diff symbols-new.txt~ symbols-new.txt
cp symbolsX.txt symbolsX.txt~
wget http://www.aprs.org/symbols/symbolsX.txt -O symbolsX.txt
-diff symbolsX.txt~ symbolsX.txt
# ---------------------------- Other utilities included with distribution -------------------------
# Separate application to decode raw data.
# First three use .c rather than .o because they depend on DECAMAIN definition.
decode_aprs : decode_aprs.c kiss_frame.c ax25_pad.c dwgpsnmea.o dwgps.o serial_port.o symbols.o textcolor.o fcs_calc.o latlong.o log.o telemetry.o tt_text.o regex.a misc.a geotranz.a
$(CC) $(CFLAGS) -DDECAMAIN -o decode_aprs $^
# Convert between text and touch tone representation.
text2tt : tt_text.c misc.a
$(CC) $(CFLAGS) -DENC_MAIN -o $@ $^
tt2text : tt_text.c misc.a
$(CC) $(CFLAGS) -DDEC_MAIN -o $@ $^
# Convert between Latitude/Longitude and UTM coordinates.
ll2utm : ll2utm.c textcolor.c geotranz.a misc.a
$(CC) $(CFLAGS) -o $@ $^
utm2ll : utm2ll.c textcolor.c geotranz.a misc.a
$(CC) $(CFLAGS) -o $@ $^
# Convert from log file to GPX.
log2gpx : log2gpx.c textcolor.o misc.a
$(CC) $(CFLAGS) -o $@ $^
# Test application to generate sound.
gen_packets : gen_packets.o ax25_pad.o hdlc_send.o fcs_calc.o gen_tone.o morse.o dtmf.o textcolor.o dsp.o misc.a regex.a
$(CC) $(CFLAGS) -o $@ $^
# Connected mode packet application server.
appserver : appserver.o textcolor.o ax25_pad.o fcs_calc.o misc.a
$(CC) $(CFLAGS) -o $@ $^ -lwinmm -lws2_32
# ------------------------------------------- Libraries --------------------------------------------
# UTM, USNG, MGRS conversions.
geotranz.a : error_string.o mgrs.o polarst.o tranmerc.o ups.o usng.o utm.o
ar -cr $@ $^
error_string.o : geotranz/error_string.c
$(CC) $(CFLAGS) -c -o $@ $^
mgrs.o : geotranz/mgrs.c
$(CC) $(CFLAGS) -c -o $@ $^
polarst.o : geotranz/polarst.c
$(CC) $(CFLAGS) -c -o $@ $^
tranmerc.o : geotranz/tranmerc.c
$(CC) $(CFLAGS) -c -o $@ $^
ups.o : geotranz/ups.c
$(CC) $(CFLAGS) -c -o $@ $^
usng.o : geotranz/usng.c
$(CC) $(CFLAGS) -c -o $@ $^
utm.o : geotranz/utm.c
$(CC) $(CFLAGS) -c -o $@ $^
#
# When building for Linux, we use regular expression
# functions supplied by the gnu C library.
# For the native WIN32 version, we need to use our own copy.
# These were copied from http://gnuwin32.sourceforge.net/packages/regex.htm
# Consider upgrading from https://www.gnu.org/software/libc/sources.html
regex.a : regex.o
ar -cr $@ $^
regex.o : regex/regex.c
$(CC) $(CFLAGS) -Dbool=int -Dtrue=1 -Dfalse=0 -c -o $@ $^
# There are several string functions found in Linux
# but not on Windows. Need to provide our own copy.
misc.a : strsep.o strtok_r.o strcasestr.o strlcpy.o strlcat.o
ar -cr $@ $^
strsep.o : misc/strsep.c
$(CC) $(CFLAGS) -c -o $@ $^
strtok_r.o : misc/strtok_r.c
$(CC) $(CFLAGS) -c -o $@ $^
strcasestr.o : misc/strcasestr.c
$(CC) $(CFLAGS) -c -o $@ $^
strlcpy.o : misc/strlcpy.c
$(CC) $(CFLAGS) -I. -c -o $@ $^
strlcat.o : misc/strlcat.c
$(CC) $(CFLAGS) -I. -c -o $@ $^
# --------------------------------- Automated Smoke Test --------------------------------
# Combine some unit tests into a single regression sanity check.
check : dtest ttest tttexttest pftest tlmtest lltest enctest kisstest pad2test xidtest dtmftest check-modem1200 check-modem300 check-modem9600 check-modem19200 check-modem2400 check-modem4800
# Can we encode and decode at popular data rates?
# Verify that single bit fixup increases the count.
check-modem1200 : gen_packets atest
gen_packets -n 100 -o test12.wav
atest -F0 -PE -L64 -G72 test12.wav
atest -F1 -PE -L70 -G75 test12.wav
rm test12.wav
check-modem300 : gen_packets atest
gen_packets -B300 -n 100 -o test3.wav
atest -B300 -F0 -L68 -G69 test3.wav
atest -B300 -F1 -L71 -G75 test3.wav
rm test3.wav
#FIXME: test full amplitude.
check-modem9600 : gen_packets atest
gen_packets -B9600 -a 170 -o test96.wav
sleep 1
atest -B9600 -F0 -L4 -G4 test96.wav
sleep 1
rm test96.wav
sleep 1
gen_packets -B9600 -n 100 -o test96.wav
sleep 1
atest -B9600 -F0 -L50 -G54 test96.wav
atest -B9600 -F1 -L55 -G59 test96.wav
sleep 1
rm test96.wav
check-modem19200 : gen_packets atest
gen_packets -r 96000 -B19200 -a 170 -o test19.wav
sleep 1
atest -B19200 -F0 -L4 test19.wav
sleep 1
rm test19.wav
sleep 1
gen_packets -r 96000 -B19200 -n 100 -o test19.wav
sleep 1
atest -B19200 -F0 -L55 -G59 test19.wav
atest -B19200 -F1 -L60 -G64 test19.wav
sleep 1
rm test19.wav
check-modem2400 : gen_packets atest
gen_packets -B2400 -n 100 -o test24.wav
sleep 1
atest -B2400 -F0 -L70 -G78 test24.wav
atest -B2400 -F1 -L80 -G87 test24.wav
sleep 1
rm test24.wav
check-modem4800 : gen_packets atest
gen_packets -B4800 -n 100 -o test48.wav
sleep 1
atest -B4800 -F0 -L70 -G74 test48.wav
atest -B4800 -F1 -L79 -G84 test48.wav
sleep 1
rm test48.wav
# Unit test for demodulators
atest : atest.c fsk_fast_filter.h demod.c demod_afsk.c demod_psk.c demod_9600.c \
dsp.o hdlc_rec.o hdlc_rec2.o multi_modem.o \
rrbb.o fcs_calc.o ax25_pad.o decode_aprs.o \
dwgpsnmea.o dwgps.o serial_port.o latlong.c \
symbols.c tt_text.c textcolor.c telemetry.c dtime_now.o \
decode_aprs.o log.o \
misc.a regex.a
echo " " > tune.h
$(CC) $(CFLAGS) -o $@ $^
#./atest ..\\direwolf-0.2\\02_Track_2.wav
#atest -B 9600 z9.wav
#atest za100.wav
atest9 : atest.c demod.c dsp.c demod_afsk.c demod_psk.c demod_9600.c hdlc_rec.c hdlc_rec2.c multi_modem.c \
rrbb.c fcs_calc.c ax25_pad.c decode_aprs.c latlong.c symbols.c textcolor.c telemetry.c dtime_now.o misc.a regex.a \
fsk_fast_filter.h
echo " " > tune.h
$(CC) $(CFLAGS) -o $@ $^
./atest9 -B 9600 ../walkabout9600.wav | grep "packets decoded in" >atest.out
#./atest9 -B 9600 noise96.wav
# Unit test for inner digipeater algorithm
.PHONY: dtest
dtest : digipeater.c dedupe.c pfilter.c \
ax25_pad.o fcs_calc.o tq.o textcolor.o \
decode_aprs.o dwgpsnmea.o dwgps.o serial_port.o latlong.o telemetry.o symbols.o tt_text.o misc.a regex.a
$(CC) $(CFLAGS) -DDIGITEST -o $@ $^
./dtest
rm dtest.exe
# Unit test for APRStt tone seqence parsing.
.PHONTY: ttest
ttest : aprs_tt.c tt_text.c latlong.o textcolor.o geotranz.a misc.a
$(CC) $(CFLAGS) -Igeotranz -DTT_MAIN -o $@ $^
./ttest
rm ttest.exe
# Unit test for APRStt tone sequence / text conversions.
.PHONY: tttexttest
tttexttest : tt_text.c textcolor.o misc.a
$(CC) $(CFLAGS) -DTTT_TEST -o $@ $^
./tttexttest
rm tttexttest.exe
# Unit test for Packet Filtering.
.PHONY: pftest
pftest : pfilter.c ax25_pad.o textcolor.o fcs_calc.o decode_aprs.o dwgpsnmea.o dwgps.o serial_port.o latlong.o symbols.o telemetry.o tt_text.o misc.a regex.a
$(CC) $(CFLAGS) -DPFTEST -o $@ $^
./pftest
rm pftest.exe
# Unit test for telemetry decoding.
.PHONY: tlmtest
tlmtest : telemetry.c ax25_pad.o fcs_calc.o textcolor.o misc.a regex.a
$(CC) $(CFLAGS) -DTEST -o $@ $^
./tlmtest
rm tlmtest.exe
# Unit test for location coordinate conversion.
.PHONY: lltest
lltest : latlong.c textcolor.o misc.a
$(CC) $(CFLAGS) -DLLTEST -o $@ $^
./lltest
rm lltest.exe
# Unit test for encoding position & object report.
.PHONY: enctest
enctest : encode_aprs.c latlong.c textcolor.c misc.a
$(CC) $(CFLAGS) -DEN_MAIN -o $@ $^
./enctest
rm enctest.exe
# Unit test for KISS encapsulation.
.PHONY: kisstest
kisstest : kiss_frame.c
$(CC) $(CFLAGS) -DKISSTEST -o $@ $^
./kisstest
rm kisstest.exe
# Unit test for constructing frames besides UI.
.PHONY: pad2test
pad2test : ax25_pad2.c ax25_pad.c fcs_calc.o textcolor.o regex.a misc.a
$(CC) $(CFLAGS) -DPAD2TEST -o $@ $^
./pad2test
rm pad2test.exe
# Unit Test for XID frame encode/decode.
.PHONY: xidtest
xidtest : xid.c textcolor.o misc.a
$(CC) $(CFLAGS) -DXIDTEST -o $@ $^
./xidtest
rm xidtest.exe
# Unit Test for DTMF encode/decode.
.PHONY: dtmftest
dtmftest : dtmf.c textcolor.o
$(CC) $(CFLAGS) -DDTMF_TEST -o $@ $^
./dtmftest
rm dtmftest.exe
# ------------------------------ Other manual testing & experimenting -------------------------------
tnctest : tnctest.c textcolor.o dtime_now.o serial_port.o misc.a
$(CC) $(CFLAGS) -o $@ $^ -lwinmm -lws2_32
# For tweaking the demodulator.
demod.o : tune.h
demod_9600.o : tune.h
demod_afsk.o : tune.h
demod_psk.o : tune.h
testagc : atest.c demod.c dsp.c demod_afsk.c demod_psk.c demod_9600.o fsk_demod_agc.h \
hdlc_rec.o hdlc_rec2.o multi_modem.o \
rrbb.o fcs_calc.o ax25_pad.o decode_aprs.o latlong.o symbols.o textcolor.o telemetry.o \
dwgpsnmea.o dwgps.o serial_port.o tt_text.o dtime_now.o regex.a misc.a
rm -f atest.exe
$(CC) $(CFLAGS) -o atest $^
./atest -P GGG- -F 0 ../02_Track_2.wav | grep "packets decoded in" >atest.out
echo " " > tune.h
noisy3.wav : gen_packets
./gen_packets -B 300 -n 100 -o noisy3.wav
testagc3 : atest.c demod.c dsp.c demod_afsk.c demod_psk.c demod_9600.c hdlc_rec.c hdlc_rec2.c multi_modem.c \
rrbb.c fcs_calc.c ax25_pad.c decode_aprs.c latlong.c symbols.c textcolor.c telemetry.c dtime_now.o regex.a misc.a \
tune.h
rm -f atest3.exe
$(CC) $(CFLAGS) -o atest3 $^
./atest3 -B 300 -P D -D 3 noisy3.wav | grep "packets decoded in" >atest.out
echo " " > tune.h
noisy96.wav : gen_packets
./gen_packets -B 9600 -n 100 -o noisy96.wav
testagc96 : atest.c fsk_fast_filter.h tune.h demod.c demod_afsk.c demod_psk.c demod_9600.c \
dsp.o hdlc_rec.o hdlc_rec2.o multi_modem.o \
rrbb.o fcs_calc.o ax25_pad.o decode_aprs.o \
dwgpsnmea.o dwgps.o serial_port.o latlong.o \
symbols.o tt_text.o textcolor.o telemetry.o dtime_now.o \
misc.a regex.a
rm -f atest96.exe
$(CC) $(CFLAGS) -o atest96 $^
./atest96 -B 9600 ../walkabout9600c.wav | grep "packets decoded in" >atest.out
#./atest96 -B 9600 noisy96.wav | grep "packets decoded in" >atest.out
#./atest96 -B 9600 19990303_0225_9600_8bis_22kHz.wav | grep "packets decoded in" >atest.out
#./atest96 -B 9600 19990303_0225_9600_16bit_22kHz.wav | grep "packets decoded in" >atest.out
#./atest96 -B 9600 -P + z8-22k.wav| grep "packets decoded in" >atest.out
#./atest96 -B 9600 test9600.wav | grep "packets decoded in" >atest.out
echo " " > tune.h
testagc24 : atest.c fsk_fast_filter.h tune.h demod.c demod_afsk.c demod_psk.c demod_9600.c \
dsp.o hdlc_rec.o hdlc_rec2.o multi_modem.o \
rrbb.o fcs_calc.o ax25_pad.o decode_aprs.o \
dwgpsnmea.o dwgps.o serial_port.o latlong.o \
symbols.o tt_text.o textcolor.o telemetry.o dtime_now.o \
misc.a regex.a
rm -f atest24.exe
sleep 1
$(CC) $(CFLAGS) -o atest24 $^
./atest24 -B 2400 test2400.wav | grep "packets decoded in" >atest.out
echo " " > tune.h
testagc48 : atest.c fsk_fast_filter.h tune.h demod.c demod_afsk.c demod_psk.c demod_9600.c \
dsp.o hdlc_rec.o hdlc_rec2.o multi_modem.o \
rrbb.o fcs_calc.o ax25_pad.o decode_aprs.o \
dwgpsnmea.o dwgps.o serial_port.o latlong.o \
symbols.o tt_text.o textcolor.o telemetry.o dtime_now.o \
misc.a regex.a
rm -f atest48.exe
sleep 1
$(CC) $(CFLAGS) -o atest48 $^
./atest48 -B 4800 test4800.wav | grep "packets decoded in" >atest.out
#./atest48 -B 4800 test4800.wav
echo " " > tune.h
# Unit test for IGate
itest : igate.c textcolor.c ax25_pad.c fcs_calc.c misc.a regex.a
$(CC) $(CFLAGS) -DITEST -o $@ $^ -lwinmm -lws2_32
# Multiple AGWPE network or serial port clients to test TNCs side by side.
aclients : aclients.c ax25_pad.c fcs_calc.c textcolor.c misc.a regex.a
$(CC) $(CFLAGS) -o $@ $^ -lwinmm -lws2_32
# Talk to a KISS TNC.
# Note: kiss_frame.c has conditional compilation on KISSUTIL.
kissutil : kissutil.c kiss_frame.c ax25_pad.o fcs_calc.o textcolor.o serial_port.o sock.o dtime_now.o misc.a regex.a
$(CC) $(CFLAGS) -DKISSUTIL -o $@ $^ -lwinmm -lws2_32
# Touch Tone to Speech sample application.
ttcalc : ttcalc.o ax25_pad.o fcs_calc.o textcolor.o misc.a regex.a
$(CC) $(CFLAGS) -o $@ $^ -lwinmm -lws2_32
# Send GPS location to KISS TNC each second.
walk96 : walk96.c dwgps.o dwgpsnmea.o kiss_frame.o \
latlong.o encode_aprs.o serial_port.o textcolor.o \
ax25_pad.o fcs_calc.o \
xmit.o hdlc_send.o gen_tone.o ptt.o tq.o \
hdlc_rec.o hdlc_rec2.o rrbb.o dsp.o audio_win.o \
multi_modem.o demod.o demod_afsk.o demod_psk.c demod_9600.o rdq.o \
server.o morse.o dtmf.o audio_stats.o dtime_now.o dlq.o \
regex.a misc.a
$(CC) $(CFLAGS) -DWALK96 -o $@ $^ -lwinmm -lws2_32
#--------------------------------------------------------------
.PHONY: depend
depend : $(wildcard *.c)
makedepend -f $(lastword $(MAKEFILE_LIST)) -- $(CFLAGS) -- $^
.PHONY: clean
clean :
rm -f *.o *.a *.exe fsk_fast_filter.h noisy96.wav
echo " " > tune.h
# ------------------------------- Packaging for distribution ----------------------
# Name of zip file for distribution.
z := $(notdir ${CURDIR})
.PHONY: dist-win
dist-win : direwolf.exe decode_aprs.exe text2tt.exe tt2text.exe ll2utm.exe utm2ll.exe \
aclients.exe log2gpx.exe gen_packets.exe atest.exe ttcalc.exe kissutil.exe \
generic.conf dwespeak.bat \
README.md CHANGES.md \
doc/User-Guide.pdf \
doc/Raspberry-Pi-APRS.pdf \
doc/APRStt-Implementation-Notes.pdf
rm -f ../$z-win.zip
egrep '^C|^W' generic.conf | cut -c2-999 > direwolf.conf
unix2dos direwolf.conf
cp doc/README.md README-doc.md
zip --junk-paths ../$z-win.zip \
README.md \
CHANGES.md \
README-doc.md \
doc/2400-4800-PSK-for-APRS-Packet-Radio.pdf \
doc/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf \
doc/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf \
doc/A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf \
doc/APRS-Telemetry-Toolkit.pdf \
doc/APRStt-Implementation-Notes.pdf \
doc/APRStt-interface-for-SARTrack.pdf \
doc/APRStt-Listening-Example.pdf \
doc/Bluetooth-KISS-TNC.pdf \
doc/Going-beyond-9600-baud.pdf \
doc/Raspberry-Pi-APRS.pdf \
doc/Raspberry-Pi-APRS-Tracker.pdf \
doc/Raspberry-Pi-SDR-IGate.pdf \
doc/Successful-APRS-IGate-Operation.pdf \
doc/User-Guide.pdf \
doc/WA8LMF-TNC-Test-CD-Results.pdf \
LICENSE* \
direwolf.conf \
direwolf.exe \
decode_aprs.exe \
tocalls.txt symbols-new.txt symbolsX.txt \
text2tt.exe tt2text.exe \
ll2utm.exe utm2ll.exe \
aclients.exe \
log2gpx.exe \
gen_packets.exe \
atest.exe \
ttcalc.exe \
kissutil.exe \
dwespeak.bat \
telemetry-toolkit/*
rm README-doc.md
# Reminders if pdf files are not up to date.
doc/User-Guide.pdf : doc/User-Guide.docx
echo "***** User-Guide.pdf is out of date *****"
doc/Raspberry-Pi-APRS.pdf : doc/Raspberry-Pi-APRS.docx
echo "***** Raspberry-Pi-APRS.pdf is out of date *****"
doc/Raspberry-Pi-APRS-Tracker.pdf : doc/Raspberry-Pi-APRS-Tracker.docx
echo "***** Raspberry-Pi-APRS-Tracker.pdf is out of date *****"
doc/APRStt-Implementation-Notes.pdf : doc/APRStt-Implementation-Notes.docx
echo "***** APRStt-Implementation-Notes.pdf is out of date *****"
doc/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf : doc/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.docx
echo "***** A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf is out of date *****"
doc/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf : doc/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.docx
echo "***** A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf is out of date *****"
doc/APRS-Telemetry-Toolkit.pdf : doc/APRS-Telemetry-Toolkit.docx
echo "***** APRS-Telemetry-Toolkit.pdf is out of date *****"
.PHONY: backup
backup :
mkdir /cygdrive/e/backup-cygwin-home/`date +"%Y-%m-%d"`
cp -r . /cygdrive/e/backup-cygwin-home/`date +"%Y-%m-%d"`
#
# The following is updated by "make depend"
#
# DO NOT DELETE

128
README.md
View File

@ -3,14 +3,21 @@
### Decoded Information from Radio Emissions for Windows Or Linux Fans ### ### Decoded Information from Radio Emissions for Windows Or Linux Fans ###
In the early days of Amateur Packet Radio, it was necessary to use an expensive “Terminal Node Controller” (TNC) with specialized hardware. Those days are gone. You can now get better results at lower cost by connecting your radio to the “soundcard” interface of a computer and using software to decode the signals. In the early days of Amateur Packet Radio, it was necessary to use an expensive "Terminal Node Controller" (TNC) with specialized hardware. Those days are gone. You can now get better results at lower cost by connecting your radio to the "soundcard" interface of a computer and using software to decode the signals.
Why settle for mediocre receive performance from a 1980's technology TNC using an old modem chip? Dire Wolf decodes over 1000 error-free frames from Track 2 of the [WA8LMF TNC Test CD](https://github.com/wb2osz/direwolf/tree/dev/doc/WA8LMF-TNC-Test-CD-Results.pdf), leaving all the hardware TNCs, and first generation "soundcard" modems, behind in the dust. Why waste $200 and settle for mediocre receive performance from a 1980's technology TNC using an old modem chip? Dire Wolf decodes over 1000 error-free frames from Track 2 of the [WA8LMF TNC Test CD](https://github.com/wb2osz/direwolf/tree/dev/doc/WA8LMF-TNC-Test-CD-Results.pdf), leaving all the hardware TNCs, and first generation "soundcard" modems, behind in the dust.
![](tnc-test-cd-results.png) ![](tnc-test-cd-results.png)
Dire Wolf includes [FX.25](https://en.wikipedia.org/wiki/FX.25_Forward_Error_Correction) which adds Forward Error Correction (FEC) in a way that is completely compatible with existing systems. If both ends are capable of FX.25, your information will continue to get through under conditions where regular AX.25 is completely useless. This was originally developed for satellites and is now seeing widespread use on HF.
Dire Wolf is a modern software replacement for the old 1980's style TNC built with special hardware.
![](fx25.png)
Version 1.7 adds [IL2P](https://en.wikipedia.org/wiki/Improved_Layer_2_Protocol), a different method of FEC with less overhead but it is not compatible with AX.25.
### 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: Without any additional software, it can perform as:
@ -20,7 +27,7 @@ Without any additional software, it can perform as:
- [APRStt](http://www.aprs.org/aprstt.html) gateway - [APRStt](http://www.aprs.org/aprstt.html) gateway
It can also be used as a virtual TNC for other applications such as [APRSIS32](http://aprsisce.wikidot.com/), [UI-View32](http://www.ui-view.net/), [Xastir](http://xastir.org/index.php/Main_Page), [APRS-TW](http://aprstw.blandranch.net/), [YAAC](http://www.ka2ddo.org/ka2ddo/YAAC.html), [UISS](http://users.belgacom.net/hamradio/uiss.htm), [Linux AX25](http://www.linux-ax25.org/wiki/Main_Page), [SARTrack](http://www.sartrack.co.nz/index.html), [RMS Express](http://www.winlink.org/RMSExpress), [BPQ32](http://www.cantab.net/users/john.wiseman/Documents/BPQ32.html), [Outpost PM](http://www.outpostpm.org/), and many others. It can also be used as a virtual TNC for other applications such as [APRSIS32](http://aprsisce.wikidot.com/), [Xastir](http://xastir.org/index.php/Main_Page), [APRS-TW](http://aprstw.blandranch.net/), [YAAC](http://www.ka2ddo.org/ka2ddo/YAAC.html), [PinPoint APRS](http://www.pinpointaprs.com/), [UI-View32](http://www.ui-view.net/),[UISS](http://users.belgacom.net/hamradio/uiss.htm), [Linux AX25](http://www.linux-ax25.org/wiki/Main_Page), [SARTrack](http://www.sartrack.co.nz/index.html), [Winlink Express (formerly known as RMS Express, formerly known as Winlink 2000 or WL2K)](http://www.winlink.org/RMSExpress), [BPQ32](http://www.cantab.net/users/john.wiseman/Documents/BPQ32.html), [Outpost PM](http://www.outpostpm.org/), [Ham Radio of Things](https://github.com/wb2osz/hrot), [Packet Compressed Sensing Imaging (PCSI)](https://maqifrnswa.github.io/PCSI/), and many others.
## Features & Benefits ## ## Features & Benefits ##
@ -36,6 +43,7 @@ It can also be used as a virtual TNC for other applications such as [APRSIS32](h
Send periodic beacons to provide information to others. For tracking the location is provided by a GPS receiver. Send periodic beacons to provide information to others. For tracking the location is provided by a GPS receiver.
Build your own telemetry applications with the toolkit. Build your own telemetry applications with the toolkit.
- **APRStt Gateway.** - **APRStt Gateway.**
Very few hams have portable equipment for APRS but nearly everyone has a handheld radio that can send DTMF tones. APRStt allows a user, equipped with only DTMF (commonly known as Touch Tone) generation capability, to enter information into the global APRS data network. Responses can be sent by Morse Code or synthesized speech. Very few hams have portable equipment for APRS but nearly everyone has a handheld radio that can send DTMF tones. APRStt allows a user, equipped with only DTMF (commonly known as Touch Tone) generation capability, to enter information into the global APRS data network. Responses can be sent by Morse Code or synthesized speech.
@ -48,6 +56,11 @@ It can also be used as a virtual TNC for other applications such as [APRSIS32](h
IGate stations allow communication between disjoint radio networks by allowing some content to flow between them over the Internet. IGate stations allow communication between disjoint radio networks by allowing some content to flow between them over the Internet.
- **Ham Radio of Things (HRoT).**
There have been occasional mentions of merging Ham Radio with the Internet of Things but only ad hoc incompatible narrowly focused applications. Here is a proposal for a standardized more flexible method so different systems can communicate with each other.
[Ham Radio of Things - IoT over Ham Radio](https://github.com/wb2osz/hrot)
- **AX.25 v2.2 Link Layer.** - **AX.25 v2.2 Link Layer.**
@ -55,23 +68,37 @@ It can also be used as a virtual TNC for other applications such as [APRSIS32](h
- **KISS Interface (TCP/IP, serial port, Bluetooth) & AGW network Interface (TCP/IP).** - **KISS Interface (TCP/IP, serial port, Bluetooth) & AGW network Interface (TCP/IP).**
Dire Wolf can be used as a virtual TNC for applications such as APRSIS32, UI-View32, Xastir, APRS-TW,YAAC, UISS, Linux AX25, SARTrack, Winlink / RMS Express, Outpost PM, and many others. Dire Wolf can be used as a virtual TNC for applications such as [APRSIS32](http://aprsisce.wikidot.com/), [Xastir](http://xastir.org/index.php/Main_Page), [APRS-TW](http://aprstw.blandranch.net/), [YAAC](http://www.ka2ddo.org/ka2ddo/YAAC.html), [PinPoint APRS](http://www.pinpointaprs.com/), [UI-View32](http://www.ui-view.net/),[UISS](http://users.belgacom.net/hamradio/uiss.htm), [Linux AX25](http://www.linux-ax25.org/wiki/Main_Page), [SARTrack](http://www.sartrack.co.nz/index.html), [Winlink Express (formerly known as RMS Express, formerly known as Winlink 2000 or WL2K)](http://www.winlink.org/RMSExpress), [BPQ32](http://www.cantab.net/users/john.wiseman/Documents/BPQ32.html), [Outpost PM](http://www.outpostpm.org/), [Ham Radio of Things](https://github.com/wb2osz/hrot), [Packet Compressed Sensing Imaging (PCSI)](https://maqifrnswa.github.io/PCSI/), and many others.
### Radio Interfaces: ### ### Radio Interfaces: ###
- **Uses computers “soundcard” and digital signal processing.** - **Uses computer's "soundcard" and digital signal processing.**
Lower cost and better performance than specialized hardware. Lower cost and better performance than specialized hardware.
Compatible interfaces include [UDRC](https://nw-digital-radio.groups.io/g/udrc/wiki/UDRC%E2%84%A2-and-Direwolf-Packet-Modem), [SignaLink USB](http://www.tigertronics.com/slusbmain.htm), [DMK URI](http://www.dmkeng.com/URI_Order_Page.htm), [RB-USB RIM](http://www.repeater-builder.com/products/usb-rim-lite.html), [RA-35](http://www.masterscommunications.com/products/radio-adapter/ra35.html), and many others. Compatible interfaces include [DRAWS](http://nwdigitalradio.com/draws/), [UDRC](https://nw-digital-radio.groups.io/g/udrc/wiki/UDRC%E2%84%A2-and-Direwolf-Packet-Modem), [SignaLink USB](http://www.tigertronics.com/slusbmain.htm), [DMK URI](http://www.dmkeng.com/URI_Order_Page.htm), [RB-USB RIM](http://www.repeater-builder.com/products/usb-rim-lite.html), [RA-35](http://www.masterscommunications.com/products/radio-adapter/ra35.html), [DINAH](https://hamprojects.info/dinah/), [SHARI](https://hamprojects.info/shari/), and many others.
- **Standard 300, 1200 & 9600 bps modems and more.** - **Modems:**
- **DTMF (“Touch Tone”) Decoding and Encoding.** 300 bps AFSK for HF
1200 bps AFSK most common for VHF/UHF
2400 & 4800 bps PSK
9600 bps GMSK/G3RUH
AIS reception
EAS SAME reception
- **DTMF ("Touch Tone") Decoding and Encoding.**
- **Speech Synthesizer & Morse code generator.** - **Speech Synthesizer interface & Morse code generator.**
Transmit human understandable messages. Transmit human understandable messages.
@ -87,10 +114,16 @@ It can also be used as a virtual TNC for other applications such as [APRSIS32](h
## Documentation ## ## Documentation ##
[Stable Version](https://github.com/wb2osz/direwolf/tree/master/doc) [Stable Version](https://github.com/wb2osz/direwolf/tree/master/doc)
[Latest Development Version](https://github.com/wb2osz/direwolf/tree/dev/doc) [Latest Development Version ("dev" branch)](https://github.com/wb2osz/direwolf/tree/dev/doc)
[Additional Topics](https://github.com/wb2osz/direwolf-doc)
[Power Point presentations](https://github.com/wb2osz/direwolf-presentation) -- Why not give a talk at a local club meeting?
Youtube has many interesting and helpful videos. Searching for [direwolf tnc](https://www.youtube.com/results?search_query=direwolf+tnc) or [direwolf aprs](https://www.youtube.com/results?search_query=direwolf+aprs) will produce the most relevant results.
## Installation ## ## Installation ##
@ -98,58 +131,99 @@ It can also be used as a virtual TNC for other applications such as [APRSIS32](h
Go to the [**releases** page](https://github.com/wb2osz/direwolf/releases). Download a zip file with "win" in its name, unzip it, and run direwolf.exe from a command window. Go to the [**releases** page](https://github.com/wb2osz/direwolf/releases). Download a zip file with "win" in its name, unzip it, and run direwolf.exe from a command window.
For more details see the **User Guide** in the [**doc** directory](https://github.com/wb2osz/direwolf/tree/master/doc). You can also build it yourself from source. For more details see the **User Guide** in the [**doc** directory](https://github.com/wb2osz/direwolf/tree/master/doc).
### Linux - Using git clone (recommended) ### ### Linux - Using git clone (recommended) ###
***Note that this has changed for version 1.6. There are now a couple extra steps.***
First you will need to install some software development packages using different commands depending on your flavor of Linux.
In most cases, the first few will already be there and the package installer will tell you that installation is not necessary.
On Debian / Ubuntu / Raspbian / Raspberry Pi OS:
sudo apt-get install git
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install make
sudo apt-get install cmake
sudo apt-get install libasound2-dev
sudo apt-get install libudev-dev
sudo apt-get install libavahi-client-dev
Or on Red Hat / Fedora / CentOS:
sudo yum install git
sudo yum install gcc
sudo yum install gcc-c++
sudo yum install make
sudo yum install alsa-lib-devel
sudo yum install libudev-devel
sudo yum install avahi-devel
CentOS 6 & 7 currently have cmake 2.8 but we need 3.1 or later.
First you need to enable the EPEL repository. Add a symlink if you don't already have the older version and want to type cmake rather than cmake3.
sudo yum install epel-release
sudo rpm -e cmake
sudo yum install cmake3
sudo ln -s /usr/bin/cmake3 /usr/bin/cmake
Then on any flavor of Linux:
cd ~ cd ~
git clone https://www.github.com/wb2osz/direwolf git clone https://www.github.com/wb2osz/direwolf
cd direwolf cd direwolf
make git checkout dev
mkdir build && cd build
cmake ..
make -j4
sudo make install sudo make install
make install-conf make install-conf
This should give you the most recent stable release. If you want the latest (possibly unstable) development version, use "git checkout dev" before the first "make" command. This gives you the latest development version. Leave out the "git checkout dev" to get the most recent stable release.
For more details see the **User Guide** in the [**doc** directory](https://github.com/wb2osz/direwolf/tree/master/doc). Special considerations for the Raspberry Pi are found in **Raspberry-Pi-APRS.pdf** For more details see the **User Guide** in the [**doc** directory](https://github.com/wb2osz/direwolf/tree/master/doc). Special considerations for the Raspberry Pi are found in **Raspberry-Pi-APRS.pdf**
### Linux - Using apt-get (Debian flavor operating systems) ### ### Linux - Using apt-get (Debian flavor operating systems) ###
Results will vary depending on your hardware platform and operating system version because it depends on various volunteers who perform the packaging. Results will vary depending on your hardware platform and operating system version because it depends on various volunteers who perform the packaging. Expect the version to lag significantly behind development.
sudo apt-get update sudo apt-get update
apt-cache showpkg direwolf apt-cache showpkg direwolf
sudo apt-get install direwolf sudo apt-get install direwolf
### Linux - Using yum (Red Hat flavor operating systems) ### ### Linux - Using yum (Red Hat flavor operating systems) ###
Results will vary depending on your hardware platform and operating system version because it depends on various volunteers who perform the packaging. Results will vary depending on your hardware platform and operating system version because it depends on various volunteers who perform the packaging. Expect the version to lag significantly behind development.
sudo yum check-update sudo yum check-update
sudo yum list direwolf sudo yum list direwolf
sudo yum install direwolf sudo yum install direwolf
### Linux - Download source in tar or zip file ###
Go to the [releases page](https://github.com/wb2osz/direwolf/releases). Chose desired release and download the source as zip or compressed tar file. Unpack the files, with "unzip" or "tar xfz," and then: ### Macintosh OS X ###
cd direwolf-* Read the **User Guide** in the [**doc** directory](https://github.com/wb2osz/direwolf/tree/master/doc). It is more complicated than Linux.
make
sudo make install If you have problems, post them to the [Dire Wolf packet TNC](https://groups.io/g/direwolf) discussion group.
make install-conf
You can also install a pre-built version from Mac Ports. Keeping this up to date depends on volunteers who perform the packaging. This version could lag behind development.
sudo port install direwolf
For more details see the **User Guide** in the [**doc** directory](https://github.com/wb2osz/direwolf/tree/master/doc). Special considerations for the Raspberry Pi are found in **Raspberry-Pi-APRS.pdf**
## Join the conversation ## ## Join the conversation ##
Here are some good places to ask questions and share your experience: Here are some good places to ask questions and share your experience:
- [Dire Wolf packet TNC](https://groups.yahoo.com/neo/groups/direwolf_packet/info) - [Dire Wolf Software TNC](https://groups.io/g/direwolf)
- [Raspberry Pi 4 Ham Radio](https://groups.io/g/RaspberryPi-4-HamRadio) - [Raspberry Pi 4 Ham Radio](https://groups.io/g/RaspberryPi-4-HamRadio)

View File

@ -0,0 +1 @@
include(CPack)

View File

@ -0,0 +1,10 @@
[Desktop Entry]
Name=@APPLICATION_NAME@
Comment=APRS Soundcard TNC
Exec=@APPLICATION_DESKTOP_EXEC@
Icon=@CMAKE_PROJECT_NAME@_icon.png
StartupNotify=true
Terminal=false
Type=Application
Categories=HamRadio
Keywords=Ham Radio;APRS;Soundcard TNC;KISS;AGWPE;AX.25

1
cmake/cpack/direwolf.rc Normal file
View File

@ -0,0 +1 @@
MAINICON ICON "direwolf_icon.ico"

View File

Before

Width:  |  Height:  |  Size: 361 KiB

After

Width:  |  Height:  |  Size: 361 KiB

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -0,0 +1,16 @@
#include <stdint.h>
#include <arm_neon.h>
#include <stdlib.h>
#include <signal.h>
void signalHandler(int signum) {
exit(signum); // SIGILL = 4
}
int main(int argc, char* argv[])
{
signal(SIGILL, signalHandler);
uint32x4_t x={0};
x=veorq_u32(x,x);
return 0;
}

View File

@ -0,0 +1,15 @@
#include <signal.h>
#include <stdlib.h>
#include <immintrin.h>
void signalHandler(int signum) {
exit(signum); // SIGILL = 4
}
int main(int argc, char* argv[])
{
signal(SIGILL, signalHandler);
__m256d x = _mm256_setzero_pd();
x=_mm256_addsub_pd(x,x);
return 0;
}

View File

@ -0,0 +1,15 @@
#include <signal.h>
#include <stdlib.h>
#include <immintrin.h>
void signalHandler(int signum) {
exit(signum); // SIGILL = 4
}
int main(int argc, char* argv[])
{
signal(SIGILL, signalHandler);
__m256i x = _mm256_setzero_si256();
x=_mm256_add_epi64 (x,x);
return 0;
}

View File

@ -0,0 +1,16 @@
#include <stdint.h>
#include <stdlib.h>
#include <signal.h>
#include <immintrin.h>
void signalHandler(int signum) {
exit(signum); // SIGILL = 4
}
int main(int argc, char* argv[])
{
signal(SIGILL, signalHandler);
uint64_t x[8] = {0};
__m512i y = _mm512_loadu_si512((__m512i*)x);
return 0;
}

View File

@ -0,0 +1,15 @@
#include <signal.h>
#include <stdlib.h>
#include <emmintrin.h>
void signalHandler(int signum) {
exit(signum); // SIGILL = 4
}
int main(int argc, char* argv[])
{
signal(SIGILL, signalHandler);
__m128i x = _mm_setzero_si128();
x=_mm_add_epi64(x,x);
return 0;
}

View File

@ -0,0 +1,16 @@
#include <signal.h>
#include <stdlib.h>
#include <emmintrin.h>
#include <pmmintrin.h>
void signalHandler(int signum) {
exit(signum); // SIGILL = 4
}
int main(int argc, char* argv[])
{
signal(SIGILL, signalHandler);
__m128d x = _mm_setzero_pd();
x=_mm_addsub_pd(x,x);
return 0;
}

View File

@ -0,0 +1,18 @@
#include <signal.h>
#include <stdlib.h>
#include <emmintrin.h>
#include <smmintrin.h>
void signalHandler(int signum) {
exit(signum); // SIGILL = 4
}
int main(int argc, char* argv[])
{
signal(SIGILL, signalHandler);
__m128i x = _mm_setzero_si128();
__m128i a = _mm_setzero_si128();
__m128i b = _mm_setzero_si128();
x=_mm_blend_epi16(a,b,4);
return 0;
}

View File

@ -0,0 +1,15 @@
#include <signal.h>
#include <stdlib.h>
#include <nmmintrin.h>
void signalHandler(int signum) {
exit(signum); // SIGILL = 4
}
int main(int argc, char* argv[])
{
signal(SIGILL, signalHandler);
unsigned int x=32;
x=_mm_crc32_u8(x,4);
return 0;
}

View File

@ -0,0 +1,16 @@
#include <signal.h>
#include <stdlib.h>
#include <emmintrin.h>
#include <tmmintrin.h>
void signalHandler(int signum) {
exit(signum); // SIGILL = 4
}
int main(int argc, char* argv[])
{
signal(SIGILL, signalHandler);
__m128i x = _mm_setzero_si128();
x=_mm_alignr_epi8(x,x,2);
return 0;
}

View File

@ -0,0 +1,21 @@
if(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
exec_program(
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
)
if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
endif(NOT "${rm_retval}" STREQUAL 0)
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
endif(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
endforeach(file)

View File

@ -0,0 +1,19 @@
find_library(AVAHI_COMMON_LIBRARY NAMES avahi-common PATHS ${PC_AVAHI_CLIENT_LIBRARY_DIRS})
if(AVAHI_COMMON_LIBRARY)
set(AVAHI_COMMON_FOUND TRUE)
endif()
find_library(AVAHI_CLIENT_LIBRARY NAMES avahi-client PATHS ${PC_AVAHI_CLIENT_LIBRARY_DIRS})
if(AVAHI_CLIENT_LIBRARY)
set(AVAHI_CLIENT_FOUND TRUE)
endif()
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Avahi DEFAULT_MSG AVAHI_COMMON_FOUND AVAHI_CLIENT_FOUND)
if (AVAHI_FOUND)
set(AVAHI_INCLUDE_DIRS ${AVAHI_UI_INCLUDE_DIR})
set(AVAHI_LIBRARIES ${AVAHI_COMMON_LIBRARY} ${AVAHI_CLIENT_LIBRARY})
endif()
mark_as_advanced(AVAHI_INCLUDE_DIRS AVAHI_LIBRARIES)

View File

@ -0,0 +1,383 @@
# Clang or AppleClang (see CMP0025)
if(NOT DEFINED C_CLANG AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(C_CLANG 1)
elseif(NOT DEFINED C_GCC AND CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set(C_GCC 1)
elseif(NOT DEFINED C_MSVC AND CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set(C_MSVC 1)
endif()
# Detect current compilation architecture and create standard definitions
include(CheckSymbolExists)
function(detect_architecture symbol arch)
if (NOT DEFINED ARCHITECTURE)
set(CMAKE_REQUIRED_QUIET 1)
check_symbol_exists("${symbol}" "" ARCHITECTURE_${arch})
unset(CMAKE_REQUIRED_QUIET)
# The output variable needs to be unique across invocations otherwise
# CMake's crazy scope rules will keep it defined
if (ARCHITECTURE_${arch})
set(ARCHITECTURE "${arch}" PARENT_SCOPE)
set(ARCHITECTURE_${arch} 1 PARENT_SCOPE)
add_definitions(-DARCHITECTURE_${arch}=1)
endif()
endif()
endfunction()
# direwolf versions thru 1.5 were available pre-built for 32 bit Windows targets.
# Research and experimentation revealed that the SSE instructions made a big
# difference in runtime speed but SSE2 and later were not significantly better
# for this application. I decided to build with only the SSE instructions making
# the Pentium 3 the minimum requirement. SSE2 would require at least a Pentium 4
# and offered no significant performance advantage.
# These are ancient history - from the previous Century - but old computers, generally
# considered useless for anything else, often end up in the ham shack.
#
# When cmake was first used for direwolf, the default target became 64 bit and the
# SSE2, SSE3, SSE4.1, and SSE4.2 instructions were automatically enabled based on the
# build machine capabilities. This was fine until I tried running the application
# on a computer much older than where it was built. It did not have the SSE4 instructions
# and the application died without a clue for the reason.
# Just how much benefit do these new instructions provide for this application?
#
# These were all run on the same computer, but compiled in different ways.
# Times to run atest with Track 1 of the TNC test CD:
#
# direwolf 1.5 - 32 bit target - gcc 6.3.0
#
# 60.4 sec. Pentium 3 with SSE
#
# direwolf 1.6 - 32 bit target - gcc 7.4.0
#
# 81.0 sec. with no SIMD instructions enabled.
# 54.4 sec. with SSE
# 52.0 sec. with SSE2
# 52.4 sec. with SSE2, SSE3
# 52.3 sec. with SSE2, SSE3, SSE4.1, SSE4.2
# 49.9 sec. Fedora standard: -m32 -march=i686 -mtune=generic -msse2 -mfpmath=sse
# 50.4 sec. sse not sse2: -m32 -march=i686 -mtune=generic -msse -mfpmath=sse
#
# That's what I found several years ago with a much older compiler.
# The original SSE helped a lot but SSE2 and later made little difference.
#
# direwolf 1.6 - 64 bit target - gcc 7.4.0
#
# 34.8 sec. with no SIMD instructions enabled.
# 34.8 sec. with SSE
# 34.8 sec. with SSE2
# 34.2 sec. with SSE2, SSE3
# 33.5 sec. with SSE2, SSE3, SSE4.1, SSE4.2
# 33.4 Fedora standard: -mtune=generic
#
# Why do we see such little variation? 64-bit target implies
# SSE, SSE2, SSE3 instructions are available.
#
# Building for a 64 bit target makes it run about 1.5x faster on the same hardware.
#
# The default will be set for maximum portability so packagers won't need to
# to anything special.
#
#
# While ENABLE_GENERIC also had the desired result (for x86_64), I don't think
# it is the right approach. It prevents the detection of the architecture,
# i.e. x86, x86_64, ARM, ARM64. That's why it did not go looking for the various
# SSE instructions. For x86, we would miss out on using SSE.
if (NOT ENABLE_GENERIC)
if (C_MSVC)
detect_architecture("_M_AMD64" x86_64)
detect_architecture("_M_IX86" x86)
detect_architecture("_M_ARM" ARM)
detect_architecture("_M_ARM64" ARM64)
else()
detect_architecture("__x86_64__" x86_64)
detect_architecture("__i386__" x86)
detect_architecture("__arm__" ARM)
detect_architecture("__aarch64__" ARM64)
endif()
endif()
if (NOT DEFINED ARCHITECTURE)
set(ARCHITECTURE "GENERIC")
set(ARCHITECTURE_GENERIC 1)
add_definitions(-DARCHITECTURE_GENERIC=1)
endif()
message(STATUS "Target architecture: ${ARCHITECTURE}")
set(TEST_DIR ${PROJECT_SOURCE_DIR}/cmake/cpu_tests)
# flag that set the minimum cpu flag requirements
# used to create re-distribuitable binary
if (${ARCHITECTURE} MATCHES "x86_64|x86" AND (FORCE_SSE OR FORCE_SSSE3 OR FORCE_SSE41))
if (FORCE_SSE)
set(HAS_SSE ON CACHE BOOL "SSE SIMD enabled")
if(C_GCC OR C_CLANG)
if (${ARCHITECTURE} MATCHES "x86_64")
# All 64-bit capable chips support MMX, SSE, SSE2, and SSE3
# so they are all enabled automatically. We don't want to use
# SSE4, based on build machine capabilites, because the application
# would not run properly on an older CPU.
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mtune=generic" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mtune=generic" )
else()
# Fedora standard uses -msse2 here.
# I dropped it down to -msse for greater compatibility and little penalty.
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32 -march=i686 -mtune=generic -msse -mfpmath=sse" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32 -march=i686 -mtune=generic -msse -mfpmath=sse" )
endif()
message(STATUS "Use SSE SIMD instructions")
add_definitions(-DUSE_SSE)
elseif(C_MSVC)
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /arch:SSE" )
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /arch:SSE" )
set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Oi /GL /Ot /Ox" )
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox" )
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG" )
message(STATUS "Use MSVC SSSE3 SIMD instructions")
add_definitions (/D "_CRT_SECURE_NO_WARNINGS")
add_definitions(-DUSE_SSSE3)
endif()
elseif (FORCE_SSSE3)
set(HAS_SSSE3 ON CACHE BOOL "SSSE3 SIMD enabled")
if(C_GCC OR C_CLANG)
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mssse3" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mssse3" )
message(STATUS "Use SSSE3 SIMD instructions")
add_definitions(-DUSE_SSSE3)
elseif(C_MSVC)
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /arch:SSSE3" )
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /arch:SSSE3" )
set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Oi /GL /Ot /Ox" )
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox" )
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG" )
message(STATUS "Use MSVC SSSE3 SIMD instructions")
add_definitions (/D "_CRT_SECURE_NO_WARNINGS")
add_definitions(-DUSE_SSSE3)
endif()
elseif (FORCE_SSE41)
set(HAS_SSSE3 ON CACHE BOOL "SSSE3 SIMD enabled")
set(HAS_SSE4_1 ON CACHE BOOL "Architecture has SSE 4.1 SIMD enabled")
if(C_GCC OR C_CLANG)
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.1" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1" )
message(STATUS "Use SSE 4.1 SIMD instructions")
add_definitions(-DUSE_SSSE3)
add_definitions(-DUSE_SSE4_1)
elseif(C_MSVC)
# seems that from MSVC 2015 comiler doesn't support those flags
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /arch:SSE4_1" )
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /arch:SSE4_1" )
set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Oi /GL /Ot /Ox" )
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox" )
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG" )
message(STATUS "Use SSE 4.1 SIMD instructions")
add_definitions (/D "_CRT_SECURE_NO_WARNINGS")
add_definitions(-DUSE_SSSE3)
add_definitions(-DUSE_SSE4_1)
endif()
endif()
else ()
if (${ARCHITECTURE} MATCHES "x86_64|x86")
if(C_MSVC)
try_run(RUN_SSE2 COMPILE_SSE2 "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_x86_sse2.cxx" COMPILE_DEFINITIONS /O0)
else()
try_run(RUN_SSE2 COMPILE_SSE2 "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_x86_sse2.cxx" COMPILE_DEFINITIONS -msse2 -O0)
endif()
if(COMPILE_SSE2 AND RUN_SSE2 EQUAL 0)
set(HAS_SSE2 ON CACHE BOOL "Architecture has SSSE2 SIMD enabled")
message(STATUS "Use SSE2 SIMD instructions")
if(C_GCC OR C_CLANG)
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2" )
add_definitions(-DUSE_SSE2)
elseif(C_MSVC)
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /arch:SSE2" )
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /arch:SSE2" )
set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Oi /GL /Ot /Ox /arch:SSE2" )
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox /arch:SSE2" )
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG" )
add_definitions (/D "_CRT_SECURE_NO_WARNINGS")
add_definitions(-DUSE_SSE2)
endif()
else()
set(HAS_SSE2 OFF CACHE BOOL "Architecture does not have SSSE2 SIMD enabled")
endif()
if(C_MSVC)
try_run(RUN_SSSE3 COMPILE_SSSE3 "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_x86_ssse3.cxx" COMPILE_DEFINITIONS /O0)
else()
try_run(RUN_SSSE3 COMPILE_SSSE3 "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_x86_ssse3.cxx" COMPILE_DEFINITIONS -mssse3 -O0)
endif()
if(COMPILE_SSSE3 AND RUN_SSSE3 EQUAL 0)
set(HAS_SSSE3 ON CACHE BOOL "Architecture has SSSE3 SIMD enabled")
message(STATUS "Use SSSE3 SIMD instructions")
if(C_GCC OR C_CLANG)
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mssse3" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mssse3" )
add_definitions(-DUSE_SSSE3)
elseif(C_MSVC)
# seems not present on MSVC 2017
#set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox /arch:SSSE3" )
set( CMAKE_C_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox" )
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox" )
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG" )
add_definitions (/D "_CRT_SECURE_NO_WARNINGS")
add_definitions(-DUSE_SSSE3)
endif()
else()
set(HAS_SSSE3 OFF CACHE BOOL "Architecture does not have SSSE3 SIMD enabled")
endif()
if(C_MSVC)
try_run(RUN_SSE4_1 COMPILE_SSE4_1 "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_x86_sse41.cxx" COMPILE_DEFINITIONS /O0)
else()
try_run(RUN_SSE4_1 COMPILE_SSE4_1 "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_x86_sse41.cxx" COMPILE_DEFINITIONS -msse4.1 -O0)
endif()
if(COMPILE_SSE4_1 AND RUN_SSE4_1 EQUAL 0)
set(HAS_SSE4_1 ON CACHE BOOL "Architecture has SSE 4.1 SIMD enabled")
message(STATUS "Use SSE 4.1 SIMD instructions")
if(C_GCC OR C_CLANG)
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.1" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.1" )
add_definitions(-DUSE_SSE4_1)
elseif(C_MSVC)
# seems not present on MSVC 2017
#set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /arch:SSE4_1" )
#set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox /arch:SSE4_1" )
set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Oi /GL /Ot /Ox" )
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox" )
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG" )
add_definitions (/D "_CRT_SECURE_NO_WARNINGS")
add_definitions(-DUSE_SSE4_1)
endif()
else()
set(HAS_SSE4_1 OFF CACHE BOOL "Architecture does not have SSE 4.1 SIMD enabled")
endif()
if(C_MSVC)
try_run(RUN_SSE4_2 COMPILE_SSE4_2 "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_x86_sse42.cxx" COMPILE_DEFINITIONS /O0)
else()
try_run(RUN_SSE4_2 COMPILE_SSE4_2 "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_x86_sse42.cxx" COMPILE_DEFINITIONS -msse4.2 -O0)
endif()
if(COMPILE_SSE4_2 AND RUN_SSE4_2 EQUAL 0)
set(HAS_SSE4_2 ON CACHE BOOL "Architecture has SSE 4.2 SIMD enabled")
message(STATUS "Use SSE 4.2 SIMD instructions")
if(C_GCC OR C_CLANG)
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse4.2" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse4.2" )
add_definitions(-DUSE_SSE4_2)
elseif(C_MSVC)
# seems not present on MSVC 2017
#set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /arch:SSE4_2" )
#set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox /arch:SSE4_2" )
set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Oi /GL /Ot /Ox" )
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Oi /GL /Ot /Ox" )
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG" )
add_definitions (/D "_CRT_SECURE_NO_WARNINGS")
add_definitions(-DUSE_SSE4_2)
endif()
else()
set(HAS_SSE4_2 OFF CACHE BOOL "Architecture does not have SSE 4.2 SIMD enabled")
endif()
if(C_MSVC)
try_run(RUN_AVX COMPILE_AVX "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_x86_avx.cxx" COMPILE_DEFINITIONS /O0)
else()
try_run(RUN_AVX COMPILE_AVX "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_x86_avx.cxx" COMPILE_DEFINITIONS -mavx -O0)
endif()
if(COMPILE_AVX AND RUN_AVX EQUAL 0)
set(HAS_AVX ON CACHE BOOL "Architecture has AVX SIMD enabled")
message(STATUS "Use AVX SIMD instructions")
if(C_GCC OR C_CLANG)
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx" )
add_definitions(-DUSE_AVX)
elseif(C_MSVC)
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /arch:AVX" )
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /arch:AVX" )
set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Oi /GL /Ot /Ox /arch:AVX" )
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox /arch:AVX" )
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG" )
add_definitions (/D "_CRT_SECURE_NO_WARNINGS")
add_definitions(-DUSE_AVX)
endif()
else()
set(HAS_AVX OFF CACHE BOOL "Architecture does not have AVX SIMD enabled")
endif()
if(C_MSVC)
try_run(RUN_AVX2 COMPILE_AVX2 "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_x86_avx2.cxx" COMPILE_DEFINITIONS /O0)
else()
try_run(RUN_AVX2 COMPILE_AVX2 "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_x86_avx2.cxx" COMPILE_DEFINITIONS -mavx2 -O0)
endif()
if(COMPILE_AVX2 AND RUN_AVX2 EQUAL 0)
set(HAS_AVX2 ON CACHE BOOL "Architecture has AVX2 SIMD enabled")
message(STATUS "Use AVX2 SIMD instructions")
if(C_GCC OR C_CLANG)
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx2" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx2" )
add_definitions(-DUSE_AVX2)
elseif(C_MSVC)
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /arch:AVX2" )
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /arch:AVX2" )
set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Oi /GL /Ot /Ox /arch:AVX2" )
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox /arch:AVX2" )
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG" )
add_definitions (/D "_CRT_SECURE_NO_WARNINGS")
add_definitions(-DUSE_AVX2)
endif()
else()
set(HAS_AVX2 OFF CACHE BOOL "Architecture does not have AVX2 SIMD enabled")
endif()
if(C_MSVC)
try_run(RUN_AVX512 COMPILE_AVX512 "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_x86_avx512.cxx" COMPILE_DEFINITIONS /O0)
else()
try_run(RUN_AVX512 COMPILE_AVX512 "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_x86_avx512.cxx" COMPILE_DEFINITIONS -mavx512f -O0)
endif()
if(COMPILE_AVX512 AND RUN_AVX512 EQUAL 0)
set(HAS_AVX512 ON CACHE BOOL "Architecture has AVX512 SIMD enabled")
message(STATUS "Use AVX512 SIMD instructions")
if(C_GCC OR C_CLANG)
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mavx512f" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mavx512f" )
add_definitions(-DUSE_AVX512)
elseif(C_MSVC)
set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /arch:AVX512" )
set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /arch:AVX512" )
set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /Oi /GL /Ot /Ox /arch:AVX512" )
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Oi /GL /Ot /Ox /arch:AVX512" )
set( CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /LTCG" )
add_definitions (/D "_CRT_SECURE_NO_WARNINGS")
add_definitions(-DUSE_AVX512)
endif()
else()
set(HAS_AVX512 OFF CACHE BOOL "Architecture does not have AVX512 SIMD enabled")
endif()
elseif(ARCHITECTURE_ARM)
if(C_MSVC)
try_run(RUN_NEON COMPILE_NEON "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_arm_neon.cxx" COMPILE_DEFINITIONS /O0)
else()
if(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL ${CMAKE_SYSTEM_PROCESSOR})
try_run(RUN_NEON COMPILE_NEON "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_arm_neon.cxx" COMPILE_DEFINITIONS -mfpu=neon -O0)
else()
try_compile(COMPILE_NEON "${CMAKE_BINARY_DIR}/tmp" "${TEST_DIR}/test_arm_neon.cxx" COMPILE_DEFINITIONS -mfpu=neon -O0)
set(RUN_NEON 0)
endif()
endif()
if(COMPILE_NEON AND RUN_NEON EQUAL 0)
set(HAS_NEON ON CACHE BOOL "Architecture has NEON SIMD enabled")
message(STATUS "Use NEON SIMD instructions")
if(C_GCC OR C_CLANG)
set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfpu=neon" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mfpu=neon" )
add_definitions(-DUSE_NEON)
endif()
else()
set(HAS_NEON OFF CACHE BOOL "Architecture does not have NEON SIMD enabled")
endif()
elseif(ARCHITECTURE_ARM64)
# Advanced SIMD (aka NEON) is mandatory for AArch64
set(HAS_NEON ON CACHE BOOL "Architecture has NEON SIMD enabled")
message(STATUS "Use NEON SIMD instructions")
add_definitions(-DUSE_NEON)
endif()
endif()
# clear binary test folder
FILE(REMOVE_RECURSE ${CMAKE_BINARY_DIR}/tmp)

View File

@ -0,0 +1,15 @@
# Clang or AppleClang (see CMP0025)
if(NOT DEFINED C_CLANG AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(C_CLANG 1)
elseif(NOT DEFINED C_GCC AND CMAKE_CXX_COMPILER_ID MATCHES "GNU")
set(C_GCC 1)
elseif(NOT DEFINED C_MSVC AND CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set(C_MSVC 1)
if(MSVC_VERSION GREATER_EQUAL 1920 AND MSVC_VERSION LESS_EQUAL 1929)
set(VS2019 ON)
elseif(MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS_EQUAL 1919)
set(VS2017 ON)
elseif(MSVC_VERSION GREATER 1899 AND MSVC_VERSION LESS 1910)
set(VS2015 ON)
endif()
endif()

View File

@ -0,0 +1,88 @@
# - Try to find GPSD
# Once done this will define
#
# GPSD_FOUND - system has GPSD
# GPSD_INCLUDE_DIRS - the GPSD include directory
# GPSD_LIBRARIES - Link these to use GPSD
# GPSD_DEFINITIONS - Compiler switches required for using GPSD
#
# Copyright (c) 2006 Andreas Schneider <mail@cynapses.org>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
set(GPSD_ROOT_DIR
"${GPSD_ROOT_DIR}"
CACHE
PATH
"Directory to search for gpsd")
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_GPSD libgps)
endif()
if (GPSD_LIBRARIES AND GPSD_INCLUDE_DIRS)
# in cache already
set(GPSD_FOUND TRUE)
else (GPSD_LIBRARIES AND GPSD_INCLUDE_DIRS)
find_path(GPSD_INCLUDE_DIRS
NAMES
gps.h
PATHS
/usr/include
/usr/local/include
/opt/local/include
/sw/include
/usr/include/gps
/usr/local/include/gps
/opt/local/include/gps
/sw/include/gps
HINTS
${PC_GPSD_INCLUDEDIR}
${GPSD_ROOT_DIR}
)
# debian uses version suffixes
# add suffix evey new release
find_library(GPSD_LIBRARIES
NAMES
gps
PATHS
/usr/lib64
/usr/lib
/usr/local/lib
/opt/local/lib
/sw/lib
HINTS
${PC_GPSD_LIBDIR}
${GPSD_ROOT_DIR}
)
if (GPSD_INCLUDE_DIRS AND GPSD_LIBRARIES)
set(GPSD_FOUND TRUE)
endif (GPSD_INCLUDE_DIRS AND GPSD_LIBRARIES)
if (GPSD_FOUND)
if (NOT GPSD_FIND_QUIETLY)
message(STATUS "Found GPSD: ${GPSD_LIBRARIES}")
endif (NOT GPSD_FIND_QUIETLY)
else (GPSD_FOUND)
if (GPSD_FIND_REQUIRED)
message(FATAL_ERROR "Could not find GPSD")
endif (GPSD_FIND_REQUIRED)
endif (GPSD_FOUND)
# show the GPSD_INCLUDE_DIRS and GPSD_LIBRARIES variables only in the advanced view
mark_as_advanced(GPSD_INCLUDE_DIRS GPSD_LIBRARIES)
endif (GPSD_LIBRARIES AND GPSD_INCLUDE_DIRS)
# maybe on CYGWIN gpsd works
if (WIN32)
set(GPSD_FOUND FALSE)
set(GPSD_LIBRARIES "")
set(GPSD_INCLUDE_DIRS "")
endif (WIN32)

View File

@ -0,0 +1,64 @@
# - Try to find Portaudio
# Once done this will define
#
# PORTAUDIO_FOUND - system has Portaudio
# PORTAUDIO_INCLUDE_DIRS - the Portaudio include directory
# PORTAUDIO_LIBRARIES - Link these to use Portaudio
set(PORTAUDIO_ROOT_DIR
"${PORTAUDIO_ROOT_DIR}"
CACHE
PATH
"Directory to search for portaudio")
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_PORTAUDIO portaudio-2.0)
endif()
find_path(PORTAUDIO_INCLUDE_DIRS
NAMES
portaudio.h
PATHS
/usr/local/include
/usr/include
/opt/local/include
HINTS
${PC_PORTAUDIO_INCLUDEDIR}
${PORTAUDIO_ROOT_DIR}
)
find_library(PORTAUDIO_LIBRARIES
NAMES
portaudio
PATHS
/usr/local/lib
/usr/lib
/usr/lib64
/opt/local/lib
HINTS
${PC_PORTAUDIO_LIBDIR}
${PORTAUDIO_ROOT_DIR}
)
mark_as_advanced(PORTAUDIO_INCLUDE_DIRS PORTAUDIO_LIBRARIES)
# Found PORTAUDIO, but it may be version 18 which is not acceptable.
if(EXISTS ${PORTAUDIO_INCLUDE_DIRS}/portaudio.h)
include(CheckCXXSourceCompiles)
set(CMAKE_REQUIRED_INCLUDES_SAVED ${CMAKE_REQUIRED_INCLUDES})
set(CMAKE_REQUIRED_INCLUDES ${PORTAUDIO_INCLUDE_DIRS})
CHECK_CXX_SOURCE_COMPILES(
"#include <portaudio.h>\nPaDeviceIndex pa_find_device_by_name(const char *name); int main () {return 0;}"
PORTAUDIO2_FOUND)
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVED})
unset(CMAKE_REQUIRED_INCLUDES_SAVED)
if(PORTAUDIO2_FOUND)
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PORTAUDIO DEFAULT_MSG PORTAUDIO_INCLUDE_DIRS PORTAUDIO_LIBRARIES)
else(PORTAUDIO2_FOUND)
message(STATUS
" portaudio.h not compatible (requires API 2.0)")
set(PORTAUDIO_FOUND FALSE)
endif(PORTAUDIO2_FOUND)
endif()

View File

@ -0,0 +1,67 @@
# - Try to find Hamlib
#
# HAMLIB_FOUND - system has Hamlib
# HAMLIB_LIBRARIES - location of the library for hamlib
# HAMLIB_INCLUDE_DIRS - location of the include files for hamlib
#
# Requires these CMake modules:
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
#
# Original Author:
# 2019 Davide Gerhard <rainbow@irh.it>
set(HAMLIB_ROOT_DIR
"${HAMLIB_ROOT_DIR}"
CACHE
PATH
"Directory to search for hamlib")
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_HAMLIB hamlib)
endif()
find_path(HAMLIB_INCLUDE_DIR
NAMES hamlib/rig.h
PATHS
/usr/include
/usr/local/include
/opt/local/include
HINTS
${PC_HAMLIB_INCLUDEDIR}
${HAMLIB_ROOT_DIR}
)
find_library(HAMLIB_LIBRARY
NAMES hamlib
PATHS
/usr/lib64/hamlib
/usr/lib/hamlib
/usr/lib64
/usr/lib
/usr/local/lib64/hamlib
/usr/local/lib/hamlib
/usr/local/lib64
/usr/local/lib
/opt/local/lib
/opt/local/lib/hamlib
HINTS
${PC_HAMLIB_LIBDIR}
${HAMLIB_ROOT_DIR}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(hamlib
DEFAULT_MSG
HAMLIB_LIBRARY
HAMLIB_INCLUDE_DIR
)
if(HAMLIB_FOUND)
list(APPEND HAMLIB_LIBRARIES ${HAMLIB_LIBRARY})
list(APPEND HAMLIB_INCLUDE_DIRS ${HAMLIB_INCLUDE_DIR})
mark_as_advanced(HAMLIB_ROOT_DIR)
endif()
mark_as_advanced(HAMLIB_INCLUDE_DIR HAMLIB_LIBRARY)

View File

@ -0,0 +1,42 @@
# - Try to find sndio
#
# SNDIO_FOUND - system has sndio
# SNDIO_LIBRARIES - location of the library for sndio
# SNDIO_INCLUDE_DIRS - location of the include files for sndio
set(SNDIO_ROOT_DIR
"${SNDIO_ROOT_DIR}"
CACHE
PATH
"Directory to search for sndio")
# no need to check pkg-config
find_path(SNDIO_INCLUDE_DIRS
NAMES
sndio.h
PATHS
/usr/local/include
/usr/include
/opt/local/include
HINTS
${SNDIO_ROOT_DIR}
)
find_library(SNDIO_LIBRARIES
NAMES
sndio
PATHS
/usr/local/lib
/usr/lib
/usr/lib64
/opt/local/lib
HINTS
${SNDIIO_ROOT_DIR}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SNDIO DEFAULT_MSG SNDIO_INCLUDE_DIRS SNDIO_LIBRARIES)
mark_as_advanced(SNDIO_INCLUDE_DIRS SNDIO_LIBRARIES)

View File

@ -0,0 +1,85 @@
# - try to find the udev library
#
# Cache Variables: (probably not for direct use in your scripts)
# UDEV_INCLUDE_DIR
# UDEV_SOURCE_DIR
# UDEV_LIBRARY
#
# Non-cache variables you might use in your CMakeLists.txt:
# UDEV_FOUND
# UDEV_INCLUDE_DIRS
# UDEV_LIBRARIES
#
# Requires these CMake modules:
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
#
# Original Author:
# 2014 Kevin M. Godby <kevin@godby.org>
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
set(UDEV_ROOT_DIR
"${UDEV_ROOT_DIR}"
CACHE
PATH
"Directory to search for udev")
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_LIBUDEV libudev)
endif()
find_library(UDEV_LIBRARY
NAMES
udev
PATHS
${PC_LIBUDEV_LIBRARY_DIRS}
${PC_LIBUDEV_LIBDIR}
/usr/lib64
/usr/lib
/usr/local/lib
HINTS
"${UDEV_ROOT_DIR}"
PATH_SUFFIXES
lib
)
get_filename_component(_libdir "${UDEV_LIBRARY}" PATH)
find_path(UDEV_INCLUDE_DIR
NAMES
libudev.h
PATHS
/usr/include
/usr/local/include
${PC_LIBUDEV_INCLUDE_DIRS}
${PC_LIBUDEV_INCLUDEDIR}
HINTS
"${_libdir}"
"${_libdir}/.."
"${UDEV_ROOT_DIR}"
PATH_SUFFIXES
include
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(udev
DEFAULT_MSG
UDEV_LIBRARY
UDEV_INCLUDE_DIR
)
if (UDEV_INCLUDE_DIR AND UDEV_LIBRARY)
set(UDEV_FOUND TRUE)
endif (UDEV_INCLUDE_DIR AND UDEV_LIBRARY)
if(UDEV_FOUND)
list(APPEND UDEV_LIBRARIES ${UDEV_LIBRARY})
list(APPEND UDEV_INCLUDE_DIRS ${UDEV_INCLUDE_DIR})
mark_as_advanced(UDEV_ROOT_DIR)
endif()
mark_as_advanced(UDEV_INCLUDE_DIR
UDEV_LIBRARY)

View File

@ -3,7 +3,7 @@
# $ ls -l /dev/hidraw* # $ ls -l /dev/hidraw*
# crw------- 1 root root 247, 0 Sep 24 09:40 /dev/hidraw0 # crw------- 1 root root 247, 0 Sep 24 09:40 /dev/hidraw0
# #
# An ordinary user, trying to acccess it will be denied. # An ordinary user, trying to access it will be denied.
# #
# Unnecessarily running applications as root is generally a bad idea because it makes it too easy # Unnecessarily running applications as root is generally a bad idea because it makes it too easy
# to accidentally trash your system. We need to relax the restrictions so ordinary users can use these devices. # to accidentally trash your system. We need to relax the restrictions so ordinary users can use these devices.
@ -28,3 +28,9 @@ SUBSYSTEM=="hidraw", ATTRS{idVendor}=="0d8c", GROUP="audio", MODE="0660"
# #
# Read the User Guide and run the "cm108" application for more information. # Read the User Guide and run the "cm108" application for more information.
# #
#
# Same thing for the "All In One Cable."
#
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="7388", GROUP="audio", MODE="0660"

48
conf/CMakeLists.txt Normal file
View File

@ -0,0 +1,48 @@
# generate conf per platform
file(READ "${CUSTOM_CONF_DIR}/generic.conf" file_content)
if(LINUX)
string(REGEX REPLACE "\n%W%[^\n]*" "" file_content "${file_content}")
string(REGEX REPLACE "\n%M%[^\n]*" "" file_content "${file_content}")
string(REGEX REPLACE "\n%L%([^\n]*)" "\n\\1" file_content "${file_content}")
elseif(WIN32 OR CYGWIN)
string(REGEX REPLACE "\n%M%[^\n]*" "" file_content "${file_content}")
string(REGEX REPLACE "\n%L%[^\n]*" "" file_content "${file_content}")
string(REGEX REPLACE "\n%W%([^\n]*)" "\n\\1" file_content "${file_content}")
else() # macOS FreeBSD OpenBSD
string(REGEX REPLACE "\n%W%[^\n]*" "" file_content "${file_content}")
string(REGEX REPLACE "\n%L%[^\n]*" "" file_content "${file_content}")
string(REGEX REPLACE "\n%M%([^\n]*)" "\n\\1" file_content "${file_content}")
endif()
# remove remark
string(REGEX REPLACE "\n%R%[^\n]*" "" file_content "${file_content}")
# clear common lines
string(REGEX REPLACE "\n%C%([^\n]*)" "\n\\1" file_content "${file_content}")
string(REGEX REPLACE "^%C%([^\n]*)" "\\1" file_content "${file_content}")
file(WRITE "${CMAKE_BINARY_DIR}/direwolf.conf" "${file_content}")
# install udev rules for CM108
if(LINUX)
install(FILES "${CUSTOM_CONF_DIR}/99-direwolf-cmedia.rules" DESTINATION /etc/udev/rules.d/)
endif()
install(FILES "${CMAKE_BINARY_DIR}/direwolf.conf" DESTINATION ${INSTALL_CONF_DIR})
install(FILES "${CUSTOM_CONF_DIR}/sdr.conf" DESTINATION ${INSTALL_CONF_DIR})
# Put sample configuration & startup files in home directory.
# This step would be done as ordinary user.
# Some people like to put the direwolf config file in /etc/ax25.
# Note that all of these are also in $(DESTDIR)/share/doc/direwolf/examples/.
if(NOT (WIN32 OR CYGWIN))
add_custom_target(install-conf
COMMAND ${CMAKE_COMMAND}
-DCUSTOM_BINARY_DIR="${CMAKE_BINARY_DIR}"
-DCUSTOM_CONF_DIR="${CUSTOM_CONF_DIR}"
-DCUSTOM_SCRIPTS_DIR="${CUSTOM_SCRIPTS_DIR}"
-DCUSTOM_TELEMETRY_DIR="${CUSTOM_TELEMETRY_DIR}"
-P "${CMAKE_SOURCE_DIR}/conf/install_conf.cmake"
)
endif()

537
conf/generic.conf Normal file
View File

@ -0,0 +1,537 @@
%C%#############################################################
%C%# #
%C%# Configuration file for Dire Wolf #
%C%# #
%L%# Linux version #
%W%# Windows version #
%M%# Macintosh version #
%C%# #
%C%#############################################################
%R%
%R%
%R% The sample config file was getting pretty messy
%R% with the Windows and Linux differences.
%R% It would be a maintenance burden to keep most of
%R% two different versions in sync.
%R% This common source is now used to generate the
%R% two different variations while having only a single
%R% copy of the common parts.
%R%
%R% The first column contains one of the following:
%R%
%R% R remark which is discarded.
%R% C common to both versions.
%R% W Windows version only.
%R% L Linux version only.
%R% M Macintosh version and possibly others (portaudio used).
%R%
%C%#
%C%# Extensive documentation can be found here:
%C%# Stable release - https://github.com/wb2osz/direwolf/tree/master/doc
%C%# Latest development - https://github.com/wb2osz/direwolf/tree/dev/doc
%C%# Additional topics - https://github.com/wb2osz/direwolf-doc
%C%#
%W%# The basic documentation set can also be found in the doc folder.
%L%# The basic documentation set can also be found in
%L%# /usr/local/share/doc/direwolf/ or /usr/share/doc/direwolf/
%L%# Concise "man" pages are also available for Linux.
%M%# /usr/local/share/doc/direwolf/ or /usr/share/doc/direwolf/
%M%# Concise "man" pages are also available for Mac OSX.
%C%#
%C%# Questions??? Join the discussion forum: https://groups.io/g/direwolf
%C%#
%C%#
%C%# This sample file does not have examples for all of the possibilities.
%C%# Consult the User Guide for more details on configuration options
%C%# and other documents for more details for different uses.
%C%#
%C%# These are the most likely settings you might change:
%C%#
%C%# (1) MYCALL - call sign and SSID for your station.
%C%#
%C%# Look for lines starting with MYCALL and
%C%# change NOCALL to your own.
%C%#
%C%# (2) PBEACON - enable position beaconing.
%C%#
%C%# Look for lines starting with PBEACON and
%C%# modify for your call, location, etc.
%C%#
%C%# (3) DIGIPEATER - configure digipeating rules.
%C%#
%C%# Look for lines starting with DIGIPEATER.
%C%# Most people will probably use the given example.
%C%# Just remove the "#" from the start of the line
%C%# to enable it.
%C%#
%C%# (4) IGSERVER, IGLOGIN - IGate server and login
%C%#
%C%# Configure an IGate client to relay messages between
%C%# radio and internet servers.
%C%#
%C%#
%C%# The default location is "direwolf.conf" in the current working directory.
%L%# On Linux, the user's home directory will also be searched.
%C%# An alternate configuration file location can be specified with the "-c" command line option.
%C%#
%C%# As you probably guessed by now, # indicates a comment line.
%C%#
%C%# Remove the # at the beginning of a line if you want to use a sample
%C%# configuration that is currently commented out.
%C%#
%C%# Commands are a keyword followed by parameters.
%C%#
%C%# Command key words are case insensitive. i.e. upper and lower case are equivalent.
%C%#
%C%# Command parameters are generally case sensitive. i.e. upper and lower case are different.
%C%#
%C%
%C%
%C%#############################################################
%C%# #
%C%# FIRST AUDIO DEVICE PROPERTIES #
%C%# (Channel 0 + 1 if in stereo) #
%C%# #
%C%#############################################################
%C%
%C%#
%C%# Many people will simply use the default sound device.
%C%# Some might want to use an alternative device by choosing it here.
%C%#
%C%#
%C%# Many examples of radio interfaces and PTT options can be found in:
%C%# https://github.com/wb2osz/direwolf-doc/blob/main/Radio-Interface-Guide.pdf
%C%#
%C%#
%R% ---------- Windows ----------
%R%
%W%# When the Windows version starts up, it displays something like
%W%# this with the available sound devices and capabilities:
%W%#
%W%# Available audio input devices for receive (*=selected):
%W%# * 0: Microphone (C-Media USB Headpho (channel 2)
%W%# 1: Microphone (Bluetooth SCO Audio
%W%# 2: Microphone (Bluetooth AV Audio)
%W%# * 3: Microphone (Realtek High Defini (channels 0 & 1)
%W%# Available audio output devices for transmit (*=selected):
%W%# * 0: Speakers (C-Media USB Headphone (channel 2)
%W%# 1: Speakers (Bluetooth SCO Audio)
%W%# 2: Realtek Digital Output(Optical)
%W%# 3: Speakers (Bluetooth AV Audio)
%W%# * 4: Speakers (Realtek High Definiti (channels 0 & 1)
%W%# 5: Realtek Digital Output (Realtek
%W%#
%W%# Example: To use the microphone and speaker connections on the
%W%# system board, either of these forms can be used:
%W%
%W%#ADEVICE High
%W%#ADEVICE 3 4
%W%
%W%
%W%# Example: To use the USB Audio, use a command like this with
%W%# the input and output device numbers. (Remove the # comment character.)
%W%#ADEVICE USB
%W%
%W%# You can also use "-" or "stdin" to pipe stdout from
%W%# some other application such as a software defined radio.
%W%# "stdin" is not an audio device. Don't use this unless you
%W%# understand what this means. Read the User Guide.
%W%# You can also specify "UDP:" and an optional port for input.
%W%# Something different must be specified for output.
%W%
%W%# ADEVICE stdin 0
%W%# ADEVICE UDP:7355 0
%W%
%W%# The position in the list can change when devices (e.g. USB) are added and removed.
%W%# You can also specify devices by using part of the name.
%W%# Here is an example of specifying the USB Audio device.
%W%# This is case-sensitive. Upper and lower case are not treated the same.
%W%
%W%#ADEVICE USB
%W%
%W%
%R% ---------- Linux ----------
%R%
%L%# Linux ALSA is complicated. See User Guide for discussion.
%L%# To use something other than the default, generally use plughw
%L%# and a card number reported by "arecord -l" command. Example:
%L%
%L%# ADEVICE plughw:1,0
%L%
%L%# You can also use "-" or "stdin" to pipe stdout from
%L%# some other application such as a software defined radio.
%L%# "stdin" is not an audio device. Don't use this unless you
%L%# understand what this means. Read the User Guide.
%L%# You can also specify "UDP:" and an optional port for input.
%L%# Something different must be specified for output.
%L%
%L%# ADEVICE stdin plughw:1,0
%L%# ADEVICE UDP:7355 default
%L%
%R% ---------- Mac ----------
%R%
%M%# Macintosh Operating System uses portaudio driver for audio
%M%# input/output. Default device selection not available. User/OP
%M%# must configure the sound input/output option. Note that
%M%# the device names can contain spaces. In this case, the names
%M%# must be enclosed by quotes.
%M%#
%M%# Examples:
%M%#
%M%ADEVICE "Built-in Input" "Built-in Output"
%M%
%M%# ADEVICE "USB Audio Codec:6" "USB Audio Codec:5"
%M%#
%M%#
%M%# You can also use "-" or "stdin" to pipe stdout from
%M%# some other application such as a software defined radio.
%M%# "stdin" is not an audio device. Don't use this unless you
%M%# understand what this means. Read the User Guide.
%M%# You can also specify "UDP:" and an optional port for input.
%M%# Something different must be specified for output.
%M%
%M%# ADEVICE UDP:7355 default
%M%#
%C%
%C%#
%C%# Number of audio channels for this souncard: 1 (mono) or 2 (stereo).
%C%# 1 is the default so there is no need to specify it.
%C%#
%C%
%C%#ACHANNELS 2
%C%
%C%
%C%#############################################################
%C%# #
%C%# SECOND AUDIO DEVICE PROPERTIES #
%C%# (Channel 2 + 3 if in stereo) #
%C%# #
%C%#############################################################
%C%
%C%#ADEVICE1 ...
%C%
%C%
%C%#############################################################
%C%# #
%C%# THIRD AUDIO DEVICE PROPERTIES #
%C%# (Channel 4 + 5 if in stereo) #
%C%# #
%C%#############################################################
%C%
%C%#ADEVICE2 ...
%C%
%C%
%C%#############################################################
%C%# #
%C%# CHANNEL 0 PROPERTIES #
%C%# #
%C%#############################################################
%C%
%C%CHANNEL 0
%C%
%C%#
%C%# The following MYCALL, MODEM, PTT, etc. configuration items
%C%# apply to the most recent CHANNEL.
%C%#
%C%
%C%#
%C%# Station identifier for this channel.
%C%# Multiple channels can have the same or different names.
%C%#
%C%# It can be up to 6 letters and digits with an optional ssid.
%C%# The APRS specification requires that it be upper case.
%C%#
%C%# Example (don't use this unless you are me): MYCALL WB2OSZ-5
%C%#
%C%
%C%MYCALL N0CALL
%C%
%C%#
%C%# Pick a suitable modem speed based on your situation.
%C%# 1200 Most common for VHF/UHF. This is the default if not specified.
%C%# 2400 QPSK compatible with MFJ-2400, and probably PK232-2400 & KPC-2400.
%C%# 300 Low speed for HF SSB. Default tones 1600 & 1800.
%C%# EAS Emergency Alert System (EAS) Specific Area Message Encoding (SAME).
%C%# 9600 G3RUH style - Can't use Microphone and Speaker connections.
%C%# AIS International system for tracking ships on VHF.
%C%# Also uses 9600 bps so Speaker connection won't work.
%C%#
%C%# In most cases you can just specify the speed. Examples:
%C%#
%C%
%C%MODEM 1200
%C%#MODEM 9600
%C%
%C%#
%C%# Many options are available for great flexibility.
%C%# See User Guide for details.
%C%#
%C%
%C%#
%C%# Uncomment line below to enable the DTMF decoder for this channel.
%C%#
%C%
%C%#DTMF
%C%
%C%# Push to Talk (PTT) can be confusing because there are so many different cases.
%C%# Radio-Interface-Guide.pdf in https://github.com/wb2osz/direwolf-doc
%C%# goes into detail about the various options.
%C%
%L%# If using a C-Media CM108/CM119 or similar USB Audio Adapter,
%L%# you can use a GPIO pin for PTT control. This is very convenient
%L%# because a single USB connection is used for both audio and PTT.
%L%# Example:
%L%
%L%#PTT CM108
%L%
%W%# If using a C-Media CM108/CM119 or similar USB Audio Adapter,
%W%# you can use a GPIO pin for PTT control. This is very convenient
%W%# because a single USB connection is used for both audio and PTT.
%W%# Example:
%W%
%W%#PTT CM108
%W%%C%#
%C%# The transmitter Push to Talk (PTT) control can be wired to a serial port
%C%# with a suitable interface circuit. DON'T connect it directly!
%C%#
%C%# For the PTT command, specify the device and either RTS or DTR.
%C%# RTS or DTR may be preceded by "-" to invert the signal.
%C%# Both can be used for interfaces that want them driven with opposite polarity.
%C%#
%L%# COM1 can be used instead of /dev/ttyS0, COM2 for /dev/ttyS1, and so on.
%L%#
%C%
%C%#PTT COM1 RTS
%C%#PTT COM1 RTS -DTR
%L%#PTT /dev/ttyUSB0 RTS
%L%#PTT /dev/ttyUSB0 RTS -DTR
%C%
%L%#
%L%# On Linux, you can also use general purpose I/O pins if
%L%# your system is configured for user access to them.
%L%# This would apply mostly to microprocessor boards, not a regular PC.
%L%# See separate Raspberry Pi document for more details.
%L%# The number may be preceded by "-" to invert the signal.
%L%#
%L%
%L%#PTT GPIO 25
%L%
%C%# The Data Carrier Detect (DCD) signal can be sent to most of the same places
%C%# as the PTT signal. This could be used to light up an LED like a normal TNC.
%C%
%C%#DCD COM1 -DTR
%L%#DCD GPIO 24
%C%
%C%
%C%#############################################################
%C%# #
%C%# CHANNEL 1 PROPERTIES #
%C%# #
%C%#############################################################
%C%
%C%#CHANNEL 1
%C%
%C%#
%C%# Specify MYCALL, MODEM, PTT, etc. configuration items for
%C%# CHANNEL 1. Repeat for any other channels.
%C%
%C%
%C%#############################################################
%C%# #
%C%# TEXT TO SPEECH COMMAND FILE #
%C%# #
%C%#############################################################
%C%
%W%#SPEECH dwespeak.bat
%L%#SPEECH dwespeak.sh
%C%
%C%
%C%#############################################################
%C%# #
%C%# VIRTUAL TNC SERVER PROPERTIES #
%C%# #
%C%#############################################################
%C%
%C%#
%C%# Dire Wolf acts as a virtual TNC and can communicate with
%C%# client applications by different protocols:
%C%#
%C%# - the "AGW TCPIP Socket Interface" - default port 8000
%C%# - KISS protocol over TCP socket - default port 8001
%W%# - KISS TNC via serial port
%L%# - KISS TNC via pseudo terminal (-p command line option)
%C%#
%C%
%C%AGWPORT 8000
%C%KISSPORT 8001
%C%
%W%#
%W%# Some applications are designed to operate with only a physical
%W%# TNC attached to a serial port. For these, we provide a virtual serial
%W%# port that appears to be connected to a TNC.
%W%#
%W%# Take a look at the User Guide for instructions to set up
%W%# two virtual serial ports named COM3 and COM4 connected by
%W%# a null modem.
%W%#
%W%# Using the configuration described, Dire Wolf will connect to
%W%# COM3 and the client application will use COM4.
%W%#
%W%# Uncomment following line to use this feature.
%W%
%W%#NULLMODEM COM3
%W%
%W%
%C%#
%C%# It is sometimes possible to recover frames with a bad FCS.
%C%# This is not a global setting.
%C%# It applies only the the most recent CHANNEL specified.
%C%#
%C%# 0 - Don't try to repair. (default)
%C%# 1 - Attempt to fix single bit error.
%C%#
%C%
%C%#FIX_BITS 0
%C%
%C%#
%C%#############################################################
%C%# #
%C%# FIXED POSIION BEACONING PROPERTIES #
%C%# #
%C%#############################################################
%C%
%C%
%C%#
%C%# Beaconing is configured with these two commands:
%C%#
%C%# PBEACON - for a position report (usually yourself)
%C%# OBEACON - for an object report (usually some other entity)
%C%#
%C%# Each has a series of keywords and values for options.
%C%# See User Guide for details.
%C%#
%C%# Example:
%C%#
%C%# This results in a broadcast once every 10 minutes.
%C%# Every half hour, it can travel via one digipeater hop.
%C%# The others are kept local.
%C%#
%C%
%C%#PBEACON delay=1 every=30 overlay=S symbol="digi" lat=42^37.14N long=071^20.83W power=50 height=20 gain=4 comment="Chelmsford MA" via=WIDE1-1
%C%#PBEACON delay=11 every=30 overlay=S symbol="digi" lat=42^37.14N long=071^20.83W power=50 height=20 gain=4 comment="Chelmsford MA"
%C%#PBEACON delay=21 every=30 overlay=S symbol="digi" lat=42^37.14N long=071^20.83W power=50 height=20 gain=4 comment="Chelmsford MA"
%C%
%C%#
%C%# Did you know that APRS comments and messages can contain UTF-8 characters, not only plain ASCII?
%C%#
%C%#PBEACON delay=1 every=30 overlay=S symbol="digi" lat=42^37.14N long=071^20.83W comment=" Did you know that APRS comments and messages can contain UTF-8 characters? \xe0\xb8\xa7\xe0\xb8\xb4\xe0\xb8\x97\xe0\xb8\xa2\xe0\xb8\xb8\xe0\xb8\xaa\xe0\xb8\xa1\xe0\xb8\xb1\xe0\xb8\x84\xe0\xb8\xa3\xe0\xb9\x80\xe0\xb8\xa5\xe0\xb9\x88\xe0\xb8\x99"
%C%#PBEACON delay=11 every=30 overlay=S symbol="digi" lat=42^37.14N long=071^20.83W comment=" Did you know that APRS comments and messages can contain UTF-8 characters? \xce\xa1\xce\xb1\xce\xb4\xce\xb9\xce\xbf\xce\xb5\xcf\x81\xce\xb1\xcf\x83\xce\xb9\xcf\x84\xce\xb5\xcf\x87\xce\xbd\xce\xb9\xcf\x83\xce\xbc\xcf\x8c\xcf\x82"
%C%#PBEACON delay=21 every=30 overlay=S symbol="digi" lat=42^37.14N long=071^20.83W comment=" Did you know that APRS comments and messages can contain UTF-8 characters? \xe3\x82\xa2\xe3\x83\x9e\xe3\x83\x81\xe3\x83\xa5\xe3\x82\xa2\xe7\x84\xa1\xe7\xb7\x9a"
%C%#
%C%# With UTM coordinates instead of latitude and longitude.
%C%
%C%#PBEACON delay=1 every=10 overlay=S symbol="digi" zone=19T easting=307477 northing=4720178
%C%
%C%
%C%#
%C%# When the destination field is set to "SPEECH" the information part is
%C%# converted to speech rather than transmitted as a data frame.
%C%#
%C%
%C%#CBEACON dest="SPEECH" info="Club meeting tonight at 7 pm."
%C%
%C%# Similar for Morse code. If SSID is specified, it is multiplied
%C%# by 2 to get speed in words per minute (WPM).
%C%
%C%#CBEACON dest="MORSE-6" info="de MYCALL"
%C%
%C%
%C%#
%C%# Modify for your particular situation before removing
%C%# the # comment character from the beginning of appropriate lines above.
%C%#
%C%
%C%
%C%#############################################################
%C%# #
%C%# APRS DIGIPEATER PROPERTIES #
%C%# #
%C%#############################################################
%C%
%C%#
%C%# For most common situations, use something like this by removing
%C%# the "#" from the beginning of the line below.
%C%#
%C%
%C%#DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$
%C%
%C%# See User Guide and "APRS-Digipeaters.pdf" for more explanation of what
%C%# this means and how it can be customized for your particular needs.
%C%
%C%
%C%# Traditional connected mode packet radio uses a different
%C%# type of digipeating. See User Guide for details.
%C%
%C%#############################################################
%C%# #
%C%# INTERNET GATEWAY #
%C%# #
%C%#############################################################
%C%
%C%# First you need to specify the name of a Tier 2 server.
%C%# The current preferred way is to use one of these regional rotate addresses:
%C%
%C%# noam.aprs2.net - for North America
%C%# soam.aprs2.net - for South America
%C%# euro.aprs2.net - for Europe and Africa
%C%# asia.aprs2.net - for Asia
%C%# aunz.aprs2.net - for Oceania
%C%
%C%#IGSERVER noam.aprs2.net
%C%
%C%# You also need to specify your login name and passcode.
%C%# Contact the author if you can't figure out how to generate the passcode.
%C%
%C%#IGLOGIN WB2OSZ-5 123456
%C%
%C%# That's all you need for a receive only IGate which relays
%C%# messages from the local radio channel to the global servers.
%C%
%C%# Some might want to send an IGate client position directly to a server
%C%# without sending it over the air and relying on someone else to
%C%# forward it to an IGate server. This is done by using sendto=IG rather
%C%# than a radio channel number. Overlay R for receive only, T for two way.
%C%# There is no need to send it as often as you would over the radio.
%C%
%C%#PBEACON sendto=IG delay=0:30 every=60:00 symbol="igate" overlay=R lat=42^37.14N long=071^20.83W
%C%#PBEACON sendto=IG delay=0:30 every=60:00 symbol="igate" overlay=T lat=42^37.14N long=071^20.83W
%C%
%C%
%C%# To relay messages from the Internet to radio, you need to add
%C%# one more option with the transmit channel number and a VIA path.
%C%
%C%#IGTXVIA 0 WIDE1-1,WIDE2-1
%C%
%C%
%C%# Finally, we don't want to flood the radio channel.
%C%# The IGate function will limit the number of packets transmitted
%C%# during 1 minute and 5 minute intervals. If a limit would
%C%# be exceeded, the packet is dropped and message is displayed in red.
%C%# This might be low for APRS Thursday when there is abnormally high activity.
%C%
%C%IGTXLIMIT 6 10
%C%
%C%
%C%#############################################################
%C%# #
%C%# APRStt GATEWAY #
%C%# #
%C%#############################################################
%C%
%C%#
%C%# Dire Wolf can receive DTMF (commonly known as Touch Tone)
%C%# messages and convert them to packet objects.
%C%#
%C%# See separate "APRStt-Implementation-Notes" document for details.
%C%#

23
conf/install_conf.cmake Normal file
View File

@ -0,0 +1,23 @@
if(NOT EXISTS $ENV{HOME}/direwolf.conf)
configure_file("${CUSTOM_BINARY_DIR}/direwolf.conf" $ENV{HOME})
endif()
if(NOT EXISTS $ENV{HOME}/sdr.conf)
configure_file("${CUSTOM_CONF_DIR}/sdr.conf" $ENV{HOME})
endif()
if(NOT EXISTS $ENV{HOME}/dw-start.sh)
configure_file("${CUSTOM_SCRIPTS_DIR}/dw-start.sh" $ENV{HOME})
endif()
if(NOT EXISTS $ENV{HOME}/telem-m0xer-3.txt)
configure_file("${CUSTOM_TELEMETRY_DIR}/telem-m0xer-3.txt" $ENV{HOME})
endif()
if(NOT EXISTS $ENV{HOME}/telem-balloon.conf)
configure_file("${CUSTOM_TELEMETRY_DIR}/telem-balloon.conf" $ENV{HOME})
endif()
if(NOT EXISTS $ENV{HOME}/telem-volts.conf)
configure_file("${CUSTOM_TELEMETRY_DIR}/telem-volts.conf" $ENV{HOME})
endif()

41
data/CMakeLists.txt Normal file
View File

@ -0,0 +1,41 @@
#
# Update: 1 May 2023 (still 1.7 dev version)
#
# The original intention was to allow an easy way to download the most
# recent versions of some files.
#
# "update-data" would only work once.
#
# These locations are no longer being maintained:
# http://www.aprs.org/aprs11/tocalls.txt -- 14 Dec 2021
# http://www.aprs.org/symbols/symbols-new.txt -- 17 Mar 2021
# http://www.aprs.org/symbols/symbolsX.txt -- 25 Nov 2015
# so there is no reason to provide a capability grab the latest version.
#
# Rather than fixing an obsolete capability, it will just be removed.
#
# The destination field is often used to identify the manufacturer/model.
# These are not hardcoded into Dire Wolf. Instead they are read from
# a file called tocalls.txt at application start up time.
#
# The original permanent symbols are built in but the "new" symbols,
# using overlays, are often updated. These are also read from files.
#
include(ExternalProject)
set(TOCALLS_TXT "tocalls.txt")
set(SYMBOLS-NEW_TXT "symbols-new.txt")
set(SYMBOLSX_TXT "symbolsX.txt")
set(CUSTOM_BINARY_DATA_DIR "${CMAKE_BINARY_DIR}/data")
# we can also move to a separate cmake file and use file(download)
# see conf/install_conf.cmake as example
file(COPY "${CUSTOM_DATA_DIR}/${TOCALLS_TXT}" DESTINATION "${CUSTOM_BINARY_DATA_DIR}")
file(COPY "${CUSTOM_DATA_DIR}/${SYMBOLS-NEW_TXT}" DESTINATION "${CUSTOM_BINARY_DATA_DIR}")
file(COPY "${CUSTOM_DATA_DIR}/${SYMBOLSX_TXT}" DESTINATION "${CUSTOM_BINARY_DATA_DIR}")
install(FILES "${CUSTOM_BINARY_DATA_DIR}/${TOCALLS_TXT}" DESTINATION ${INSTALL_DATA_DIR})
install(FILES "${CUSTOM_BINARY_DATA_DIR}/${SYMBOLS-NEW_TXT}" DESTINATION ${INSTALL_DATA_DIR})
install(FILES "${CUSTOM_BINARY_DATA_DIR}/${SYMBOLSX_TXT}" DESTINATION ${INSTALL_DATA_DIR})

View File

@ -1,11 +1,16 @@
APRS SYMBOL OVERLAY and EXTENSION TABLES in APRS 1.2 3 Apr 2017 APRS SYMBOL OVERLAY and EXTENSION TABLES in APRS 1.2 17 Mar 2021
--------------------------------------------------------------------- ------------------------------------------------------------------------
BACKGROUND: Since 1 October 2007, overlay characters (36 per symbol) BACKGROUND: Since October 2007, overlay characters (36/symbol) are
are allowed on all symbols. Since the master symbol document, allowed on all symbols. This allows thousands of uniquely specified
http://aprs.org/symbols/symbolsX.txt page only has one line per symbol symbols instead of the original 188 (94 primary and 94 alternate).
character this overlay list gives us thousands of new symbol codes. But the master symbol document, http://aprs.org/symbols/symbolsX.txt,
only has one line per symbol. So this added overlay list below gives
us thousands of new symbol codes.
17 Mar 21 Added L& for LORA Igate
24 Jun18: Updated CAR symbols
17 Jun18: Added several overlays for RAIL symbol
03 Apr17: Added Methane Hazard symbol "MH" 03 Apr17: Added Methane Hazard symbol "MH"
13 Feb17: Added Ez = Emergency Power (shelter), Cars: P> = Plugin 13 Feb17: Added Ez = Emergency Power (shelter), Cars: P> = Plugin
S> = Solar powered. Moved Ham club C- to Buildings Ch. S> = Solar powered. Moved Ham club C- to Buildings Ch.
@ -54,8 +59,8 @@ of unique overlay definitions:
\u - Overlay Trucks. "Tu" is a tanker. "Gu" is a gas truck, etc \u - Overlay Trucks. "Tu" is a tanker. "Gu" is a gas truck, etc
\< - Advisories may now have overlays \< - Advisories may now have overlays
\8 - Nodes with overlays. "G8" would be 802.11G \8 - Nodes with overlays. "G8" would be 802.11G
\[ - \[ is wall cloud, but overlays are humans. S[ is a skier. \[ - \[ was wall cloud, but overlays are humans. S[ is a skier.
\h - Buildings. \h is a Ham store, "Hh" is Home Depot, etc. \h - Was Ham store, Now Overlays are buildings "Hh" Home Depot, etc.
4 Oct 2007. ORIGINAL EXPANSION to OVERLAYS ON ALL SYMBOLS 4 Oct 2007. ORIGINAL EXPANSION to OVERLAYS ON ALL SYMBOLS
@ -94,8 +99,9 @@ small subset of alternate symbols. Those original overlayable
alternate symbols were labeled with a "#" and called "numbered" alternate symbols were labeled with a "#" and called "numbered"
symbols. (UIview requires "No." in the symbols.ini file) symbols. (UIview requires "No." in the symbols.ini file)
STATUS OF OVERLAYS 1 OCTOBER 2007: the APRS symbol set only had a STATUS OF OVERLAYS 1 OCTOBER 2007: the APRS symbol set was limited
few remaining unused symbol codes that had not yet been defined: to about 94 symbols and only had a few remaining unused symbol
codes that had not yet been defined:
OF THE 94 Primary Symbols. The following were available: OF THE 94 Primary Symbols. The following were available:
10 symbols (/0 - /9) that mostly look like billiard balls now 10 symbols (/0 - /9) that mostly look like billiard balls now
@ -107,7 +113,7 @@ OF THE 94 Alternate Symbols. The following were available:
8 series \1 through \8 that can support 36 overlays each 8 series \1 through \8 that can support 36 overlays each
3 reserved series. 3 reserved series.
ADDITIONAL OVERLAY PROPOSAL: But any of the other 79 alternate BASIS FOR OVERLAY EXPANSION: But any of the other 79 alternate
symbols could all have multiple (36) overlays if they can make sense symbols could all have multiple (36) overlays if they can make sense
with the existing underlying basic symbol that we have been using for with the existing underlying basic symbol that we have been using for
that basic alternate symbol. That is, any new definition of a that basic alternate symbol. That is, any new definition of a
@ -128,7 +134,7 @@ letting that define a new graphic just for that combination.
The following tables will attempt to keep track of these and The following tables will attempt to keep track of these and
any other useful generic applications of overlay characters. any other useful generic applications of overlay characters.
AMPLIFIED some existing ALTERNATE SYMBOL Overlays: (new Aug 2014) AMPLIFIED some existing ALTERNATE SYMBOL Overlays: (Aug 2014)
change Flooding #W to include Avalanche, Mudslide/Landslide change Flooding #W to include Avalanche, Mudslide/Landslide
Update #' name to crash & incident sites Update #' name to crash & incident sites
Update \D (was available) to DEPOT family Update \D (was available) to DEPOT family
@ -178,6 +184,7 @@ MO = Manned Balloon (2015)
TO = Teathered (2015) TO = Teathered (2015)
CO = Constant Pressure - Long duration (2015) CO = Constant Pressure - Long duration (2015)
RO = Rocket bearing Balloon (Rockoon) (2015) RO = Rocket bearing Balloon (Rockoon) (2015)
WO = World-round balloon (2018)
BOX SYMBOL: #A (and other system inputted symbols) BOX SYMBOL: #A (and other system inputted symbols)
/A = Aid station /A = Aid station
@ -197,21 +204,26 @@ BUILDINGS: #h
/h = Hospital /h = Hospital
\h = Ham Store ** <= now used for HAMFESTS \h = Ham Store ** <= now used for HAMFESTS
Ch = Club (ham radio) Ch = Club (ham radio)
Eh = Electronics Store
Fh = HamFest (new Aug 2014) Fh = HamFest (new Aug 2014)
Hh = Home Depot etc.. Hh = Hardware Store etc..
CARS: #> (Vehicles) CARS: #> (Vehicles)
/> = normal car (side view) /> = normal car (side view)
\> = Top view and symbol POINTS in direction of travel \> = Top view and symbol POINTS in direction of travel
#> = Reserve overlays 1-9 for numbered cars (new Aug 2014) #> = Reserve overlays 1-9 for numbered cars (new Aug 2014)
B> = Battery (was E for electric) 3> = Model 3 (Tesla)
B> = BEV - Battery EV(was E for electric)
D> = DIY - Do it yourself
E> = Ethanol (was electric) E> = Ethanol (was electric)
F> = Fuelcell or hydrogen F> = Fuelcell or hydrogen
H> = Homemade H> = Hybrid
P> = Plugin-hybrid L> = Leaf
P> = PHEV - Plugin-hybrid
S> = Solar powered S> = Solar powered
T> = Tesla (temporary) T> = Tesla (temporary)
V> = GM Volt (temporary) V> = Volt (temporary)
X> = Model X
CIVIL DEFENSE or TRIANGLE: #c CIVIL DEFENSE or TRIANGLE: #c
/c = Incident Command Post /c = Incident Command Post
@ -262,6 +274,7 @@ FE = (F overlay) Fog was \{
GATEWAYS: #& GATEWAYS: #&
/& = HF Gateway <= the original primary table definition /& = HF Gateway <= the original primary table definition
I& = Igate Generic (please use more specific overlay) I& = Igate Generic (please use more specific overlay)
L& - Lora Igate
R& = Receive only IGate (do not send msgs back to RF) R& = Receive only IGate (do not send msgs back to RF)
P& = PSKmail node P& = PSKmail node
T& = TX igate with path set to 1 hop only) T& = TX igate with path set to 1 hop only)
@ -332,19 +345,39 @@ I; = Islands on the air
S; = Summits on the air S; = Summits on the air
W; = WOTA W; = WOTA
POWER or ENERGY: #% POWER and ENERGY: #%
/% = DX cluster <= the original primary table definition /% = DX cluster <= the original primary table definition
C% = Coal C% = Coal
E% = Emergency (new Aug 2014) E% = Emergency (new Aug 2014)
G% = Geothermal G% = Gas Turbine
H% = Hydroelectric H% = Hydroelectric
N% = Nuclear N% = Nuclear
P% = Portable (new Aug 2014) P% = Portable (new Aug 2014)
R% = Renewable (hydrogen etc fuels) R% = Renewable (hydrogen etc fuels)
S% = Solar S% = Solar
T% = Turbine T% = Thermal (geo)
W% = Wind W% = Wind
RAIL Symbols: #=
/= = generic train (use steam engine shape for quick recognition)
\= = tbd (use same symbol for now)
B= = Bus-rail/trolley/streetcar/guiderail
C= = Commuter
D= = Diesel
E= = Electric
F= = Freight
G= = Gondola
H= = High Speed Rail (& Hyperloop?)
I= = Inclined Rail
L= = eLevated
M= = Monorail
P= = Passenger
S= = Steam
T= = Terminal (station)
U= = sUbway (& Hyperloop?)
X= = eXcursion
RESTAURANTS: #R RESTAURANTS: #R
\R = Restaurant (generic) \R = Restaurant (generic)
7R = 7/11 7R = 7/11

View File

@ -1,33 +1,40 @@
APRS TO-CALL VERSION NUMBERS 12 Dec 2017 <title>
------------------------------------------------------------------- APRS TO-CALL VERSION NUMBERS 14 Dec 2021
WB4APR ---------------------------------------------------------------------
12 Dec 17 Added APHWxx for use in "HamWAN WB4APR
11 Dec 17 Added APDVxx for OE6PLD's SSTV with APRS status exchange </title>
20 Nov 17 added APPICO DB1NTO' PicoAPRS <version_notes>
18 Oct 17 Added APBMxx BrandMeister DMR Server for R3ABM 07 Jun 23 Added APK005 for Kenwood TH-D75
25 Sep 17 added APP6xx for APRSlib 14 Dec 21 Added APATAR ATA-R APRS Digipeater by TA7W/OH2UDS and TA6AEU
05 Sep 17 Chged APTAxx to APTBxx for TinyAPRS by BG5HHP 26 Sep 21 Added APRRDZ EPS32 https://github.com/dl9rdz/rdz_ttgo_sonde
17 Aug 17 Added APOCSG for POCSAG - N0AGI's APRS to Pagers 18 Sep 21 Added APCSS for AMSAT Cubesat Simulator https://cubesatsim.org
21 Jun 17 Added APCSMS for Cosmos (used for sending commands @USNA 16 Sep 21 Added APY05D for Yaesu FT5D series
08 Jun 17 Added APPMxx for DL1MX's RTL-SDR pytohon Igate 04 Sep 21 APLOxx LoRa KISS TNC/Tracker https://github.com/SQ9MDD/TTGO-T-Beam-LoRa-APRS
01 Jun 17 added APOFF digi off on PSAT,PSAT2 24 Aug 21 Added APLSxx SARIMESH http://www.sarimesh.net
and APDTMF digi off mode on QIKCOM2 and DTMF ON 22 Aug 21 Added APE2Ax for VA3NNW's Email-2-APRS ap
and APRSON digi ON for PSAT 30 Jun 21 Added APCNxx for carNET by DG5OAW
and APDIGI digi ON for PSAT2 and QIKCOM-2 14 Jun 21 Added APN2xx for NOSaprs JNOS 2.0 - VE4KLM
and APSAT digi ON for QIKCOM-1 24 Apr 21 Added APMPAD for DF1JSL's WXBot clone and extension
20 Mar 17 added APTBxx for TinyAPRS by BG5HHP 20 Apr 21 Added APLCxx for APRScube by DL3DCW
06 Feb 17 added APIExx for W7KMV's PiAPRS system 19 Apr 21 Added APVMxx for DRCC-DVM Voice (Digital Radio China Club)
25 Jan 17 added APSFxx F5OPV embedded devices - was APZ40 13 Apr 21 Added APIxxx for all Dstar ICOMS (APRS via DPRS)
16 Dec 16 added APYSxx for W2GMD's Python APRS 23 MAr 20 Added APW9xx For 9A9Y Weather Tracker
14 Nov 16 Added APINxx for PinPoint by AB0WV 16 Feb 21 Added API970 for I com 9700
09 Nov 16 added APNICx for SQ5EKU http://sq5eku.blogspot.com/
24 Oct 16 added APTKPT TrackPoint N0LP, removed APZTKP 2020 Added APHBLx,APIZCI,APLGxx,APLTxx,APNVxx,APY300,APESPG,APESPW
24 Aug 16 added APK004 for Kenwood THD-74 APGDTx,APOSWx,APOSBx,APBT62,APCLUB,APMQxx
29 Apr 16 added APFPRS for FreeDV by Jeroen PE1RXQ 2019 Added APTPNx,APJ8xx,APBSDx,APNKMX,APAT51,APMGxx,APTCMA,
25 Feb 16 Added APCDS0 for Leon Lessing ZS6LMG's cell tracker APATxx,APQTHx,APLIGx
21 Jan 16 added APDNOx for APRSduino by DO3SWW 2018 added APRARX,APELKx,APGBLN,APBKxx,APERSx,APTCHE
In 2015 Added APSTPO,APAND1,APDRxx,APZ247,APHTxx,APMTxx,APZMAJ 2017 Added APHWxx,APDVxx,APPICO,APBMxx,APP6xx,APTAxx,APOCSG,APCSMS,
APB2MF,APR2MF,APAVT5 APPMxx,APOFF,APDTMF,APRSON,APDIGI,APSAT,APTBxx,APIExx,
APSFxx
2016 added APYSxx,APINxx,APNICx,APTKPT,APK004,APFPRS,APCDS0,APDNOx
2015 Added APSTPO,APAND1,APDRxx,APZ247,APHTxx,APMTxx,APZMAJ
APB2MF,APR2MF,APAVT5
</version_notes>
<description>
In APRS, the AX.25 Destination address is not used for packet In APRS, the AX.25 Destination address is not used for packet
routing as is normally done in AX.25. So APRS uses it for two routing as is normally done in AX.25. So APRS uses it for two
@ -38,6 +45,13 @@ bytes of the field are available to indicate the software version
number or application. The following applications have requested number or application. The following applications have requested
a TOCALL number series: a TOCALL number series:
Authors with similar alphabetic requirements are encouraged to share
their address space with other software. Work out agreements amongst
yourselves and keep me informed.
</description>
<tocalls>
APn 3rd digit is a number APn 3rd digit is a number
AP1WWX TAPR T-238+ WX station AP1WWX TAPR T-238+ WX station
AP1MAJ Martyn M1MAJ DeLorme inReach Tracker AP1MAJ Martyn M1MAJ DeLorme inReach Tracker
@ -52,21 +66,30 @@ a TOCALL number series:
APAHxx AHub APAHxx AHub
APAND1 APRSdroid (pre-release) http://aprsdroid.org/ APAND1 APRSdroid (pre-release) http://aprsdroid.org/
APAMxx Altus Metrum GPS trackers APAMxx Altus Metrum GPS trackers
APATAR ATA-R APRS Digipeater by TA7W/OH2UDS and TA6AEU
APAT8x for Anytone. 81 for 878 HT
APAT51 for Anytone AT-D578UV APRS mobile radio
APAVT5 SainSonic AP510 which is a 1watt tracker APAVT5 SainSonic AP510 which is a 1watt tracker
APAWxx AGWPE APAWxx AGWPE
APB APBxxx Beacons or Rabbit TCPIP micros? APB APBxxx Beacons or Rabbit TCPIP micros?
APB2MF DL2MF - MF2APRS Radiosonde for balloons APB2MF DL2MF - MF2APRS Radiosonde for balloons
APBLxx BigRedBee BeeLine APBLxx BigRedBee BeeLine
APBLO MOdel Rocketry K7RKT APBLO MOdel Rocketry K7RKT
APBKxx PY5BK Bravo Tracker in Brazil
APBPQx John G8BPQ Digipeater/IGate APBPQx John G8BPQ Digipeater/IGate
APBMxx BrandMeister DMR Server for R3ABM APBMxx BrandMeister DMR Server for R3ABM
APBSDx HamBSD https://hambsd.org/
APBT62 BTech DMR 6x2
APC APCxxx Cellular applications APC APCxxx Cellular applications
APCBBx VE7UDP Blackberry Applications APCBBx VE7UDP Blackberry Applications
APCDS0 Leon Lessing ZS6LMG's cell tracker APCDS0 Leon Lessing ZS6LMG's cell tracker
APCLEY EYTraker GPRS/GSM tracker by ZS6EY APCLEY EYTraker GPRS/GSM tracker by ZS6EY
APCLWX EYWeather GPRS/GSM WX station by ZS6EY
APCLEZ Telit EZ10 GSM application ZS6CEY APCLEZ Telit EZ10 GSM application ZS6CEY
APCLUB Brazil APRS network
APCLWX EYWeather GPRS/GSM WX station by ZS6EY
APCNxx for carNET by DG5OAW
APCSMS for Cosmos (used for sending commands @USNA) APCSMS for Cosmos (used for sending commands @USNA)
APCSS for AMSAT cubesats https://cubesatsim.org
APCWP8 John GM7HHB, WinphoneAPRS APCWP8 John GM7HHB, WinphoneAPRS
APCYxx Cybiko applications APCYxx Cybiko applications
APD APD4xx UP4DAR platform APD APD4xx UP4DAR platform
@ -89,23 +112,44 @@ a TOCALL number series:
APDVxx OE6PLD's SSTV with APRS status exchange APDVxx OE6PLD's SSTV with APRS status exchange
APDWxx DireWolf, WB2OSZ APDWxx DireWolf, WB2OSZ
APE APExxx Telemetry devices APE APExxx Telemetry devices
APE2Ax VA3NNW's Email-2-APRS ap
APECAN Pecan Pico APRS Balloon Tracker APECAN Pecan Pico APRS Balloon Tracker
APELKx WB8ELK balloons
APERXQ Experimental tracker by PE1RXQ APERXQ Experimental tracker by PE1RXQ
APERSx Runner tracking by Jason,KG7YKZ
APESPG ESP SmartBeacon APRS-IS Client
APESPW ESP Weather Station APRS-IS Client
APF APFxxx Firenet APF APFxxx Firenet
APFGxx Flood Gage (KP4DJT) APFGxx Flood Gage (KP4DJT)
APFIxx for APRS.FI OH7LZB, Hessu APFIxx for APRS.FI OH7LZB, Hessu
APFPRS for FreeDV by Jeroen PE1RXQ APFPRS for FreeDV by Jeroen PE1RXQ
APG APGxxx Gates, etc APG APGxxx Gates, etc
APGOxx for AA3NJ PDA application APGOxx for AA3NJ PDA application
APGBLN for NW5W's GoBalloon
APGDTx for VK4FAST's Graphic Data Terminal
APH APHKxx for LA1BR tracker/digipeater APH APHKxx for LA1BR tracker/digipeater
APHAXn SM2APRS by PY2UEP APHAXn SM2APRS by PY2UEP
APHBLx for DMR Gateway by Eric - KF7EEL
APHTxx HMTracker by IU0AAC APHTxx HMTracker by IU0AAC
APHWxx for use in "HamWAN APHWxx for use in "HamWAN
API APICQx for ICQ API API282 for ICOM IC-2820
API31 for ICOM ID-31
API410 for ICOM ID-4100
API51 for ICOM ID-51
API510 for ICOM ID-5100
API710 for ICOM IC-7100
API80 for ICOM IC-80
API880 for ICOM ID-880
API910 for ICOM IC-9100
API92 for ICOM IC-92
API970 for ICOM 9700
APICQx for ICQ
APICxx HA9MCQ's Pic IGate APICxx HA9MCQ's Pic IGate
APIExx W7KMV's PiAPRS system APIExx W7KMV's PiAPRS system
APINxx PinPoint by AB0WV APINxx PinPoint by AB0WV
APJ APJAxx JavAPRS APIZCI hymTR IZCI Tracker by TA7W/OH2UDS and TA6AEU
APJ APJ8xx Jordan / KN4CRD JS8Call application
APJAxx JavAPRS
APJExx JeAPRS APJExx JeAPRS
APJIxx jAPRSIgate APJIxx jAPRSIgate
APJSxx javAPRSSrvr APJSxx javAPRSSrvr
@ -113,16 +157,26 @@ a TOCALL number series:
APK APK0xx Kenwood TH-D7's APK APK0xx Kenwood TH-D7's
APK003 Kenwood TH-D72 APK003 Kenwood TH-D72
APK004 Kenwood TH-D74 APK004 Kenwood TH-D74
APK005 Kenwood TH-D75
APK1xx Kenwood D700's APK1xx Kenwood D700's
APK102 Kenwood D710 APK102 Kenwood D710
APKRAM KRAMstuff.com - Mark. G7LEU APKRAM KRAMstuff.com - Mark. G7LEU
APL APLQRU Charlie - QRU Server APL APLCxx APRScube by DL3DCW
APLGxx LoRa Gateway/Digipeater OE5BPA
APLIGx LightAPRS - TA2MUN and TA9OHC
APLOxx LoRa KISS TNC/Tracker
APLQRU Charlie - QRU Server
APLMxx WA0TQG transceiver controller APLMxx WA0TQG transceiver controller
APLSxx SARIMESH ( http://www.sarimesh.net )
APLTxx LoRa Tracker - OE5BPA
APM APMxxx MacAPRS, APM APMxxx MacAPRS,
APMGxx MiniGate - Alex, AB0TJ APMGxx PiCrumbs and MiniGate - Alex, AB0TJ
APMIxx SQ3PLX http://microsat.com.pl/ APMIxx SQ3PLX http://microsat.com.pl/
APMPAD DF1JSL's WXBot clone and extension
APMQxx Ham Radio of Things WB2OSZ
APMTxx LZ1PPL for tracker APMTxx LZ1PPL for tracker
APN APNxxx Network nodes, digis, etc APN APNxxx Network nodes, digis, etc
APN2xx NOSaprs for JNOS 2.0 - VE4KLM
APN3xx Kantronics KPC-3 rom versions APN3xx Kantronics KPC-3 rom versions
APN9xx Kantronics KPC-9612 Roms APN9xx Kantronics KPC-9612 Roms
APNAxx WB6ZSU's APRServe APNAxx WB6ZSU's APRServe
@ -131,10 +185,12 @@ a TOCALL number series:
APNK01 Kenwood D700 (APK101) type APNK01 Kenwood D700 (APK101) type
APNK80 KAM version 8.0 APNK80 KAM version 8.0
APNKMP KAM+ APNKMP KAM+
APNKMX KAM-XL
APNMxx MJF TNC roms APNMxx MJF TNC roms
APNPxx Paccom TNC roms APNPxx Paccom TNC roms
APNTxx SV2AGW's TNT tnc as a digi APNTxx SV2AGW's TNT tnc as a digi
APNUxx UIdigi APNUxx UIdigi
APNVxx SQ8L's VP digi and Nodes
APNXxx TNC-X (K6DBG) APNXxx TNC-X (K6DBG)
APNWxx SQ3FYK.com WX/Digi and SQ3PLX http://microsat.com.pl/ APNWxx SQ3FYK.com WX/Digi and SQ3PLX http://microsat.com.pl/
APO APRSpoint APO APRSpoint
@ -142,8 +198,10 @@ a TOCALL number series:
APOLUx for OSCAR satellites for AMSAT-LU by LU9DO APOLUx for OSCAR satellites for AMSAT-LU by LU9DO
APOAxx OpenAPRS - Greg Carter APOAxx OpenAPRS - Greg Carter
APOCSG For N0AGI's APRS to POCSAG project APOCSG For N0AGI's APRS to POCSAG project
APOTxx Open Track
APOD1w Open Track with 1 wire WX APOD1w Open Track with 1 wire WX
APOSBx openSPOT3 by HA2NON at sharkrf.com
APOSWx openSPOT2
APOTxx Open Track
APOU2k Open Track for Ultimeter APOU2k Open Track for Ultimeter
APOZxx www.KissOZ.dk Tracker. OZ1EKD and OZ7HVO APOZxx www.KissOZ.dk Tracker. OZ1EKD and OZ7HVO
APP APP6xx for APRSlib APP APP6xx for APRSlib
@ -151,8 +209,10 @@ a TOCALL number series:
APPMxx DL1MX's RTL-SDR pytohon Igate APPMxx DL1MX's RTL-SDR pytohon Igate
APPTxx KetaiTracker by JF6LZE, Takeki (msg capable) APPTxx KetaiTracker by JF6LZE, Takeki (msg capable)
APQ APQxxx Earthquake data APQ APQxxx Earthquake data
APQTHx W8WJB's QTH.app
APR APR8xx APRSdos versions 800+ APR APR8xx APRSdos versions 800+
APR2MF DL2MF - MF2APRS Radiosonde WX reporting APR2MF DL2MF - MF2APRS Radiosonde WX reporting
APRARX VK5QI's radiosonde tracking
APRDxx APRSdata, APRSdr APRDxx APRSdata, APRSdr
APRGxx aprsg igate software, OH2GVE APRGxx aprsg igate software, OH2GVE
APRHH2 HamHud 2 APRHH2 HamHud 2
@ -180,8 +240,11 @@ a TOCALL number series:
APT3xx Tiny Track III APT3xx Tiny Track III
APTAxx K4ATM's tiny track APTAxx K4ATM's tiny track
APTBxx TinyAPRS by BG5HHP Was APTAxx till Sep 2017 APTBxx TinyAPRS by BG5HHP Was APTAxx till Sep 2017
APTCHE PU3IKE in Brazil TcheTracker/Tcheduino
APTCMA CAPI tracker - PU1CMA Brazil
APTIGR TigerTrack APTIGR TigerTrack
APTKPT TrackPoint N0LP APTKPT TrackPoint N0LP
APTPNx TARPN Packet Node Tracker by KN4ORB http://tarpn.net/
APTTxx Tiny Track APTTxx Tiny Track
APTWxx Byons WXTrac APTWxx Byons WXTrac
APTVxx for ATV/APRN and SSTV applications APTVxx for ATV/APRN and SSTV applications
@ -190,38 +253,47 @@ a TOCALL number series:
APU3xx UIview terminal program APU3xx UIview terminal program
APUDRx NW Digital Radio's UDR (APRS/Dstar) APUDRx NW Digital Radio's UDR (APRS/Dstar)
APV APVxxx Voice over Internet applications APV APVxxx Voice over Internet applications
APVMxx DRCC-DVM Digital Voice (Digital Radio China Club)
APVRxx for IRLP APVRxx for IRLP
APVLxx for I-LINK APVLxx for I-LINK
APVExx for ECHO link APVExx for ECHO link
APW APWxxx WinAPRS, etc APW APWxxx WinAPRS, etc
APW9xx 9A9Y Weather Tracker
APWAxx APRSISCE Android version APWAxx APRSISCE Android version
APWSxx DF4IAN's WS2300 WX station APWSxx DF4IAN's WS2300 WX station
APWMxx APRSISCE KJ4ERJ APWMxx APRSISCE KJ4ERJ
APWWxx APRSISCE win32 version APWWxx APRSISCE win32 version
APX APXnnn Xastir APX APXnnn Xastir
APXRnn Xrouter APXRnn Xrouter
APY APYxxx Yeasu APY APYxxx Yaesu Radios
APY008 Yaesu VX-8 series APY008 Yaesu VX-8 series
APY350 Yaesu FTM-350 series APY01D Yaesu FT1D series
APYTxx for YagTracker APY02D Yaesu FT2D series
APYSxx for W2GMD's Python APRS APY03D Yaesu FT3D series
APY05D Yaesu FT5D series
APY100 Yaesu FTM-100D series
APY300 Yaesu FTM-300D series
APY350 Yaesu FTM-350 series
APY400 Yaesu FTM-400D series
APZ APZxxx Experimental APZ APZxxx Experimental
APZ200 old versions of JNOS
APZ247 for UPRS NR0Q APZ247 for UPRS NR0Q
APZ0xx Xastir (old versions. See APX) APZ0xx Xastir (old versions. See APX)
APZMAJ Martyn M1MAJ DeLorme inReach Tracker APZMAJ Martyn M1MAJ DeLorme inReach Tracker
APZMDM github/codec2_talkie - product code not registered
APZMDR for HaMDR trackers - hessu * hes.iki.fi] APZMDR for HaMDR trackers - hessu * hes.iki.fi]
APZPAD Smart Palm APZPAD Smart Palm
APZTKP TrackPoint, Nick N0LP (Balloon tracking)(depricated) APZTKP TrackPoint, Nick N0LP (Balloon tracking)(depricated)
APZWIT MAP27 radio (Mountain Rescue) EI7IG APZWIT MAP27 radio (Mountain Rescue) EI7IG
APZWKR GM1WKR NetSked application APZWKR GM1WKR NetSked application
</tocalls>
<notes>
Authors with similar alphabetic requirements are encouraged to share </notes>
their address space with other software. Work out agreements amongst <altnets>
yourselves and keep me informed.
REGISTERED TOCALL ALTNETS:
REGISTERED ALTNETS: --------------------------
-------------------
ALTNETS are uses of the AX-25 tocall to distinguish specialized ALTNETS are uses of the AX-25 tocall to distinguish specialized
traffic that may be flowing on the APRS-IS, but that are not intended traffic that may be flowing on the APRS-IS, but that are not intended
@ -244,9 +316,11 @@ The following is a list of ALTNETS that may be of interest to other
users. This list is by no means complete, since ANY combination of users. This list is by no means complete, since ANY combination of
characters other than APxxxx are considered an ALTNET. But this list characters other than APxxxx are considered an ALTNET. But this list
can give consisntecy to ALTNETS that may be using the global APRS-IS can give consisntecy to ALTNETS that may be using the global APRS-IS
and need some special recognition: and need some special recognition. Here are some ideas:
</altnets>
<altnet_list>
TEST - A generic ALTNET for use during testing SATERN - Salvation Army Altnet
PSKAPR - PSKmail . But it is not AX.25 anyway AFMARS - Airforce Mars
AMARS - Army Mars
de WB4APR, Bob </altnet_list>

5
debian/README.Debian vendored Normal file
View File

@ -0,0 +1,5 @@
In order to start direwolf as a service the configuration file
/etc/direwolf.conf needs to exist. Otherwise attempting to start the service
returns an 'Assertion failed' error. An example configuration file which may be
used as a model can be found in
/usr/share/doc/direwolf/examples/direwolf.conf.gz

1
debian/changelog vendored Symbolic link
View File

@ -0,0 +1 @@
../CHANGES.md

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
10

30
debian/control vendored Normal file
View File

@ -0,0 +1,30 @@
Source: direwolf
Maintainer: Debian Hamradio Maintainers <debian-hams@lists.debian.org>
Uploaders: Iain R. Learmonth <irl@debian.org>
Section: hamradio
Priority: optional
Build-Depends: debhelper (>= 9),
libasound2-dev,
libgps-dev,
libhamlib-dev,
dh-systemd
Standards-Version: 4.1.0
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-hamradio/direwolf.git/
Vcs-Git: https://anonscm.debian.org/git/pkg-hamradio/direwolf.git
Homepage: https://github.com/wb2osz/direwolf
Package: direwolf
Architecture: alpha amd64 arm64 armel armhf i386 mipsel ppc64el sh4 x32
Depends: ${shlibs:Depends},
${misc:Depends},
adduser,
libhamlib2
Suggests: gpsd, libhamlib-utils
Breaks: direwolf-docs (<< 1.1-1)
Replaces: direwolf-docs (<< 1.1-1)
Description: Soundcard TNC for APRS
Dire Wolf is a software "soundcard" modem/TNC and APRS encoder/decoder. It can
be used stand-alone to receive APRS messages, as a digipeater, APRStt gateway,
or Internet Gateway (IGate). It can also be used as a virtual TNC for other
applications such as APRSIS32, UI-View32, Xastir, APRS-TW, YAAC, UISS, Linux
AX25, SARTrack, and many others.

176
debian/copyright vendored Normal file
View File

@ -0,0 +1,176 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: direwolf
Files-Excluded: doc/*.pdf
Source: https://github.com/wb2osz/direwolf
Comment:
The files in misc/ are copied directly from the Cygwin source code. These are
listed here as dual licensed as they are both part of the Cygwin distribution
and originally part of BSD. See misc/README-dire-wolf.txt for more information.
.
Please see ftp-master's comments on this here:
https://lists.debian.org/debian-hams/2014/09/msg00063.html
https://lists.debian.org/debian-hams/2014/10/msg00003.html
Files: *
Copyright: (C) 2011-2014 John Langner WB2OSZ
License: GPL-2+
Files: geotranz/*
Copyright: National Geospatial-Intelligence Agency
License: Permissive-NGA
Files: regex/*
Copyright: (C) 2002, 2003, 2005 Free Software Foundation, Inc.
License: LGPL-2.1+
Files: misc/strcasestr.c
Copyright:
(C) 1990, 1993 The Regents of the University of California
(C) RedHat
License: BSD-4-clause or GPL-2+
Files: misc/strtok_r.c misc/strsep.c
Copyright:
(C) 1988 Regents of the University of California
(C) RedHat
License: BSD-3-clause or GPL-2+
Files: debian/*
Copyright: (C) 2014 Iain R. Learmonth <irl@fsfe.org>
License: GPL-2+
License: BSD-3-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
.
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
License: BSD-4-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
.
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by the University of
California, Berkeley and its contributors.
.
4. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
License: GPL-2+
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
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, a copy of the full license text is available in
/usr/share/common-licenses/GPL-2.
License: LGPL-2.1+
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
.
On Debian systems, a copy of the full license text is available in
/usr/share/common-licenses/LGPL-2.1.
License: Permissive-NGA
1. The GEOTRANS source code ("the software") is provided free of charge by the
National Geospatial-Intelligence Agency (NGA) of the United States Department
of Defense. Although NGA makes no copyright claim under Title 17 U.S.C., NGA
claims copyrights in the source code under other legal regimes. NGA hereby
grants to each user of the software a license to use and distribute the
software, and develop derivative works.
.
2. NGA requests that products developed using the software credit the source of
the software with the following statement, "The product was developed using
GEOTRANS, a product of the National Geospatial-Intelligence Agency (NGA) and
U.S. Army Engineering Research and Development Center." Do not use the name
GEOTRANS for any derived work.
.
3. Warranty Disclaimer: The software was developed to meet only the internal
requirements of the National Geospatial-Intelligence Agency (NGA). The software
is provided "as is," and no warranty, express or implied, including but not
limited to the implied warranties of merchantability and fitness for particular
purpose or arising by statute or otherwise in law or from a course of dealing
or usage in trade, is made by NGA as to the accuracy and functioning of the
software.
.
4. NGA and its personnel are not required to provide technical support or
general assistance with respect to public use of the software. Government
customers may contact NGA.
.
5. Neither NGA nor its personnel will be liable for any claims, losses, or
damages arising from or connected with the use of the software. The user agrees
to hold harmless the United States National Geospatial-Intelligence Agency
(NGA). The user's sole and exclusive remedy is to stop using the software.
.
6. Please be advised that pursuant to the United States Code, 10 U.S.C. 425,
the name of the National Geospatial-Intelligence Agency, the initials "NGA",
the seal of the National Geospatial-Intelligence Agency, or any colorable
imitation thereof shall not be used to imply approval, endorsement, or
authorization of a product without prior written permission from United States
Secretary of Defense. Do not create the impression that NGA, the Secretary of
Defense or the Director of National Intelligence has endorsed any product
derived from GEOTRANS.

33
debian/direwolf.postinst vendored Normal file
View File

@ -0,0 +1,33 @@
#!/bin/sh
set -e
. /usr/share/debconf/confmodule
add_group_if_missing() {
if ! getent group direwolf >/dev/null; then
addgroup --system --force-badname direwolf || true
fi
}
add_user_if_missing() {
if ! id -u direwolf > /dev/null 2>&1; then
mkdir -m 02750 -p /var/lib/direwolf
adduser --system --home /var/lib/direwolf \
--disabled-password \
--force-badname direwolf \
--ingroup direwolf
adduser direwolf dialout
chown direwolf:direwolf /var/lib/direwolf
fi
}
add_group_if_missing
add_user_if_missing
db_stop
#DEBHELPER#
exit 0

19
debian/direwolf.postrm vendored Normal file
View File

@ -0,0 +1,19 @@
#!/bin/sh
set -e
case "$1" in
purge)
rm -rf /var/lib/direwolf/
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
esac
#DEBHELPER#
exit 0

7
debian/rules vendored Normal file
View File

@ -0,0 +1,7 @@
#!/usr/bin/make -f
%:
dh $@ --parallel
override_dh_auto_configure:
dh_auto_configure -- -DFORCE_SSE=1

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +0,0 @@
/* demod_psk.h */
void demod_psk_init (enum modem_t modem_type, int samples_per_sec, int bps, char profile, struct demodulator_state_s *D);
void demod_psk_process_sample (int chan, int subchan, int sam, struct demodulator_state_s *D);

View File

@ -1,103 +0,0 @@
#%global git_commit b2548ec58f44f4b651626757a166b9f4f18d8000
%global git_commit 37179479caf0bf36adf8c9bc0fde641884edaeac
%global git_date 20171216
%global git_short_commit %(echo %{git_commit} | cut -c -8)
%global git_suffix %{git_date}git%{git_short_commit}
Name: direwolf
Version: 1.5Beta
Release: 1.%{git_suffix}%{?dist}
Summary: Soundcard based AX.25 TNC
Group: Applications/Communications
License: GPLv2
URL: https://github.com/wb2osz/direwolf
#Source0: https://github.com/wb2osz/direwolf/archive/%{name}-%{version}.tar.gz
Source: %{name}-%{version}-%{git_suffix}.tgz
Packager: David Ranch (KI6ZHD) <dranch@trinnet.net>
Distribution: RedHat Linux
Patch0: direwolf-1.5-makefile.patch
BuildRequires: automake
BuildRequires: alsa-lib-devel
#If the gpsd and gpsd-devel packages are installed, Direwolf will add gps support
%description
Dire Wolf is a software "soundcard" modem/TNC and APRS encoder/decoder. It can
be used stand-alone to receive APRS messages, as a digipeater, APRStt gateway,
or Internet Gateway (IGate). It can also be used as a virtual TNC for other
applications such as APRSIS32, UI-View32, Xastir, APRS-TW, YAAC, UISS,
Linux AX25, SARTrack, RMS Express, and many others.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p0
%build
make -f Makefile.linux
#make -f Makefile.linux tocalls-symbols
make %{?_smp_mflags}
%install
make install INSTALLDIR=$RPM_BUILD_ROOT/usr
make install-conf INSTALLDIR=$RPM_BUILD_ROOT/usr
# Install icon
mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/direwolf/
cp dw-icon.png ${RPM_BUILD_ROOT}%{_datadir}/pixmaps/direwolf/
mv symbols-new.txt ${RPM_BUILD_ROOT}%{_docdir}/%{name}/
mv symbolsX.txt ${RPM_BUILD_ROOT}%{_docdir}/%{name}/
mv tocalls.txt ${RPM_BUILD_ROOT}%{_docdir}/%{name}/
desktop-file-install \
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications direwolf.desktop
#temp bug
#non echo "fixing $RPM_BUILD_ROOT/%{_bindir}/bin"
#non rm -f $RPM_BUILD_ROOT/usr/bin
%files
%{_sysconfdir}/ax25/direwolf.conf
%{_sysconfdir}/ax25/sdr.conf
%{_sysconfdir}/ax25/telemetry-toolkit/telem-balloon.conf
%{_sysconfdir}/ax25/telemetry-toolkit/telem-m0xer-3.txt
%{_sysconfdir}/ax25/telemetry-toolkit/telem-volts.conf
%{_sysconfdir}/udev/rules.d/99-direwolf-cmedia.rules
%{_bindir}/*
%{_datadir}/pixmaps/direwolf/dw-icon.png
%{_datadir}/applications/%{name}.desktop
%{_datadir}/direwolf/*
%{_docdir}/*
%{_mandir}/man1/*
%changelog
* Sat Dec 16 2017 David Ranch <dranch@trinnet.net> - 1.5-1
- New 1.5-Beta version from Git
* Sun Apr 2 2017 David Ranch <dranch@trinnet.net> - 1.4-1
- New 1.4-Beta1 version from Git
* Sun Mar 5 2017 David Ranch <dranch@trinnet.net> - 1.4-1
- New 1.4-H Alpha version from Git version
* Fri Aug 26 2016 David Ranch <dranch@trinnet.net> - 1.4-1
- New version
* Fri May 06 2016 David Ranch <dranch@trinnet.net> - 1.3-1
- New version
* Sat Sep 12 2015 David Ranch <dranch@trinnet.net> - 1.3F-1
- New version with new features
* Sun May 10 2015 David Ranch <dranch@trinnet.net> - 1.2E-1
- New version that supports a PASSALL function
- Updated the Makefile.linux patch
* Sat Mar 21 2015 David Ranch <dranch@trinnet.net> - 1.2C-1
- changed to support different make installation variable
* Sat Feb 14 2015 David Ranch <dranch@trinnet.net> - 1.2b-1
- new spec file
* Sat Dec 20 2014 David Ranch <dranch@trinnet.net> - 1.1b1-1
- new spec file

View File

@ -1,536 +0,0 @@
C#############################################################
C# #
C# Configuration file for Dire Wolf #
C# #
L# Linux version #
W# Windows version #
C# #
C#############################################################
R
R
R The sample config file was getting pretty messy
R with the Windows and Linux differences.
R It would be a maintenance burden to keep most of
R two different versions in sync.
R This common source is now used to generate the
R two different variations while having only a single
R copy of the common parts.
R
R The first column contains one of the following:
R
R R remark which is discarded.
R C common to both versions.
R W Windows version only.
R L Linux version only.
R
C#
C# Consult the User Guide for more details on configuration options.
C#
C#
C# These are the most likely settings you might change:
C#
C# (1) MYCALL - call sign and SSID for your station.
C#
C# Look for lines starting with MYCALL and
C# change NOCALL to your own.
C#
C# (2) PBEACON - enable position beaconing.
C#
C# Look for lines starting with PBEACON and
C# modify for your call, location, etc.
C#
C# (3) DIGIPEATER - configure digipeating rules.
C#
C# Look for lines starting with DIGIPEATER.
C# Most people will probably use the given example.
C# Just remove the "#" from the start of the line
C# to enable it.
C#
C# (4) IGSERVER, IGLOGIN - IGate server and login
C#
C# Configure an IGate client to relay messages between
C# radio and internet servers.
C#
C#
C# The default location is "direwolf.conf" in the current working directory.
L# On Linux, the user's home directory will also be searched.
C# An alternate configuration file location can be specified with the "-c" command line option.
C#
C# As you probably guessed by now, # indicates a comment line.
C#
C# Remove the # at the beginning of a line if you want to use a sample
C# configuration that is currently commented out.
C#
C# Commands are a keyword followed by parameters.
C#
C# Command key words are case insensitive. i.e. upper and lower case are equivalent.
C#
C# Command parameters are generally case sensitive. i.e. upper and lower case are different.
C#
C
C
C#############################################################
C# #
C# FIRST AUDIO DEVICE PROPERTIES #
C# (Channel 0 + 1 if in stereo) #
C# #
C#############################################################
C
C#
C# Many people will simply use the default sound device.
C# Some might want to use an alternative device by chosing it here.
C#
W# When the Windows version starts up, it displays something like
W# this with the available sound devices and capabilities:
W#
W# Available audio input devices for receive (*=selected):
W# * 0: Microphone (C-Media USB Headpho (channel 2)
W# 1: Microphone (Bluetooth SCO Audio
W# 2: Microphone (Bluetooth AV Audio)
W# * 3: Microphone (Realtek High Defini (channels 0 & 1)
W# Available audio output devices for transmit (*=selected):
W# * 0: Speakers (C-Media USB Headphone (channel 2)
W# 1: Speakers (Bluetooth SCO Audio)
W# 2: Realtek Digital Output(Optical)
W# 3: Speakers (Bluetooth AV Audio)
W# * 4: Speakers (Realtek High Definiti (channels 0 & 1)
W# 5: Realtek Digital Output (Realtek
W#
W# Example: To use the microphone and speaker connections on the
W# system board, either of these forms can be used:
W
W#ADEVICE High
W#ADEVICE 3 4
W
W
W# Example: To use the USB Audio, use a command like this with
W# the input and output device numbers. (Remove the # comment character.)
W#ADEVICE USB
W
W# The position in the list can change when devices (e.g. USB) are added and removed.
W# You can also specify devices by using part of the name.
W# Here is an example of specifying the USB Audio device.
W# This is case-sensitive. Upper and lower case are not treated the same.
W
W#ADEVICE USB
W
W
L# Linux ALSA is complicated. See User Guide for discussion.
L# To use something other than the default, generally use plughw
L# and a card number reported by "arecord -l" command. Example:
L
L# ADEVICE plughw:1,0
L
L# Starting with version 1.0, you can also use "-" or "stdin" to
L# pipe stdout from some other application such as a software defined
L# radio. You can also specify "UDP:" and an optional port for input.
L# Something different must be specified for output.
L
W# ADEVICE - 0
W# ADEVICE UDP:7355 0
L# ADEVICE - plughw:1,0
L# ADEVICE UDP:7355 default
L
L
C
C#
C# Number of audio channels for this souncard: 1 or 2.
C#
C
CACHANNELS 1
C#ACHANNELS 2
C
C
C#############################################################
C# #
C# SECOND AUDIO DEVICE PROPERTIES #
C# (Channel 2 + 3 if in stereo) #
C# #
C#############################################################
C
C#ADEVICE1 ...
C
C
C#############################################################
C# #
C# THIRD AUDIO DEVICE PROPERTIES #
C# (Channel 4 + 5 if in stereo) #
C# #
C#############################################################
C
C#ADEVICE2 ...
C
C
C#############################################################
C# #
C# CHANNEL 0 PROPERTIES #
C# #
C#############################################################
C
CCHANNEL 0
C
C#
C# The following MYCALL, MODEM, PTT, etc. configuration items
C# apply to the most recent CHANNEL.
C#
C
C#
C# Station identifier for this channel.
C# Multiple channels can have the same or different names.
C#
C# It can be up to 6 letters and digits with an optional ssid.
C# The APRS specification requires that it be upper case.
C#
C# Example (don't use this unless you are me): MYCALL WB2OSZ-5
C#
C
CMYCALL N0CALL
C
C#
C# Pick a suitable modem speed based on your situation.
C# 1200 Most common for VHF/UHF. Default if not specified.
C# 300 Low speed for HF SSB.
C# 9600 High speed - Can't use Microphone and Speaker connections.
C#
C# In the simplest form, just specify the speed.
C#
C
CMODEM 1200
C#MODEM 300
C#MODEM 9600
C
C#
C# These are the defaults should be fine for most cases. In special situations,
C# you might want to specify different AFSK tones or the baseband mode which does
C# not use AFSK.
C#
C#MODEM 1200 1200:2200
C#MODEM 300 1600:1800
C#MODEM 9600 0:0
C#
C#
C# On HF SSB, you might want to use multiple demodulators on slightly different
C# frequencies to compensate for stations off frequency. Here we have 7 different
C# demodulators at 30 Hz intervals. This takes a lot of CPU power so you will
C# probably need to reduce the audio sampling rate with the /n option.
C
C#MODEM 300 1600:1800 7@30 /4
C
C
C#
C# Uncomment line below to enable the DTMF decoder for this channel.
C#
C
C#DTMF
C
C#
C# If not using a VOX circuit, the transmitter Push to Talk (PTT)
C# control is usually wired to a serial port with a suitable interface circuit.
C# DON'T connect it directly!
C#
C# For the PTT command, specify the device and either RTS or DTR.
C# RTS or DTR may be preceded by "-" to invert the signal.
C# Both can be used for interfaces that want them driven with opposite polarity.
C#
L# COM1 can be used instead of /dev/ttyS0, COM2 for /dev/ttyS1, and so on.
L#
C
C#PTT COM1 RTS
C#PTT COM1 RTS -DTR
L#PTT /dev/ttyUSB0 RTS
C
L#
L# On Linux, you can also use general purpose I/O pins if
L# your system is configured for user access to them.
L# This would apply mostly to microprocessor boards, not a regular PC.
L# See separate Raspberry Pi document for more details.
L# The number may be preceded by "-" to invert the signal.
L#
L
L#PTT GPIO 25
L
C# The Data Carrier Detect (DCD) signal can be sent to the same places
C# as the PTT signal. This could be used to light up an LED like a normal TNC.
C
C#DCD COM1 -DTR
L#DCD GPIO 24
C
C
C#############################################################
C# #
C# CHANNEL 1 PROPERTIES #
C# #
C#############################################################
C
C#CHANNEL 1
C
C#
C# Specify MYCALL, MODEM, PTT, etc. configuration items for
C# CHANNEL 1. Repeat for any other channels.
C
C
C#############################################################
C# #
C# TEXT TO SPEECH COMMAND FILE #
C# #
C#############################################################
C
W#SPEECH dwespeak.bat
L#SPEECH dwespeak.sh
C
C
C#############################################################
C# #
C# VIRTUAL TNC SERVER PROPERTIES #
C# #
C#############################################################
C
C#
C# Dire Wolf acts as a virtual TNC and can communicate with
C# client applications by different protocols:
C#
C# - the "AGW TCPIP Socket Interface" - default port 8000
C# - KISS protocol over TCP socket - default port 8001
W# - KISS TNC via serial port
L# - KISS TNC via pseudo terminal (-p command line option)
C#
C
CAGWPORT 8000
CKISSPORT 8001
C
W#
W# Some applications are designed to operate with only a physical
W# TNC attached to a serial port. For these, we provide a virtual serial
W# port that appears to be connected to a TNC.
W#
W# Take a look at the User Guide for instructions to set up
W# two virtual serial ports named COM3 and COM4 connected by
W# a null modem.
W#
W# Using the configuration described, Dire Wolf will connect to
W# COM3 and the client application will use COM4.
W#
W# Uncomment following line to use this feature.
W
W#SERIALKISS COM3
W
W
C#
C# It is sometimes possible to recover frames with a bad FCS.
C# This applies to all channels.
C#
C# 0 [NONE] - Don't try to repair.
C# 1 [SINGLE] - Attempt to fix single bit error. (default)
C# 2 [DOUBLE] - Also attempt to fix two adjacent bits.
C# ... see User Guide for more values and in-depth discussion.
C#
C
C#FIX_BITS 0
C
C#
C#############################################################
C# #
C# BEACONING PROPERTIES #
C# #
C#############################################################
C
C
C#
C# Beaconing is configured with these two commands:
C#
C# PBEACON - for a position report (usually yourself)
C# OBEACON - for an object report (usually some other entity)
C#
C# Each has a series of keywords and values for options.
C# See User Guide for details.
C#
C# Example:
C#
C# This results in a broadcast once every 10 minutes.
C# Every half hour, it can travel via two digipeater hops.
C# The others are kept local.
C#
C
C#PBEACON delay=1 every=30 overlay=S symbol="digi" lat=42^37.14N long=071^20.83W power=50 height=20 gain=4 comment="Chelmsford MA" via=WIDE1-1,WIDE2-1
C#PBEACON delay=11 every=30 overlay=S symbol="digi" lat=42^37.14N long=071^20.83W power=50 height=20 gain=4 comment="Chelmsford MA"
C#PBEACON delay=21 every=30 overlay=S symbol="digi" lat=42^37.14N long=071^20.83W power=50 height=20 gain=4 comment="Chelmsford MA"
C
C
C# With UTM coordinates instead of latitude and longitude.
C
C#PBEACON delay=1 every=10 overlay=S symbol="digi" zone=19T easting=307477 northing=4720178
C
C
C#
C# When the destination field is set to "SPEECH" the information part is
C# converted to speech rather than transmitted as a data frame.
C#
C
C#CBEACON dest="SPEECH" info="Club meeting tonight at 7 pm."
C
C
C#
C# Modify for your particular situation before removing
C# the # comment character from the beginning of appropriate lines above.
C#
C
C
C#############################################################
C# #
C# DIGIPEATER PROPERTIES #
C# #
C#############################################################
C
C#
C# For most common situations, use something like this by removing
C# the "#" from the beginning of the line below.
C#
C
C#DIGIPEAT 0 0 ^WIDE[3-7]-[1-7]$|^TEST$ ^WIDE[12]-[12]$ TRACE
C
C# See User Guide for more explanation of what this means and how
C# it can be customized for your particular needs.
C
C# Filtering can be used to limit was is digipeated.
C# For example, only weather weather reports, received on channel 0,
C# will be retransmitted on channel 1.
C#
C
C#FILTER 0 1 t/wn
C
C
C#############################################################
C# #
C# INTERNET GATEWAY #
C# #
C#############################################################
C
C# First you need to specify the name of a Tier 2 server.
C# The current preferred way is to use one of these regional rotate addresses:
C
C# noam.aprs2.net - for North America
C# soam.aprs2.net - for South America
C# euro.aprs2.net - for Europe and Africa
C# asia.aprs2.net - for Asia
C# aunz.aprs2.net - for Oceania
C
C#IGSERVER noam.aprs2.net
C
C# You also need to specify your login name and passcode.
C# Contact the author if you can't figure out how to generate the passcode.
C
C#IGLOGIN WB2OSZ-5 123456
C
C# That's all you need for a receive only IGate which relays
C# messages from the local radio channel to the global servers.
C
C# Some might want to send an IGate client position directly to a server
C# without sending it over the air and relying on someone else to
C# forward it to an IGate server. This is done by using sendto=IG rather
C# than a radio channel number. Overlay R for receive only, T for two way.
C
C#PBEACON sendto=IG delay=0:30 every=60:00 symbol="igate" overlay=R lat=42^37.14N long=071^20.83W
C#PBEACON sendto=IG delay=0:30 every=60:00 symbol="igate" overlay=T lat=42^37.14N long=071^20.83W
C
C
C# To relay messages from the Internet to radio, you need to add
C# one more options with the transmit channel number and a VIA path.
C
C#IGTXVIA 0 WIDE1-1
C
C# The APRS Internet Server (APRS-IS) has its own idea about what you
C# should be transmitting. This includes "messages" addressed to stations
C# recently heard in your area. For special situations, you can subscribe
C# to
C# decrease what you are already subscribed to. This is known as a server
C# side filter. Read here: http://www.aprs-is.net/javaprsfilter.aspx
C# Example, positions and objects within 50 km of my location:
C
C#IGFILTER m/50
C
C# Sometimes the server will send you more than you want. You can also apply
C# local filtering to limit what will be transmitted on the RF side.
C# For example, transmit only "messages" (which is the default) on channel 0
C# and weather reports on channel 1.
C
C#FILTER IG 0 i/30
C#FILTER IG 1 t/wn
C
C# Finally, we don't want to flood the radio channel.
C# The IGate function will limit the number of packets transmitted
C# during 1 minute and 5 minute intervals. If a limit would
C# be exceeded, the packet is dropped and message is displayed in red.
C
CIGTXLIMIT 6 10
C
C
C#############################################################
C# #
C# APRStt GATEWAY #
C# #
C#############################################################
C
C#
C# Dire Wolf can receive DTMF (commonly known as Touch Tone)
C# messages and convert them to packet objects.
C#
C# See separate "APRStt-Implementation-Notes" document for details.
C#
C
C#
C# Sample gateway configuration based on:
C#
C# http://www.aprs.org/aprstt/aprstt-coding24.txt
C# http://www.aprs.org/aprs-jamboree-2013.html
C#
C
C# Define specific points.
C
CTTPOINT B01 37^55.37N 81^7.86W
CTTPOINT B7495088 42.605237 -71.34456
CTTPOINT B934 42.605237 -71.34456
C
CTTPOINT B901 42.661279 -71.364452
CTTPOINT B902 42.660411 -71.364419
CTTPOINT B903 42.659046 -71.364452
CTTPOINT B904 42.657578 -71.364602
C
C
C# For location at given bearing and distance from starting point.
C
CTTVECTOR B5bbbddd 37^55.37N 81^7.86W 0.01 mi
C
C# For location specified by x, y coordinates.
C
CTTGRID Byyyxxx 37^50.00N 81^00.00W 37^59.99N 81^09.99W
C
C# UTM location for Lowell-Dracut-Tyngsborough State Forest.
C
CTTUTM B6xxxyyy 19T 10 300000 4720000
C
C
C
C# Location for the corral.
C
CTTCORRAL 37^55.50N 81^7.00W 0^0.02N
C
C# Compact messages - Fixed locations xx and object yyy where
C# Object numbers 100 - 199 = bicycle
C# Object numbers 200 - 299 = fire truck
C# Others = dog
C
CTTMACRO xx1yy B9xx*AB166*AA2B4C5B3B0A1yy
CTTMACRO xx2yy B9xx*AB170*AA3C4C7C3B0A2yy
CTTMACRO xxyyy B9xx*AB180*AA3A6C4A0Ayyy
C
CTTMACRO z Cz
C
C# Receive on channel 0, Transmit object reports on channel 1 with optional via path.
C
C#TTOBJ 0 1 WIDE1-1
C
C# Advertise gateway position with beacon.
C
C# OBEACON DELAY=0:15 EVERY=10:00 VIA=WIDE1-1 OBJNAME=WB2OSZ-tt SYMBOL=APRStt LAT=42^37.14N LONG=71^20.83W COMMENT="APRStt Gateway"
C
C

BIN
doc/AIS-Reception.pdf Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

21
doc/CMakeLists.txt Normal file
View File

@ -0,0 +1,21 @@
install(FILES "${CUSTOM_DOC_DIR}/README.md" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/2400-4800-PSK-for-APRS-Packet-Radio.pdf" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/AIS-Reception.pdf" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/APRS-Telemetry-Toolkit.pdf" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/APRStt-Implementation-Notes.pdf" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/APRStt-interface-for-SARTrack.pdf" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/APRStt-Listening-Example.pdf" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/AX25_plus_FEC_equals_FX25.pdf" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/Bluetooth-KISS-TNC.pdf" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/Going-beyond-9600-baud.pdf" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/Raspberry-Pi-APRS.pdf" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/Raspberry-Pi-APRS-Tracker.pdf" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/Raspberry-Pi-SDR-IGate.pdf" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/Successful-APRS-IGate-Operation.pdf" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/User-Guide.pdf" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/WA8LMF-TNC-Test-CD-Results.pdf" DESTINATION ${INSTALL_DOC_DIR})
install(FILES "${CUSTOM_DOC_DIR}/Why-is-9600-only-twice-as-fast-as-1200.pdf" DESTINATION ${INSTALL_DOC_DIR})

View File

@ -2,13 +2,20 @@
Click on the document name to view in your web browser or the link following to download the PDF file. Click on the document name to view in your web browser or the link following to download the PDF file.
## Slide Show ##
Brief summary of packet radio / APRS history and the capbilities of Dire Wolf.
[Power Point presentation](https://github.com/wb2osz/direwolf-presentation) -- Why not give a talk at a local club meeting?
## Essential Reading ## ## Essential Reading ##
- [**User Guide**](User-Guide.pdf) [ [*download*](../../../raw/dev/doc/User-Guide.pdf) ] - [**User Guide**](User-Guide.pdf) [ [*download*](../../../raw/master/doc/User-Guide.pdf) ]
This is your primary source of information about installation, operation, and configuration. This is your primary source of information about installation, operation, and configuration.
- [**Raspberry Pi APRS**](Raspberry-Pi-APRS.pdf) [ [*download*](../../../raw/dev/doc/Raspberry-Pi-APRS.pdf) ] - [**Raspberry Pi APRS**](Raspberry-Pi-APRS.pdf) [ [*download*](../../../raw/master/doc/Raspberry-Pi-APRS.pdf) ]
The Raspberry Pi has some special considerations that The Raspberry Pi has some special considerations that
make it different from other generic Linux systems. make it different from other generic Linux systems.
@ -19,40 +26,60 @@ Click on the document name to view in your web browser or the link following to
These dive into more detail for specialized topics or typical usage scenarios. These dive into more detail for specialized topics or typical usage scenarios.
- [**AX.25 + FEC = FX.25**](AX25_plus_FEC_equals_FX25.pdf) [ [*download*](../../../raw/dev/doc/AX25_plus_FEC_equals_FX25.pdf) ]
What can you do if your radio signal isnt quite strong enough to get through reliably? Move to higher ground? Get a better antenna? More power? Use very narrow bandwidth and very slow data?
Sometimes those are not options. Another way to improve communication reliability is to add redundant information so the message will still get through even if small parts are missing. FX.25 adds forward error correction (FEC) which maintaining complete compatibility with older equipment.
- [**AX.25 Throughput: Why is 9600 bps Packet Radio only twice as fast as 1200?**](Why-is-9600-only-twice-as-fast-as-1200.pdf) [ [*download*](../../../raw/dev/doc/Why-is-9600-only-twice-as-fast-as-1200.pdf) ]
Simply switching to a higher data rate will probably result in great disappointment. You might expect it to be 8 times faster but it can turn out to be only twice as fast.
In this document, we look at why a large increase in data bit rate can produce a much smaller increase in throughput. We will explore techniques that can be used to make large improvements and drastically speed up large data transfer.
- [**Successful APRS IGate Operation**](Successful-APRS-IGate-Operation.pdf) [ [*download*](../../../raw/dev/doc/Successful-APRS-IGate-Operation.pdf) ] - [**Successful APRS IGate Operation**](Successful-APRS-IGate-Operation.pdf) [ [*download*](../../../raw/dev/doc/Successful-APRS-IGate-Operation.pdf) ]
Dire Wolf can serve as a gateway between the APRS radio network and APRS-IS servers on the Internet. Dire Wolf can serve as a gateway between the APRS radio network and APRS-IS servers on the Internet.
This explains how it all works, proper configuration, and troubleshooting. This explains how it all works, proper configuration, and troubleshooting.
- [**Bluetooth KISS TNC**](Bluetooth-KISS-TNC.pdf) [ [*download*](../../../raw/dev/doc/Bluetooth-KISS-TNC.pdf) ] - [**Bluetooth KISS TNC**](Bluetooth-KISS-TNC.pdf) [ [*download*](../../../raw/master/doc/Bluetooth-KISS-TNC.pdf) ]
Eliminate the cable between your TNC and application. Use Bluetooth instead. Eliminate the cable between your TNC and application. Use Bluetooth instead.
- [**APRStt Implementation Notes**](APRStt-Implementation-Notes.pdf) [ [*download*](../../../raw/dev/doc/APRStt-Implementation-Notes.pdf) ] - [**APRStt Implementation Notes**](APRStt-Implementation-Notes.pdf) [ [*download*](../../../raw/master/doc/APRStt-Implementation-Notes.pdf) ]
Very few hams have portable equipment for APRS but nearly everyone has a handheld radio that can send DTMF tones. APRStt allows a user, equipped with only DTMF (commonly known as Touch Tone) generation capability, to enter information into the global APRS data network. Very few hams have portable equipment for APRS but nearly everyone has a handheld radio that can send DTMF tones. APRStt allows a user, equipped with only DTMF (commonly known as Touch Tone) generation capability, to enter information into the global APRS data network.
This document explains how the APRStt concept was implemented in the Dire Wolf application. This document explains how the APRStt concept was implemented in the Dire Wolf application.
- [**APRStt Interface for SARTrack**](APRStt-interface-for-SARTrack.pdf) [ [*download*](../../../raw/dev/doc/APRStt-interface-for-SARTrack.pdf) ]
- [**APRStt Interface for SARTrack**](APRStt-interface-for-SARTrack.pdf) [ [*download*](../../../raw/master/doc/APRStt-interface-for-SARTrack.pdf) ]
This example illustrates how APRStt can be integrated with other applications such as SARTrack, APRSISCE/32, YAAC, or Xastir. This example illustrates how APRStt can be integrated with other applications such as SARTrack, APRSISCE/32, YAAC, or Xastir.
- [**APRStt Listening Example**](APRStt-Listening-Example.pdf) [ [*download*](../../../raw/dev/doc/APRStt-Listening-Example.pdf) ] - [**APRStt Listening Example**](APRStt-Listening-Example.pdf) [ [*download*](../../../raw/master/doc/APRStt-Listening-Example.pdf) ]
WB4APR described a useful application for the [QIKCOM-2 Satallite Transponder](http://www.tapr.org/pipermail/aprssig/2015-November/045035.html). WB4APR described a useful application for the [QIKCOM-2 Satallite Transponder](http://www.tapr.org/pipermail/aprssig/2015-November/045035.html).
Dont have your own QIKCOM-2 Satellite Transponder? No Problem. You can do the same thing with an ordinary computer and the APRStt gateway built into Dire Wolf. Heres how. Dont have your own QIKCOM-2 Satellite Transponder? No Problem. You can do the same thing with an ordinary computer and the APRStt gateway built into Dire Wolf. Heres how.
- [**Raspberry Pi APRS Tracker**](Raspberry-Pi-APRS-Tracker.pdf) [ [*download*](../../../raw/dev/doc/Raspberry-Pi-APRS-Tracker.pdf) ] - [**Raspberry Pi APRS Tracker**](Raspberry-Pi-APRS-Tracker.pdf) [ [*download*](../../../raw/master/doc/Raspberry-Pi-APRS-Tracker.pdf) ]
Build a tracking device which transmits position from a GPS receiver. Build a tracking device which transmits position from a GPS receiver.
- [**Raspberry Pi SDR IGate**](Raspberry-Pi-SDR-IGate.pdf) [ [*download*](../../../raw/dev/doc/Raspberry-Pi-SDR-IGate.pdf) ] - [**Raspberry Pi SDR IGate**](Raspberry-Pi-SDR-IGate.pdf) [ [*download*](../../../raw/master/doc/Raspberry-Pi-SDR-IGate.pdf) ]
It's easy to build a receive-only APRS Internet Gateway (IGate) with only a Raspberry Pi and a software defined radio (RTL-SDR) dongle. Heres how. It's easy to build a receive-only APRS Internet Gateway (IGate) with only a Raspberry Pi and a software defined radio (RTL-SDR) dongle. Heres how.
- [**APRS Telemetry Toolkit**](APRS-Telemetry-Toolkit.pdf) [ [*download*](../../../raw/dev/doc/APRS-Telemetry-Toolkit.pdf) ] - [**APRS Telemetry Toolkit**](APRS-Telemetry-Toolkit.pdf) [ [*download*](../../../raw/master/doc/APRS-Telemetry-Toolkit.pdf) ]
Describes scripts and methods to generate telemetry. Describes scripts and methods to generate telemetry.
Includes a complete example of attaching an analog to Includes a complete example of attaching an analog to
@ -61,21 +88,41 @@ These dive into more detail for specialized topics or typical usage scenarios.
- [**2400 & 4800 bps PSK for APRS / Packet Radio**](2400-4800-PSK-for-APRS-Packet-Radio.pdf) [ [*download*](../../../raw/dev/doc/2400-4800-PSK-for-APRS-Packet-Radio.pdf) ] - [**2400 & 4800 bps PSK for APRS / Packet Radio**](2400-4800-PSK-for-APRS-Packet-Radio.pdf) [ [*download*](../../../raw/master/doc/2400-4800-PSK-for-APRS-Packet-Radio.pdf) ]
Double or quadruple your data rate by sending multiple bits at the same time. Double or quadruple your data rate by sending multiple bits at the same time.
- [**Going beyond 9600 baud**](Going-beyond-9600-baud.pdf) [ [*download*](../../../raw/dev/doc/Going-beyond-9600-baud.pdf) ] - [**Going beyond 9600 baud**](Going-beyond-9600-baud.pdf) [ [*download*](../../../raw/master/doc/Going-beyond-9600-baud.pdf) ]
Why stop at 9600 baud? Go faster if your soundcard and radio can handle it. Why stop at 9600 baud? Go faster if your soundcard and radio can handle it.
- [**AIS Reception**](AIS-Reception.pdf) [ [*download*](../../../raw/dev/doc/AIS-Reception.pdf) ]
AIS is an international tracking system for ships. Messages can contain position, speed, course, name, destination, status, vessel dimensions, and many other types of information. Learn how to receive these signals with an ordindary ham transceiver and display the ship locations with APRS applications or [OpenCPN](https://opencpn.org).
- **[EAS to APRS message converter](https://github.com/wb2osz/eas2aprs)**
The [U.S. National Weather Service](https://www.weather.gov/nwr/) (NWS) operates more than 1,000 VHF FM radio stations that continuously transmit weather information. These stations also transmit special warnings about severe weather, disasters (natural & manmade), and public safety.
Alerts are sent in a digital form known as Emergency Alert System (EAS) Specific Area Message Encoding (SAME). [You can hear a sample here](https://en.wikipedia.org/wiki/Specific_Area_Message_Encoding).
It is possible to buy radios that decode these messages but what fun is that? We are ham radio operators so we want to build our own from stuff that we already have sitting around.
## Miscellaneous ## ## Miscellaneous ##
- **[Ham Radio of Things (HRoT)](https://github.com/wb2osz/hrot)**
- [**A Better APRS Packet Demodulator, part 1, 1200 baud**](A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf) [ [*download*](../../../raw/dev/doc/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf) ]
Now that billions of computers and mobile phones (which are handheld computers) are all connected by the Internet, the large growth is expected from the “Internet of Things.” What is a “thing?” It could be a temperature sensor, garage door opener, motion detector, flood water level, smoke alarm, antenna rotator, coffee maker, lights, home thermostat, …, just about anything you might want to monitor or control.
There have been other occasional mentions of merging Ham Radio with the Internet of Things but only ad hoc incompatible narrowly focused applications. Here is a proposal for a standardized more flexible method so different systems can communicate with each other.
- [**A Better APRS Packet Demodulator, part 1, 1200 baud**](A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf) [ [*download*](../../../raw/master/doc/A-Better-APRS-Packet-Demodulator-Part-1-1200-baud.pdf) ]
Sometimes it's a little mystifying why an Sometimes it's a little mystifying why an
APRS / AX.25 Packet TNC will decode some signals APRS / AX.25 Packet TNC will decode some signals
@ -87,7 +134,7 @@ and a couple things that can be done about it.
- [**A Better APRS Packet Demodulator, part 2, 9600 baud**](A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf) [ [*download*](../../../raw/dev/doc/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf) ] - [**A Better APRS Packet Demodulator, part 2, 9600 baud**](A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf) [ [*download*](../../../raw/master/doc/A-Better-APRS-Packet-Demodulator-Part-2-9600-baud.pdf) ]
In the first part of this series we discussed 1200 baud audio frequency shift keying (AFSK). The mismatch In the first part of this series we discussed 1200 baud audio frequency shift keying (AFSK). The mismatch
between FM transmitter pre-emphasis and the between FM transmitter pre-emphasis and the
@ -96,26 +143,34 @@ and a couple things that can be done about it.
This makes it more difficult to demodulate them accurately. This makes it more difficult to demodulate them accurately.
9600 baud operation is an entirely different animal. ... 9600 baud operation is an entirely different animal. ...
- [**WA8LMF TNC Test CD Results a.k.a. Battle of the TNCs**](WA8LMF-TNC-Test-CD-Results.pdf) [ [*download*](../../../raw/dev/doc/WA8LMF-TNC-Test-CD-Results.pdf) ] - [**WA8LMF TNC Test CD Results a.k.a. Battle of the TNCs**](WA8LMF-TNC-Test-CD-Results.pdf) [ [*download*](../../../raw/master/doc/WA8LMF-TNC-Test-CD-Results.pdf) ]
How can we compare how well the TNCs perform under real world conditions? How can we compare how well the TNCs perform under real world conditions?
The de facto standard of measurement is the number of packets decoded from [WA8LMFs TNC Test CD](http://wa8lmf.net/TNCtest/index.htm). The de facto standard of measurement is the number of packets decoded from [WA8LMFs TNC Test CD](http://wa8lmf.net/TNCtest/index.htm).
Many have published the number of packets they have been able to decode from this test. Here they are, all gathered in one place, for your reading pleasure. Many have published the number of packets they have been able to decode from this test. Here they are, all gathered in one place, for your reading pleasure.
- [**A Closer Look at the WA8LMF TNC Test CD**](A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf) [ [*download*](../../../raw/dev/doc/A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf) ] - [**A Closer Look at the WA8LMF TNC Test CD**](A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf) [ [*download*](../../../raw/master/doc/A-Closer-Look-at-the-WA8LMF-TNC-Test-CD.pdf) ]
Here, we take a closer look at some of the frames on the TNC Test CD in hopes of gaining some insights into why some are easily decoded and others are more difficult. Here, we take a closer look at some of the frames on the TNC Test CD in hopes of gaining some insights into why some are easily decoded and others are more difficult.
There are a lot of ugly signals out there. Many can be improved by decreasing the transmit volume. Others are just plain weird and you have to wonder how they are being generated. There are a lot of ugly signals out there. Many can be improved by decreasing the transmit volume. Others are just plain weird and you have to wonder how they are being generated.
## Additional Documentation for Dire Wolf Software TNC #
When there was little documentation, it was all added to the source code repository [https://github.com/wb2osz/direwolf/tree/master/doc](https://github.com/wb2osz/direwolf/tree/master/doc)
The growing number of documentation files and revisions are making the source code repository very large which means long download times. Additional documentation, not tied to a specific release, is now being added to [https://github.com/wb2osz/direwolf-doc](https://github.com/wb2osz/direwolf-doc)
## Questions? Experiences to share? ## ## Questions? Experiences to share? ##
Here are some good places to ask questions and share your experiences: Here are some good places to ask questions and share your experiences:
- [Dire Wolf packet TNC](https://groups.yahoo.com/neo/groups/direwolf_packet/info) - [Dire Wolf Software TNC](https://groups.io/g/direwolf)
- [Raspberry Pi 4 Ham Radio](https://groups.yahoo.com/neo/groups/Raspberry_Pi_4-Ham_RADIO/info) - [Raspberry Pi 4 Ham Radio](https://groups.io/g/RaspberryPi-4-HamRadio)
- [linuxham](https://groups.yahoo.com/neo/groups/linuxham/info) - [linuxham](https://groups.io/g/linuxham)
- [TAPR aprssig](http://www.tapr.org/pipermail/aprssig/) - [TAPR aprssig](http://www.tapr.org/pipermail/aprssig/)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

10
dsp.h
View File

@ -1,10 +0,0 @@
/* dsp.h */
// TODO: put prefixes on these names.
float window (bp_window_t type, int size, int j);
void gen_lowpass (float fc, float *lp_filter, int filter_size, bp_window_t wtype);
void gen_bandpass (float f1, float f2, float *bp_filter, int filter_size, bp_window_t wtype);

View File

@ -1,9 +0,0 @@
extern double dtime_now (void);
void timestamp_now (char *result, int result_size, int show_ms);
void timestamp_user_format (char *result, int result_size, char *user_format);
void timestamp_filename (char *result, int result_size);

View File

@ -1 +0,0 @@
MAINICON ICON "dw-icon.ico"

17
external/geotranz/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,17 @@
# UTM, USNG, MGRS conversions
set(GEOTRANZ_LIBRARIES geotranz CACHE INTERNAL "geotranz")
list(APPEND geotranz_SOURCES
error_string.c
mgrs.c
polarst.c
tranmerc.c
ups.c
usng.c
utm.c
)
add_library(geotranz STATIC
${geotranz_SOURCES}
)

View File

@ -400,7 +400,7 @@ long Make_MGRS_String (char* MGRS,
if (Zone) if (Zone)
i = sprintf (MGRS+i,"%2.2ld",Zone); i = sprintf (MGRS+i,"%2.2ld",Zone);
else else
strncpy(MGRS, " ", 2); // 2 spaces strcpy(MGRS, " "); // 2 spaces - Should i be set to 2?
for (j=0;j<3;j++) for (j=0;j<3;j++)
MGRS[i++] = alphabet[Letters[j]]; MGRS[i++] = alphabet[Letters[j]];

View File

@ -236,7 +236,7 @@ extern "C" {
* The function Convert_MGRS_To_UPS converts an MGRS coordinate string * The function Convert_MGRS_To_UPS converts an MGRS coordinate string
* to UPS (hemisphere, easting, and northing) coordinates, according * to UPS (hemisphere, easting, and northing) coordinates, according
* to the current ellipsoid parameters. If any errors occur, the error * to the current ellipsoid parameters. If any errors occur, the error
* code(s) are returned by the function, otherwide UPS_NO_ERROR is returned. * code(s) are returned by the function, otherwise UPS_NO_ERROR is returned.
* *
* MGRS : MGRS coordinate string (input) * MGRS : MGRS coordinate string (input)
* Hemisphere : Hemisphere either 'N' or 'S' (output) * Hemisphere : Hemisphere either 'N' or 'S' (output)

View File

@ -367,7 +367,7 @@ long Make_USNG_String (char* USNG,
if (Zone) if (Zone)
i = sprintf (USNG+i,"%2.2ld",Zone); i = sprintf (USNG+i,"%2.2ld",Zone);
else else
strncpy(USNG, " ", 2); // 2 spaces strcpy(USNG, " "); // 2 spaces - Should i be set to 2?
for (j=0;j<3;j++) for (j=0;j<3;j++)
USNG[i++] = alphabet[Letters[j]]; USNG[i++] = alphabet[Letters[j]];

21
external/hidapi/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,21 @@
set(HIDAPI_LIBRARIES "" CACHE INTERNAL "")
if(WIN32 OR CYGWIN) # windows
set(HIDAPI_LIBRARIES hidapi CACHE INTERNAL "hidapi")
list(APPEND hidapi_SOURCES
# Functions for accessing HID devices on Windows.
# These were copied from https://github.com/libusb/hidapi
${CUSTOM_HIDAPI_DIR}/hid.c
)
add_library(hidapi STATIC
${hidapi_SOURCES}
)
set_target_properties(hidapi
PROPERTIES COMPILE_FLAGS "-Dbool=int -Dtrue=1 -Dfalse=0 -DUSE_HIDAPI_STATIC"
)
endif()

26
external/hidapi/LICENSE-bsd.txt vendored Normal file
View File

@ -0,0 +1,26 @@
Copyright (c) 2010, Alan Ott, Signal 11 Software
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of Signal 11 Software nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

674
external/hidapi/LICENSE-gpl3.txt vendored Normal file
View File

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

9
external/hidapi/LICENSE-orig.txt vendored Normal file
View File

@ -0,0 +1,9 @@
HIDAPI - Multi-Platform library for
communication with HID devices.
Copyright 2009, Alan Ott, Signal 11 Software.
All Rights Reserved.
This software may be used by anyone for any reason so
long as the copyright notice in the source files
remains intact.

13
external/hidapi/LICENSE.txt vendored Normal file
View File

@ -0,0 +1,13 @@
HIDAPI can be used under one of three licenses.
1. The GNU General Public License, version 3.0, in LICENSE-gpl3.txt
2. A BSD-Style License, in LICENSE-bsd.txt.
3. The more liberal original HIDAPI license. LICENSE-orig.txt
The license chosen is at the discretion of the user of HIDAPI. For example:
1. An author of GPL software would likely use HIDAPI under the terms of the
GPL.
2. An author of commercial closed-source software would likely use HIDAPI
under the terms of the BSD-style license or the original HIDAPI license.

1
external/hidapi/README.md vendored Normal file
View File

@ -0,0 +1 @@
This is from https://github.com/libusb/hidapi

1091
external/hidapi/hid.c vendored Normal file

File diff suppressed because it is too large Load Diff

498
external/hidapi/hidapi.h vendored Normal file
View File

@ -0,0 +1,498 @@
/*******************************************************
HIDAPI - Multi-Platform library for
communication with HID devices.
Alan Ott
Signal 11 Software
8/22/2009
Copyright 2009, All Rights Reserved.
At the discretion of the user of this library,
this software may be licensed under the terms of the
GNU General Public License v3, a BSD-Style license, or the
original HIDAPI license as outlined in the LICENSE.txt,
LICENSE-gpl3.txt, LICENSE-bsd.txt, and LICENSE-orig.txt
files located at the root of the source distribution.
These files may also be found in the public source
code repository located at:
https://github.com/libusb/hidapi .
********************************************************/
/** @file
* @defgroup API hidapi API
*/
#ifndef HIDAPI_H__
#define HIDAPI_H__
#include <wchar.h>
#ifdef _WIN32
#define HID_API_EXPORT __declspec(dllexport)
#define HID_API_CALL
#else
#define HID_API_EXPORT /**< API export macro */
#define HID_API_CALL /**< API call macro */
#endif
#define HID_API_EXPORT_CALL HID_API_EXPORT HID_API_CALL /**< API export and call macro*/
/** @brief Static/compile-time major version of the library.
@ingroup API
*/
#define HID_API_VERSION_MAJOR 0
/** @brief Static/compile-time minor version of the library.
@ingroup API
*/
#define HID_API_VERSION_MINOR 10
/** @brief Static/compile-time patch version of the library.
@ingroup API
*/
#define HID_API_VERSION_PATCH 1
/* Helper macros */
#define HID_API_AS_STR_IMPL(x) #x
#define HID_API_AS_STR(x) HID_API_AS_STR_IMPL(x)
#define HID_API_TO_VERSION_STR(v1, v2, v3) HID_API_AS_STR(v1.v2.v3)
/** @brief Static/compile-time string version of the library.
@ingroup API
*/
#define HID_API_VERSION_STR HID_API_TO_VERSION_STR(HID_API_VERSION_MAJOR, HID_API_VERSION_MINOR, HID_API_VERSION_PATCH)
#ifdef __cplusplus
extern "C" {
#endif
struct hid_api_version {
int major;
int minor;
int patch;
};
struct hid_device_;
typedef struct hid_device_ hid_device; /**< opaque hidapi structure */
/** hidapi info structure */
struct hid_device_info {
/** Platform-specific device path */
char *path;
/** Device Vendor ID */
unsigned short vendor_id;
/** Device Product ID */
unsigned short product_id;
/** Serial Number */
wchar_t *serial_number;
/** Device Release Number in binary-coded decimal,
also known as Device Version Number */
unsigned short release_number;
/** Manufacturer String */
wchar_t *manufacturer_string;
/** Product string */
wchar_t *product_string;
/** Usage Page for this Device/Interface
(Windows/Mac/hidraw only) */
unsigned short usage_page;
/** Usage for this Device/Interface
(Windows/Mac/hidraw only) */
unsigned short usage;
/** The USB interface which this logical device
represents.
* Valid on both Linux implementations in all cases.
* Valid on the Windows implementation only if the device
contains more than one interface.
* Valid on the Mac implementation if and only if the device
is a USB HID device. */
int interface_number;
/** Pointer to the next device */
struct hid_device_info *next;
};
/** @brief Initialize the HIDAPI library.
This function initializes the HIDAPI library. Calling it is not
strictly necessary, as it will be called automatically by
hid_enumerate() and any of the hid_open_*() functions if it is
needed. This function should be called at the beginning of
execution however, if there is a chance of HIDAPI handles
being opened by different threads simultaneously.
@ingroup API
@returns
This function returns 0 on success and -1 on error.
*/
int HID_API_EXPORT HID_API_CALL hid_init(void);
/** @brief Finalize the HIDAPI library.
This function frees all of the static data associated with
HIDAPI. It should be called at the end of execution to avoid
memory leaks.
@ingroup API
@returns
This function returns 0 on success and -1 on error.
*/
int HID_API_EXPORT HID_API_CALL hid_exit(void);
/** @brief Enumerate the HID Devices.
This function returns a linked list of all the HID devices
attached to the system which match vendor_id and product_id.
If @p vendor_id is set to 0 then any vendor matches.
If @p product_id is set to 0 then any product matches.
If @p vendor_id and @p product_id are both set to 0, then
all HID devices will be returned.
@ingroup API
@param vendor_id The Vendor ID (VID) of the types of device
to open.
@param product_id The Product ID (PID) of the types of
device to open.
@returns
This function returns a pointer to a linked list of type
struct #hid_device_info, containing information about the HID devices
attached to the system, or NULL in the case of failure. Free
this linked list by calling hid_free_enumeration().
*/
struct hid_device_info HID_API_EXPORT * HID_API_CALL hid_enumerate(unsigned short vendor_id, unsigned short product_id);
/** @brief Free an enumeration Linked List
This function frees a linked list created by hid_enumerate().
@ingroup API
@param devs Pointer to a list of struct_device returned from
hid_enumerate().
*/
void HID_API_EXPORT HID_API_CALL hid_free_enumeration(struct hid_device_info *devs);
/** @brief Open a HID device using a Vendor ID (VID), Product ID
(PID) and optionally a serial number.
If @p serial_number is NULL, the first device with the
specified VID and PID is opened.
This function sets the return value of hid_error().
@ingroup API
@param vendor_id The Vendor ID (VID) of the device to open.
@param product_id The Product ID (PID) of the device to open.
@param serial_number The Serial Number of the device to open
(Optionally NULL).
@returns
This function returns a pointer to a #hid_device object on
success or NULL on failure.
*/
HID_API_EXPORT hid_device * HID_API_CALL hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number);
/** @brief Open a HID device by its path name.
The path name be determined by calling hid_enumerate(), or a
platform-specific path name can be used (eg: /dev/hidraw0 on
Linux).
This function sets the return value of hid_error().
@ingroup API
@param path The path name of the device to open
@returns
This function returns a pointer to a #hid_device object on
success or NULL on failure.
*/
HID_API_EXPORT hid_device * HID_API_CALL hid_open_path(const char *path);
/** @brief Write an Output report to a HID device.
The first byte of @p data[] must contain the Report ID. For
devices which only support a single report, this must be set
to 0x0. The remaining bytes contain the report data. Since
the Report ID is mandatory, calls to hid_write() will always
contain one more byte than the report contains. For example,
if a hid report is 16 bytes long, 17 bytes must be passed to
hid_write(), the Report ID (or 0x0, for devices with a
single report), followed by the report data (16 bytes). In
this example, the length passed in would be 17.
hid_write() will send the data on the first OUT endpoint, if
one exists. If it does not, it will send the data through
the Control Endpoint (Endpoint 0).
This function sets the return value of hid_error().
@ingroup API
@param dev A device handle returned from hid_open().
@param data The data to send, including the report number as
the first byte.
@param length The length in bytes of the data to send.
@returns
This function returns the actual number of bytes written and
-1 on error.
*/
int HID_API_EXPORT HID_API_CALL hid_write(hid_device *dev, const unsigned char *data, size_t length);
/** @brief Read an Input report from a HID device with timeout.
Input reports are returned
to the host through the INTERRUPT IN endpoint. The first byte will
contain the Report number if the device uses numbered reports.
This function sets the return value of hid_error().
@ingroup API
@param dev A device handle returned from hid_open().
@param data A buffer to put the read data into.
@param length The number of bytes to read. For devices with
multiple reports, make sure to read an extra byte for
the report number.
@param milliseconds timeout in milliseconds or -1 for blocking wait.
@returns
This function returns the actual number of bytes read and
-1 on error. If no packet was available to be read within
the timeout period, this function returns 0.
*/
int HID_API_EXPORT HID_API_CALL hid_read_timeout(hid_device *dev, unsigned char *data, size_t length, int milliseconds);
/** @brief Read an Input report from a HID device.
Input reports are returned
to the host through the INTERRUPT IN endpoint. The first byte will
contain the Report number if the device uses numbered reports.
This function sets the return value of hid_error().
@ingroup API
@param dev A device handle returned from hid_open().
@param data A buffer to put the read data into.
@param length The number of bytes to read. For devices with
multiple reports, make sure to read an extra byte for
the report number.
@returns
This function returns the actual number of bytes read and
-1 on error. If no packet was available to be read and
the handle is in non-blocking mode, this function returns 0.
*/
int HID_API_EXPORT HID_API_CALL hid_read(hid_device *dev, unsigned char *data, size_t length);
/** @brief Set the device handle to be non-blocking.
In non-blocking mode calls to hid_read() will return
immediately with a value of 0 if there is no data to be
read. In blocking mode, hid_read() will wait (block) until
there is data to read before returning.
Nonblocking can be turned on and off at any time.
@ingroup API
@param dev A device handle returned from hid_open().
@param nonblock enable or not the nonblocking reads
- 1 to enable nonblocking
- 0 to disable nonblocking.
@returns
This function returns 0 on success and -1 on error.
*/
int HID_API_EXPORT HID_API_CALL hid_set_nonblocking(hid_device *dev, int nonblock);
/** @brief Send a Feature report to the device.
Feature reports are sent over the Control endpoint as a
Set_Report transfer. The first byte of @p data[] must
contain the Report ID. For devices which only support a
single report, this must be set to 0x0. The remaining bytes
contain the report data. Since the Report ID is mandatory,
calls to hid_send_feature_report() will always contain one
more byte than the report contains. For example, if a hid
report is 16 bytes long, 17 bytes must be passed to
hid_send_feature_report(): the Report ID (or 0x0, for
devices which do not use numbered reports), followed by the
report data (16 bytes). In this example, the length passed
in would be 17.
This function sets the return value of hid_error().
@ingroup API
@param dev A device handle returned from hid_open().
@param data The data to send, including the report number as
the first byte.
@param length The length in bytes of the data to send, including
the report number.
@returns
This function returns the actual number of bytes written and
-1 on error.
*/
int HID_API_EXPORT HID_API_CALL hid_send_feature_report(hid_device *dev, const unsigned char *data, size_t length);
/** @brief Get a feature report from a HID device.
Set the first byte of @p data[] to the Report ID of the
report to be read. Make sure to allow space for this
extra byte in @p data[]. Upon return, the first byte will
still contain the Report ID, and the report data will
start in data[1].
This function sets the return value of hid_error().
@ingroup API
@param dev A device handle returned from hid_open().
@param data A buffer to put the read data into, including
the Report ID. Set the first byte of @p data[] to the
Report ID of the report to be read, or set it to zero
if your device does not use numbered reports.
@param length The number of bytes to read, including an
extra byte for the report ID. The buffer can be longer
than the actual report.
@returns
This function returns the number of bytes read plus
one for the report ID (which is still in the first
byte), or -1 on error.
*/
int HID_API_EXPORT HID_API_CALL hid_get_feature_report(hid_device *dev, unsigned char *data, size_t length);
/** @brief Get a input report from a HID device.
Set the first byte of @p data[] to the Report ID of the
report to be read. Make sure to allow space for this
extra byte in @p data[]. Upon return, the first byte will
still contain the Report ID, and the report data will
start in data[1].
@ingroup API
@param device A device handle returned from hid_open().
@param data A buffer to put the read data into, including
the Report ID. Set the first byte of @p data[] to the
Report ID of the report to be read, or set it to zero
if your device does not use numbered reports.
@param length The number of bytes to read, including an
extra byte for the report ID. The buffer can be longer
than the actual report.
@returns
This function returns the number of bytes read plus
one for the report ID (which is still in the first
byte), or -1 on error.
*/
int HID_API_EXPORT HID_API_CALL hid_get_input_report(hid_device *dev, unsigned char *data, size_t length);
/** @brief Close a HID device.
This function sets the return value of hid_error().
@ingroup API
@param dev A device handle returned from hid_open().
*/
void HID_API_EXPORT HID_API_CALL hid_close(hid_device *dev);
/** @brief Get The Manufacturer String from a HID device.
@ingroup API
@param dev A device handle returned from hid_open().
@param string A wide string buffer to put the data into.
@param maxlen The length of the buffer in multiples of wchar_t.
@returns
This function returns 0 on success and -1 on error.
*/
int HID_API_EXPORT_CALL hid_get_manufacturer_string(hid_device *dev, wchar_t *string, size_t maxlen);
/** @brief Get The Product String from a HID device.
@ingroup API
@param dev A device handle returned from hid_open().
@param string A wide string buffer to put the data into.
@param maxlen The length of the buffer in multiples of wchar_t.
@returns
This function returns 0 on success and -1 on error.
*/
int HID_API_EXPORT_CALL hid_get_product_string(hid_device *dev, wchar_t *string, size_t maxlen);
/** @brief Get The Serial Number String from a HID device.
@ingroup API
@param dev A device handle returned from hid_open().
@param string A wide string buffer to put the data into.
@param maxlen The length of the buffer in multiples of wchar_t.
@returns
This function returns 0 on success and -1 on error.
*/
int HID_API_EXPORT_CALL hid_get_serial_number_string(hid_device *dev, wchar_t *string, size_t maxlen);
/** @brief Get a string from a HID device, based on its string index.
@ingroup API
@param dev A device handle returned from hid_open().
@param string_index The index of the string to get.
@param string A wide string buffer to put the data into.
@param maxlen The length of the buffer in multiples of wchar_t.
@returns
This function returns 0 on success and -1 on error.
*/
int HID_API_EXPORT_CALL hid_get_indexed_string(hid_device *dev, int string_index, wchar_t *string, size_t maxlen);
/** @brief Get a string describing the last error which occurred.
Whether a function sets the last error is noted in its
documentation. These functions will reset the last error
to NULL before their execution.
Strings returned from hid_error() must not be freed by the user!
This function is thread-safe, and error messages are thread-local.
@ingroup API
@param dev A device handle returned from hid_open(),
or NULL to get the last non-device-specific error
(e.g. for errors in hid_open() itself).
@returns
This function returns a string containing the last error
which occurred or NULL if none has occurred.
*/
HID_API_EXPORT const wchar_t* HID_API_CALL hid_error(hid_device *dev);
/** @brief Get a runtime version of the library.
@ingroup API
@returns
Pointer to statically allocated struct, that contains version.
*/
HID_API_EXPORT const struct hid_api_version* HID_API_CALL hid_version(void);
/** @brief Get a runtime version string of the library.
@ingroup API
@returns
Pointer to statically allocated string, that contains version string.
*/
HID_API_EXPORT const char* HID_API_CALL hid_version_str(void);
#ifdef __cplusplus
}
#endif
#endif

Some files were not shown because too many files have changed in this diff Show More