├── ARDOP1OFDM ├── SerialIntefaceSpec.txt ├── i2cDisplay.c ├── UpgradeLog.htm ├── TCPHostInterface.c ├── SerialIntefaceSpec.pdf ├── Version.h ├── LICENSE ├── Makefile ├── config.doc ├── debug.log ├── README ├── MbedSerial.c ├── LCM1602-IIC.h ├── Main.c ├── ARDOP1OFDM.vcproj.HPLAPTOP.johnw.user ├── ARDOP1OFDM.vcproj.SKIGACER.johnw.user ├── ARDOP1OFDM.vcproj.WL2K-CMBO.John.user ├── ARDOP1OFDM.vcproj.DESKTOP-TGEL8RC.John.user ├── crcgen.c ├── pttio.h ├── soundio.h ├── kisspkt.h ├── audioio.h ├── ARDOPDebug8515_20191124.log ├── galois.c ├── ARDOP1OFDM.txt ├── LCM1602-IIC.c ├── ecc.h ├── rs.doc ├── DACout.c └── getopt.h ├── ARDOP2 ├── SerialIntefaceSpec.txt ├── ARDOPDebug8515_20210919.log ├── ARDOP2.ncb ├── ARDOP2.suo ├── i2cDisplay.c ├── TCPHostInterface.c ├── SerialIntefaceSpec.pdf ├── TCPHostInterface.c.bak ├── Version.h ├── LICENSE ├── config.doc ├── Makefile ├── debug.log ├── README ├── ARDOP2.sln ├── MbedSerial.c ├── LCM1602-IIC.h ├── Main.c ├── ARDOP2.vcproj.HPLAPTOP.johnw.user ├── ARDOP2.vcproj.SKIGACER.johnw.user ├── ARDOP2.vcproj.WL2K-CMBO.John.user ├── ARDOP2.vcproj.DESKTOP-MHE5LO8.johnw.user ├── ARDOP2.vcproj.DESKTOP-TGEL8RC.John.user ├── crcgen.c ├── pttio.h ├── soundio.h ├── kisspkt.h ├── audioio.h ├── ARDOPSession8520_20210920.log ├── galois.c ├── LCM1602-IIC.c ├── ecc.h ├── rs.doc ├── DACout.c └── getopt.h ├── HEAD ├── ARDOPC ├── i2cDisplay.c ├── ARDOPFECLog_20231111.log ├── TCPHostInterface.c ├── SerialIntefaceSpec.pdf ├── TCPHostInterface-DESKTOP-MHE5LO8.c ├── LICENSE ├── config.doc ├── Makefile ├── debug.log ├── README ├── MbedSerial.c ├── ARDOPDebug8515_20231111.log ├── LCM1602-IIC.h ├── Main.c ├── ARDOP_PTC │ ├── ARDOP_PTC.vcproj.HPLAPTOP.johnw.user │ └── ARDOP_PTC.vcproj.WL2K-CMBO.John.user ├── ARDOPC.vcproj.DESKTOP-TGEL8RC.John.user ├── ARDOPC.vcproj.DESKTOP-TGEL8RC.John-skigdebian.user ├── crcgen.c ├── pttio.h ├── soundio.h ├── kisspkt.h ├── audioio.h ├── galois.c ├── LCM1602-IIC.c ├── ecc.h ├── rs.doc ├── DACout.c └── getopt.h ├── description ├── ARDOPOFDM ├── ARDOPOFDM.suo ├── i2cDisplay.c ├── TCPHostInterface.c ├── SerialIntefaceSpec.pdf ├── LICENSE ├── Version.h ├── config.doc ├── Makefile ├── debug.log ├── Makefile-skigdebian ├── README ├── MbedSerial.c ├── UpgradeLog.XML ├── LCM1602-IIC.h ├── Main.c ├── ARDOPOFDM.vcproj.DESKTOP-TGEL8RC.John.user ├── crcgen.c ├── pttio.h ├── soundio.h ├── kisspkt.h ├── ARDOPOFDM.txt ├── audioio.h ├── galois.c ├── LCM1602-IIC.c ├── ecc.h ├── rs.doc ├── DACout.c └── getopt.h ├── config ├── README.txt ├── ARDOP1OFDM_Teensy └── TeensyWrapper.c ├── ARDOP2_Teensy └── TeensyWrapper.c ├── ARDOP_Teensy └── TeensyWrapper.c └── ARDOPOFDM_Teensy └── TeensyWrapper.c /ARDOP1OFDM/SerialIntefaceSpec.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ARDOP2/SerialIntefaceSpec.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /HEAD: -------------------------------------------------------------------------------- 1 | ref: refs/heads/master 2 | -------------------------------------------------------------------------------- /ARDOP2/ARDOPDebug8515_20210919.log: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ARDOP2/ARDOP2.ncb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g8bpq/ardop/HEAD/ARDOP2/ARDOP2.ncb -------------------------------------------------------------------------------- /ARDOP2/ARDOP2.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g8bpq/ardop/HEAD/ARDOP2/ARDOP2.suo -------------------------------------------------------------------------------- /ARDOP2/i2cDisplay.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g8bpq/ardop/HEAD/ARDOP2/i2cDisplay.c -------------------------------------------------------------------------------- /ARDOPC/i2cDisplay.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g8bpq/ardop/HEAD/ARDOPC/i2cDisplay.c -------------------------------------------------------------------------------- /description: -------------------------------------------------------------------------------- 1 | Unnamed repository; edit this file 'description' to name the repository. 2 | -------------------------------------------------------------------------------- /ARDOP1OFDM/i2cDisplay.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g8bpq/ardop/HEAD/ARDOP1OFDM/i2cDisplay.c -------------------------------------------------------------------------------- /ARDOPOFDM/ARDOPOFDM.suo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g8bpq/ardop/HEAD/ARDOPOFDM/ARDOPOFDM.suo -------------------------------------------------------------------------------- /ARDOPOFDM/i2cDisplay.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g8bpq/ardop/HEAD/ARDOPOFDM/i2cDisplay.c -------------------------------------------------------------------------------- /ARDOP1OFDM/UpgradeLog.htm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g8bpq/ardop/HEAD/ARDOP1OFDM/UpgradeLog.htm -------------------------------------------------------------------------------- /ARDOP2/TCPHostInterface.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g8bpq/ardop/HEAD/ARDOP2/TCPHostInterface.c -------------------------------------------------------------------------------- /ARDOPC/ARDOPFECLog_20231111.log: -------------------------------------------------------------------------------- 1 | FECG8BPQ-2 : Hello 'FECG8BPQ-2 : HELLO G8BPQ-2 : FECSEND -------------------------------------------------------------------------------- /ARDOPC/TCPHostInterface.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g8bpq/ardop/HEAD/ARDOPC/TCPHostInterface.c -------------------------------------------------------------------------------- /ARDOPOFDM/TCPHostInterface.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g8bpq/ardop/HEAD/ARDOPOFDM/TCPHostInterface.c -------------------------------------------------------------------------------- /ARDOP1OFDM/TCPHostInterface.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g8bpq/ardop/HEAD/ARDOP1OFDM/TCPHostInterface.c -------------------------------------------------------------------------------- /ARDOP2/SerialIntefaceSpec.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g8bpq/ardop/HEAD/ARDOP2/SerialIntefaceSpec.pdf -------------------------------------------------------------------------------- /ARDOP2/TCPHostInterface.c.bak: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g8bpq/ardop/HEAD/ARDOP2/TCPHostInterface.c.bak -------------------------------------------------------------------------------- /ARDOPC/SerialIntefaceSpec.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g8bpq/ardop/HEAD/ARDOPC/SerialIntefaceSpec.pdf -------------------------------------------------------------------------------- /ARDOP1OFDM/SerialIntefaceSpec.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g8bpq/ardop/HEAD/ARDOP1OFDM/SerialIntefaceSpec.pdf -------------------------------------------------------------------------------- /ARDOPOFDM/SerialIntefaceSpec.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g8bpq/ardop/HEAD/ARDOPOFDM/SerialIntefaceSpec.pdf -------------------------------------------------------------------------------- /ARDOP2/Version.h: -------------------------------------------------------------------------------- 1 | const char ProductName[] = "ARDOP2"; 2 | 3 | // Version 3.10 Add CM108 PTT (Sept 2021) 4 | 5 | -------------------------------------------------------------------------------- /ARDOPC/TCPHostInterface-DESKTOP-MHE5LO8.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g8bpq/ardop/HEAD/ARDOPC/TCPHostInterface-DESKTOP-MHE5LO8.c -------------------------------------------------------------------------------- /config: -------------------------------------------------------------------------------- 1 | [core] 2 | repositoryformatversion = 0 3 | filemode = false 4 | bare = true 5 | symlinks = false 6 | ignorecase = true 7 | -------------------------------------------------------------------------------- /ARDOP1OFDM/Version.h: -------------------------------------------------------------------------------- 1 | 2 | const char ProductName[] = "ARDOP TNC"; 3 | const char ProductVersion[] = "1.0.4.1s-OFDMBPQ"; 4 | 5 | 6 | // 4.1s (Sept 2021) 7 | // Add GUI Support 8 | // Improve GUI Support 9 | // Add L/R soundcard and LOGDIR Options 10 | // Add EXTRADELAY parameter 11 | // Add CM108 PTT 12 | 13 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | Copy boards.txt and platform.txt to hardware\teensy\avr in your Arduino IDE installation folder. 2 | 3 | Set Sketchbook location (File/Preferences Menu) to the location of TeensyProjects, eg 4 | 5 | C:\OneDrive\Dev\Source\TeensyProjects 6 | 7 | If you want to compile the Soundcard Emulation sketches see TeensyProjects\libraries\SoundCard\README.txt 8 | 9 | 10 | -------------------------------------------------------------------------------- /ARDOP2/LICENSE: -------------------------------------------------------------------------------- 1 | * (C) Henry Minsky (hqm@alum.mit.edu) 1991-2009 2 | * 3 | * This software library is licensed under terms of the GNU GENERAL 4 | * PUBLIC LICENSE. [See file gpl.txt] 5 | * 6 | * Commercial licensing is available under a separate license, please 7 | * contact author for details. 8 | * 9 | * Latest source code and other info at http://rscode.sourceforge.net 10 | 11 | -------------------------------------------------------------------------------- /ARDOPC/LICENSE: -------------------------------------------------------------------------------- 1 | * (C) Henry Minsky (hqm@alum.mit.edu) 1991-2009 2 | * 3 | * This software library is licensed under terms of the GNU GENERAL 4 | * PUBLIC LICENSE. [See file gpl.txt] 5 | * 6 | * Commercial licensing is available under a separate license, please 7 | * contact author for details. 8 | * 9 | * Latest source code and other info at http://rscode.sourceforge.net 10 | 11 | -------------------------------------------------------------------------------- /ARDOP1OFDM/LICENSE: -------------------------------------------------------------------------------- 1 | * (C) Henry Minsky (hqm@alum.mit.edu) 1991-2009 2 | * 3 | * This software library is licensed under terms of the GNU GENERAL 4 | * PUBLIC LICENSE. [See file gpl.txt] 5 | * 6 | * Commercial licensing is available under a separate license, please 7 | * contact author for details. 8 | * 9 | * Latest source code and other info at http://rscode.sourceforge.net 10 | 11 | -------------------------------------------------------------------------------- /ARDOPOFDM/LICENSE: -------------------------------------------------------------------------------- 1 | * (C) Henry Minsky (hqm@alum.mit.edu) 1991-2009 2 | * 3 | * This software library is licensed under terms of the GNU GENERAL 4 | * PUBLIC LICENSE. [See file gpl.txt] 5 | * 6 | * Commercial licensing is available under a separate license, please 7 | * contact author for details. 8 | * 9 | * Latest source code and other info at http://rscode.sourceforge.net 10 | 11 | -------------------------------------------------------------------------------- /ARDOPOFDM/Version.h: -------------------------------------------------------------------------------- 1 | const char ProductName[] = "ARDOP OFDM"; 2 | 3 | // 3.32 Fix tuning range 4 | // 3.33 Add GUI Support 5 | // 3.34 Improve GUI Support 6 | // Add L/R soundcard and LOGDIR Options 7 | // 3.35 Improvements to ARQ timing 8 | // 3.36 Add short (~2Sec) 4PSK mode for sending < 120 bytes of data 9 | // 3.37 Fix switching back from more robust mode if data outstanding 10 | // 3.38 Temporary disable Short frame sending stuff 11 | // 3.39 Fix shift error in 38 12 | // 3.40 Add EXTRADELAY parameter 13 | // 3.41 Add CM108 PTT (Sept 2021} 14 | 15 | -------------------------------------------------------------------------------- /ARDOP1OFDM/Makefile: -------------------------------------------------------------------------------- 1 | # ARDOPC Makefile 2 | 3 | OBJS = ofdm.o LinSerial.o KISSModule.o pktARDOP.o pktSession.o BusyDetect.o i2cDisplay.o ALSASound.o ARDOPC.o ardopSampleArrays.o ARQ.o FFT.o FEC.o HostInterface.o Modulate.o rs.o berlekamp.o galois.o SoundInput.o TCPHostInterface.o SCSHostInterface.o 4 | 5 | # Configuration: 6 | CFLAGS = -DLINBPQ -MMD -g 7 | CC = gcc 8 | 9 | all: ardopc 10 | 11 | ardopc: $(OBJS) 12 | gcc $(OBJS) -Xlinker -Map=output.map -lrt -lm -lpthread -lasound -o ardop1ofdm 13 | 14 | 15 | -include *.d 16 | 17 | clean : 18 | rm ardop1ofdm $(OBJS) 19 | 20 | -------------------------------------------------------------------------------- /ARDOP2/config.doc: -------------------------------------------------------------------------------- 1 | The basic coding parameters are defined using 2 | macros, and an executable can be made by compiling using macro 3 | definitions defining the values of the following names in the file 4 | "ecc.h": 5 | 6 | The important compile time parameter is the number of parity bytes, 7 | specified by the #define NPAR. 8 | 9 | The library is shipped with 10 | 11 | #define NPAR 4 12 | 13 | The error-correction routines are polynomial in the number of 14 | parity bytes, so try to keep NPAR small for high performance. 15 | 16 | Remember, the sum of the message length (in bytes) plus parity bytes 17 | must be less than or equal to 255. 18 | 19 | -------------------------------------------------------------------------------- /ARDOPC/config.doc: -------------------------------------------------------------------------------- 1 | The basic coding parameters are defined using 2 | macros, and an executable can be made by compiling using macro 3 | definitions defining the values of the following names in the file 4 | "ecc.h": 5 | 6 | The important compile time parameter is the number of parity bytes, 7 | specified by the #define NPAR. 8 | 9 | The library is shipped with 10 | 11 | #define NPAR 4 12 | 13 | The error-correction routines are polynomial in the number of 14 | parity bytes, so try to keep NPAR small for high performance. 15 | 16 | Remember, the sum of the message length (in bytes) plus parity bytes 17 | must be less than or equal to 255. 18 | 19 | -------------------------------------------------------------------------------- /ARDOP1OFDM/config.doc: -------------------------------------------------------------------------------- 1 | The basic coding parameters are defined using 2 | macros, and an executable can be made by compiling using macro 3 | definitions defining the values of the following names in the file 4 | "ecc.h": 5 | 6 | The important compile time parameter is the number of parity bytes, 7 | specified by the #define NPAR. 8 | 9 | The library is shipped with 10 | 11 | #define NPAR 4 12 | 13 | The error-correction routines are polynomial in the number of 14 | parity bytes, so try to keep NPAR small for high performance. 15 | 16 | Remember, the sum of the message length (in bytes) plus parity bytes 17 | must be less than or equal to 255. 18 | 19 | -------------------------------------------------------------------------------- /ARDOPOFDM/config.doc: -------------------------------------------------------------------------------- 1 | The basic coding parameters are defined using 2 | macros, and an executable can be made by compiling using macro 3 | definitions defining the values of the following names in the file 4 | "ecc.h": 5 | 6 | The important compile time parameter is the number of parity bytes, 7 | specified by the #define NPAR. 8 | 9 | The library is shipped with 10 | 11 | #define NPAR 4 12 | 13 | The error-correction routines are polynomial in the number of 14 | parity bytes, so try to keep NPAR small for high performance. 15 | 16 | Remember, the sum of the message length (in bytes) plus parity bytes 17 | must be less than or equal to 255. 18 | 19 | -------------------------------------------------------------------------------- /ARDOP2/Makefile: -------------------------------------------------------------------------------- 1 | # ARDOPC Makefile 2 | 3 | OBJS = LinSerial.o KISSModule.o pktARDOP.o pktSession.o BusyDetect.o i2cDisplay.o ALSASound.o ARDOPC.o ardopSampleArrays.o ARQ.o FFT.o FEC.o HostInterface.o Modulate.o rs.o berlekamp.o galois.o SoundInput.o TCPHostInterface.o SCSHostInterface.o 4 | 5 | # Configuration: 6 | CFLAGS = -DLINBPQ -MMD -g 7 | CC = gcc 8 | 9 | vpath %.c /mnt/ardop2 10 | vpath %.h /mnt/ardop2 11 | vpath %.o ./ 12 | 13 | all: ardop2 14 | 15 | ardop2: $(OBJS) 16 | gcc $(OBJS) -Xlinker -Map=output.map -lrt -lm -lpthread -lasound -o ardop2 17 | 18 | 19 | -include *.d 20 | 21 | clean : 22 | rm ardop2 $(OBJS) 23 | 24 | -------------------------------------------------------------------------------- /ARDOPC/Makefile: -------------------------------------------------------------------------------- 1 | # ARDOPC Makefile 2 | 3 | OBJS = ARDOPCommon.o LinSerial.o KISSModule.o pktARDOP.o pktSession.o BusyDetect.o i2cDisplay.o ALSASound.o \ 4 | ARDOPC.o ardopSampleArrays.o ARQ.o FFT.o FEC.o HostInterface.o Modulate.o rs.o \ 5 | berlekamp.o galois.o SoundInput.o TCPHostInterface.o SCSHostInterface.o 6 | 7 | # Configuration: 8 | CFLAGS = -DLINBPQ -MMD -g 9 | CC = gcc 10 | 11 | vpath %.c ../ARDOPCommonCode 12 | vpath %.h ../ARDOPCommonCode 13 | vpath %.o ./ 14 | 15 | all: ardopc 16 | 17 | ardopc: $(OBJS) 18 | gcc $(OBJS) -Xlinker -Map=output.map -lrt -lm -lpthread -lasound -o ardopc 19 | 20 | 21 | -include *.d 22 | 23 | clean : 24 | rm ardopc $(OBJS) 25 | 26 | -------------------------------------------------------------------------------- /ARDOPOFDM/Makefile: -------------------------------------------------------------------------------- 1 | # ARDOPC Makefile 2 | 3 | OBJS = ofdm.o ARDOPCommon.o LinSerial.o KISSModule.o pktARDOP.o pktSession.o BusyDetect.o \ 4 | i2cDisplay.o ALSASound.o ARDOPC.o ardopSampleArrays.o ARQ.o FFT.o FEC.o HostInterface.o \ 5 | Modulate.o rs.o berlekamp.o galois.o SoundInput.o TCPHostInterface.o SCSHostInterface.o 6 | 7 | 8 | 9 | 10 | # Configuration: 11 | CFLAGS = -DLINBPQ -MMD -g -fcommon 12 | CC = gcc 13 | 14 | 15 | vpath %.c ../ARDOPCommonCode 16 | vpath %.h ../ARDOPCommonCode 17 | vpath %.o ./ 18 | 19 | 20 | all: ardopofdm 21 | 22 | ardopofdm: $(OBJS) 23 | gcc $(OBJS) -Xlinker -Map=output.map -lrt -lm -lpthread -lasound -o ardopofdm 24 | 25 | 26 | -include *.d 27 | 28 | clean : 29 | rm ardopofdm $(OBJS) 30 | 31 | -------------------------------------------------------------------------------- /ARDOP2/debug.log: -------------------------------------------------------------------------------- 1 | [0103/094857:ERROR:process_info.cc(608)] range at 0x69dc504c00000000, size 0x252 fully unreadable 2 | [0103/094902:ERROR:process_info.cc(608)] range at 0x69dc506c00000000, size 0x252 fully unreadable 3 | [0103/094902:ERROR:process_info.cc(608)] range at 0x0, size 0x252 fully unreadable 4 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986604974 out of range 5 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986608782 out of range 6 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986609230 out of range 7 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986603038 out of range 8 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986603272 out of range 9 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986608890 out of range 10 | -------------------------------------------------------------------------------- /ARDOPC/debug.log: -------------------------------------------------------------------------------- 1 | [0103/094857:ERROR:process_info.cc(608)] range at 0x69dc504c00000000, size 0x252 fully unreadable 2 | [0103/094902:ERROR:process_info.cc(608)] range at 0x69dc506c00000000, size 0x252 fully unreadable 3 | [0103/094902:ERROR:process_info.cc(608)] range at 0x0, size 0x252 fully unreadable 4 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986604974 out of range 5 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986608782 out of range 6 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986609230 out of range 7 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986603038 out of range 8 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986603272 out of range 9 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986608890 out of range 10 | -------------------------------------------------------------------------------- /ARDOP1OFDM/debug.log: -------------------------------------------------------------------------------- 1 | [0103/094857:ERROR:process_info.cc(608)] range at 0x69dc504c00000000, size 0x252 fully unreadable 2 | [0103/094902:ERROR:process_info.cc(608)] range at 0x69dc506c00000000, size 0x252 fully unreadable 3 | [0103/094902:ERROR:process_info.cc(608)] range at 0x0, size 0x252 fully unreadable 4 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986604974 out of range 5 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986608782 out of range 6 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986609230 out of range 7 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986603038 out of range 8 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986603272 out of range 9 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986608890 out of range 10 | -------------------------------------------------------------------------------- /ARDOPOFDM/debug.log: -------------------------------------------------------------------------------- 1 | [0103/094857:ERROR:process_info.cc(608)] range at 0x69dc504c00000000, size 0x252 fully unreadable 2 | [0103/094902:ERROR:process_info.cc(608)] range at 0x69dc506c00000000, size 0x252 fully unreadable 3 | [0103/094902:ERROR:process_info.cc(608)] range at 0x0, size 0x252 fully unreadable 4 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986604974 out of range 5 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986608782 out of range 6 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986609230 out of range 7 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986603038 out of range 8 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986603272 out of range 9 | [0103/094943:WARNING:in_range_cast.h(38)] value 2552986608890 out of range 10 | -------------------------------------------------------------------------------- /ARDOPOFDM/Makefile-skigdebian: -------------------------------------------------------------------------------- 1 | # ARDOPC Makefile 2 | 3 | OBJS = ofdm.o ARDOPCommon.o LinSerial.o KISSModule.o pktARDOP.o pktSession.o BusyDetect.o \ 4 | i2cDisplay.o ALSASound.o ARDOPC.o ardopSampleArrays.o ARQ.o FFT.o FEC.o HostInterface.o \ 5 | Modulate.o rs.o berlekamp.o galois.o SoundInput.o TCPHostInterface.o SCSHostInterface.o 6 | 7 | 8 | 9 | 10 | # Configuration: 11 | CFLAGS = -DLINBPQ -MMD -g -fcommon 12 | CC = gcc 13 | 14 | 15 | vpath %.c ../ARDOPCommonCode 16 | vpath %.h ../ARDOPCommonCode 17 | vpath %.o ./ 18 | 19 | 20 | all: ardopofdm 21 | 22 | ardopofdm: $(OBJS) 23 | gcc $(OBJS) -Xlinker -Map=output.map -lrt -lm -lpthread -lasound -o ardopofdm 24 | 25 | 26 | -include *.d 27 | 28 | clean : 29 | rm ardopofdm $(OBJS) 30 | 31 | -------------------------------------------------------------------------------- /ARDOP2/README: -------------------------------------------------------------------------------- 1 | RSCODE version 1.3 2 | 3 | See the files 4 | 5 | config.doc documentation of some compile time parameters 6 | rs.doc overview of the Reed-Solomon coding program 7 | rs.man a man page, slightly outdated at this point 8 | example.c a simple example of encoding,decoding, and error correction 9 | 10 | Makefile should work on a Sun system, may require GNU make. 11 | 12 | 13 | Henry Minsky 14 | hqm@alum.mit.edu 15 | 16 | 17 | * (c) Henry Minsky (hqm@alum.mit.edu) 1991-2009 18 | * 19 | * This software library is licensed under terms of the GNU GENERAL 20 | * PUBLIC LICENSE. (See gpl.txt) 21 | * 22 | * Commercial licensing is available under a separate license, please 23 | * contact author for details. 24 | * 25 | * Source code is available at http://rscode.sourceforge.net 26 | 27 | 28 | -------------------------------------------------------------------------------- /ARDOPC/README: -------------------------------------------------------------------------------- 1 | RSCODE version 1.3 2 | 3 | See the files 4 | 5 | config.doc documentation of some compile time parameters 6 | rs.doc overview of the Reed-Solomon coding program 7 | rs.man a man page, slightly outdated at this point 8 | example.c a simple example of encoding,decoding, and error correction 9 | 10 | Makefile should work on a Sun system, may require GNU make. 11 | 12 | 13 | Henry Minsky 14 | hqm@alum.mit.edu 15 | 16 | 17 | * (c) Henry Minsky (hqm@alum.mit.edu) 1991-2009 18 | * 19 | * This software library is licensed under terms of the GNU GENERAL 20 | * PUBLIC LICENSE. (See gpl.txt) 21 | * 22 | * Commercial licensing is available under a separate license, please 23 | * contact author for details. 24 | * 25 | * Source code is available at http://rscode.sourceforge.net 26 | 27 | 28 | -------------------------------------------------------------------------------- /ARDOP1OFDM/README: -------------------------------------------------------------------------------- 1 | RSCODE version 1.3 2 | 3 | See the files 4 | 5 | config.doc documentation of some compile time parameters 6 | rs.doc overview of the Reed-Solomon coding program 7 | rs.man a man page, slightly outdated at this point 8 | example.c a simple example of encoding,decoding, and error correction 9 | 10 | Makefile should work on a Sun system, may require GNU make. 11 | 12 | 13 | Henry Minsky 14 | hqm@alum.mit.edu 15 | 16 | 17 | * (c) Henry Minsky (hqm@alum.mit.edu) 1991-2009 18 | * 19 | * This software library is licensed under terms of the GNU GENERAL 20 | * PUBLIC LICENSE. (See gpl.txt) 21 | * 22 | * Commercial licensing is available under a separate license, please 23 | * contact author for details. 24 | * 25 | * Source code is available at http://rscode.sourceforge.net 26 | 27 | 28 | -------------------------------------------------------------------------------- /ARDOPOFDM/README: -------------------------------------------------------------------------------- 1 | RSCODE version 1.3 2 | 3 | See the files 4 | 5 | config.doc documentation of some compile time parameters 6 | rs.doc overview of the Reed-Solomon coding program 7 | rs.man a man page, slightly outdated at this point 8 | example.c a simple example of encoding,decoding, and error correction 9 | 10 | Makefile should work on a Sun system, may require GNU make. 11 | 12 | 13 | Henry Minsky 14 | hqm@alum.mit.edu 15 | 16 | 17 | * (c) Henry Minsky (hqm@alum.mit.edu) 1991-2009 18 | * 19 | * This software library is licensed under terms of the GNU GENERAL 20 | * PUBLIC LICENSE. (See gpl.txt) 21 | * 22 | * Commercial licensing is available under a separate license, please 23 | * contact author for details. 24 | * 25 | * Source code is available at http://rscode.sourceforge.net 26 | 27 | 28 | -------------------------------------------------------------------------------- /ARDOP2/ARDOP2.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 9.00 3 | # Visual C++ Express 2005 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ARDOPV2", "ARDOP2.vcproj", "{2EDF4140-A927-4DE1-9752-005DF68F6A39}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {2EDF4140-A927-4DE1-9752-005DF68F6A39}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {2EDF4140-A927-4DE1-9752-005DF68F6A39}.Debug|Win32.Build.0 = Debug|Win32 14 | {2EDF4140-A927-4DE1-9752-005DF68F6A39}.Release|Win32.ActiveCfg = Release|Win32 15 | {2EDF4140-A927-4DE1-9752-005DF68F6A39}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /ARDOP2/MbedSerial.c: -------------------------------------------------------------------------------- 1 | // ARDOP TNC Serial Interface for Nucleo Board 2 | // 3 | 4 | #define TRUE 1 5 | #define FALSE 0 6 | 7 | 8 | void ProcessSCSPacket(unsigned char * rxbuffer, int Length); 9 | 10 | unsigned char RXBUFFER[300]; 11 | 12 | extern volatile int RXBPtr; 13 | 14 | int HostInit() 15 | { 16 | return TRUE; 17 | } 18 | 19 | void HostPoll() 20 | { 21 | if (RXBPtr) 22 | { 23 | RXBUFFER[RXBPtr] = 0; 24 | Debugprintf("Host RX %d %s", RXBPtr, RXBUFFER); 25 | ProcessSCSPacket(RXBUFFER, RXBPtr); 26 | Sleep(100); 27 | } 28 | } 29 | 30 | // Don't want to run anything in interrupt context, so just save rx chars to RXBUFFER 31 | 32 | void SerialSink(unsigned char c) 33 | { 34 | // if (RXBPtr < 300) 35 | // RXBUFFER[RXBPtr++] = c; 36 | } 37 | 38 | 39 | void PutString(unsigned char * Msg) 40 | { 41 | SerialSendData(Msg, strlen(Msg)); 42 | } 43 | 44 | int PutChar(unsigned char c) 45 | { 46 | SerialSendData(&c, 1); 47 | return 0; 48 | } 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /ARDOPC/MbedSerial.c: -------------------------------------------------------------------------------- 1 | // ARDOP TNC Serial Interface for Nucleo Board 2 | // 3 | 4 | #define TRUE 1 5 | #define FALSE 0 6 | 7 | 8 | void ProcessSCSPacket(unsigned char * rxbuffer, int Length); 9 | 10 | unsigned char RXBUFFER[300]; 11 | 12 | extern volatile int RXBPtr; 13 | 14 | int HostInit() 15 | { 16 | return TRUE; 17 | } 18 | 19 | void HostPoll() 20 | { 21 | if (RXBPtr) 22 | { 23 | RXBUFFER[RXBPtr] = 0; 24 | Debugprintf("Host RX %d %s", RXBPtr, RXBUFFER); 25 | ProcessSCSPacket(RXBUFFER, RXBPtr); 26 | Sleep(100); 27 | } 28 | } 29 | 30 | // Don't want to run anything in interrupt context, so just save rx chars to RXBUFFER 31 | 32 | void SerialSink(unsigned char c) 33 | { 34 | // if (RXBPtr < 300) 35 | // RXBUFFER[RXBPtr++] = c; 36 | } 37 | 38 | 39 | void PutString(unsigned char * Msg) 40 | { 41 | SerialSendData(Msg, strlen(Msg)); 42 | } 43 | 44 | int PutChar(unsigned char c) 45 | { 46 | SerialSendData(&c, 1); 47 | return 0; 48 | } 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /ARDOP1OFDM/MbedSerial.c: -------------------------------------------------------------------------------- 1 | // ARDOP TNC Serial Interface for Nucleo Board 2 | // 3 | 4 | #define TRUE 1 5 | #define FALSE 0 6 | 7 | 8 | void ProcessSCSPacket(unsigned char * rxbuffer, int Length); 9 | 10 | unsigned char RXBUFFER[300]; 11 | 12 | extern volatile int RXBPtr; 13 | 14 | int HostInit() 15 | { 16 | return TRUE; 17 | } 18 | 19 | void HostPoll() 20 | { 21 | if (RXBPtr) 22 | { 23 | RXBUFFER[RXBPtr] = 0; 24 | Debugprintf("Host RX %d %s", RXBPtr, RXBUFFER); 25 | ProcessSCSPacket(RXBUFFER, RXBPtr); 26 | Sleep(100); 27 | } 28 | } 29 | 30 | // Don't want to run anything in interrupt context, so just save rx chars to RXBUFFER 31 | 32 | void SerialSink(unsigned char c) 33 | { 34 | // if (RXBPtr < 300) 35 | // RXBUFFER[RXBPtr++] = c; 36 | } 37 | 38 | 39 | void PutString(unsigned char * Msg) 40 | { 41 | SerialSendData(Msg, strlen(Msg)); 42 | } 43 | 44 | int PutChar(unsigned char c) 45 | { 46 | SerialSendData(&c, 1); 47 | return 0; 48 | } 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /ARDOPOFDM/MbedSerial.c: -------------------------------------------------------------------------------- 1 | // ARDOP TNC Serial Interface for Nucleo Board 2 | // 3 | 4 | #define TRUE 1 5 | #define FALSE 0 6 | 7 | 8 | void ProcessSCSPacket(unsigned char * rxbuffer, int Length); 9 | 10 | unsigned char RXBUFFER[300]; 11 | 12 | extern volatile int RXBPtr; 13 | 14 | int HostInit() 15 | { 16 | return TRUE; 17 | } 18 | 19 | void HostPoll() 20 | { 21 | if (RXBPtr) 22 | { 23 | RXBUFFER[RXBPtr] = 0; 24 | Debugprintf("Host RX %d %s", RXBPtr, RXBUFFER); 25 | ProcessSCSPacket(RXBUFFER, RXBPtr); 26 | Sleep(100); 27 | } 28 | } 29 | 30 | // Don't want to run anything in interrupt context, so just save rx chars to RXBUFFER 31 | 32 | void SerialSink(unsigned char c) 33 | { 34 | // if (RXBPtr < 300) 35 | // RXBUFFER[RXBPtr++] = c; 36 | } 37 | 38 | 39 | void PutString(unsigned char * Msg) 40 | { 41 | SerialSendData(Msg, strlen(Msg)); 42 | } 43 | 44 | int PutChar(unsigned char c) 45 | { 46 | SerialSendData(&c, 1); 47 | return 0; 48 | } 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /ARDOP1OFDM_Teensy/TeensyWrapper.c: -------------------------------------------------------------------------------- 1 | // 2 | // Makes keeping Windows, Linux and Teensy version in step easier 3 | 4 | #define TEENSY 5 | #define ARDOP 6 | #define PTC 7 | 8 | #include "TeensyConfig.h" 9 | 10 | #include "../../ARDOP1OFDM/ofdm.c" 11 | #include "../../ARDOP1OFDM/ARDOPC.c" 12 | #include "../../ARDOP1OFDM/ardopSampleArrays.c" 13 | #include "../../ARDOP1OFDM/ARQ.c" 14 | #include "../../ARDOP1OFDM/berlekamp.c" 15 | #include "../../ARDOP1OFDM/BusyDetect.c" 16 | #include "../../ARDOP1OFDM/FEC.c" 17 | #include "../../ARDOP1OFDM/FFT.c" 18 | #include "../../ARDOP1OFDM/KISSModule.c" 19 | #include "../../ARDOP1OFDM/galois.c" 20 | #include "../../ARDOP1OFDM/HostInterface.c" 21 | #include "../../ARDOP1OFDM/Modulate.c" 22 | #include "../../ARDOP1OFDM/rs.c" 23 | #include "../../ARDOP1OFDM/SCSHostInterface.c" 24 | #include "../../ARDOP1OFDM/SoundInput.c" 25 | #include "../../ARDOP1OFDM/afskModule.c" 26 | #include "../../ARDOP1OFDM/pktARDOP.c" 27 | #include "../../ARDOP1OFDM/pktSession.c" 28 | #include "../../ARDOPCommonCode/ARDOPCommon.c" 29 | -------------------------------------------------------------------------------- /ARDOPC/ARDOPDebug8515_20231111.log: -------------------------------------------------------------------------------- 1 | 07:04:03.340 ardopc Version 2.0.3.1 2 | 07:04:03.341 Capture Devices 3 | 07:04:03.624 0 Microphone (2- USB PnP Sound De 4 | 07:04:03.633 1 CABLE-D Output (VB-Audio Cable 5 | 07:04:03.642 2 CABLE-A Output (VB-Audio Cable 6 | 07:04:03.656 3 Stereo Mix (Realtek High Defini 7 | 07:04:03.664 4 CABLE-C Output (VB-Audio Cable 8 | 07:04:03.672 5 CABLE-B Output (VB-Audio Cable 9 | 07:04:03.680 6 CABLE Output (VB-Audio Virtual 10 | 07:04:03.680 Playback Devices 11 | 07:04:03.710 0 Speakers (Realtek High Definiti 12 | 07:04:03.728 1 CABLE-B Input (VB-Audio Cable B 13 | 07:04:03.746 2 CABLE Input (VB-Audio Virtual C 14 | 07:04:03.763 3 CABLE-A Input (VB-Audio Cable A 15 | 07:04:03.781 4 CABLE-C Input (VB-Audio Cable C 16 | 07:04:03.799 5 Speakers (2- USB PnP Sound Devi 17 | 07:04:03.819 6 CABLE-D Input (VB-Audio Cable D 18 | 07:04:03.833 Opened WaveOut Device Speakers (Realtek High Definiti 19 | 07:04:03.841 Opened WaveIn Device Stereo Mix (Realtek High Defini 20 | 07:04:03.875 ardopc listening on port 8515 21 | 07:04:03.893 Input peaks = -4, 2 22 | -------------------------------------------------------------------------------- /ARDOPOFDM/UpgradeLog.XML: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ARDOP2_Teensy/TeensyWrapper.c: -------------------------------------------------------------------------------- 1 | // 2 | // Makes keeping Windows, Linux and Teensy version in step easier 3 | 4 | #define TEENSY 5 | #define ARDOP 6 | #define PTC 7 | 8 | #include "TeensyConfig.h" 9 | 10 | #include "../../ARDOP2/ARDOPC.c" 11 | #include "../../ARDOP2/ardopSampleArrays.c" 12 | #include "../../ARDOP2/ARQ.c" 13 | #include "../../ARDOP2/berlekamp.c" 14 | #include "../../ARDOP2/BusyDetect.c" 15 | #include "../../ARDOP2/FEC.c" 16 | #include "../../ARDOP2/FFT.c" 17 | #include "../../ARDOP2/KISSModule.c" 18 | #include "../../ARDOP2/galois.c" 19 | #include "../../ARDOP2/HostInterface.c" 20 | #include "../../ARDOP2/Modulate.c" 21 | #include "../../ARDOP2/rs.c" 22 | #include "../../ARDOP2/SCSHostInterface.c" 23 | #include "../../ARDOP2/SoundInput.c" 24 | //#include "../../ARDOP2/direwolf/demod_afsk.c" 25 | //#include "../../ARDOP2/direwolf/dsp.c" 26 | //#include "../../ARDOP2/direwolf/hdlc_rec.c" 27 | #include "../../ARDOP2/afskModule.c" 28 | //#include "../../ARDOPC/costab.c" 29 | //#include "../../ARDOPC/modem.c" 30 | #include "../../ARDOP2/pktARDOP.c" 31 | #include "../../ARDOP2/pktSession.c" 32 | #include "../../ARDOPCommonCode/ARDOPCommon.c" 33 | -------------------------------------------------------------------------------- /ARDOP_Teensy/TeensyWrapper.c: -------------------------------------------------------------------------------- 1 | // 2 | // Makes keeping Windows, Linux and Teensy version in step easier 3 | 4 | #define TEENSY 5 | #define ARDOP 6 | #define PTC 7 | 8 | #include "TeensyConfig.h" 9 | 10 | #include "../../ARDOPC/ARDOPC.c" 11 | #include "../../ARDOPC/ardopSampleArrays.c" 12 | #include "../../ARDOPC/ARQ.c" 13 | #include "../../ARDOPC/berlekamp.c" 14 | #include "../../ARDOPC/BusyDetect.c" 15 | #include "../../ARDOPC/FEC.c" 16 | #include "../../ARDOPC/FFT.c" 17 | #include "../../ARDOPC/KISSModule.c" 18 | #include "../../ARDOPC/galois.c" 19 | #include "../../ARDOPC/HostInterface.c" 20 | #include "../../ARDOPC/Modulate.c" 21 | #include "../../ARDOPC/rs.c" 22 | #include "../../ARDOPC/SCSHostInterface.c" 23 | #include "../../ARDOPC/SoundInput.c" 24 | //#include "../../ARDOPC/direwolf/demod_afsk.c" 25 | //#include "../../ARDOPC/direwolf/dsp.c" 26 | //#include "../../ARDOPC/direwolf/hdlc_rec.c" 27 | #include "../../ARDOPC/afskModule.c" 28 | //#include "../../ARDOPC/costab.c" 29 | //#include "../../ARDOPC/modem.c" 30 | #include "../../ARDOPC/pktARDOP.c" 31 | #include "../../ARDOPC/pktSession.c" 32 | #include "../../ARDOPCommonCode/ARDOPCommon.c" 33 | -------------------------------------------------------------------------------- /ARDOPOFDM_Teensy/TeensyWrapper.c: -------------------------------------------------------------------------------- 1 | // 2 | // Makes keeping Windows, Linux and Teensy version in step easier 3 | 4 | #define TEENSY 5 | #define ARDOP 6 | #define PTC 7 | 8 | #include "TeensyConfig.h" 9 | 10 | #include "../../ARDOPOFDM/ofdm.c" 11 | #include "../../ARDOPOFDM/ARDOPC.c" 12 | #include "../../ARDOPOFDM/ardopSampleArrays.c" 13 | #include "../../ARDOPOFDM/ARQ.c" 14 | #include "../../ARDOPOFDM/berlekamp.c" 15 | #include "../../ARDOPOFDM/BusyDetect.c" 16 | #include "../../ARDOPOFDM/FEC.c" 17 | #include "../../ARDOPOFDM/FFT.c" 18 | #include "../../ARDOPOFDM/KISSModule.c" 19 | #include "../../ARDOPOFDM/galois.c" 20 | #include "../../ARDOPOFDM/HostInterface.c" 21 | #include "../../ARDOPOFDM/Modulate.c" 22 | #include "../../ARDOPOFDM/rs.c" 23 | #include "../../ARDOPOFDM/SCSHostInterface.c" 24 | #include "../../ARDOPOFDM/SoundInput.c" 25 | //#include "../../ARDOPOFDM/direwolf/demod_afsk.c" 26 | //#include "../../ARDOPOFDM/direwolf/dsp.c" 27 | //#include "../../ARDOPOFDM/direwolf/hdlc_rec.c" 28 | #include "../../ARDOPOFDM/afskModule.c" 29 | //#include "../../ARDOPC/costab.c" 30 | //#include "../../ARDOPC/modem.c" 31 | #include "../../ARDOPOFDM/pktARDOP.c" 32 | #include "../../ARDOPOFDM/pktSession.c" 33 | #include "../../ARDOPCommonCode/ARDOPCommon.c" 34 | -------------------------------------------------------------------------------- /ARDOP2/LCM1602-IIC.h: -------------------------------------------------------------------------------- 1 | // COMMANDOS 2 | #define LCD_CLEARDISPLAY 0x01 3 | #define LCD_RETURNHOME 0x02 4 | #define LCD_ENTRYMODESET 0x04 5 | #define LCD_DISPLAYCONTROL 0x08 6 | #define LCD_CURSORSHIFT 0x10 7 | #define LCD_FUNCTIONSET 0x20 8 | #define LCD_SETCGRAMADDR 0x40 9 | #define LCD_SETDDRAMADDR 0x80 10 | #define LCD_BACKLIGHT 0x08 11 | #define LCD_NOBACKLIGHT 0x00 12 | 13 | // FLAGS PARA EL MODO DE ENTRADA 14 | #define LCD_ENTRYRIGHT 0x00 15 | #define LCD_ENTRYLEFT 0x02 16 | #define LCD_ENTRYSHIFTINCREMENT 0x01 17 | #define LCD_ENTRYSHIFTDECREMENT 0x00 18 | 19 | // FLAGS DE DISPLAY CONTROL 20 | #define LCD_DISPLAYON 0x04 21 | #define LCD_DISPLAYOFF 0x00 22 | #define LCD_CURSORON 0x02 23 | #define LCD_CURSOROFF 0x00 24 | #define LCD_BLINKON 0x01 25 | #define LCD_BLINKOFF 0x00 26 | 27 | // FLAGS DE FUNCTION SET 28 | #define LCD_8BITMODE 0x10 29 | #define LCD_4BITMODE 0x00 30 | #define LCD_2LINE 0x08 31 | #define LCD_1LINE 0x00 32 | #define LCD_5x10DOTS 0x04 33 | #define LCD_5x8DOTS 0x00 34 | 35 | 36 | #define LCD_EN 0x04 // Enable bit 37 | #define LCD_RW 0x02 // Read/Write bit 38 | #define LCD_RS 0x01 // Register select bit 39 | 40 | void clear(int file); 41 | void home(int file); 42 | void locate(int file, int row, int col); 43 | void print(int file, const char *text); 44 | int initialize(const char *i2c_device, int addr); 45 | void finalize(int file); 46 | 47 | -------------------------------------------------------------------------------- /ARDOPC/LCM1602-IIC.h: -------------------------------------------------------------------------------- 1 | // COMMANDOS 2 | #define LCD_CLEARDISPLAY 0x01 3 | #define LCD_RETURNHOME 0x02 4 | #define LCD_ENTRYMODESET 0x04 5 | #define LCD_DISPLAYCONTROL 0x08 6 | #define LCD_CURSORSHIFT 0x10 7 | #define LCD_FUNCTIONSET 0x20 8 | #define LCD_SETCGRAMADDR 0x40 9 | #define LCD_SETDDRAMADDR 0x80 10 | #define LCD_BACKLIGHT 0x08 11 | #define LCD_NOBACKLIGHT 0x00 12 | 13 | // FLAGS PARA EL MODO DE ENTRADA 14 | #define LCD_ENTRYRIGHT 0x00 15 | #define LCD_ENTRYLEFT 0x02 16 | #define LCD_ENTRYSHIFTINCREMENT 0x01 17 | #define LCD_ENTRYSHIFTDECREMENT 0x00 18 | 19 | // FLAGS DE DISPLAY CONTROL 20 | #define LCD_DISPLAYON 0x04 21 | #define LCD_DISPLAYOFF 0x00 22 | #define LCD_CURSORON 0x02 23 | #define LCD_CURSOROFF 0x00 24 | #define LCD_BLINKON 0x01 25 | #define LCD_BLINKOFF 0x00 26 | 27 | // FLAGS DE FUNCTION SET 28 | #define LCD_8BITMODE 0x10 29 | #define LCD_4BITMODE 0x00 30 | #define LCD_2LINE 0x08 31 | #define LCD_1LINE 0x00 32 | #define LCD_5x10DOTS 0x04 33 | #define LCD_5x8DOTS 0x00 34 | 35 | 36 | #define LCD_EN 0x04 // Enable bit 37 | #define LCD_RW 0x02 // Read/Write bit 38 | #define LCD_RS 0x01 // Register select bit 39 | 40 | void clear(int file); 41 | void home(int file); 42 | void locate(int file, int row, int col); 43 | void print(int file, const char *text); 44 | int initialize(const char *i2c_device, int addr); 45 | void finalize(int file); 46 | 47 | -------------------------------------------------------------------------------- /ARDOP1OFDM/LCM1602-IIC.h: -------------------------------------------------------------------------------- 1 | // COMMANDOS 2 | #define LCD_CLEARDISPLAY 0x01 3 | #define LCD_RETURNHOME 0x02 4 | #define LCD_ENTRYMODESET 0x04 5 | #define LCD_DISPLAYCONTROL 0x08 6 | #define LCD_CURSORSHIFT 0x10 7 | #define LCD_FUNCTIONSET 0x20 8 | #define LCD_SETCGRAMADDR 0x40 9 | #define LCD_SETDDRAMADDR 0x80 10 | #define LCD_BACKLIGHT 0x08 11 | #define LCD_NOBACKLIGHT 0x00 12 | 13 | // FLAGS PARA EL MODO DE ENTRADA 14 | #define LCD_ENTRYRIGHT 0x00 15 | #define LCD_ENTRYLEFT 0x02 16 | #define LCD_ENTRYSHIFTINCREMENT 0x01 17 | #define LCD_ENTRYSHIFTDECREMENT 0x00 18 | 19 | // FLAGS DE DISPLAY CONTROL 20 | #define LCD_DISPLAYON 0x04 21 | #define LCD_DISPLAYOFF 0x00 22 | #define LCD_CURSORON 0x02 23 | #define LCD_CURSOROFF 0x00 24 | #define LCD_BLINKON 0x01 25 | #define LCD_BLINKOFF 0x00 26 | 27 | // FLAGS DE FUNCTION SET 28 | #define LCD_8BITMODE 0x10 29 | #define LCD_4BITMODE 0x00 30 | #define LCD_2LINE 0x08 31 | #define LCD_1LINE 0x00 32 | #define LCD_5x10DOTS 0x04 33 | #define LCD_5x8DOTS 0x00 34 | 35 | 36 | #define LCD_EN 0x04 // Enable bit 37 | #define LCD_RW 0x02 // Read/Write bit 38 | #define LCD_RS 0x01 // Register select bit 39 | 40 | void clear(int file); 41 | void home(int file); 42 | void locate(int file, int row, int col); 43 | void print(int file, const char *text); 44 | int initialize(const char *i2c_device, int addr); 45 | void finalize(int file); 46 | 47 | -------------------------------------------------------------------------------- /ARDOP2/Main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "LCM1602-IIC.h" 4 | 5 | char level[10][5] = { 6 | {1,32,32,32,32}, 7 | {255,32,32,32,32}, 8 | {255,1,32,32,32}, 9 | {255,255,32,32,32}, 10 | {255,255,1,32,32}, 11 | {255,255,255,32,32}, 12 | {255,255,255,1,32}, 13 | {255,255,255,255,32}, 14 | {255,255,255,255,1}, 15 | {255,255,255,255,255}}; 16 | 17 | int main(int argc, const char *argv[]) 18 | { 19 | int i, j; 20 | if (argc != 3) { 21 | printf("Ejemplo: LCD /dev/i2c-0 32\r\n"); 22 | return -1; 23 | } 24 | printf("Using device %s 0x%x\r\n", argv[1], atoi(argv[2])); 25 | 26 | int file = initialize(argv[1], atoi(argv[2])); 27 | 28 | locateCG(file, 0); 29 | print(file, "\x7\x7\x7\x7\x7\x7\x7\x7"); 30 | print(file, "\x1c\x1c\x1c\x1c\x1c\x1c\x1c\x1c"); 31 | 32 | locate(file, 0, 0); 33 | print(file, "\x7fGM8BPQ-10 "); 34 | locate(file, 1, 0); 35 | print(file, "ISS"); 36 | 37 | while (1) 38 | { 39 | for (i = 0; i < 10; i++) 40 | { 41 | locate(file, 1, 11); 42 | for (j= 0; j < 5; j++) 43 | { 44 | send(file, level[i][j], LCD_RS); 45 | } 46 | usleep(600000); 47 | } 48 | } 49 | finalize(file); 50 | } 51 | -------------------------------------------------------------------------------- /ARDOPC/Main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "LCM1602-IIC.h" 4 | 5 | char level[10][5] = { 6 | {1,32,32,32,32}, 7 | {255,32,32,32,32}, 8 | {255,1,32,32,32}, 9 | {255,255,32,32,32}, 10 | {255,255,1,32,32}, 11 | {255,255,255,32,32}, 12 | {255,255,255,1,32}, 13 | {255,255,255,255,32}, 14 | {255,255,255,255,1}, 15 | {255,255,255,255,255}}; 16 | 17 | int main(int argc, const char *argv[]) 18 | { 19 | int i, j; 20 | if (argc != 3) { 21 | printf("Ejemplo: LCD /dev/i2c-0 32\r\n"); 22 | return -1; 23 | } 24 | printf("Using device %s 0x%x\r\n", argv[1], atoi(argv[2])); 25 | 26 | int file = initialize(argv[1], atoi(argv[2])); 27 | 28 | locateCG(file, 0); 29 | print(file, "\x7\x7\x7\x7\x7\x7\x7\x7"); 30 | print(file, "\x1c\x1c\x1c\x1c\x1c\x1c\x1c\x1c"); 31 | 32 | locate(file, 0, 0); 33 | print(file, "\x7fGM8BPQ-10 "); 34 | locate(file, 1, 0); 35 | print(file, "ISS"); 36 | 37 | while (1) 38 | { 39 | for (i = 0; i < 10; i++) 40 | { 41 | locate(file, 1, 11); 42 | for (j= 0; j < 5; j++) 43 | { 44 | send(file, level[i][j], LCD_RS); 45 | } 46 | usleep(600000); 47 | } 48 | } 49 | finalize(file); 50 | } 51 | -------------------------------------------------------------------------------- /ARDOPOFDM/LCM1602-IIC.h: -------------------------------------------------------------------------------- 1 | // COMMANDOS 2 | #define LCD_CLEARDISPLAY 0x01 3 | #define LCD_RETURNHOME 0x02 4 | #define LCD_ENTRYMODESET 0x04 5 | #define LCD_DISPLAYCONTROL 0x08 6 | #define LCD_CURSORSHIFT 0x10 7 | #define LCD_FUNCTIONSET 0x20 8 | #define LCD_SETCGRAMADDR 0x40 9 | #define LCD_SETDDRAMADDR 0x80 10 | #define LCD_BACKLIGHT 0x08 11 | #define LCD_NOBACKLIGHT 0x00 12 | 13 | // FLAGS PARA EL MODO DE ENTRADA 14 | #define LCD_ENTRYRIGHT 0x00 15 | #define LCD_ENTRYLEFT 0x02 16 | #define LCD_ENTRYSHIFTINCREMENT 0x01 17 | #define LCD_ENTRYSHIFTDECREMENT 0x00 18 | 19 | // FLAGS DE DISPLAY CONTROL 20 | #define LCD_DISPLAYON 0x04 21 | #define LCD_DISPLAYOFF 0x00 22 | #define LCD_CURSORON 0x02 23 | #define LCD_CURSOROFF 0x00 24 | #define LCD_BLINKON 0x01 25 | #define LCD_BLINKOFF 0x00 26 | 27 | // FLAGS DE FUNCTION SET 28 | #define LCD_8BITMODE 0x10 29 | #define LCD_4BITMODE 0x00 30 | #define LCD_2LINE 0x08 31 | #define LCD_1LINE 0x00 32 | #define LCD_5x10DOTS 0x04 33 | #define LCD_5x8DOTS 0x00 34 | 35 | 36 | #define LCD_EN 0x04 // Enable bit 37 | #define LCD_RW 0x02 // Read/Write bit 38 | #define LCD_RS 0x01 // Register select bit 39 | 40 | void clear(int file); 41 | void home(int file); 42 | void locate(int file, int row, int col); 43 | void print(int file, const char *text); 44 | int initialize(const char *i2c_device, int addr); 45 | void finalize(int file); 46 | 47 | -------------------------------------------------------------------------------- /ARDOP1OFDM/Main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "LCM1602-IIC.h" 4 | 5 | char level[10][5] = { 6 | {1,32,32,32,32}, 7 | {255,32,32,32,32}, 8 | {255,1,32,32,32}, 9 | {255,255,32,32,32}, 10 | {255,255,1,32,32}, 11 | {255,255,255,32,32}, 12 | {255,255,255,1,32}, 13 | {255,255,255,255,32}, 14 | {255,255,255,255,1}, 15 | {255,255,255,255,255}}; 16 | 17 | int main(int argc, const char *argv[]) 18 | { 19 | int i, j; 20 | if (argc != 3) { 21 | printf("Ejemplo: LCD /dev/i2c-0 32\r\n"); 22 | return -1; 23 | } 24 | printf("Using device %s 0x%x\r\n", argv[1], atoi(argv[2])); 25 | 26 | int file = initialize(argv[1], atoi(argv[2])); 27 | 28 | locateCG(file, 0); 29 | print(file, "\x7\x7\x7\x7\x7\x7\x7\x7"); 30 | print(file, "\x1c\x1c\x1c\x1c\x1c\x1c\x1c\x1c"); 31 | 32 | locate(file, 0, 0); 33 | print(file, "\x7fGM8BPQ-10 "); 34 | locate(file, 1, 0); 35 | print(file, "ISS"); 36 | 37 | while (1) 38 | { 39 | for (i = 0; i < 10; i++) 40 | { 41 | locate(file, 1, 11); 42 | for (j= 0; j < 5; j++) 43 | { 44 | send(file, level[i][j], LCD_RS); 45 | } 46 | usleep(600000); 47 | } 48 | } 49 | finalize(file); 50 | } 51 | -------------------------------------------------------------------------------- /ARDOPOFDM/Main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "LCM1602-IIC.h" 4 | 5 | char level[10][5] = { 6 | {1,32,32,32,32}, 7 | {255,32,32,32,32}, 8 | {255,1,32,32,32}, 9 | {255,255,32,32,32}, 10 | {255,255,1,32,32}, 11 | {255,255,255,32,32}, 12 | {255,255,255,1,32}, 13 | {255,255,255,255,32}, 14 | {255,255,255,255,1}, 15 | {255,255,255,255,255}}; 16 | 17 | int main(int argc, const char *argv[]) 18 | { 19 | int i, j; 20 | if (argc != 3) { 21 | printf("Ejemplo: LCD /dev/i2c-0 32\r\n"); 22 | return -1; 23 | } 24 | printf("Using device %s 0x%x\r\n", argv[1], atoi(argv[2])); 25 | 26 | int file = initialize(argv[1], atoi(argv[2])); 27 | 28 | locateCG(file, 0); 29 | print(file, "\x7\x7\x7\x7\x7\x7\x7\x7"); 30 | print(file, "\x1c\x1c\x1c\x1c\x1c\x1c\x1c\x1c"); 31 | 32 | locate(file, 0, 0); 33 | print(file, "\x7fGM8BPQ-10 "); 34 | locate(file, 1, 0); 35 | print(file, "ISS"); 36 | 37 | while (1) 38 | { 39 | for (i = 0; i < 10; i++) 40 | { 41 | locate(file, 1, 11); 42 | for (j= 0; j < 5; j++) 43 | { 44 | send(file, level[i][j], LCD_RS); 45 | } 46 | usleep(600000); 47 | } 48 | } 49 | finalize(file); 50 | } 51 | -------------------------------------------------------------------------------- /ARDOP2/ARDOP2.vcproj.HPLAPTOP.johnw.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /ARDOP2/ARDOP2.vcproj.SKIGACER.johnw.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /ARDOP2/ARDOP2.vcproj.WL2K-CMBO.John.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /ARDOP1OFDM/ARDOP1OFDM.vcproj.HPLAPTOP.johnw.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /ARDOPC/ARDOP_PTC/ARDOP_PTC.vcproj.HPLAPTOP.johnw.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /ARDOPC/ARDOP_PTC/ARDOP_PTC.vcproj.WL2K-CMBO.John.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /ARDOP2/ARDOP2.vcproj.DESKTOP-MHE5LO8.johnw.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /ARDOPOFDM/ARDOPOFDM.vcproj.DESKTOP-TGEL8RC.John.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /ARDOPC/ARDOPC.vcproj.DESKTOP-TGEL8RC.John.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /ARDOP1OFDM/ARDOP1OFDM.vcproj.SKIGACER.johnw.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /ARDOPC/ARDOPC.vcproj.DESKTOP-TGEL8RC.John-skigdebian.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /ARDOP1OFDM/ARDOP1OFDM.vcproj.WL2K-CMBO.John.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /ARDOP1OFDM/ARDOP1OFDM.vcproj.DESKTOP-TGEL8RC.John.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /ARDOP2/ARDOP2.vcproj.DESKTOP-TGEL8RC.John.user: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 11 | 35 | 36 | 39 | 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /ARDOP2/crcgen.c: -------------------------------------------------------------------------------- 1 | /***************************** 2 | * Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009 3 | * 4 | * This software library is licensed under terms of the GNU GENERAL 5 | * PUBLIC LICENSE 6 | * 7 | * RSCODE is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * RSCODE is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Rscode. If not, see . 19 | 20 | * Commercial licensing is available under a separate license, please 21 | * contact author for details. 22 | * 23 | * Source code is available at http://rscode.sourceforge.net 24 | * 25 | * CRC-CCITT generator simulator for byte wide data. 26 | * 27 | * 28 | * CRC-CCITT = x^16 + x^12 + x^5 + 1 29 | * 30 | * 31 | ******************************/ 32 | 33 | 34 | #include "ecc.h" 35 | 36 | BIT16 crchware(BIT16 data, BIT16 genpoly, BIT16 accum); 37 | 38 | /* Computes the CRC-CCITT checksum on array of byte data, length len 39 | */ 40 | BIT16 crc_ccitt(unsigned char *msg, int len) 41 | { 42 | int i; 43 | BIT16 acc = 0; 44 | 45 | for (i = 0; i < len; i++) { 46 | acc = crchware((BIT16) msg[i], (BIT16) 0x1021, acc); 47 | } 48 | 49 | return(acc); 50 | } 51 | 52 | /* models crc hardware (minor variation on polynomial division algorithm) */ 53 | BIT16 crchware(BIT16 data, BIT16 genpoly, BIT16 accum) 54 | { 55 | static BIT16 i; 56 | data <<= 8; 57 | for (i = 8; i > 0; i--) { 58 | if ((data ^ accum) & 0x8000) 59 | accum = ((accum << 1) ^ genpoly) & 0xFFFF; 60 | else 61 | accum = (accum<<1) & 0xFFFF; 62 | data = (data<<1) & 0xFFFF; 63 | } 64 | return (accum); 65 | } 66 | 67 | -------------------------------------------------------------------------------- /ARDOPC/crcgen.c: -------------------------------------------------------------------------------- 1 | /***************************** 2 | * Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009 3 | * 4 | * This software library is licensed under terms of the GNU GENERAL 5 | * PUBLIC LICENSE 6 | * 7 | * RSCODE is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * RSCODE is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Rscode. If not, see . 19 | 20 | * Commercial licensing is available under a separate license, please 21 | * contact author for details. 22 | * 23 | * Source code is available at http://rscode.sourceforge.net 24 | * 25 | * CRC-CCITT generator simulator for byte wide data. 26 | * 27 | * 28 | * CRC-CCITT = x^16 + x^12 + x^5 + 1 29 | * 30 | * 31 | ******************************/ 32 | 33 | 34 | #include "ecc.h" 35 | 36 | BIT16 crchware(BIT16 data, BIT16 genpoly, BIT16 accum); 37 | 38 | /* Computes the CRC-CCITT checksum on array of byte data, length len 39 | */ 40 | BIT16 crc_ccitt(unsigned char *msg, int len) 41 | { 42 | int i; 43 | BIT16 acc = 0; 44 | 45 | for (i = 0; i < len; i++) { 46 | acc = crchware((BIT16) msg[i], (BIT16) 0x1021, acc); 47 | } 48 | 49 | return(acc); 50 | } 51 | 52 | /* models crc hardware (minor variation on polynomial division algorithm) */ 53 | BIT16 crchware(BIT16 data, BIT16 genpoly, BIT16 accum) 54 | { 55 | static BIT16 i; 56 | data <<= 8; 57 | for (i = 8; i > 0; i--) { 58 | if ((data ^ accum) & 0x8000) 59 | accum = ((accum << 1) ^ genpoly) & 0xFFFF; 60 | else 61 | accum = (accum<<1) & 0xFFFF; 62 | data = (data<<1) & 0xFFFF; 63 | } 64 | return (accum); 65 | } 66 | 67 | -------------------------------------------------------------------------------- /ARDOP1OFDM/crcgen.c: -------------------------------------------------------------------------------- 1 | /***************************** 2 | * Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009 3 | * 4 | * This software library is licensed under terms of the GNU GENERAL 5 | * PUBLIC LICENSE 6 | * 7 | * RSCODE is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * RSCODE is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Rscode. If not, see . 19 | 20 | * Commercial licensing is available under a separate license, please 21 | * contact author for details. 22 | * 23 | * Source code is available at http://rscode.sourceforge.net 24 | * 25 | * CRC-CCITT generator simulator for byte wide data. 26 | * 27 | * 28 | * CRC-CCITT = x^16 + x^12 + x^5 + 1 29 | * 30 | * 31 | ******************************/ 32 | 33 | 34 | #include "ecc.h" 35 | 36 | BIT16 crchware(BIT16 data, BIT16 genpoly, BIT16 accum); 37 | 38 | /* Computes the CRC-CCITT checksum on array of byte data, length len 39 | */ 40 | BIT16 crc_ccitt(unsigned char *msg, int len) 41 | { 42 | int i; 43 | BIT16 acc = 0; 44 | 45 | for (i = 0; i < len; i++) { 46 | acc = crchware((BIT16) msg[i], (BIT16) 0x1021, acc); 47 | } 48 | 49 | return(acc); 50 | } 51 | 52 | /* models crc hardware (minor variation on polynomial division algorithm) */ 53 | BIT16 crchware(BIT16 data, BIT16 genpoly, BIT16 accum) 54 | { 55 | static BIT16 i; 56 | data <<= 8; 57 | for (i = 8; i > 0; i--) { 58 | if ((data ^ accum) & 0x8000) 59 | accum = ((accum << 1) ^ genpoly) & 0xFFFF; 60 | else 61 | accum = (accum<<1) & 0xFFFF; 62 | data = (data<<1) & 0xFFFF; 63 | } 64 | return (accum); 65 | } 66 | 67 | -------------------------------------------------------------------------------- /ARDOPOFDM/crcgen.c: -------------------------------------------------------------------------------- 1 | /***************************** 2 | * Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009 3 | * 4 | * This software library is licensed under terms of the GNU GENERAL 5 | * PUBLIC LICENSE 6 | * 7 | * RSCODE is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * RSCODE is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Rscode. If not, see . 19 | 20 | * Commercial licensing is available under a separate license, please 21 | * contact author for details. 22 | * 23 | * Source code is available at http://rscode.sourceforge.net 24 | * 25 | * CRC-CCITT generator simulator for byte wide data. 26 | * 27 | * 28 | * CRC-CCITT = x^16 + x^12 + x^5 + 1 29 | * 30 | * 31 | ******************************/ 32 | 33 | 34 | #include "ecc.h" 35 | 36 | BIT16 crchware(BIT16 data, BIT16 genpoly, BIT16 accum); 37 | 38 | /* Computes the CRC-CCITT checksum on array of byte data, length len 39 | */ 40 | BIT16 crc_ccitt(unsigned char *msg, int len) 41 | { 42 | int i; 43 | BIT16 acc = 0; 44 | 45 | for (i = 0; i < len; i++) { 46 | acc = crchware((BIT16) msg[i], (BIT16) 0x1021, acc); 47 | } 48 | 49 | return(acc); 50 | } 51 | 52 | /* models crc hardware (minor variation on polynomial division algorithm) */ 53 | BIT16 crchware(BIT16 data, BIT16 genpoly, BIT16 accum) 54 | { 55 | static BIT16 i; 56 | data <<= 8; 57 | for (i = 8; i > 0; i--) { 58 | if ((data ^ accum) & 0x8000) 59 | accum = ((accum << 1) ^ genpoly) & 0xFFFF; 60 | else 61 | accum = (accum<<1) & 0xFFFF; 62 | data = (data<<1) & 0xFFFF; 63 | } 64 | return (accum); 65 | } 66 | 67 | -------------------------------------------------------------------------------- /ARDOP1OFDM/pttio.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * pttio.h -- Internal PTT input/output data structures and routines. 5 | * 6 | * Copyright (C) 2000, 2014 7 | * Thomas Sailer (sailer@ife.ee.ethz.ch) 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 | * 23 | */ 24 | 25 | /*****************************************************************************/ 26 | 27 | #ifndef _PTTIO_H 28 | #define _PTTIO_H 29 | 30 | /* ---------------------------------------------------------------------- */ 31 | 32 | #ifdef HAVE_CONFIG_H 33 | #include "config.h" 34 | #endif 35 | 36 | #ifdef WIN32 37 | #include 38 | #endif 39 | 40 | /* ---------------------------------------------------------------------- */ 41 | 42 | #ifdef WIN32 43 | 44 | struct pttio { 45 | HANDLE h; 46 | unsigned int ptt; 47 | unsigned int dcd; 48 | }; 49 | 50 | #else 51 | 52 | #ifdef HAVE_LIBHAMLIB 53 | #include 54 | #endif 55 | 56 | struct pttio { 57 | enum { noport, serport, parport, hamlibport, cm108, sysfsgpio } mode; 58 | unsigned int ptt; 59 | unsigned int dcd; 60 | unsigned int gpio; 61 | 62 | union { 63 | int fd; 64 | #ifdef HAVE_LIBHAMLIB 65 | RIG *rig_ptr; 66 | #endif 67 | } u; 68 | }; 69 | 70 | #endif 71 | 72 | /* ---------------------------------------------------------------------- */ 73 | 74 | extern struct modemparams pttparams[]; 75 | extern int pttinit(struct pttio *state, const char *params[]); 76 | extern void pttsetptt(struct pttio *state, int pttx); 77 | extern void pttsetdcd(struct pttio *state, int dcd); 78 | extern void pttrelease(struct pttio *state); 79 | 80 | /* ---------------------------------------------------------------------- */ 81 | #endif /* _PTTIO_H */ 82 | -------------------------------------------------------------------------------- /ARDOP2/pttio.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * pttio.h -- Internal PTT input/output data structures and routines. 5 | * 6 | * Copyright (C) 2000, 2014 7 | * Thomas Sailer (sailer@ife.ee.ethz.ch) 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 | * 23 | */ 24 | 25 | /*****************************************************************************/ 26 | 27 | #ifndef _PTTIO_H 28 | #define _PTTIO_H 29 | 30 | /* ---------------------------------------------------------------------- */ 31 | 32 | #ifdef HAVE_CONFIG_H 33 | #include "config.h" 34 | #endif 35 | 36 | #ifdef WIN32 37 | #include 38 | #endif 39 | 40 | /* ---------------------------------------------------------------------- */ 41 | 42 | #ifdef WIN32 43 | 44 | struct pttio { 45 | HANDLE h; 46 | unsigned int ptt; 47 | unsigned int dcd; 48 | }; 49 | 50 | #else 51 | 52 | #ifdef HAVE_LIBHAMLIB 53 | #include 54 | #endif 55 | 56 | struct pttio { 57 | enum { noport, serport, parport, hamlibport, cm108, sysfsgpio } mode; 58 | unsigned int ptt; 59 | unsigned int dcd; 60 | unsigned int gpio; 61 | 62 | union { 63 | int fd; 64 | #ifdef HAVE_LIBHAMLIB 65 | RIG *rig_ptr; 66 | #endif 67 | } u; 68 | }; 69 | 70 | #endif 71 | 72 | /* ---------------------------------------------------------------------- */ 73 | 74 | extern struct modemparams pttparams[]; 75 | extern int pttinit(struct pttio *state, const char *params[]); 76 | extern void pttsetptt(struct pttio *state, int pttx); 77 | extern void pttsetdcd(struct pttio *state, int dcd); 78 | extern void pttrelease(struct pttio *state); 79 | 80 | /* ---------------------------------------------------------------------- */ 81 | #endif /* _PTTIO_H */ 82 | -------------------------------------------------------------------------------- /ARDOPC/pttio.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * pttio.h -- Internal PTT input/output data structures and routines. 5 | * 6 | * Copyright (C) 2000, 2014 7 | * Thomas Sailer (sailer@ife.ee.ethz.ch) 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 | * 23 | */ 24 | 25 | /*****************************************************************************/ 26 | 27 | #ifndef _PTTIO_H 28 | #define _PTTIO_H 29 | 30 | /* ---------------------------------------------------------------------- */ 31 | 32 | #ifdef HAVE_CONFIG_H 33 | #include "config.h" 34 | #endif 35 | 36 | #ifdef WIN32 37 | #include 38 | #endif 39 | 40 | /* ---------------------------------------------------------------------- */ 41 | 42 | #ifdef WIN32 43 | 44 | struct pttio { 45 | HANDLE h; 46 | unsigned int ptt; 47 | unsigned int dcd; 48 | }; 49 | 50 | #else 51 | 52 | #ifdef HAVE_LIBHAMLIB 53 | #include 54 | #endif 55 | 56 | struct pttio { 57 | enum { noport, serport, parport, hamlibport, cm108, sysfsgpio } mode; 58 | unsigned int ptt; 59 | unsigned int dcd; 60 | unsigned int gpio; 61 | 62 | union { 63 | int fd; 64 | #ifdef HAVE_LIBHAMLIB 65 | RIG *rig_ptr; 66 | #endif 67 | } u; 68 | }; 69 | 70 | #endif 71 | 72 | /* ---------------------------------------------------------------------- */ 73 | 74 | extern struct modemparams pttparams[]; 75 | extern int pttinit(struct pttio *state, const char *params[]); 76 | extern void pttsetptt(struct pttio *state, int pttx); 77 | extern void pttsetdcd(struct pttio *state, int dcd); 78 | extern void pttrelease(struct pttio *state); 79 | 80 | /* ---------------------------------------------------------------------- */ 81 | #endif /* _PTTIO_H */ 82 | -------------------------------------------------------------------------------- /ARDOPOFDM/pttio.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * pttio.h -- Internal PTT input/output data structures and routines. 5 | * 6 | * Copyright (C) 2000, 2014 7 | * Thomas Sailer (sailer@ife.ee.ethz.ch) 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 | * 23 | */ 24 | 25 | /*****************************************************************************/ 26 | 27 | #ifndef _PTTIO_H 28 | #define _PTTIO_H 29 | 30 | /* ---------------------------------------------------------------------- */ 31 | 32 | #ifdef HAVE_CONFIG_H 33 | #include "config.h" 34 | #endif 35 | 36 | #ifdef WIN32 37 | #include 38 | #endif 39 | 40 | /* ---------------------------------------------------------------------- */ 41 | 42 | #ifdef WIN32 43 | 44 | struct pttio { 45 | HANDLE h; 46 | unsigned int ptt; 47 | unsigned int dcd; 48 | }; 49 | 50 | #else 51 | 52 | #ifdef HAVE_LIBHAMLIB 53 | #include 54 | #endif 55 | 56 | struct pttio { 57 | enum { noport, serport, parport, hamlibport, cm108, sysfsgpio } mode; 58 | unsigned int ptt; 59 | unsigned int dcd; 60 | unsigned int gpio; 61 | 62 | union { 63 | int fd; 64 | #ifdef HAVE_LIBHAMLIB 65 | RIG *rig_ptr; 66 | #endif 67 | } u; 68 | }; 69 | 70 | #endif 71 | 72 | /* ---------------------------------------------------------------------- */ 73 | 74 | extern struct modemparams pttparams[]; 75 | extern int pttinit(struct pttio *state, const char *params[]); 76 | extern void pttsetptt(struct pttio *state, int pttx); 77 | extern void pttsetdcd(struct pttio *state, int dcd); 78 | extern void pttrelease(struct pttio *state); 79 | 80 | /* ---------------------------------------------------------------------- */ 81 | #endif /* _PTTIO_H */ 82 | -------------------------------------------------------------------------------- /ARDOP2/soundio.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * soundio.h -- Internal data structures. 5 | * 6 | * Copyright (C) 2000 7 | * Thomas Sailer (sailer@ife.ee.ethz.ch) 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 | * 23 | */ 24 | 25 | /*****************************************************************************/ 26 | 27 | #ifndef _SOUNDIO_H 28 | #define _SOUNDIO_H 29 | 30 | /* ---------------------------------------------------------------------- */ 31 | 32 | #include "modem.h" 33 | #include "kisspkt.h" 34 | #include "pttio.h" 35 | #include "audioio.h" 36 | 37 | #ifdef WIN32 38 | #include 39 | #else 40 | #define VOID void 41 | #endif 42 | #define pthread_t unsigned int 43 | 44 | 45 | /* ---------------------------------------------------------------------- */ 46 | 47 | struct state { 48 | struct modemchannel *channels; 49 | struct state *next; 50 | struct audioio *audioio; 51 | 52 | struct chacc chacc; 53 | 54 | struct pttio ptt; 55 | 56 | }; 57 | 58 | struct modemchannel 59 | { 60 | struct modemchannel *next; 61 | struct state *state; 62 | struct modulator *mod; 63 | struct demodulator *demod; 64 | void *modstate; 65 | void *demodstate; 66 | unsigned int rxbitrate; 67 | pthread_t rxthread; 68 | struct kisspkt pkt; 69 | }; 70 | 71 | extern struct state state; 72 | 73 | /* ---------------------------------------------------------------------- */ 74 | 75 | extern struct modemparams pktkissparams[]; 76 | extern void pktinit(struct modemchannel *chan); 77 | extern void pktrelease(struct modemchannel *chan); 78 | extern void pkttransmitloop(struct state *state); 79 | 80 | //extern int snprintpkt(char *buf, size_t sz, const u_int8_t *pkt, unsigned len); 81 | 82 | extern void logrelease(void); 83 | extern void loginit(unsigned int vl, unsigned int tosysl); 84 | 85 | extern struct modulator *modchain; 86 | extern struct demodulator *demodchain; 87 | 88 | /* ---------------------------------------------------------------------- */ 89 | #endif /* _SOUNDIO_H */ 90 | -------------------------------------------------------------------------------- /ARDOPC/soundio.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * soundio.h -- Internal data structures. 5 | * 6 | * Copyright (C) 2000 7 | * Thomas Sailer (sailer@ife.ee.ethz.ch) 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 | * 23 | */ 24 | 25 | /*****************************************************************************/ 26 | 27 | #ifndef _SOUNDIO_H 28 | #define _SOUNDIO_H 29 | 30 | /* ---------------------------------------------------------------------- */ 31 | 32 | #include "modem.h" 33 | #include "kisspkt.h" 34 | #include "pttio.h" 35 | #include "audioio.h" 36 | 37 | #ifdef WIN32 38 | #include 39 | #else 40 | #define VOID void 41 | #endif 42 | #define pthread_t unsigned int 43 | 44 | 45 | /* ---------------------------------------------------------------------- */ 46 | 47 | struct state { 48 | struct modemchannel *channels; 49 | struct state *next; 50 | struct audioio *audioio; 51 | 52 | struct chacc chacc; 53 | 54 | struct pttio ptt; 55 | 56 | }; 57 | 58 | struct modemchannel 59 | { 60 | struct modemchannel *next; 61 | struct state *state; 62 | struct modulator *mod; 63 | struct demodulator *demod; 64 | void *modstate; 65 | void *demodstate; 66 | unsigned int rxbitrate; 67 | pthread_t rxthread; 68 | struct kisspkt pkt; 69 | }; 70 | 71 | extern struct state state; 72 | 73 | /* ---------------------------------------------------------------------- */ 74 | 75 | extern struct modemparams pktkissparams[]; 76 | extern void pktinit(struct modemchannel *chan); 77 | extern void pktrelease(struct modemchannel *chan); 78 | extern void pkttransmitloop(struct state *state); 79 | 80 | //extern int snprintpkt(char *buf, size_t sz, const u_int8_t *pkt, unsigned len); 81 | 82 | extern void logrelease(void); 83 | extern void loginit(unsigned int vl, unsigned int tosysl); 84 | 85 | extern struct modulator *modchain; 86 | extern struct demodulator *demodchain; 87 | 88 | /* ---------------------------------------------------------------------- */ 89 | #endif /* _SOUNDIO_H */ 90 | -------------------------------------------------------------------------------- /ARDOP1OFDM/soundio.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * soundio.h -- Internal data structures. 5 | * 6 | * Copyright (C) 2000 7 | * Thomas Sailer (sailer@ife.ee.ethz.ch) 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 | * 23 | */ 24 | 25 | /*****************************************************************************/ 26 | 27 | #ifndef _SOUNDIO_H 28 | #define _SOUNDIO_H 29 | 30 | /* ---------------------------------------------------------------------- */ 31 | 32 | #include "modem.h" 33 | #include "kisspkt.h" 34 | #include "pttio.h" 35 | #include "audioio.h" 36 | 37 | #ifdef WIN32 38 | #include 39 | #else 40 | #define VOID void 41 | #endif 42 | #define pthread_t unsigned int 43 | 44 | 45 | /* ---------------------------------------------------------------------- */ 46 | 47 | struct state { 48 | struct modemchannel *channels; 49 | struct state *next; 50 | struct audioio *audioio; 51 | 52 | struct chacc chacc; 53 | 54 | struct pttio ptt; 55 | 56 | }; 57 | 58 | struct modemchannel 59 | { 60 | struct modemchannel *next; 61 | struct state *state; 62 | struct modulator *mod; 63 | struct demodulator *demod; 64 | void *modstate; 65 | void *demodstate; 66 | unsigned int rxbitrate; 67 | pthread_t rxthread; 68 | struct kisspkt pkt; 69 | }; 70 | 71 | extern struct state state; 72 | 73 | /* ---------------------------------------------------------------------- */ 74 | 75 | extern struct modemparams pktkissparams[]; 76 | extern void pktinit(struct modemchannel *chan); 77 | extern void pktrelease(struct modemchannel *chan); 78 | extern void pkttransmitloop(struct state *state); 79 | 80 | //extern int snprintpkt(char *buf, size_t sz, const u_int8_t *pkt, unsigned len); 81 | 82 | extern void logrelease(void); 83 | extern void loginit(unsigned int vl, unsigned int tosysl); 84 | 85 | extern struct modulator *modchain; 86 | extern struct demodulator *demodchain; 87 | 88 | /* ---------------------------------------------------------------------- */ 89 | #endif /* _SOUNDIO_H */ 90 | -------------------------------------------------------------------------------- /ARDOPOFDM/soundio.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * soundio.h -- Internal data structures. 5 | * 6 | * Copyright (C) 2000 7 | * Thomas Sailer (sailer@ife.ee.ethz.ch) 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 | * 23 | */ 24 | 25 | /*****************************************************************************/ 26 | 27 | #ifndef _SOUNDIO_H 28 | #define _SOUNDIO_H 29 | 30 | /* ---------------------------------------------------------------------- */ 31 | 32 | #include "modem.h" 33 | #include "kisspkt.h" 34 | #include "pttio.h" 35 | #include "audioio.h" 36 | 37 | #ifdef WIN32 38 | #include 39 | #else 40 | #define VOID void 41 | #endif 42 | #define pthread_t unsigned int 43 | 44 | 45 | /* ---------------------------------------------------------------------- */ 46 | 47 | struct state { 48 | struct modemchannel *channels; 49 | struct state *next; 50 | struct audioio *audioio; 51 | 52 | struct chacc chacc; 53 | 54 | struct pttio ptt; 55 | 56 | }; 57 | 58 | struct modemchannel 59 | { 60 | struct modemchannel *next; 61 | struct state *state; 62 | struct modulator *mod; 63 | struct demodulator *demod; 64 | void *modstate; 65 | void *demodstate; 66 | unsigned int rxbitrate; 67 | pthread_t rxthread; 68 | struct kisspkt pkt; 69 | }; 70 | 71 | extern struct state state; 72 | 73 | /* ---------------------------------------------------------------------- */ 74 | 75 | extern struct modemparams pktkissparams[]; 76 | extern void pktinit(struct modemchannel *chan); 77 | extern void pktrelease(struct modemchannel *chan); 78 | extern void pkttransmitloop(struct state *state); 79 | 80 | //extern int snprintpkt(char *buf, size_t sz, const u_int8_t *pkt, unsigned len); 81 | 82 | extern void logrelease(void); 83 | extern void loginit(unsigned int vl, unsigned int tosysl); 84 | 85 | extern struct modulator *modchain; 86 | extern struct demodulator *demodchain; 87 | 88 | /* ---------------------------------------------------------------------- */ 89 | #endif /* _SOUNDIO_H */ 90 | -------------------------------------------------------------------------------- /ARDOP2/kisspkt.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * kisspkt.h -- Internal kisspkt data structures. 5 | * 6 | * Copyright (C) 2000 7 | * Thomas Sailer (sailer@ife.ee.ethz.ch) 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 | * 23 | */ 24 | 25 | /*****************************************************************************/ 26 | 27 | #ifndef _KISSPKT_H 28 | #define _KISSPKT_H 29 | 30 | /* ---------------------------------------------------------------------- */ 31 | 32 | #ifdef HAVE_CONFIG_H 33 | #include "config.h" 34 | #endif 35 | 36 | /* ---------------------------------------------------------------------- */ 37 | 38 | #define MAXFLEN 512U 39 | #define RXBUFFER_SIZE ((MAXFLEN*6U/5U)+8U) 40 | #define TXBUFFER_SIZE 4096U /* must be a power of 2 and >= MAXFLEN*6/5+8; NOTE: in words */ 41 | 42 | #define KISSINBUF_SIZE (2*MAXFLEN+8) 43 | 44 | #define IFNAMELEN 128 45 | 46 | /* ---------------------------------------------------------------------- */ 47 | 48 | struct chacc { 49 | unsigned int txdelay; 50 | unsigned int ppersist; 51 | unsigned int slottime; 52 | unsigned int fullduplex; 53 | unsigned int txtail; 54 | }; 55 | 56 | struct kisspkt { 57 | unsigned int dcd; 58 | unsigned int inhibittx; 59 | 60 | struct { 61 | unsigned rd, wr, txend; 62 | unsigned char buf[TXBUFFER_SIZE]; 63 | } htx; 64 | 65 | struct { 66 | unsigned int bitbuf, bitstream, numbits, state; 67 | unsigned char *bufptr; 68 | int bufcnt; 69 | unsigned char buf[RXBUFFER_SIZE]; 70 | } hrx; 71 | 72 | struct { 73 | int fd, fdmaster, ioerr; 74 | unsigned iframelen, ibufptr; 75 | char ifname[IFNAMELEN]; 76 | unsigned char ibuf[KISSINBUF_SIZE]; 77 | } kiss; 78 | 79 | struct { 80 | unsigned int kiss_in; 81 | unsigned int kiss_inerr; 82 | unsigned int kiss_out; 83 | unsigned int kiss_outerr; 84 | unsigned int pkt_in; 85 | unsigned int pkt_out; 86 | } stat; 87 | }; 88 | 89 | /* ---------------------------------------------------------------------- */ 90 | #endif /* _KISSPKT_H */ 91 | -------------------------------------------------------------------------------- /ARDOPC/kisspkt.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * kisspkt.h -- Internal kisspkt data structures. 5 | * 6 | * Copyright (C) 2000 7 | * Thomas Sailer (sailer@ife.ee.ethz.ch) 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 | * 23 | */ 24 | 25 | /*****************************************************************************/ 26 | 27 | #ifndef _KISSPKT_H 28 | #define _KISSPKT_H 29 | 30 | /* ---------------------------------------------------------------------- */ 31 | 32 | #ifdef HAVE_CONFIG_H 33 | #include "config.h" 34 | #endif 35 | 36 | /* ---------------------------------------------------------------------- */ 37 | 38 | #define MAXFLEN 512U 39 | #define RXBUFFER_SIZE ((MAXFLEN*6U/5U)+8U) 40 | #define TXBUFFER_SIZE 4096U /* must be a power of 2 and >= MAXFLEN*6/5+8; NOTE: in words */ 41 | 42 | #define KISSINBUF_SIZE (2*MAXFLEN+8) 43 | 44 | #define IFNAMELEN 128 45 | 46 | /* ---------------------------------------------------------------------- */ 47 | 48 | struct chacc { 49 | unsigned int txdelay; 50 | unsigned int ppersist; 51 | unsigned int slottime; 52 | unsigned int fullduplex; 53 | unsigned int txtail; 54 | }; 55 | 56 | struct kisspkt { 57 | unsigned int dcd; 58 | unsigned int inhibittx; 59 | 60 | struct { 61 | unsigned rd, wr, txend; 62 | unsigned char buf[TXBUFFER_SIZE]; 63 | } htx; 64 | 65 | struct { 66 | unsigned int bitbuf, bitstream, numbits, state; 67 | unsigned char *bufptr; 68 | int bufcnt; 69 | unsigned char buf[RXBUFFER_SIZE]; 70 | } hrx; 71 | 72 | struct { 73 | int fd, fdmaster, ioerr; 74 | unsigned iframelen, ibufptr; 75 | char ifname[IFNAMELEN]; 76 | unsigned char ibuf[KISSINBUF_SIZE]; 77 | } kiss; 78 | 79 | struct { 80 | unsigned int kiss_in; 81 | unsigned int kiss_inerr; 82 | unsigned int kiss_out; 83 | unsigned int kiss_outerr; 84 | unsigned int pkt_in; 85 | unsigned int pkt_out; 86 | } stat; 87 | }; 88 | 89 | /* ---------------------------------------------------------------------- */ 90 | #endif /* _KISSPKT_H */ 91 | -------------------------------------------------------------------------------- /ARDOPOFDM/kisspkt.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * kisspkt.h -- Internal kisspkt data structures. 5 | * 6 | * Copyright (C) 2000 7 | * Thomas Sailer (sailer@ife.ee.ethz.ch) 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 | * 23 | */ 24 | 25 | /*****************************************************************************/ 26 | 27 | #ifndef _KISSPKT_H 28 | #define _KISSPKT_H 29 | 30 | /* ---------------------------------------------------------------------- */ 31 | 32 | #ifdef HAVE_CONFIG_H 33 | #include "config.h" 34 | #endif 35 | 36 | /* ---------------------------------------------------------------------- */ 37 | 38 | #define MAXFLEN 512U 39 | #define RXBUFFER_SIZE ((MAXFLEN*6U/5U)+8U) 40 | #define TXBUFFER_SIZE 4096U /* must be a power of 2 and >= MAXFLEN*6/5+8; NOTE: in words */ 41 | 42 | #define KISSINBUF_SIZE (2*MAXFLEN+8) 43 | 44 | #define IFNAMELEN 128 45 | 46 | /* ---------------------------------------------------------------------- */ 47 | 48 | struct chacc { 49 | unsigned int txdelay; 50 | unsigned int ppersist; 51 | unsigned int slottime; 52 | unsigned int fullduplex; 53 | unsigned int txtail; 54 | }; 55 | 56 | struct kisspkt { 57 | unsigned int dcd; 58 | unsigned int inhibittx; 59 | 60 | struct { 61 | unsigned rd, wr, txend; 62 | unsigned char buf[TXBUFFER_SIZE]; 63 | } htx; 64 | 65 | struct { 66 | unsigned int bitbuf, bitstream, numbits, state; 67 | unsigned char *bufptr; 68 | int bufcnt; 69 | unsigned char buf[RXBUFFER_SIZE]; 70 | } hrx; 71 | 72 | struct { 73 | int fd, fdmaster, ioerr; 74 | unsigned iframelen, ibufptr; 75 | char ifname[IFNAMELEN]; 76 | unsigned char ibuf[KISSINBUF_SIZE]; 77 | } kiss; 78 | 79 | struct { 80 | unsigned int kiss_in; 81 | unsigned int kiss_inerr; 82 | unsigned int kiss_out; 83 | unsigned int kiss_outerr; 84 | unsigned int pkt_in; 85 | unsigned int pkt_out; 86 | } stat; 87 | }; 88 | 89 | /* ---------------------------------------------------------------------- */ 90 | #endif /* _KISSPKT_H */ 91 | -------------------------------------------------------------------------------- /ARDOP1OFDM/kisspkt.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * kisspkt.h -- Internal kisspkt data structures. 5 | * 6 | * Copyright (C) 2000 7 | * Thomas Sailer (sailer@ife.ee.ethz.ch) 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 | * 23 | */ 24 | 25 | /*****************************************************************************/ 26 | 27 | #ifndef _KISSPKT_H 28 | #define _KISSPKT_H 29 | 30 | /* ---------------------------------------------------------------------- */ 31 | 32 | #ifdef HAVE_CONFIG_H 33 | #include "config.h" 34 | #endif 35 | 36 | /* ---------------------------------------------------------------------- */ 37 | 38 | #define MAXFLEN 512U 39 | #define RXBUFFER_SIZE ((MAXFLEN*6U/5U)+8U) 40 | #define TXBUFFER_SIZE 4096U /* must be a power of 2 and >= MAXFLEN*6/5+8; NOTE: in words */ 41 | 42 | #define KISSINBUF_SIZE (2*MAXFLEN+8) 43 | 44 | #define IFNAMELEN 128 45 | 46 | /* ---------------------------------------------------------------------- */ 47 | 48 | struct chacc { 49 | unsigned int txdelay; 50 | unsigned int ppersist; 51 | unsigned int slottime; 52 | unsigned int fullduplex; 53 | unsigned int txtail; 54 | }; 55 | 56 | struct kisspkt { 57 | unsigned int dcd; 58 | unsigned int inhibittx; 59 | 60 | struct { 61 | unsigned rd, wr, txend; 62 | unsigned char buf[TXBUFFER_SIZE]; 63 | } htx; 64 | 65 | struct { 66 | unsigned int bitbuf, bitstream, numbits, state; 67 | unsigned char *bufptr; 68 | int bufcnt; 69 | unsigned char buf[RXBUFFER_SIZE]; 70 | } hrx; 71 | 72 | struct { 73 | int fd, fdmaster, ioerr; 74 | unsigned iframelen, ibufptr; 75 | char ifname[IFNAMELEN]; 76 | unsigned char ibuf[KISSINBUF_SIZE]; 77 | } kiss; 78 | 79 | struct { 80 | unsigned int kiss_in; 81 | unsigned int kiss_inerr; 82 | unsigned int kiss_out; 83 | unsigned int kiss_outerr; 84 | unsigned int pkt_in; 85 | unsigned int pkt_out; 86 | } stat; 87 | }; 88 | 89 | /* ---------------------------------------------------------------------- */ 90 | #endif /* _KISSPKT_H */ 91 | -------------------------------------------------------------------------------- /ARDOPOFDM/ARDOPOFDM.txt: -------------------------------------------------------------------------------- 1 | ARDOPOFDM is an experimental extension to ARDOP2. The higher speed PSK and QAM modes of ARDOP2 are replaced with OFDM modes. There are two bandwidths, 500 and 2500 and 4 modes within each bandwidth (2PSK, 4PSK 8PSK and 16PSK or 16QAM). The code uses a modulation rate and carrier spacing of 55.555 Hz. The 500 mode uses 9 carriers and the 2500 mode 43 carriers. There isn't a 200 wide version. 2 | 3 | The code runs on Windows, Linux and my Teensy TNC. 4 | 5 | ARDOPOFDM has one new configuration parameter, ENABLEOFDM, with a default of TRUE. Apart from the new data frames it has two new CONREQ frames, OCONREQ500 and OCONREQ2500 and a new ACK, OFDMACK. If ENABLEOFDM is set it will send and accept the OCONREQ frames and the OFDM data frames. For compatibility with ARDOP2 stations if it receives a normal CONREQ frame it will disable the use of the OFDM data frames. If ENABLEOFDM is set to FALSE it will use normal CONREQ frames and reject OCONREQ, so it can connect to ARDOP2 stations. ARDOPOFDM acks each carrier separately, so only carriers that have failed to decode are repeated. If all carriers are ok a normal DataACK or DataACKHQ frame is sent, if not a slightly longer OFDMACK is sent which indicates which carriers need to be repeated. 6 | 7 | I haven't been able to evaluate it under a wide range of radio conditions, but initial testing looks promising. Under ideal conditions it is a bit over twice as fast as normal ARDOP (about 80% of the speed of VARA). Data frame length is a little under 5 seconds. Under ideal conditions performance in 2500 mode is 8 | 9 | 16OFDM 80 bytes/carrier, 3440 bytes per frame, approx 4600 BPS Net 10 | 8OFDM 60 bytes/carrier, 2580 bytes per frame, approx 3440 BPS Net 11 | 4OFDM 40 bytes/carrier, 1720 bytes per frame, approx 2300 BPS Net 12 | 2OFDM 19 bytes/carrier, 817 bytes per frame, approx 1100 BPS Net 13 | 14 | For Comparison 16QAM.2500.100 (10 Carriers) 15 | 16 | 120 bytes/carrier, 1200 bytes per frame, approx 2225 BPS Net 17 | 18 | As mentioned earlier this a experimental and modulation details and frame formats are likely to change as testing proceeds. It is really only suitable for people who a used to testing software. 19 | 20 | Software can be downloaded from 21 | 22 | http://www.cantab.net/users/john.wiseman/Downloads/Beta/ARDOPOFDM.exe 23 | http://www.cantab.net/users/john.wiseman/Downloads/Beta/ardopofdm 24 | http://www.cantab.net/users/john.wiseman/Downloads/Beta/piardopofdm 25 | http://www.cantab.net/users/john.wiseman/Downloads/Beta/TeensyProjects.zip 26 | 27 | 28 | The software has only been tested with BPQ32/LinBPQ and Winlink Express in PTC Emulation mode. You need to install the latest Beta BPQ32 or linbpq to use it. It may work with RMS Express in normal mode and Trimode, but this hasn't been tested and may result in slow running or data corruption due to changes in flow control thresholds. 29 | 30 | -------------------------------------------------------------------------------- /ARDOP2/audioio.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * audioio.h -- Internal audioio data structures. 5 | * 6 | * Copyright (C) 2000 7 | * Thomas Sailer (sailer@ife.ee.ethz.ch) 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 | * 23 | */ 24 | 25 | /*****************************************************************************/ 26 | 27 | #ifndef _AUDIOIO_H 28 | #define _AUDIOIO_H 29 | 30 | /* ---------------------------------------------------------------------- */ 31 | 32 | #ifdef HAVE_CONFIG_H 33 | #include "config.h" 34 | #endif 35 | 36 | #include "modem.h" 37 | 38 | /* ---------------------------------------------------------------------- */ 39 | 40 | struct audioio { 41 | void (*release)(struct audioio *audioio); 42 | void (*terminateread)(struct audioio *audioio); 43 | void (*transmitstart)(struct audioio *audioio); 44 | void (*transmitstop)(struct audioio *audioio); 45 | void (*write)(struct audioio *audioio, const int16_t *samples, unsigned int nr); 46 | void (*read)(struct audioio *audioio, int16_t *samples, unsigned int nr, u_int16_t tim); 47 | u_int16_t (*curtime)(struct audioio *audioio); 48 | }; 49 | 50 | /* "private" audio IO functions */ 51 | extern struct modemparams ioparams_soundcard[]; 52 | extern struct modemparams ioparams_alsasoundcard[]; 53 | extern struct modemparams ioparams_filein[]; 54 | extern struct modemparams ioparams_sim[]; 55 | 56 | extern void ioinit_soundcard(void); 57 | extern void ioinit_alsasoundcard(void); 58 | extern void ioinit_filein(void); 59 | extern void ioinit_sim(void); 60 | 61 | #define IO_RDONLY 1 62 | #define IO_WRONLY 2 63 | #define IO_RDWR (IO_RDONLY|IO_WRONLY) 64 | 65 | extern struct audioio *ioopen_soundcard(unsigned int *samplerate, unsigned int flags, const char *params[]); 66 | extern struct audioio *ioopen_alsasoundcard(unsigned int *samplerate, unsigned int flags, const char *params[]); 67 | extern struct audioio *ioopen_filein(unsigned int *samplerate, unsigned int flags, const char *params[]); 68 | extern struct audioio *ioopen_sim(unsigned int *samplerate, unsigned int flags, const char *params[]); 69 | 70 | /* ---------------------------------------------------------------------- */ 71 | #endif /* _AUDIOIO_H */ 72 | -------------------------------------------------------------------------------- /ARDOPC/audioio.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * audioio.h -- Internal audioio data structures. 5 | * 6 | * Copyright (C) 2000 7 | * Thomas Sailer (sailer@ife.ee.ethz.ch) 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 | * 23 | */ 24 | 25 | /*****************************************************************************/ 26 | 27 | #ifndef _AUDIOIO_H 28 | #define _AUDIOIO_H 29 | 30 | /* ---------------------------------------------------------------------- */ 31 | 32 | #ifdef HAVE_CONFIG_H 33 | #include "config.h" 34 | #endif 35 | 36 | #include "modem.h" 37 | 38 | /* ---------------------------------------------------------------------- */ 39 | 40 | struct audioio { 41 | void (*release)(struct audioio *audioio); 42 | void (*terminateread)(struct audioio *audioio); 43 | void (*transmitstart)(struct audioio *audioio); 44 | void (*transmitstop)(struct audioio *audioio); 45 | void (*write)(struct audioio *audioio, const int16_t *samples, unsigned int nr); 46 | void (*read)(struct audioio *audioio, int16_t *samples, unsigned int nr, u_int16_t tim); 47 | u_int16_t (*curtime)(struct audioio *audioio); 48 | }; 49 | 50 | /* "private" audio IO functions */ 51 | extern struct modemparams ioparams_soundcard[]; 52 | extern struct modemparams ioparams_alsasoundcard[]; 53 | extern struct modemparams ioparams_filein[]; 54 | extern struct modemparams ioparams_sim[]; 55 | 56 | extern void ioinit_soundcard(void); 57 | extern void ioinit_alsasoundcard(void); 58 | extern void ioinit_filein(void); 59 | extern void ioinit_sim(void); 60 | 61 | #define IO_RDONLY 1 62 | #define IO_WRONLY 2 63 | #define IO_RDWR (IO_RDONLY|IO_WRONLY) 64 | 65 | extern struct audioio *ioopen_soundcard(unsigned int *samplerate, unsigned int flags, const char *params[]); 66 | extern struct audioio *ioopen_alsasoundcard(unsigned int *samplerate, unsigned int flags, const char *params[]); 67 | extern struct audioio *ioopen_filein(unsigned int *samplerate, unsigned int flags, const char *params[]); 68 | extern struct audioio *ioopen_sim(unsigned int *samplerate, unsigned int flags, const char *params[]); 69 | 70 | /* ---------------------------------------------------------------------- */ 71 | #endif /* _AUDIOIO_H */ 72 | -------------------------------------------------------------------------------- /ARDOP1OFDM/audioio.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * audioio.h -- Internal audioio data structures. 5 | * 6 | * Copyright (C) 2000 7 | * Thomas Sailer (sailer@ife.ee.ethz.ch) 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 | * 23 | */ 24 | 25 | /*****************************************************************************/ 26 | 27 | #ifndef _AUDIOIO_H 28 | #define _AUDIOIO_H 29 | 30 | /* ---------------------------------------------------------------------- */ 31 | 32 | #ifdef HAVE_CONFIG_H 33 | #include "config.h" 34 | #endif 35 | 36 | #include "modem.h" 37 | 38 | /* ---------------------------------------------------------------------- */ 39 | 40 | struct audioio { 41 | void (*release)(struct audioio *audioio); 42 | void (*terminateread)(struct audioio *audioio); 43 | void (*transmitstart)(struct audioio *audioio); 44 | void (*transmitstop)(struct audioio *audioio); 45 | void (*write)(struct audioio *audioio, const int16_t *samples, unsigned int nr); 46 | void (*read)(struct audioio *audioio, int16_t *samples, unsigned int nr, u_int16_t tim); 47 | u_int16_t (*curtime)(struct audioio *audioio); 48 | }; 49 | 50 | /* "private" audio IO functions */ 51 | extern struct modemparams ioparams_soundcard[]; 52 | extern struct modemparams ioparams_alsasoundcard[]; 53 | extern struct modemparams ioparams_filein[]; 54 | extern struct modemparams ioparams_sim[]; 55 | 56 | extern void ioinit_soundcard(void); 57 | extern void ioinit_alsasoundcard(void); 58 | extern void ioinit_filein(void); 59 | extern void ioinit_sim(void); 60 | 61 | #define IO_RDONLY 1 62 | #define IO_WRONLY 2 63 | #define IO_RDWR (IO_RDONLY|IO_WRONLY) 64 | 65 | extern struct audioio *ioopen_soundcard(unsigned int *samplerate, unsigned int flags, const char *params[]); 66 | extern struct audioio *ioopen_alsasoundcard(unsigned int *samplerate, unsigned int flags, const char *params[]); 67 | extern struct audioio *ioopen_filein(unsigned int *samplerate, unsigned int flags, const char *params[]); 68 | extern struct audioio *ioopen_sim(unsigned int *samplerate, unsigned int flags, const char *params[]); 69 | 70 | /* ---------------------------------------------------------------------- */ 71 | #endif /* _AUDIOIO_H */ 72 | -------------------------------------------------------------------------------- /ARDOPOFDM/audioio.h: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | 3 | /* 4 | * audioio.h -- Internal audioio data structures. 5 | * 6 | * Copyright (C) 2000 7 | * Thomas Sailer (sailer@ife.ee.ethz.ch) 8 | * 9 | * This program is free software; you can redistribute it and/or modify 10 | * it under the terms of the GNU General Public License as published by 11 | * the Free Software Foundation; either version 2 of the License, or 12 | * (at your option) any later version. 13 | * 14 | * This program is distributed in the hope that it will be useful, 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 | * GNU General Public License for more details. 18 | * 19 | * You should have received a copy of the GNU General Public License 20 | * along with this program; if not, write to the Free Software 21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 | * 23 | */ 24 | 25 | /*****************************************************************************/ 26 | 27 | #ifndef _AUDIOIO_H 28 | #define _AUDIOIO_H 29 | 30 | /* ---------------------------------------------------------------------- */ 31 | 32 | #ifdef HAVE_CONFIG_H 33 | #include "config.h" 34 | #endif 35 | 36 | #include "modem.h" 37 | 38 | /* ---------------------------------------------------------------------- */ 39 | 40 | struct audioio { 41 | void (*release)(struct audioio *audioio); 42 | void (*terminateread)(struct audioio *audioio); 43 | void (*transmitstart)(struct audioio *audioio); 44 | void (*transmitstop)(struct audioio *audioio); 45 | void (*write)(struct audioio *audioio, const int16_t *samples, unsigned int nr); 46 | void (*read)(struct audioio *audioio, int16_t *samples, unsigned int nr, u_int16_t tim); 47 | u_int16_t (*curtime)(struct audioio *audioio); 48 | }; 49 | 50 | /* "private" audio IO functions */ 51 | extern struct modemparams ioparams_soundcard[]; 52 | extern struct modemparams ioparams_alsasoundcard[]; 53 | extern struct modemparams ioparams_filein[]; 54 | extern struct modemparams ioparams_sim[]; 55 | 56 | extern void ioinit_soundcard(void); 57 | extern void ioinit_alsasoundcard(void); 58 | extern void ioinit_filein(void); 59 | extern void ioinit_sim(void); 60 | 61 | #define IO_RDONLY 1 62 | #define IO_WRONLY 2 63 | #define IO_RDWR (IO_RDONLY|IO_WRONLY) 64 | 65 | extern struct audioio *ioopen_soundcard(unsigned int *samplerate, unsigned int flags, const char *params[]); 66 | extern struct audioio *ioopen_alsasoundcard(unsigned int *samplerate, unsigned int flags, const char *params[]); 67 | extern struct audioio *ioopen_filein(unsigned int *samplerate, unsigned int flags, const char *params[]); 68 | extern struct audioio *ioopen_sim(unsigned int *samplerate, unsigned int flags, const char *params[]); 69 | 70 | /* ---------------------------------------------------------------------- */ 71 | #endif /* _AUDIOIO_H */ 72 | -------------------------------------------------------------------------------- /ARDOP1OFDM/ARDOPDebug8515_20191124.log: -------------------------------------------------------------------------------- 1 | 10:51:33.627 ARDOPC Version 1.0.4.1q-OFDMBPQ 2 | 10:51:33.646 Capture Devices 3 | 10:51:35.048 0 Digital Audio Interface (8- Tee 4 | 10:51:35.196 1 Stereo Mix (Realtek High Defini 5 | 10:51:35.457 2 CABLE Output (VB-Audio Virtual 6 | 10:51:35.458 Playback Devices 7 | 10:51:35.711 0 Digital Audio Interface (8- Tee 8 | 10:51:35.847 1 CABLE Input (VB-Audio Virtual C 9 | 10:51:35.917 2 Speakers (Realtek High Definiti 10 | 10:51:36.021 3 Realtek Digital Output (Realtek 11 | 10:51:36.053 Opened WaveOut Device Speakers (Realtek High Definiti 12 | 10:51:36.069 Opened WaveIn Device Stereo Mix (Realtek High Defini 13 | 10:51:36.083 ARDOPC listening on port 8520 14 | 10:51:36.137 Input peaks = -31431, 11999 15 | 10:51:46.183 Input peaks = -4, 3 16 | 10:53:14.136 ARDOPC Version 1.0.4.1q-OFDMBPQ 17 | 10:53:14.137 Capture Devices 18 | 10:53:14.417 0 Digital Audio Interface (8- Tee 19 | 10:53:14.447 1 Stereo Mix (Realtek High Defini 20 | 10:53:14.459 2 CABLE Output (VB-Audio Virtual 21 | 10:53:14.461 Playback Devices 22 | 10:53:14.515 0 Digital Audio Interface (8- Tee 23 | 10:53:14.557 1 CABLE Input (VB-Audio Virtual C 24 | 10:53:14.608 2 Speakers (Realtek High Definiti 25 | 10:53:14.641 3 Realtek Digital Output (Realtek 26 | 10:53:14.672 Opened WaveOut Device Microsoft Sound Mapper 27 | 10:53:14.682 Opened WaveIn Device Microsoft Sound Mapper 28 | 10:53:14.692 ARDOPC listening on port 8520 29 | 10:53:14.711 Input peaks = -32768, 0 30 | 10:53:24.746 Input peaks = -31049, 0 31 | 10:54:00.270 ARDOPC Version 1.0.4.1q-OFDMBPQ 32 | 10:54:00.270 Capture Devices 33 | 10:54:00.668 0 Digital Audio Interface (8- Tee 34 | 10:54:00.688 1 Stereo Mix (Realtek High Defini 35 | 10:54:00.697 2 CABLE Output (VB-Audio Virtual 36 | 10:54:00.697 Playback Devices 37 | 10:54:00.734 0 Digital Audio Interface (8- Tee 38 | 10:54:00.759 1 CABLE Input (VB-Audio Virtual C 39 | 10:54:00.802 2 Speakers (Realtek High Definiti 40 | 10:54:00.838 3 Realtek Digital Output (Realtek 41 | 10:54:00.858 Opened WaveOut Device Digital Audio Interface (8- Tee 42 | 10:54:00.865 Opened WaveIn Device Digital Audio Interface (8- Tee 43 | 10:54:00.886 ARDOPC listening on port 8520 44 | 10:54:00.894 Input peaks = -30998, 0 45 | 10:54:10.927 Input peaks = -31047, 0 46 | 10:54:20.971 Input peaks = -31050, 0 47 | 11:06:00.410 ARDOPC Version 1.0.4.1q-OFDMBPQ 48 | 11:06:00.410 Capture Devices 49 | 11:06:00.752 0 Digital Audio Interface (8- Tee 50 | 11:06:00.767 1 Stereo Mix (Realtek High Defini 51 | 11:06:00.779 2 CABLE Output (VB-Audio Virtual 52 | 11:06:00.779 Playback Devices 53 | 11:06:00.818 0 Digital Audio Interface (8- Tee 54 | 11:06:00.858 1 CABLE Input (VB-Audio Virtual C 55 | 11:06:00.896 2 Speakers (Realtek High Definiti 56 | 11:06:00.929 3 Realtek Digital Output (Realtek 57 | 11:06:00.946 Opened WaveOut Device Digital Audio Interface (8- Tee 58 | 11:06:00.955 Opened WaveIn Device Digital Audio Interface (8- Tee 59 | 11:06:00.972 ARDOPC listening on port 8520 60 | 11:06:00.988 Input peaks = -31010, 0 61 | 11:06:11.044 Input peaks = -31058, 0 62 | -------------------------------------------------------------------------------- /ARDOP2/ARDOPSession8520_20210920.log: -------------------------------------------------------------------------------- 1 | 09:42:51.860 2 | ************************* ARQ session stats with G8BPQ-2 1 minutes **************************** 3 | LeaderDetects= 32 AvgLeader S+N:N(3KHz noise BW)= 0.231549 dB LeaderSyncs= 32 4 | AvgCorrelationMax:MaxProd= 59.814011 over 32 correlations 5 | FrameSyncs=30 Good Frame Type Decodes=29 Failed Frame Type Decodes =1 Timeouts =11 6 | Avg Frame Type decode distance= 0.034526 over 29 decodes 7 | 8 | FSK: 9 | Good FSK Data Frame Decodes= 1 RecoveredFSKCarriers with Summation=0 Failed FSK Data Frame Decodes=0 10 | AccumFSKTracking= 0 over 64 symbols Good Data Frame Decodes= 1 Failed Data Frame Decodes=0 11 | 12 | PSK: 13 | Good PSK Data Frame Decodes=1 RecoveredPSKCarriers with Summation=0 Failed PSK Data Frame Decodes=0 14 | AccumPSKTracking=0 0 attempts over 1720 total PSK Symbols 15 | 16 | 17 | QAM: 18 | Good QAM Data Frame Decodes=1 RecoveredQAMCarriers with Summation=0 Failed QAM Data Frame Decodes=0 19 | AccumQAMTracking=0 0 attempts over 3260 total QAM Symbols 20 | 21 | Squelch= 5 BusyDet= 5 Mode Shift UPs= 3 Mode Shift DOWNs= 0 Link Turnovers= 5 22 | 23 | Received Frame Quality: 24 | Avg 4FSK Quality=100 on 1 frame(s) 25 | Avg 4PSK Quality=98 on 1 frame(s) 26 | Avg QAM Quality=94 on 1 frame(s) 27 | 28 | Type ACKS NAKS 29 | 4FSK.500.50.E 0 0 30 | 4FSK.1000.50.E 0 0 31 | 4PSKR.2500.50.E 1 0 32 | 4PSK.2500.50.E 1 0 33 | 16QAMR.2500.100.E 1 0 34 | 16QAM.2500.100.E 3 0 35 | ************************************************************************************************ 36 | 09:44:41.092 37 | ************************* ARQ session stats with G8BPQ-10 1 minutes **************************** 38 | LeaderDetects= 33 AvgLeader S+N:N(3KHz noise BW)= 1.204753 dB LeaderSyncs= 33 39 | AvgCorrelationMax:MaxProd= 59.995232 over 33 correlations 40 | FrameSyncs=33 Good Frame Type Decodes=33 Failed Frame Type Decodes =0 Timeouts =0 41 | Avg Frame Type decode distance= 0.000052 over 31 decodes 42 | 43 | PSK: 44 | Good PSK Data Frame Decodes=1 RecoveredPSKCarriers with Summation=0 Failed PSK Data Frame Decodes=0 45 | AccumPSKTracking=0 0 attempts over 1720 total PSK Symbols 46 | 47 | 48 | QAM: 49 | Good QAM Data Frame Decodes=4 RecoveredQAMCarriers with Summation=0 Failed QAM Data Frame Decodes=0 50 | AccumQAMTracking=0 0 attempts over 13040 total QAM Symbols 51 | 52 | Squelch= 5 BusyDet= 5 Mode Shift UPs= 2 Mode Shift DOWNs= 0 Link Turnovers= 5 53 | 54 | Received Frame Quality: 55 | Avg 4PSK Quality=98 on 1 frame(s) 56 | Avg QAM Quality=92 on 4 frame(s) 57 | 58 | Type ACKS NAKS 59 | 4FSK.500.50.E 0 0 60 | 4FSK.1000.50.E 0 0 61 | 4PSKR.2500.50.E 1 0 62 | 4PSK.2500.50.E 1 0 63 | 16QAMR.2500.100.E 0 0 64 | 16QAM.2500.100.E 0 0 65 | ************************************************************************************************ 66 | -------------------------------------------------------------------------------- /ARDOP2/galois.c: -------------------------------------------------------------------------------- 1 | /***************************** 2 | * Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009 3 | * 4 | * This software library is licensed under terms of the GNU GENERAL 5 | * PUBLIC LICENSE 6 | * 7 | * RSCODE is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * RSCODE is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Rscode. If not, see . 19 | 20 | * Commercial licensing is available under a separate license, please 21 | * contact author for details. 22 | * 23 | * Source code is available at http://rscode.sourceforge.net 24 | * 25 | * 26 | * Multiplication and Arithmetic on Galois Field GF(256) 27 | * 28 | * From Mee, Daniel, "Magnetic Recording, Volume III", Ch. 5 by Patel. 29 | * 30 | * 31 | ******************************/ 32 | 33 | 34 | #include 35 | #include 36 | #include "ecc.h" 37 | 38 | /* This is one of 14 irreducible polynomials 39 | * of degree 8 and cycle length 255. (Ch 5, pp. 275, Magnetic Recording) 40 | * The high order 1 bit is implicit */ 41 | /* x^8 + x^4 + x^3 + x^2 + 1 */ 42 | #define PPOLY 0x1D 43 | 44 | 45 | int gexp[512]; 46 | int glog[256]; 47 | 48 | 49 | static void init_exp_table (void); 50 | 51 | 52 | void 53 | init_galois_tables (void) 54 | { 55 | /* initialize the table of powers of alpha */ 56 | init_exp_table(); 57 | } 58 | 59 | 60 | static void 61 | init_exp_table (void) 62 | { 63 | int i, z; 64 | int pinit,p1,p2,p3,p4,p5,p6,p7,p8; 65 | 66 | pinit = p2 = p3 = p4 = p5 = p6 = p7 = p8 = 0; 67 | p1 = 1; 68 | 69 | gexp[0] = 1; 70 | gexp[255] = gexp[0]; 71 | glog[0] = 0; /* shouldn't log[0] be an error? */ 72 | 73 | // Private pp8() As Integer = {1, 0, 1, 1, 1, 0, 0, 0, 1} 'specify irreducible polynomial coeffts */ 74 | 75 | for (i = 1; i < 256; i++) { 76 | pinit = p8; 77 | p8 = p7; 78 | p7 = p6; 79 | p6 = p5; 80 | p5 = p4 ^ pinit; 81 | p4 = p3 ^ pinit; 82 | p3 = p2 ^ pinit; 83 | p2 = p1; 84 | p1 = pinit; 85 | gexp[i] = p1 + p2*2 + p3*4 + p4*8 + p5*16 + p6*32 + p7*64 + p8*128; 86 | gexp[i+255] = gexp[i]; 87 | } 88 | 89 | for (i = 1; i < 256; i++) { 90 | for (z = 0; z < 256; z++) { 91 | if (gexp[z] == i) { 92 | glog[i] = z; 93 | break; 94 | } 95 | } 96 | } 97 | } 98 | 99 | /* multiplication using logarithms */ 100 | int gmult(int a, int b) 101 | { 102 | int i,j; 103 | if (a==0 || b == 0) return (0); 104 | i = glog[a]; 105 | j = glog[b]; 106 | return (gexp[i+j]); 107 | } 108 | 109 | 110 | int ginv (int elt) 111 | { 112 | return (gexp[255-glog[elt]]); 113 | } 114 | 115 | -------------------------------------------------------------------------------- /ARDOPC/galois.c: -------------------------------------------------------------------------------- 1 | /***************************** 2 | * Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009 3 | * 4 | * This software library is licensed under terms of the GNU GENERAL 5 | * PUBLIC LICENSE 6 | * 7 | * RSCODE is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * RSCODE is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Rscode. If not, see . 19 | 20 | * Commercial licensing is available under a separate license, please 21 | * contact author for details. 22 | * 23 | * Source code is available at http://rscode.sourceforge.net 24 | * 25 | * 26 | * Multiplication and Arithmetic on Galois Field GF(256) 27 | * 28 | * From Mee, Daniel, "Magnetic Recording, Volume III", Ch. 5 by Patel. 29 | * 30 | * 31 | ******************************/ 32 | 33 | 34 | #include 35 | #include 36 | #include "ecc.h" 37 | 38 | /* This is one of 14 irreducible polynomials 39 | * of degree 8 and cycle length 255. (Ch 5, pp. 275, Magnetic Recording) 40 | * The high order 1 bit is implicit */ 41 | /* x^8 + x^4 + x^3 + x^2 + 1 */ 42 | #define PPOLY 0x1D 43 | 44 | 45 | int gexp[512]; 46 | int glog[256]; 47 | 48 | 49 | static void init_exp_table (void); 50 | 51 | 52 | void 53 | init_galois_tables (void) 54 | { 55 | /* initialize the table of powers of alpha */ 56 | init_exp_table(); 57 | } 58 | 59 | 60 | static void 61 | init_exp_table (void) 62 | { 63 | int i, z; 64 | int pinit,p1,p2,p3,p4,p5,p6,p7,p8; 65 | 66 | pinit = p2 = p3 = p4 = p5 = p6 = p7 = p8 = 0; 67 | p1 = 1; 68 | 69 | gexp[0] = 1; 70 | gexp[255] = gexp[0]; 71 | glog[0] = 0; /* shouldn't log[0] be an error? */ 72 | 73 | // Private pp8() As Integer = {1, 0, 1, 1, 1, 0, 0, 0, 1} 'specify irreducible polynomial coeffts */ 74 | 75 | for (i = 1; i < 256; i++) { 76 | pinit = p8; 77 | p8 = p7; 78 | p7 = p6; 79 | p6 = p5; 80 | p5 = p4 ^ pinit; 81 | p4 = p3 ^ pinit; 82 | p3 = p2 ^ pinit; 83 | p2 = p1; 84 | p1 = pinit; 85 | gexp[i] = p1 + p2*2 + p3*4 + p4*8 + p5*16 + p6*32 + p7*64 + p8*128; 86 | gexp[i+255] = gexp[i]; 87 | } 88 | 89 | for (i = 1; i < 256; i++) { 90 | for (z = 0; z < 256; z++) { 91 | if (gexp[z] == i) { 92 | glog[i] = z; 93 | break; 94 | } 95 | } 96 | } 97 | } 98 | 99 | /* multiplication using logarithms */ 100 | int gmult(int a, int b) 101 | { 102 | int i,j; 103 | if (a==0 || b == 0) return (0); 104 | i = glog[a]; 105 | j = glog[b]; 106 | return (gexp[i+j]); 107 | } 108 | 109 | 110 | int ginv (int elt) 111 | { 112 | return (gexp[255-glog[elt]]); 113 | } 114 | 115 | -------------------------------------------------------------------------------- /ARDOP1OFDM/galois.c: -------------------------------------------------------------------------------- 1 | /***************************** 2 | * Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009 3 | * 4 | * This software library is licensed under terms of the GNU GENERAL 5 | * PUBLIC LICENSE 6 | * 7 | * RSCODE is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * RSCODE is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Rscode. If not, see . 19 | 20 | * Commercial licensing is available under a separate license, please 21 | * contact author for details. 22 | * 23 | * Source code is available at http://rscode.sourceforge.net 24 | * 25 | * 26 | * Multiplication and Arithmetic on Galois Field GF(256) 27 | * 28 | * From Mee, Daniel, "Magnetic Recording, Volume III", Ch. 5 by Patel. 29 | * 30 | * 31 | ******************************/ 32 | 33 | 34 | #include 35 | #include 36 | #include "ecc.h" 37 | 38 | /* This is one of 14 irreducible polynomials 39 | * of degree 8 and cycle length 255. (Ch 5, pp. 275, Magnetic Recording) 40 | * The high order 1 bit is implicit */ 41 | /* x^8 + x^4 + x^3 + x^2 + 1 */ 42 | #define PPOLY 0x1D 43 | 44 | 45 | int gexp[512]; 46 | int glog[256]; 47 | 48 | 49 | static void init_exp_table (void); 50 | 51 | 52 | void 53 | init_galois_tables (void) 54 | { 55 | /* initialize the table of powers of alpha */ 56 | init_exp_table(); 57 | } 58 | 59 | 60 | static void 61 | init_exp_table (void) 62 | { 63 | int i, z; 64 | int pinit,p1,p2,p3,p4,p5,p6,p7,p8; 65 | 66 | pinit = p2 = p3 = p4 = p5 = p6 = p7 = p8 = 0; 67 | p1 = 1; 68 | 69 | gexp[0] = 1; 70 | gexp[255] = gexp[0]; 71 | glog[0] = 0; /* shouldn't log[0] be an error? */ 72 | 73 | // Private pp8() As Integer = {1, 0, 1, 1, 1, 0, 0, 0, 1} 'specify irreducible polynomial coeffts */ 74 | 75 | for (i = 1; i < 256; i++) { 76 | pinit = p8; 77 | p8 = p7; 78 | p7 = p6; 79 | p6 = p5; 80 | p5 = p4 ^ pinit; 81 | p4 = p3 ^ pinit; 82 | p3 = p2 ^ pinit; 83 | p2 = p1; 84 | p1 = pinit; 85 | gexp[i] = p1 + p2*2 + p3*4 + p4*8 + p5*16 + p6*32 + p7*64 + p8*128; 86 | gexp[i+255] = gexp[i]; 87 | } 88 | 89 | for (i = 1; i < 256; i++) { 90 | for (z = 0; z < 256; z++) { 91 | if (gexp[z] == i) { 92 | glog[i] = z; 93 | break; 94 | } 95 | } 96 | } 97 | } 98 | 99 | /* multiplication using logarithms */ 100 | int gmult(int a, int b) 101 | { 102 | int i,j; 103 | if (a==0 || b == 0) return (0); 104 | i = glog[a]; 105 | j = glog[b]; 106 | return (gexp[i+j]); 107 | } 108 | 109 | 110 | int ginv (int elt) 111 | { 112 | return (gexp[255-glog[elt]]); 113 | } 114 | 115 | -------------------------------------------------------------------------------- /ARDOPOFDM/galois.c: -------------------------------------------------------------------------------- 1 | /***************************** 2 | * Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009 3 | * 4 | * This software library is licensed under terms of the GNU GENERAL 5 | * PUBLIC LICENSE 6 | * 7 | * RSCODE is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * RSCODE is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Rscode. If not, see . 19 | 20 | * Commercial licensing is available under a separate license, please 21 | * contact author for details. 22 | * 23 | * Source code is available at http://rscode.sourceforge.net 24 | * 25 | * 26 | * Multiplication and Arithmetic on Galois Field GF(256) 27 | * 28 | * From Mee, Daniel, "Magnetic Recording, Volume III", Ch. 5 by Patel. 29 | * 30 | * 31 | ******************************/ 32 | 33 | 34 | #include 35 | #include 36 | #include "ecc.h" 37 | 38 | /* This is one of 14 irreducible polynomials 39 | * of degree 8 and cycle length 255. (Ch 5, pp. 275, Magnetic Recording) 40 | * The high order 1 bit is implicit */ 41 | /* x^8 + x^4 + x^3 + x^2 + 1 */ 42 | #define PPOLY 0x1D 43 | 44 | 45 | int gexp[512]; 46 | int glog[256]; 47 | 48 | 49 | static void init_exp_table (void); 50 | 51 | 52 | void 53 | init_galois_tables (void) 54 | { 55 | /* initialize the table of powers of alpha */ 56 | init_exp_table(); 57 | } 58 | 59 | 60 | static void 61 | init_exp_table (void) 62 | { 63 | int i, z; 64 | int pinit,p1,p2,p3,p4,p5,p6,p7,p8; 65 | 66 | pinit = p2 = p3 = p4 = p5 = p6 = p7 = p8 = 0; 67 | p1 = 1; 68 | 69 | gexp[0] = 1; 70 | gexp[255] = gexp[0]; 71 | glog[0] = 0; /* shouldn't log[0] be an error? */ 72 | 73 | // Private pp8() As Integer = {1, 0, 1, 1, 1, 0, 0, 0, 1} 'specify irreducible polynomial coeffts */ 74 | 75 | for (i = 1; i < 256; i++) { 76 | pinit = p8; 77 | p8 = p7; 78 | p7 = p6; 79 | p6 = p5; 80 | p5 = p4 ^ pinit; 81 | p4 = p3 ^ pinit; 82 | p3 = p2 ^ pinit; 83 | p2 = p1; 84 | p1 = pinit; 85 | gexp[i] = p1 + p2*2 + p3*4 + p4*8 + p5*16 + p6*32 + p7*64 + p8*128; 86 | gexp[i+255] = gexp[i]; 87 | } 88 | 89 | for (i = 1; i < 256; i++) { 90 | for (z = 0; z < 256; z++) { 91 | if (gexp[z] == i) { 92 | glog[i] = z; 93 | break; 94 | } 95 | } 96 | } 97 | } 98 | 99 | /* multiplication using logarithms */ 100 | int gmult(int a, int b) 101 | { 102 | int i,j; 103 | if (a==0 || b == 0) return (0); 104 | i = glog[a]; 105 | j = glog[b]; 106 | return (gexp[i+j]); 107 | } 108 | 109 | 110 | int ginv (int elt) 111 | { 112 | return (gexp[255-glog[elt]]); 113 | } 114 | 115 | -------------------------------------------------------------------------------- /ARDOP1OFDM/ARDOP1OFDM.txt: -------------------------------------------------------------------------------- 1 | As ARDOP2 has been withdrawn, I've added the experimental OFDM Modes to ARDOP1. The following description is still generally applicable. Download links are 2 | 3 | http://www.cantab.net/users/john.wiseman/Downloads/Beta/ARDO1POFDM.exe 4 | http://www.cantab.net/users/john.wiseman/Downloads/Beta/ardo1pofdm 5 | http://www.cantab.net/users/john.wiseman/Downloads/Beta/piardop1ofdm 6 | http://www.cantab.net/users/john.wiseman/Downloads/Beta/TeensyProjects.zip 7 | 8 | 9 | 10 | 11 | ARDOPOFDM is an experimental extension to ARDOP2. The higher speed PSK and QAM modes of ARDOP2 are replaced with OFDM modes. There are two bandwidths, 500 and 2500 and 4 modes within each bandwidth (2PSK, 4PSK 8PSK and 16PSK or 16QAM). The code uses a modulation rate and carrier spacing of 55.555 Hz. The 500 mode uses 9 carriers and the 2500 mode 43 carriers. There isn't a 200 wide version. 12 | 13 | The code runs on Windows, Linux and my Teensy TNC. 14 | 15 | ARDOPOFDM has one new configuration parameter, ENABLEOFDM, with a default of TRUE. Apart from the new data frames it has two new CONREQ frames, OCONREQ500 and OCONREQ2500 and a new ACK, OFDMACK. If ENABLEOFDM is set it will send and accept the OCONREQ frames and the OFDM data frames. For compatibility with ARDOP2 stations if it receives a normal CONREQ frame it will disable the use of the OFDM data frames. If ENABLEOFDM is set to FALSE it will use normal CONREQ frames and reject OCONREQ, so it can connect to ARDOP2 stations. ARDOPOFDM acks each carrier separately, so only carriers that have failed to decode are repeated. If all carriers are ok a normal DataACK or DataACKHQ frame is sent, if not a slightly longer OFDMACK is sent which indicates which carriers need to be repeated. 16 | 17 | I haven't been able to evaluate it under a wide range of radio conditions, but initial testing looks promising. Under ideal conditions it is a bit over twice as fast as normal ARDOP (about 80% of the speed of VARA). Data frame length is a little under 5 seconds. Under ideal conditions performance in 2500 mode is 18 | 19 | 16OFDM 80 bytes/carrier, 3440 bytes per frame, approx 4600 BPS Net 20 | 8OFDM 60 bytes/carrier, 2580 bytes per frame, approx 3440 BPS Net 21 | 4OFDM 40 bytes/carrier, 1720 bytes per frame, approx 2300 BPS Net 22 | 2OFDM 19 bytes/carrier, 817 bytes per frame, approx 1100 BPS Net 23 | 24 | For Comparison 16QAM.2500.100 (10 Carriers) 25 | 26 | 120 bytes/carrier, 1200 bytes per frame, approx 2225 BPS Net 27 | 28 | As mentioned earlier this a experimental and modulation details and frame formats are likely to change as testing proceeds. It is really only suitable for people who a used to testing software. 29 | 30 | Software can be downloaded from 31 | 32 | http://www.cantab.net/users/john.wiseman/Downloads/Beta/ARDOPOFDM.exe 33 | http://www.cantab.net/users/john.wiseman/Downloads/Beta/ardopofdm 34 | http://www.cantab.net/users/john.wiseman/Downloads/Beta/piardopofdm 35 | http://www.cantab.net/users/john.wiseman/Downloads/Beta/TeensyProjects.zip 36 | 37 | The software has only been tested with BPQ32/LinBPQ and Winlink Express in PTC Emulation mode. You need to install the latest Beta BPQ32 or linbpq to use it. It may work with RMS Express in normal mode and Trimode, but this hasn't been tested and may result in slow running or data corruption due to changes in flow control thresholds. 38 | 39 | -------------------------------------------------------------------------------- /ARDOP1OFDM/LCM1602-IIC.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "LCM1602-IIC.h" 12 | 13 | void expanderWrite(int file, char value) 14 | { 15 | char buffer = value | LCD_BACKLIGHT; 16 | //printf("EW = %x\r\n", buffer); 17 | if (write(file, &buffer, 1) != 1) 18 | printf("Error escribiendo en el dispositivo.\r\n"); 19 | } 20 | 21 | void pulseEnable(int file, char value) 22 | { 23 | expanderWrite(file, value | LCD_EN); 24 | usleep(1); 25 | 26 | expanderWrite(file, value & ~LCD_EN); 27 | usleep(50); 28 | } 29 | 30 | void write4bits(int file, char value) 31 | { 32 | //printf("\r\n"); 33 | //printf("W4B\r\n"); 34 | expanderWrite(file, value); 35 | pulseEnable(file, value); 36 | //printf("\r\n"); 37 | } 38 | 39 | void send(int file, char value, char mode) 40 | { 41 | //printf("\r\nSEND\r\n"); 42 | char h = value & 0xf0; 43 | char l = (value << 4) & 0xf0; 44 | write4bits(file, h | mode); 45 | write4bits(file, l | mode); 46 | } 47 | 48 | void command(int file, char value) 49 | { 50 | send(file, value, 0); 51 | } 52 | 53 | int initialize(const char *i2c_device, int addr) 54 | { 55 | // Se abre el fichero del dispositivo 56 | int file = 0; 57 | if ((file = open(i2c_device, O_RDWR)) < 0) { 58 | printf("No se pudo abrir el dispositivo i2c: %s\r\n", i2c_device); 59 | return -1; 60 | } 61 | 62 | if (ioctl(file, I2C_SLAVE, addr) != 0) { 63 | printf("No se ha podido seleccionar la dirección del esclavo\r\n"); 64 | return -1; 65 | } 66 | 67 | usleep(50000); 68 | expanderWrite(file, LCD_BACKLIGHT); 69 | usleep(1000000); 70 | 71 | // Se comienza en modo 4 bit, intentamos poner en modo 4 bit 72 | write4bits(file, 0x03 << 4); 73 | usleep(4500); 74 | write4bits(file, 0x30); 75 | usleep(4500); 76 | write4bits(file, 0x30); 77 | usleep(150); 78 | 79 | // Finalmente se pone el interface en 4 bit 80 | write4bits(file, 0x20); 81 | 82 | // Se configura el número de líneas 83 | command(file, LCD_FUNCTIONSET | LCD_2LINE); 84 | command(file, LCD_DISPLAYCONTROL | LCD_DISPLAYON | LCD_CURSOROFF | LCD_BLINKOFF); 85 | clear(file); 86 | 87 | // Se inicializa la dirección del texto por defecto 88 | command(file, LCD_ENTRYMODESET | LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT); 89 | 90 | // Cursor al inicio 91 | home(file); 92 | 93 | return file; 94 | } 95 | 96 | void finalize(int file) 97 | { 98 | close(file); 99 | } 100 | 101 | void clear(int file) 102 | { 103 | command(file, LCD_CLEARDISPLAY); 104 | usleep(2000); 105 | } 106 | 107 | void home(int file) 108 | { 109 | command(file, LCD_RETURNHOME); 110 | usleep(2000); 111 | } 112 | 113 | void locate(int file, int row, int col) 114 | { 115 | static int row_offsets[] = { 0x00, 0x40, 0x14, 0x54 }; 116 | command(file, LCD_SETDDRAMADDR | ((col % 16) + row_offsets[row % 2])); 117 | } 118 | 119 | void locateCG(int file, int n) 120 | { 121 | command(file, LCD_SETCGRAMADDR + n); 122 | } 123 | 124 | 125 | void print(int file, const char *text) 126 | { 127 | int i = 0; 128 | int tlen = strlen(text); 129 | for (i = 0; i < tlen; i++) 130 | send(file, text[i], LCD_RS); 131 | } 132 | 133 | -------------------------------------------------------------------------------- /ARDOP2/LCM1602-IIC.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "LCM1602-IIC.h" 12 | 13 | void expanderWrite(int file, char value) 14 | { 15 | char buffer = value | LCD_BACKLIGHT; 16 | //printf("EW = %x\r\n", buffer); 17 | if (write(file, &buffer, 1) != 1) 18 | printf("Error escribiendo en el dispositivo.\r\n"); 19 | } 20 | 21 | void pulseEnable(int file, char value) 22 | { 23 | expanderWrite(file, value | LCD_EN); 24 | usleep(1); 25 | 26 | expanderWrite(file, value & ~LCD_EN); 27 | usleep(50); 28 | } 29 | 30 | void write4bits(int file, char value) 31 | { 32 | //printf("\r\n"); 33 | //printf("W4B\r\n"); 34 | expanderWrite(file, value); 35 | pulseEnable(file, value); 36 | //printf("\r\n"); 37 | } 38 | 39 | void send(int file, char value, char mode) 40 | { 41 | //printf("\r\nSEND\r\n"); 42 | char h = value & 0xf0; 43 | char l = (value << 4) & 0xf0; 44 | write4bits(file, h | mode); 45 | write4bits(file, l | mode); 46 | } 47 | 48 | void command(int file, char value) 49 | { 50 | send(file, value, 0); 51 | } 52 | 53 | int initialize(const char *i2c_device, int addr) 54 | { 55 | // Se abre el fichero del dispositivo 56 | int file = 0; 57 | if ((file = open(i2c_device, O_RDWR)) < 0) { 58 | printf("No se pudo abrir el dispositivo i2c: %s\r\n", i2c_device); 59 | return -1; 60 | } 61 | 62 | if (ioctl(file, I2C_SLAVE, addr) != 0) { 63 | printf("No se ha podido seleccionar la dirección del esclavo\r\n"); 64 | return -1; 65 | } 66 | 67 | usleep(50000); 68 | expanderWrite(file, LCD_BACKLIGHT); 69 | usleep(1000000); 70 | 71 | // Se comienza en modo 4 bit, intentamos poner en modo 4 bit 72 | write4bits(file, 0x03 << 4); 73 | usleep(4500); 74 | write4bits(file, 0x30); 75 | usleep(4500); 76 | write4bits(file, 0x30); 77 | usleep(150); 78 | 79 | // Finalmente se pone el interface en 4 bit 80 | write4bits(file, 0x20); 81 | 82 | // Se configura el número de líneas 83 | command(file, LCD_FUNCTIONSET | LCD_2LINE); 84 | command(file, LCD_DISPLAYCONTROL | LCD_DISPLAYON | LCD_CURSOROFF | LCD_BLINKOFF); 85 | clear(file); 86 | 87 | // Se inicializa la dirección del texto por defecto 88 | command(file, LCD_ENTRYMODESET | LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT); 89 | 90 | // Cursor al inicio 91 | home(file); 92 | 93 | return file; 94 | } 95 | 96 | void finalize(int file) 97 | { 98 | close(file); 99 | } 100 | 101 | void clear(int file) 102 | { 103 | command(file, LCD_CLEARDISPLAY); 104 | usleep(2000); 105 | } 106 | 107 | void home(int file) 108 | { 109 | command(file, LCD_RETURNHOME); 110 | usleep(2000); 111 | } 112 | 113 | void locate(int file, int row, int col) 114 | { 115 | static int row_offsets[] = { 0x00, 0x40, 0x14, 0x54 }; 116 | command(file, LCD_SETDDRAMADDR | ((col % 16) + row_offsets[row % 2])); 117 | } 118 | 119 | void locateCG(int file, int n) 120 | { 121 | command(file, LCD_SETCGRAMADDR + n); 122 | } 123 | 124 | 125 | void print(int file, const char *text) 126 | { 127 | int i = 0; 128 | int tlen = strlen(text); 129 | for (i = 0; i < tlen; i++) 130 | send(file, text[i], LCD_RS); 131 | } 132 | 133 | -------------------------------------------------------------------------------- /ARDOPC/LCM1602-IIC.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "LCM1602-IIC.h" 12 | 13 | void expanderWrite(int file, char value) 14 | { 15 | char buffer = value | LCD_BACKLIGHT; 16 | //printf("EW = %x\r\n", buffer); 17 | if (write(file, &buffer, 1) != 1) 18 | printf("Error escribiendo en el dispositivo.\r\n"); 19 | } 20 | 21 | void pulseEnable(int file, char value) 22 | { 23 | expanderWrite(file, value | LCD_EN); 24 | usleep(1); 25 | 26 | expanderWrite(file, value & ~LCD_EN); 27 | usleep(50); 28 | } 29 | 30 | void write4bits(int file, char value) 31 | { 32 | //printf("\r\n"); 33 | //printf("W4B\r\n"); 34 | expanderWrite(file, value); 35 | pulseEnable(file, value); 36 | //printf("\r\n"); 37 | } 38 | 39 | void send(int file, char value, char mode) 40 | { 41 | //printf("\r\nSEND\r\n"); 42 | char h = value & 0xf0; 43 | char l = (value << 4) & 0xf0; 44 | write4bits(file, h | mode); 45 | write4bits(file, l | mode); 46 | } 47 | 48 | void command(int file, char value) 49 | { 50 | send(file, value, 0); 51 | } 52 | 53 | int initialize(const char *i2c_device, int addr) 54 | { 55 | // Se abre el fichero del dispositivo 56 | int file = 0; 57 | if ((file = open(i2c_device, O_RDWR)) < 0) { 58 | printf("No se pudo abrir el dispositivo i2c: %s\r\n", i2c_device); 59 | return -1; 60 | } 61 | 62 | if (ioctl(file, I2C_SLAVE, addr) != 0) { 63 | printf("No se ha podido seleccionar la dirección del esclavo\r\n"); 64 | return -1; 65 | } 66 | 67 | usleep(50000); 68 | expanderWrite(file, LCD_BACKLIGHT); 69 | usleep(1000000); 70 | 71 | // Se comienza en modo 4 bit, intentamos poner en modo 4 bit 72 | write4bits(file, 0x03 << 4); 73 | usleep(4500); 74 | write4bits(file, 0x30); 75 | usleep(4500); 76 | write4bits(file, 0x30); 77 | usleep(150); 78 | 79 | // Finalmente se pone el interface en 4 bit 80 | write4bits(file, 0x20); 81 | 82 | // Se configura el número de líneas 83 | command(file, LCD_FUNCTIONSET | LCD_2LINE); 84 | command(file, LCD_DISPLAYCONTROL | LCD_DISPLAYON | LCD_CURSOROFF | LCD_BLINKOFF); 85 | clear(file); 86 | 87 | // Se inicializa la dirección del texto por defecto 88 | command(file, LCD_ENTRYMODESET | LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT); 89 | 90 | // Cursor al inicio 91 | home(file); 92 | 93 | return file; 94 | } 95 | 96 | void finalize(int file) 97 | { 98 | close(file); 99 | } 100 | 101 | void clear(int file) 102 | { 103 | command(file, LCD_CLEARDISPLAY); 104 | usleep(2000); 105 | } 106 | 107 | void home(int file) 108 | { 109 | command(file, LCD_RETURNHOME); 110 | usleep(2000); 111 | } 112 | 113 | void locate(int file, int row, int col) 114 | { 115 | static int row_offsets[] = { 0x00, 0x40, 0x14, 0x54 }; 116 | command(file, LCD_SETDDRAMADDR | ((col % 16) + row_offsets[row % 2])); 117 | } 118 | 119 | void locateCG(int file, int n) 120 | { 121 | command(file, LCD_SETCGRAMADDR + n); 122 | } 123 | 124 | 125 | void print(int file, const char *text) 126 | { 127 | int i = 0; 128 | int tlen = strlen(text); 129 | for (i = 0; i < tlen; i++) 130 | send(file, text[i], LCD_RS); 131 | } 132 | 133 | -------------------------------------------------------------------------------- /ARDOPOFDM/LCM1602-IIC.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "LCM1602-IIC.h" 12 | 13 | void expanderWrite(int file, char value) 14 | { 15 | char buffer = value | LCD_BACKLIGHT; 16 | //printf("EW = %x\r\n", buffer); 17 | if (write(file, &buffer, 1) != 1) 18 | printf("Error escribiendo en el dispositivo.\r\n"); 19 | } 20 | 21 | void pulseEnable(int file, char value) 22 | { 23 | expanderWrite(file, value | LCD_EN); 24 | usleep(1); 25 | 26 | expanderWrite(file, value & ~LCD_EN); 27 | usleep(50); 28 | } 29 | 30 | void write4bits(int file, char value) 31 | { 32 | //printf("\r\n"); 33 | //printf("W4B\r\n"); 34 | expanderWrite(file, value); 35 | pulseEnable(file, value); 36 | //printf("\r\n"); 37 | } 38 | 39 | void send(int file, char value, char mode) 40 | { 41 | //printf("\r\nSEND\r\n"); 42 | char h = value & 0xf0; 43 | char l = (value << 4) & 0xf0; 44 | write4bits(file, h | mode); 45 | write4bits(file, l | mode); 46 | } 47 | 48 | void command(int file, char value) 49 | { 50 | send(file, value, 0); 51 | } 52 | 53 | int initialize(const char *i2c_device, int addr) 54 | { 55 | // Se abre el fichero del dispositivo 56 | int file = 0; 57 | if ((file = open(i2c_device, O_RDWR)) < 0) { 58 | printf("No se pudo abrir el dispositivo i2c: %s\r\n", i2c_device); 59 | return -1; 60 | } 61 | 62 | if (ioctl(file, I2C_SLAVE, addr) != 0) { 63 | printf("No se ha podido seleccionar la dirección del esclavo\r\n"); 64 | return -1; 65 | } 66 | 67 | usleep(50000); 68 | expanderWrite(file, LCD_BACKLIGHT); 69 | usleep(1000000); 70 | 71 | // Se comienza en modo 4 bit, intentamos poner en modo 4 bit 72 | write4bits(file, 0x03 << 4); 73 | usleep(4500); 74 | write4bits(file, 0x30); 75 | usleep(4500); 76 | write4bits(file, 0x30); 77 | usleep(150); 78 | 79 | // Finalmente se pone el interface en 4 bit 80 | write4bits(file, 0x20); 81 | 82 | // Se configura el número de líneas 83 | command(file, LCD_FUNCTIONSET | LCD_2LINE); 84 | command(file, LCD_DISPLAYCONTROL | LCD_DISPLAYON | LCD_CURSOROFF | LCD_BLINKOFF); 85 | clear(file); 86 | 87 | // Se inicializa la dirección del texto por defecto 88 | command(file, LCD_ENTRYMODESET | LCD_ENTRYLEFT | LCD_ENTRYSHIFTDECREMENT); 89 | 90 | // Cursor al inicio 91 | home(file); 92 | 93 | return file; 94 | } 95 | 96 | void finalize(int file) 97 | { 98 | close(file); 99 | } 100 | 101 | void clear(int file) 102 | { 103 | command(file, LCD_CLEARDISPLAY); 104 | usleep(2000); 105 | } 106 | 107 | void home(int file) 108 | { 109 | command(file, LCD_RETURNHOME); 110 | usleep(2000); 111 | } 112 | 113 | void locate(int file, int row, int col) 114 | { 115 | static int row_offsets[] = { 0x00, 0x40, 0x14, 0x54 }; 116 | command(file, LCD_SETDDRAMADDR | ((col % 16) + row_offsets[row % 2])); 117 | } 118 | 119 | void locateCG(int file, int n) 120 | { 121 | command(file, LCD_SETCGRAMADDR + n); 122 | } 123 | 124 | 125 | void print(int file, const char *text) 126 | { 127 | int i = 0; 128 | int tlen = strlen(text); 129 | for (i = 0; i < tlen; i++) 130 | send(file, text[i], LCD_RS); 131 | } 132 | 133 | -------------------------------------------------------------------------------- /ARDOP2/ecc.h: -------------------------------------------------------------------------------- 1 | /* Reed Solomon Coding for glyphs 2 | * Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009 3 | * 4 | * This software library is licensed under terms of the GNU GENERAL 5 | * PUBLIC LICENSE 6 | * 7 | * RSCODE is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * RSCODE is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Rscode. If not, see . 19 | * 20 | * Source code is available at http://rscode.sourceforge.net 21 | * 22 | * Commercial licensing is available under a separate license, please 23 | * contact author for details. 24 | * 25 | */ 26 | 27 | /**************************************************************** 28 | 29 | Below is NPAR, the only compile-time parameter you should have to 30 | modify. 31 | 32 | It is the number of parity bytes which will be appended to 33 | your data to create a codeword. 34 | 35 | Note that the maximum codeword size is 255, so the 36 | sum of your message length plus parity should be less than 37 | or equal to this maximum limit. 38 | 39 | In practice, you will get slooow error correction and decoding 40 | if you use more than a reasonably small number of parity bytes. 41 | (say, 10 or 20) 42 | 43 | ****************************************************************/ 44 | 45 | #define MAXNPAR 64 // Sets size of static tables 46 | 47 | extern int NPAR; // Currently used number 48 | 49 | /****************************************************************/ 50 | 51 | 52 | 53 | 54 | #define TRUE 1 55 | #define FALSE 0 56 | 57 | typedef unsigned long BIT32; 58 | typedef unsigned short BIT16; 59 | 60 | /* **************************************************************** */ 61 | 62 | /* Maximum degree of various polynomials. */ 63 | #define MAXDEG (MAXNPAR*2) 64 | 65 | /*************************************/ 66 | /* Encoder parity bytes */ 67 | extern int pBytes[MAXDEG]; 68 | 69 | /* Decoder syndrome bytes */ 70 | extern int synBytes[MAXDEG]; 71 | 72 | /* print debugging info */ 73 | extern int DEBUG; 74 | 75 | /* Reed Solomon encode/decode routines */ 76 | void initialize_ecc (void); 77 | int check_syndrome (void); 78 | void decode_data (unsigned char data[], int nbytes); 79 | void encode_data (unsigned char msg[], int nbytes, unsigned char dst[]); 80 | 81 | /* CRC-CCITT checksum generator */ 82 | BIT16 crc_ccitt(unsigned char *msg, int len); 83 | 84 | /* galois arithmetic tables */ 85 | extern int gexp[]; 86 | extern int glog[]; 87 | 88 | void init_galois_tables (void); 89 | int ginv(int elt); 90 | int gmult(int a, int b); 91 | 92 | 93 | /* Error location routines */ 94 | int correct_errors_erasures (unsigned char codeword[], int csize,int nerasures, int erasures[]); 95 | 96 | /* polynomial arithmetic */ 97 | void add_polys(int dst[], int src[]) ; 98 | void scale_poly(int k, int poly[]); 99 | void mult_polys(int dst[], int p1[], int p2[]); 100 | 101 | void copy_poly(int dst[], int src[]); 102 | void zero_poly(int poly[]); 103 | -------------------------------------------------------------------------------- /ARDOPC/ecc.h: -------------------------------------------------------------------------------- 1 | /* Reed Solomon Coding for glyphs 2 | * Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009 3 | * 4 | * This software library is licensed under terms of the GNU GENERAL 5 | * PUBLIC LICENSE 6 | * 7 | * RSCODE is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * RSCODE is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Rscode. If not, see . 19 | * 20 | * Source code is available at http://rscode.sourceforge.net 21 | * 22 | * Commercial licensing is available under a separate license, please 23 | * contact author for details. 24 | * 25 | */ 26 | 27 | /**************************************************************** 28 | 29 | Below is NPAR, the only compile-time parameter you should have to 30 | modify. 31 | 32 | It is the number of parity bytes which will be appended to 33 | your data to create a codeword. 34 | 35 | Note that the maximum codeword size is 255, so the 36 | sum of your message length plus parity should be less than 37 | or equal to this maximum limit. 38 | 39 | In practice, you will get slooow error correction and decoding 40 | if you use more than a reasonably small number of parity bytes. 41 | (say, 10 or 20) 42 | 43 | ****************************************************************/ 44 | 45 | #define MAXNPAR 64 // Sets size of static tables 46 | 47 | extern int NPAR; // Currently used number 48 | 49 | /****************************************************************/ 50 | 51 | 52 | 53 | 54 | #define TRUE 1 55 | #define FALSE 0 56 | 57 | typedef unsigned long BIT32; 58 | typedef unsigned short BIT16; 59 | 60 | /* **************************************************************** */ 61 | 62 | /* Maximum degree of various polynomials. */ 63 | #define MAXDEG (MAXNPAR*2) 64 | 65 | /*************************************/ 66 | /* Encoder parity bytes */ 67 | extern int pBytes[MAXDEG]; 68 | 69 | /* Decoder syndrome bytes */ 70 | extern int synBytes[MAXDEG]; 71 | 72 | /* print debugging info */ 73 | extern int DEBUG; 74 | 75 | /* Reed Solomon encode/decode routines */ 76 | void initialize_ecc (void); 77 | int check_syndrome (void); 78 | void decode_data (unsigned char data[], int nbytes); 79 | void encode_data (unsigned char msg[], int nbytes, unsigned char dst[]); 80 | 81 | /* CRC-CCITT checksum generator */ 82 | BIT16 crc_ccitt(unsigned char *msg, int len); 83 | 84 | /* galois arithmetic tables */ 85 | extern int gexp[]; 86 | extern int glog[]; 87 | 88 | void init_galois_tables (void); 89 | int ginv(int elt); 90 | int gmult(int a, int b); 91 | 92 | 93 | /* Error location routines */ 94 | int correct_errors_erasures (unsigned char codeword[], int csize,int nerasures, int erasures[]); 95 | 96 | /* polynomial arithmetic */ 97 | void add_polys(int dst[], int src[]) ; 98 | void scale_poly(int k, int poly[]); 99 | void mult_polys(int dst[], int p1[], int p2[]); 100 | 101 | void copy_poly(int dst[], int src[]); 102 | void zero_poly(int poly[]); 103 | -------------------------------------------------------------------------------- /ARDOPOFDM/ecc.h: -------------------------------------------------------------------------------- 1 | /* Reed Solomon Coding for glyphs 2 | * Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009 3 | * 4 | * This software library is licensed under terms of the GNU GENERAL 5 | * PUBLIC LICENSE 6 | * 7 | * RSCODE is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * RSCODE is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Rscode. If not, see . 19 | * 20 | * Source code is available at http://rscode.sourceforge.net 21 | * 22 | * Commercial licensing is available under a separate license, please 23 | * contact author for details. 24 | * 25 | */ 26 | 27 | /**************************************************************** 28 | 29 | Below is NPAR, the only compile-time parameter you should have to 30 | modify. 31 | 32 | It is the number of parity bytes which will be appended to 33 | your data to create a codeword. 34 | 35 | Note that the maximum codeword size is 255, so the 36 | sum of your message length plus parity should be less than 37 | or equal to this maximum limit. 38 | 39 | In practice, you will get slooow error correction and decoding 40 | if you use more than a reasonably small number of parity bytes. 41 | (say, 10 or 20) 42 | 43 | ****************************************************************/ 44 | 45 | #define MAXNPAR 64 // Sets size of static tables 46 | 47 | extern int NPAR; // Currently used number 48 | 49 | /****************************************************************/ 50 | 51 | 52 | 53 | 54 | #define TRUE 1 55 | #define FALSE 0 56 | 57 | typedef unsigned long BIT32; 58 | typedef unsigned short BIT16; 59 | 60 | /* **************************************************************** */ 61 | 62 | /* Maximum degree of various polynomials. */ 63 | #define MAXDEG (MAXNPAR*2) 64 | 65 | /*************************************/ 66 | /* Encoder parity bytes */ 67 | extern int pBytes[MAXDEG]; 68 | 69 | /* Decoder syndrome bytes */ 70 | extern int synBytes[MAXDEG]; 71 | 72 | /* print debugging info */ 73 | extern int DEBUG; 74 | 75 | /* Reed Solomon encode/decode routines */ 76 | void initialize_ecc (void); 77 | int check_syndrome (void); 78 | void decode_data (unsigned char data[], int nbytes); 79 | void encode_data (unsigned char msg[], int nbytes, unsigned char dst[]); 80 | 81 | /* CRC-CCITT checksum generator */ 82 | BIT16 crc_ccitt(unsigned char *msg, int len); 83 | 84 | /* galois arithmetic tables */ 85 | extern int gexp[]; 86 | extern int glog[]; 87 | 88 | void init_galois_tables (void); 89 | int ginv(int elt); 90 | int gmult(int a, int b); 91 | 92 | 93 | /* Error location routines */ 94 | int correct_errors_erasures (unsigned char codeword[], int csize,int nerasures, int erasures[]); 95 | 96 | /* polynomial arithmetic */ 97 | void add_polys(int dst[], int src[]) ; 98 | void scale_poly(int k, int poly[]); 99 | void mult_polys(int dst[], int p1[], int p2[]); 100 | 101 | void copy_poly(int dst[], int src[]); 102 | void zero_poly(int poly[]); 103 | -------------------------------------------------------------------------------- /ARDOP1OFDM/ecc.h: -------------------------------------------------------------------------------- 1 | /* Reed Solomon Coding for glyphs 2 | * Copyright Henry Minsky (hqm@alum.mit.edu) 1991-2009 3 | * 4 | * This software library is licensed under terms of the GNU GENERAL 5 | * PUBLIC LICENSE 6 | * 7 | * RSCODE is free software: you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation, either version 3 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * RSCODE is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with Rscode. If not, see . 19 | * 20 | * Source code is available at http://rscode.sourceforge.net 21 | * 22 | * Commercial licensing is available under a separate license, please 23 | * contact author for details. 24 | * 25 | */ 26 | 27 | /**************************************************************** 28 | 29 | Below is NPAR, the only compile-time parameter you should have to 30 | modify. 31 | 32 | It is the number of parity bytes which will be appended to 33 | your data to create a codeword. 34 | 35 | Note that the maximum codeword size is 255, so the 36 | sum of your message length plus parity should be less than 37 | or equal to this maximum limit. 38 | 39 | In practice, you will get slooow error correction and decoding 40 | if you use more than a reasonably small number of parity bytes. 41 | (say, 10 or 20) 42 | 43 | ****************************************************************/ 44 | 45 | #define MAXNPAR 64 // Sets size of static tables 46 | 47 | extern int NPAR; // Currently used number 48 | 49 | /****************************************************************/ 50 | 51 | 52 | 53 | 54 | #define TRUE 1 55 | #define FALSE 0 56 | 57 | typedef unsigned long BIT32; 58 | typedef unsigned short BIT16; 59 | 60 | /* **************************************************************** */ 61 | 62 | /* Maximum degree of various polynomials. */ 63 | #define MAXDEG (MAXNPAR*2) 64 | 65 | /*************************************/ 66 | /* Encoder parity bytes */ 67 | extern int pBytes[MAXDEG]; 68 | 69 | /* Decoder syndrome bytes */ 70 | extern int synBytes[MAXDEG]; 71 | 72 | /* print debugging info */ 73 | extern int DEBUG; 74 | 75 | /* Reed Solomon encode/decode routines */ 76 | void initialize_ecc (void); 77 | int check_syndrome (void); 78 | void decode_data (unsigned char data[], int nbytes); 79 | void encode_data (unsigned char msg[], int nbytes, unsigned char dst[]); 80 | 81 | /* CRC-CCITT checksum generator */ 82 | BIT16 crc_ccitt(unsigned char *msg, int len); 83 | 84 | /* galois arithmetic tables */ 85 | extern int gexp[]; 86 | extern int glog[]; 87 | 88 | void init_galois_tables (void); 89 | int ginv(int elt); 90 | int gmult(int a, int b); 91 | 92 | 93 | /* Error location routines */ 94 | int correct_errors_erasures (unsigned char codeword[], int csize,int nerasures, int erasures[]); 95 | 96 | /* polynomial arithmetic */ 97 | void add_polys(int dst[], int src[]) ; 98 | void scale_poly(int k, int poly[]); 99 | void mult_polys(int dst[], int p1[], int p2[]); 100 | 101 | void copy_poly(int dst[], int src[]); 102 | void zero_poly(int poly[]); 103 | -------------------------------------------------------------------------------- /ARDOP2/rs.doc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Introduction to Reed Solomon Codes: 4 | 5 | Henry Minsky, Universal Access Inc. 6 | hqm@alum.mit.edu 7 | 8 | [For details see Cain, Clark, "Error-Correction Coding For Digital 9 | Communications", pp. 205.] The Reed-Solomon Code is an algebraic code 10 | belonging to the class of BCH (Bose-Chaudry-Hocquehen) multiple burst 11 | correcting cyclic codes. The Reed Solomon code operates on bytes of 12 | fixed length. 13 | 14 | Given m parity bytes, a Reed-Solomon code can correct up to m byte 15 | errors in known positions (erasures), or detect and correct up to m/2 16 | byte errors in unknown positions. 17 | 18 | This is an implementation of a Reed-Solomon code with 8 bit bytes, and 19 | a configurable number of parity bytes. The maximum sequence length 20 | (codeword) that can be generated is 255 bytes, including parity bytes. 21 | In practice, shorter sequences are used. 22 | 23 | ENCODING: The basic principle of encoding is to find the remainder of 24 | the message divided by a generator polynomial G(x). The encoder works 25 | by simulating a Linear Feedback Shift Register with degree equal to 26 | G(x), and feedback taps with the coefficents of the generating 27 | polynomial of the code. 28 | 29 | The rs.c file contains an algorithm to generate the encoder polynomial 30 | for any number of bytes of parity, configurable as the NPAR constant 31 | in the file ecc.h. 32 | 33 | For this RS code, G(x) = (x-a^1)(x-a^2)(x-a^3)(x-a^4)...(x-a^NPAR) 34 | where 'a' is a primitive element of the Galois Field GF(256) (== 2). 35 | 36 | DECODING 37 | 38 | The decoder generates four syndrome bytes, which will be all zero if 39 | the message has no errors. If there are errors, the location and value 40 | of the errors can be determined in a number of ways. 41 | 42 | Computing the syndromes is easily done as a sum of products, see pp. 43 | 179 [Rhee 89]. 44 | 45 | Fundamentally, the syndome bytes form four simultaneous equations 46 | which can be solved to find the error locations. Once error locations 47 | are known, the syndrome bytes can be used to find the value of the 48 | errors, and they can thus be corrected. 49 | 50 | A simplified solution for locating and correcting single errors is 51 | given in Cain and Clark, Ch. 5. 52 | 53 | The more general error-location algorithm is the Berlekamp-Massey 54 | algorithm, which will locate up to four errors, by iteratively solving 55 | for the error-locator polynomial. The Modified Berlekamp Massey 56 | algorithm takes as initial conditions any known suspicious bytes 57 | (erasure flags) which you may have (such as might be flagged by 58 | a laser demodulator, or deduced from a failure in a cross-interleaved 59 | block code row or column). 60 | 61 | Once the location of errors is known, error correction is done using 62 | the error-evaluator polynomial. 63 | 64 | APPLICATION IDEAS 65 | 66 | As an example application, this library could be used to implement the 67 | Compact Disc standard of 24 data bytes and 4 parity bytes. A RS code 68 | with 24 data bytes and 4 parity bytes is referred to as a (28,24) RS 69 | code. A (n, k) RS code is said to have efficiency k/n. This first 70 | (28,24) coding is called the C2 or level 2 encoding, because in a 71 | doubly encoded scheme, the codewords are decoded at the second 72 | decoding step. 73 | 74 | In following the approach used by Compact Disc digital audio, the 28 75 | byte C2 codewords are four way interleaved and then the interleaved 76 | data is encoded again with a (32,28) RS code. The is the C1 encoding 77 | stage. This produces what is known as a "product code", and has 78 | excellent error correction capability due to the imposition of 79 | two-dimensional structure on the parity checks. The interleave helps 80 | to insure against the case that a multibyte burst error wipes out more 81 | than two bytes in each codeword. The cross-correction capability of 82 | the product code can provide backup if in fact there are more than 2 83 | uncorrectable errors in a block. 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /ARDOPC/rs.doc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Introduction to Reed Solomon Codes: 4 | 5 | Henry Minsky, Universal Access Inc. 6 | hqm@alum.mit.edu 7 | 8 | [For details see Cain, Clark, "Error-Correction Coding For Digital 9 | Communications", pp. 205.] The Reed-Solomon Code is an algebraic code 10 | belonging to the class of BCH (Bose-Chaudry-Hocquehen) multiple burst 11 | correcting cyclic codes. The Reed Solomon code operates on bytes of 12 | fixed length. 13 | 14 | Given m parity bytes, a Reed-Solomon code can correct up to m byte 15 | errors in known positions (erasures), or detect and correct up to m/2 16 | byte errors in unknown positions. 17 | 18 | This is an implementation of a Reed-Solomon code with 8 bit bytes, and 19 | a configurable number of parity bytes. The maximum sequence length 20 | (codeword) that can be generated is 255 bytes, including parity bytes. 21 | In practice, shorter sequences are used. 22 | 23 | ENCODING: The basic principle of encoding is to find the remainder of 24 | the message divided by a generator polynomial G(x). The encoder works 25 | by simulating a Linear Feedback Shift Register with degree equal to 26 | G(x), and feedback taps with the coefficents of the generating 27 | polynomial of the code. 28 | 29 | The rs.c file contains an algorithm to generate the encoder polynomial 30 | for any number of bytes of parity, configurable as the NPAR constant 31 | in the file ecc.h. 32 | 33 | For this RS code, G(x) = (x-a^1)(x-a^2)(x-a^3)(x-a^4)...(x-a^NPAR) 34 | where 'a' is a primitive element of the Galois Field GF(256) (== 2). 35 | 36 | DECODING 37 | 38 | The decoder generates four syndrome bytes, which will be all zero if 39 | the message has no errors. If there are errors, the location and value 40 | of the errors can be determined in a number of ways. 41 | 42 | Computing the syndromes is easily done as a sum of products, see pp. 43 | 179 [Rhee 89]. 44 | 45 | Fundamentally, the syndome bytes form four simultaneous equations 46 | which can be solved to find the error locations. Once error locations 47 | are known, the syndrome bytes can be used to find the value of the 48 | errors, and they can thus be corrected. 49 | 50 | A simplified solution for locating and correcting single errors is 51 | given in Cain and Clark, Ch. 5. 52 | 53 | The more general error-location algorithm is the Berlekamp-Massey 54 | algorithm, which will locate up to four errors, by iteratively solving 55 | for the error-locator polynomial. The Modified Berlekamp Massey 56 | algorithm takes as initial conditions any known suspicious bytes 57 | (erasure flags) which you may have (such as might be flagged by 58 | a laser demodulator, or deduced from a failure in a cross-interleaved 59 | block code row or column). 60 | 61 | Once the location of errors is known, error correction is done using 62 | the error-evaluator polynomial. 63 | 64 | APPLICATION IDEAS 65 | 66 | As an example application, this library could be used to implement the 67 | Compact Disc standard of 24 data bytes and 4 parity bytes. A RS code 68 | with 24 data bytes and 4 parity bytes is referred to as a (28,24) RS 69 | code. A (n, k) RS code is said to have efficiency k/n. This first 70 | (28,24) coding is called the C2 or level 2 encoding, because in a 71 | doubly encoded scheme, the codewords are decoded at the second 72 | decoding step. 73 | 74 | In following the approach used by Compact Disc digital audio, the 28 75 | byte C2 codewords are four way interleaved and then the interleaved 76 | data is encoded again with a (32,28) RS code. The is the C1 encoding 77 | stage. This produces what is known as a "product code", and has 78 | excellent error correction capability due to the imposition of 79 | two-dimensional structure on the parity checks. The interleave helps 80 | to insure against the case that a multibyte burst error wipes out more 81 | than two bytes in each codeword. The cross-correction capability of 82 | the product code can provide backup if in fact there are more than 2 83 | uncorrectable errors in a block. 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /ARDOPOFDM/rs.doc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Introduction to Reed Solomon Codes: 4 | 5 | Henry Minsky, Universal Access Inc. 6 | hqm@alum.mit.edu 7 | 8 | [For details see Cain, Clark, "Error-Correction Coding For Digital 9 | Communications", pp. 205.] The Reed-Solomon Code is an algebraic code 10 | belonging to the class of BCH (Bose-Chaudry-Hocquehen) multiple burst 11 | correcting cyclic codes. The Reed Solomon code operates on bytes of 12 | fixed length. 13 | 14 | Given m parity bytes, a Reed-Solomon code can correct up to m byte 15 | errors in known positions (erasures), or detect and correct up to m/2 16 | byte errors in unknown positions. 17 | 18 | This is an implementation of a Reed-Solomon code with 8 bit bytes, and 19 | a configurable number of parity bytes. The maximum sequence length 20 | (codeword) that can be generated is 255 bytes, including parity bytes. 21 | In practice, shorter sequences are used. 22 | 23 | ENCODING: The basic principle of encoding is to find the remainder of 24 | the message divided by a generator polynomial G(x). The encoder works 25 | by simulating a Linear Feedback Shift Register with degree equal to 26 | G(x), and feedback taps with the coefficents of the generating 27 | polynomial of the code. 28 | 29 | The rs.c file contains an algorithm to generate the encoder polynomial 30 | for any number of bytes of parity, configurable as the NPAR constant 31 | in the file ecc.h. 32 | 33 | For this RS code, G(x) = (x-a^1)(x-a^2)(x-a^3)(x-a^4)...(x-a^NPAR) 34 | where 'a' is a primitive element of the Galois Field GF(256) (== 2). 35 | 36 | DECODING 37 | 38 | The decoder generates four syndrome bytes, which will be all zero if 39 | the message has no errors. If there are errors, the location and value 40 | of the errors can be determined in a number of ways. 41 | 42 | Computing the syndromes is easily done as a sum of products, see pp. 43 | 179 [Rhee 89]. 44 | 45 | Fundamentally, the syndome bytes form four simultaneous equations 46 | which can be solved to find the error locations. Once error locations 47 | are known, the syndrome bytes can be used to find the value of the 48 | errors, and they can thus be corrected. 49 | 50 | A simplified solution for locating and correcting single errors is 51 | given in Cain and Clark, Ch. 5. 52 | 53 | The more general error-location algorithm is the Berlekamp-Massey 54 | algorithm, which will locate up to four errors, by iteratively solving 55 | for the error-locator polynomial. The Modified Berlekamp Massey 56 | algorithm takes as initial conditions any known suspicious bytes 57 | (erasure flags) which you may have (such as might be flagged by 58 | a laser demodulator, or deduced from a failure in a cross-interleaved 59 | block code row or column). 60 | 61 | Once the location of errors is known, error correction is done using 62 | the error-evaluator polynomial. 63 | 64 | APPLICATION IDEAS 65 | 66 | As an example application, this library could be used to implement the 67 | Compact Disc standard of 24 data bytes and 4 parity bytes. A RS code 68 | with 24 data bytes and 4 parity bytes is referred to as a (28,24) RS 69 | code. A (n, k) RS code is said to have efficiency k/n. This first 70 | (28,24) coding is called the C2 or level 2 encoding, because in a 71 | doubly encoded scheme, the codewords are decoded at the second 72 | decoding step. 73 | 74 | In following the approach used by Compact Disc digital audio, the 28 75 | byte C2 codewords are four way interleaved and then the interleaved 76 | data is encoded again with a (32,28) RS code. The is the C1 encoding 77 | stage. This produces what is known as a "product code", and has 78 | excellent error correction capability due to the imposition of 79 | two-dimensional structure on the parity checks. The interleave helps 80 | to insure against the case that a multibyte burst error wipes out more 81 | than two bytes in each codeword. The cross-correction capability of 82 | the product code can provide backup if in fact there are more than 2 83 | uncorrectable errors in a block. 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /ARDOP1OFDM/rs.doc: -------------------------------------------------------------------------------- 1 | 2 | 3 | Introduction to Reed Solomon Codes: 4 | 5 | Henry Minsky, Universal Access Inc. 6 | hqm@alum.mit.edu 7 | 8 | [For details see Cain, Clark, "Error-Correction Coding For Digital 9 | Communications", pp. 205.] The Reed-Solomon Code is an algebraic code 10 | belonging to the class of BCH (Bose-Chaudry-Hocquehen) multiple burst 11 | correcting cyclic codes. The Reed Solomon code operates on bytes of 12 | fixed length. 13 | 14 | Given m parity bytes, a Reed-Solomon code can correct up to m byte 15 | errors in known positions (erasures), or detect and correct up to m/2 16 | byte errors in unknown positions. 17 | 18 | This is an implementation of a Reed-Solomon code with 8 bit bytes, and 19 | a configurable number of parity bytes. The maximum sequence length 20 | (codeword) that can be generated is 255 bytes, including parity bytes. 21 | In practice, shorter sequences are used. 22 | 23 | ENCODING: The basic principle of encoding is to find the remainder of 24 | the message divided by a generator polynomial G(x). The encoder works 25 | by simulating a Linear Feedback Shift Register with degree equal to 26 | G(x), and feedback taps with the coefficents of the generating 27 | polynomial of the code. 28 | 29 | The rs.c file contains an algorithm to generate the encoder polynomial 30 | for any number of bytes of parity, configurable as the NPAR constant 31 | in the file ecc.h. 32 | 33 | For this RS code, G(x) = (x-a^1)(x-a^2)(x-a^3)(x-a^4)...(x-a^NPAR) 34 | where 'a' is a primitive element of the Galois Field GF(256) (== 2). 35 | 36 | DECODING 37 | 38 | The decoder generates four syndrome bytes, which will be all zero if 39 | the message has no errors. If there are errors, the location and value 40 | of the errors can be determined in a number of ways. 41 | 42 | Computing the syndromes is easily done as a sum of products, see pp. 43 | 179 [Rhee 89]. 44 | 45 | Fundamentally, the syndome bytes form four simultaneous equations 46 | which can be solved to find the error locations. Once error locations 47 | are known, the syndrome bytes can be used to find the value of the 48 | errors, and they can thus be corrected. 49 | 50 | A simplified solution for locating and correcting single errors is 51 | given in Cain and Clark, Ch. 5. 52 | 53 | The more general error-location algorithm is the Berlekamp-Massey 54 | algorithm, which will locate up to four errors, by iteratively solving 55 | for the error-locator polynomial. The Modified Berlekamp Massey 56 | algorithm takes as initial conditions any known suspicious bytes 57 | (erasure flags) which you may have (such as might be flagged by 58 | a laser demodulator, or deduced from a failure in a cross-interleaved 59 | block code row or column). 60 | 61 | Once the location of errors is known, error correction is done using 62 | the error-evaluator polynomial. 63 | 64 | APPLICATION IDEAS 65 | 66 | As an example application, this library could be used to implement the 67 | Compact Disc standard of 24 data bytes and 4 parity bytes. A RS code 68 | with 24 data bytes and 4 parity bytes is referred to as a (28,24) RS 69 | code. A (n, k) RS code is said to have efficiency k/n. This first 70 | (28,24) coding is called the C2 or level 2 encoding, because in a 71 | doubly encoded scheme, the codewords are decoded at the second 72 | decoding step. 73 | 74 | In following the approach used by Compact Disc digital audio, the 28 75 | byte C2 codewords are four way interleaved and then the interleaved 76 | data is encoded again with a (32,28) RS code. The is the C1 encoding 77 | stage. This produces what is known as a "product code", and has 78 | excellent error correction capability due to the imposition of 79 | two-dimensional structure on the parity checks. The interleave helps 80 | to insure against the case that a multibyte burst error wipes out more 81 | than two bytes in each codeword. The cross-correction capability of 82 | the product code can provide backup if in fact there are more than 2 83 | uncorrectable errors in a block. 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /ARDOP1OFDM/DACout.c: -------------------------------------------------------------------------------- 1 | #include "ARDOPC.h" 2 | 3 | //#include "stm32f4xx.h" 4 | #include "stm32f4xx_gpio.h" 5 | #include 6 | #include 7 | //#include 8 | #include 9 | #include 10 | 11 | extern unsigned short buffer[2][1200]; 12 | 13 | #define DAC_DHR12R1_ADDR 0x40007408 // DAC 12 Bit Left Justified 14 | #define DAC_DHR12L1_ADDR 0x40007410 // DAC 12 Bit Right Justified 15 | #define CNT_FREQ 90000000 // TIM6 clock (prescaled APB1) ?? 180/2 16 | #define TIM_PERIOD (CNT_FREQ/24000) // Generate DMS Request at this interval. 17 | 18 | static void TIM6_Config(void); 19 | static void DAC1_Config(void); 20 | 21 | // DMA 1 Stream 5 Channel 7 is hard wired to the DAC 22 | 23 | void StartDAC() 24 | { 25 | // Set up the DAC and start sending a frame under DMA 26 | GPIO_InitTypeDef gpio_A; 27 | 28 | // We don't need to do this each time, but I doubt if it costs much 29 | 30 | RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE); 31 | RCC_APB1PeriphClockCmd(RCC_APB1Periph_DAC, ENABLE); 32 | RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_DMA1, ENABLE); 33 | 34 | gpio_A.GPIO_Pin = GPIO_Pin_4; 35 | gpio_A.GPIO_Mode = GPIO_Mode_AN; 36 | gpio_A.GPIO_PuPd = GPIO_PuPd_NOPULL; 37 | GPIO_Init(GPIOA, &gpio_A); 38 | 39 | DAC1_Config(); 40 | TIM6_Config(); 41 | } 42 | 43 | void stopDAC() 44 | { 45 | TIM_Cmd(TIM6, DISABLE); 46 | DMA_Cmd(DMA1_Stream5, DISABLE); 47 | DAC_Cmd(DAC_Channel_1, DISABLE); 48 | DAC_DMACmd(DAC_Channel_1, DISABLE); 49 | } 50 | 51 | static void TIM6_Config(void) 52 | { 53 | TIM_TimeBaseInitTypeDef TIM6_TimeBase; 54 | 55 | RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM6, ENABLE); 56 | 57 | TIM_TimeBaseStructInit(&TIM6_TimeBase); 58 | TIM6_TimeBase.TIM_Period = (uint16_t)TIM_PERIOD; 59 | TIM6_TimeBase.TIM_Prescaler = 0; 60 | TIM6_TimeBase.TIM_ClockDivision = 0; 61 | TIM6_TimeBase.TIM_CounterMode = TIM_CounterMode_Up; 62 | TIM_TimeBaseInit(TIM6, &TIM6_TimeBase); 63 | TIM_SelectOutputTrigger(TIM6, TIM_TRGOSource_Update); // So it triggers DMA 64 | 65 | TIM_Cmd(TIM6, ENABLE); 66 | } 67 | 68 | static void DAC1_Config(void) 69 | { 70 | DAC_InitTypeDef DAC_INIT; 71 | DMA_InitTypeDef DMA_INIT; 72 | 73 | DAC_INIT.DAC_Trigger = DAC_Trigger_T6_TRGO; 74 | DAC_INIT.DAC_WaveGeneration = DAC_WaveGeneration_None; 75 | DAC_INIT.DAC_OutputBuffer = DAC_OutputBuffer_Enable; 76 | DAC_Init(DAC_Channel_1, &DAC_INIT); 77 | 78 | DMA_DeInit(DMA1_Stream5); 79 | 80 | // enable double buffering .. one buffer gets sent while we are filling the other 81 | 82 | DMA_DoubleBufferModeConfig(DMA1_Stream5, (uint32_t)&buffer[1], DMA_Memory_0); 83 | DMA_DoubleBufferModeCmd(DMA1_Stream5, ENABLE); 84 | 85 | DMA_INIT.DMA_Channel = DMA_Channel_7; 86 | DMA_INIT.DMA_PeripheralBaseAddr = DAC_DHR12R1_ADDR; 87 | DMA_INIT.DMA_Memory0BaseAddr = (uint32_t)&buffer[0]; 88 | DMA_INIT.DMA_DIR = DMA_DIR_MemoryToPeripheral; 89 | DMA_INIT.DMA_BufferSize = 1200; 90 | DMA_INIT.DMA_PeripheralInc = DMA_PeripheralInc_Disable; 91 | DMA_INIT.DMA_MemoryInc = DMA_MemoryInc_Enable; 92 | DMA_INIT.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord; 93 | DMA_INIT.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord; 94 | DMA_INIT.DMA_Mode = DMA_Mode_Circular; 95 | DMA_INIT.DMA_Priority = DMA_Priority_High; 96 | DMA_INIT.DMA_FIFOMode = DMA_FIFOMode_Disable; 97 | DMA_INIT.DMA_FIFOThreshold = DMA_FIFOThreshold_HalfFull; 98 | DMA_INIT.DMA_MemoryBurst = DMA_MemoryBurst_Single; 99 | DMA_INIT.DMA_PeripheralBurst = DMA_PeripheralBurst_Single; 100 | DMA_Init(DMA1_Stream5, &DMA_INIT); 101 | 102 | DMA_Cmd(DMA1_Stream5, ENABLE); 103 | DAC_Cmd(DAC_Channel_1, ENABLE); 104 | DAC_DMACmd(DAC_Channel_1, ENABLE); 105 | } 106 | -------------------------------------------------------------------------------- /ARDOP2/DACout.c: -------------------------------------------------------------------------------- 1 | #include "ARDOPC.h" 2 | 3 | //#include "stm32f4xx.h" 4 | #include "stm32f4xx_gpio.h" 5 | #include 6 | #include 7 | //#include 8 | #include 9 | #include 10 | 11 | extern unsigned short buffer[2][1200]; 12 | 13 | #define DAC_DHR12R1_ADDR 0x40007408 // DAC 12 Bit Left Justified 14 | #define DAC_DHR12L1_ADDR 0x40007410 // DAC 12 Bit Right Justified 15 | #define CNT_FREQ 90000000 // TIM6 clock (prescaled APB1) ?? 180/2 16 | #define TIM_PERIOD (CNT_FREQ/24000) // Generate DMS Request at this interval. 17 | 18 | static void TIM6_Config(void); 19 | static void DAC1_Config(void); 20 | 21 | // DMA 1 Stream 5 Channel 7 is hard wired to the DAC 22 | 23 | void StartDAC() 24 | { 25 | // Set up the DAC and start sending a frame under DMA 26 | GPIO_InitTypeDef gpio_A; 27 | 28 | // We don't need to do this each time, but I doubt if it costs much 29 | 30 | RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE); 31 | RCC_APB1PeriphClockCmd(RCC_APB1Periph_DAC, ENABLE); 32 | RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_DMA1, ENABLE); 33 | 34 | gpio_A.GPIO_Pin = GPIO_Pin_4; 35 | gpio_A.GPIO_Mode = GPIO_Mode_AN; 36 | gpio_A.GPIO_PuPd = GPIO_PuPd_NOPULL; 37 | GPIO_Init(GPIOA, &gpio_A); 38 | 39 | DAC1_Config(); 40 | TIM6_Config(); 41 | } 42 | 43 | void stopDAC() 44 | { 45 | TIM_Cmd(TIM6, DISABLE); 46 | DMA_Cmd(DMA1_Stream5, DISABLE); 47 | DAC_Cmd(DAC_Channel_1, DISABLE); 48 | DAC_DMACmd(DAC_Channel_1, DISABLE); 49 | } 50 | 51 | static void TIM6_Config(void) 52 | { 53 | TIM_TimeBaseInitTypeDef TIM6_TimeBase; 54 | 55 | RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM6, ENABLE); 56 | 57 | TIM_TimeBaseStructInit(&TIM6_TimeBase); 58 | TIM6_TimeBase.TIM_Period = (uint16_t)TIM_PERIOD; 59 | TIM6_TimeBase.TIM_Prescaler = 0; 60 | TIM6_TimeBase.TIM_ClockDivision = 0; 61 | TIM6_TimeBase.TIM_CounterMode = TIM_CounterMode_Up; 62 | TIM_TimeBaseInit(TIM6, &TIM6_TimeBase); 63 | TIM_SelectOutputTrigger(TIM6, TIM_TRGOSource_Update); // So it triggers DMA 64 | 65 | TIM_Cmd(TIM6, ENABLE); 66 | } 67 | 68 | static void DAC1_Config(void) 69 | { 70 | DAC_InitTypeDef DAC_INIT; 71 | DMA_InitTypeDef DMA_INIT; 72 | 73 | DAC_INIT.DAC_Trigger = DAC_Trigger_T6_TRGO; 74 | DAC_INIT.DAC_WaveGeneration = DAC_WaveGeneration_None; 75 | DAC_INIT.DAC_OutputBuffer = DAC_OutputBuffer_Enable; 76 | DAC_Init(DAC_Channel_1, &DAC_INIT); 77 | 78 | DMA_DeInit(DMA1_Stream5); 79 | 80 | // enable double buffering .. one buffer gets sent while we are filling the other 81 | 82 | DMA_DoubleBufferModeConfig(DMA1_Stream5, (uint32_t)&buffer[1], DMA_Memory_0); 83 | DMA_DoubleBufferModeCmd(DMA1_Stream5, ENABLE); 84 | 85 | DMA_INIT.DMA_Channel = DMA_Channel_7; 86 | DMA_INIT.DMA_PeripheralBaseAddr = DAC_DHR12R1_ADDR; 87 | DMA_INIT.DMA_Memory0BaseAddr = (uint32_t)&buffer[0]; 88 | DMA_INIT.DMA_DIR = DMA_DIR_MemoryToPeripheral; 89 | DMA_INIT.DMA_BufferSize = 1200; 90 | DMA_INIT.DMA_PeripheralInc = DMA_PeripheralInc_Disable; 91 | DMA_INIT.DMA_MemoryInc = DMA_MemoryInc_Enable; 92 | DMA_INIT.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord; 93 | DMA_INIT.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord; 94 | DMA_INIT.DMA_Mode = DMA_Mode_Circular; 95 | DMA_INIT.DMA_Priority = DMA_Priority_High; 96 | DMA_INIT.DMA_FIFOMode = DMA_FIFOMode_Disable; 97 | DMA_INIT.DMA_FIFOThreshold = DMA_FIFOThreshold_HalfFull; 98 | DMA_INIT.DMA_MemoryBurst = DMA_MemoryBurst_Single; 99 | DMA_INIT.DMA_PeripheralBurst = DMA_PeripheralBurst_Single; 100 | DMA_Init(DMA1_Stream5, &DMA_INIT); 101 | 102 | DMA_Cmd(DMA1_Stream5, ENABLE); 103 | DAC_Cmd(DAC_Channel_1, ENABLE); 104 | DAC_DMACmd(DAC_Channel_1, ENABLE); 105 | } 106 | -------------------------------------------------------------------------------- /ARDOPC/DACout.c: -------------------------------------------------------------------------------- 1 | #include "ARDOPC.h" 2 | 3 | //#include "stm32f4xx.h" 4 | #include "stm32f4xx_gpio.h" 5 | #include 6 | #include 7 | //#include 8 | #include 9 | #include 10 | 11 | extern unsigned short buffer[2][1200]; 12 | 13 | #define DAC_DHR12R1_ADDR 0x40007408 // DAC 12 Bit Left Justified 14 | #define DAC_DHR12L1_ADDR 0x40007410 // DAC 12 Bit Right Justified 15 | #define CNT_FREQ 90000000 // TIM6 clock (prescaled APB1) ?? 180/2 16 | #define TIM_PERIOD (CNT_FREQ/24000) // Generate DMS Request at this interval. 17 | 18 | static void TIM6_Config(void); 19 | static void DAC1_Config(void); 20 | 21 | // DMA 1 Stream 5 Channel 7 is hard wired to the DAC 22 | 23 | void StartDAC() 24 | { 25 | // Set up the DAC and start sending a frame under DMA 26 | GPIO_InitTypeDef gpio_A; 27 | 28 | // We don't need to do this each time, but I doubt if it costs much 29 | 30 | RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE); 31 | RCC_APB1PeriphClockCmd(RCC_APB1Periph_DAC, ENABLE); 32 | RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_DMA1, ENABLE); 33 | 34 | gpio_A.GPIO_Pin = GPIO_Pin_4; 35 | gpio_A.GPIO_Mode = GPIO_Mode_AN; 36 | gpio_A.GPIO_PuPd = GPIO_PuPd_NOPULL; 37 | GPIO_Init(GPIOA, &gpio_A); 38 | 39 | DAC1_Config(); 40 | TIM6_Config(); 41 | } 42 | 43 | void stopDAC() 44 | { 45 | TIM_Cmd(TIM6, DISABLE); 46 | DMA_Cmd(DMA1_Stream5, DISABLE); 47 | DAC_Cmd(DAC_Channel_1, DISABLE); 48 | DAC_DMACmd(DAC_Channel_1, DISABLE); 49 | } 50 | 51 | static void TIM6_Config(void) 52 | { 53 | TIM_TimeBaseInitTypeDef TIM6_TimeBase; 54 | 55 | RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM6, ENABLE); 56 | 57 | TIM_TimeBaseStructInit(&TIM6_TimeBase); 58 | TIM6_TimeBase.TIM_Period = (uint16_t)TIM_PERIOD; 59 | TIM6_TimeBase.TIM_Prescaler = 0; 60 | TIM6_TimeBase.TIM_ClockDivision = 0; 61 | TIM6_TimeBase.TIM_CounterMode = TIM_CounterMode_Up; 62 | TIM_TimeBaseInit(TIM6, &TIM6_TimeBase); 63 | TIM_SelectOutputTrigger(TIM6, TIM_TRGOSource_Update); // So it triggers DMA 64 | 65 | TIM_Cmd(TIM6, ENABLE); 66 | } 67 | 68 | static void DAC1_Config(void) 69 | { 70 | DAC_InitTypeDef DAC_INIT; 71 | DMA_InitTypeDef DMA_INIT; 72 | 73 | DAC_INIT.DAC_Trigger = DAC_Trigger_T6_TRGO; 74 | DAC_INIT.DAC_WaveGeneration = DAC_WaveGeneration_None; 75 | DAC_INIT.DAC_OutputBuffer = DAC_OutputBuffer_Enable; 76 | DAC_Init(DAC_Channel_1, &DAC_INIT); 77 | 78 | DMA_DeInit(DMA1_Stream5); 79 | 80 | // enable double buffering .. one buffer gets sent while we are filling the other 81 | 82 | DMA_DoubleBufferModeConfig(DMA1_Stream5, (uint32_t)&buffer[1], DMA_Memory_0); 83 | DMA_DoubleBufferModeCmd(DMA1_Stream5, ENABLE); 84 | 85 | DMA_INIT.DMA_Channel = DMA_Channel_7; 86 | DMA_INIT.DMA_PeripheralBaseAddr = DAC_DHR12R1_ADDR; 87 | DMA_INIT.DMA_Memory0BaseAddr = (uint32_t)&buffer[0]; 88 | DMA_INIT.DMA_DIR = DMA_DIR_MemoryToPeripheral; 89 | DMA_INIT.DMA_BufferSize = 1200; 90 | DMA_INIT.DMA_PeripheralInc = DMA_PeripheralInc_Disable; 91 | DMA_INIT.DMA_MemoryInc = DMA_MemoryInc_Enable; 92 | DMA_INIT.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord; 93 | DMA_INIT.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord; 94 | DMA_INIT.DMA_Mode = DMA_Mode_Circular; 95 | DMA_INIT.DMA_Priority = DMA_Priority_High; 96 | DMA_INIT.DMA_FIFOMode = DMA_FIFOMode_Disable; 97 | DMA_INIT.DMA_FIFOThreshold = DMA_FIFOThreshold_HalfFull; 98 | DMA_INIT.DMA_MemoryBurst = DMA_MemoryBurst_Single; 99 | DMA_INIT.DMA_PeripheralBurst = DMA_PeripheralBurst_Single; 100 | DMA_Init(DMA1_Stream5, &DMA_INIT); 101 | 102 | DMA_Cmd(DMA1_Stream5, ENABLE); 103 | DAC_Cmd(DAC_Channel_1, ENABLE); 104 | DAC_DMACmd(DAC_Channel_1, ENABLE); 105 | } 106 | -------------------------------------------------------------------------------- /ARDOPOFDM/DACout.c: -------------------------------------------------------------------------------- 1 | #include "ARDOPC.h" 2 | 3 | //#include "stm32f4xx.h" 4 | #include "stm32f4xx_gpio.h" 5 | #include 6 | #include 7 | //#include 8 | #include 9 | #include 10 | 11 | extern unsigned short buffer[2][1200]; 12 | 13 | #define DAC_DHR12R1_ADDR 0x40007408 // DAC 12 Bit Left Justified 14 | #define DAC_DHR12L1_ADDR 0x40007410 // DAC 12 Bit Right Justified 15 | #define CNT_FREQ 90000000 // TIM6 clock (prescaled APB1) ?? 180/2 16 | #define TIM_PERIOD (CNT_FREQ/24000) // Generate DMS Request at this interval. 17 | 18 | static void TIM6_Config(void); 19 | static void DAC1_Config(void); 20 | 21 | // DMA 1 Stream 5 Channel 7 is hard wired to the DAC 22 | 23 | void StartDAC() 24 | { 25 | // Set up the DAC and start sending a frame under DMA 26 | GPIO_InitTypeDef gpio_A; 27 | 28 | // We don't need to do this each time, but I doubt if it costs much 29 | 30 | RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE); 31 | RCC_APB1PeriphClockCmd(RCC_APB1Periph_DAC, ENABLE); 32 | RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_DMA1, ENABLE); 33 | 34 | gpio_A.GPIO_Pin = GPIO_Pin_4; 35 | gpio_A.GPIO_Mode = GPIO_Mode_AN; 36 | gpio_A.GPIO_PuPd = GPIO_PuPd_NOPULL; 37 | GPIO_Init(GPIOA, &gpio_A); 38 | 39 | DAC1_Config(); 40 | TIM6_Config(); 41 | } 42 | 43 | void stopDAC() 44 | { 45 | TIM_Cmd(TIM6, DISABLE); 46 | DMA_Cmd(DMA1_Stream5, DISABLE); 47 | DAC_Cmd(DAC_Channel_1, DISABLE); 48 | DAC_DMACmd(DAC_Channel_1, DISABLE); 49 | } 50 | 51 | static void TIM6_Config(void) 52 | { 53 | TIM_TimeBaseInitTypeDef TIM6_TimeBase; 54 | 55 | RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM6, ENABLE); 56 | 57 | TIM_TimeBaseStructInit(&TIM6_TimeBase); 58 | TIM6_TimeBase.TIM_Period = (uint16_t)TIM_PERIOD; 59 | TIM6_TimeBase.TIM_Prescaler = 0; 60 | TIM6_TimeBase.TIM_ClockDivision = 0; 61 | TIM6_TimeBase.TIM_CounterMode = TIM_CounterMode_Up; 62 | TIM_TimeBaseInit(TIM6, &TIM6_TimeBase); 63 | TIM_SelectOutputTrigger(TIM6, TIM_TRGOSource_Update); // So it triggers DMA 64 | 65 | TIM_Cmd(TIM6, ENABLE); 66 | } 67 | 68 | static void DAC1_Config(void) 69 | { 70 | DAC_InitTypeDef DAC_INIT; 71 | DMA_InitTypeDef DMA_INIT; 72 | 73 | DAC_INIT.DAC_Trigger = DAC_Trigger_T6_TRGO; 74 | DAC_INIT.DAC_WaveGeneration = DAC_WaveGeneration_None; 75 | DAC_INIT.DAC_OutputBuffer = DAC_OutputBuffer_Enable; 76 | DAC_Init(DAC_Channel_1, &DAC_INIT); 77 | 78 | DMA_DeInit(DMA1_Stream5); 79 | 80 | // enable double buffering .. one buffer gets sent while we are filling the other 81 | 82 | DMA_DoubleBufferModeConfig(DMA1_Stream5, (uint32_t)&buffer[1], DMA_Memory_0); 83 | DMA_DoubleBufferModeCmd(DMA1_Stream5, ENABLE); 84 | 85 | DMA_INIT.DMA_Channel = DMA_Channel_7; 86 | DMA_INIT.DMA_PeripheralBaseAddr = DAC_DHR12R1_ADDR; 87 | DMA_INIT.DMA_Memory0BaseAddr = (uint32_t)&buffer[0]; 88 | DMA_INIT.DMA_DIR = DMA_DIR_MemoryToPeripheral; 89 | DMA_INIT.DMA_BufferSize = 1200; 90 | DMA_INIT.DMA_PeripheralInc = DMA_PeripheralInc_Disable; 91 | DMA_INIT.DMA_MemoryInc = DMA_MemoryInc_Enable; 92 | DMA_INIT.DMA_PeripheralDataSize = DMA_PeripheralDataSize_HalfWord; 93 | DMA_INIT.DMA_MemoryDataSize = DMA_MemoryDataSize_HalfWord; 94 | DMA_INIT.DMA_Mode = DMA_Mode_Circular; 95 | DMA_INIT.DMA_Priority = DMA_Priority_High; 96 | DMA_INIT.DMA_FIFOMode = DMA_FIFOMode_Disable; 97 | DMA_INIT.DMA_FIFOThreshold = DMA_FIFOThreshold_HalfFull; 98 | DMA_INIT.DMA_MemoryBurst = DMA_MemoryBurst_Single; 99 | DMA_INIT.DMA_PeripheralBurst = DMA_PeripheralBurst_Single; 100 | DMA_Init(DMA1_Stream5, &DMA_INIT); 101 | 102 | DMA_Cmd(DMA1_Stream5, ENABLE); 103 | DAC_Cmd(DAC_Channel_1, ENABLE); 104 | DAC_DMACmd(DAC_Channel_1, ENABLE); 105 | } 106 | -------------------------------------------------------------------------------- /ARDOP2/getopt.h: -------------------------------------------------------------------------------- 1 | #ifndef __GETOPT_H__ 2 | /* 3 | * getopt.h 4 | * 5 | * $Id: getopt.h,v 1.4 2009/01/04 17:35:36 keithmarshall Exp $ 6 | * 7 | * Defines constants and function prototypes required to implement 8 | * the `getopt', `getopt_long' and `getopt_long_only' APIs. 9 | * 10 | * This file is part of the MinGW32 package set. 11 | * 12 | * Contributed by Keith Marshall 13 | * 14 | * 15 | * THIS SOFTWARE IS NOT COPYRIGHTED 16 | * 17 | * This source code is offered for use in the public domain. You may 18 | * use, modify or distribute it freely. 19 | * 20 | * This code is distributed in the hope that it will be useful but 21 | * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY 22 | * DISCLAIMED. This includes but is not limited to warranties of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 24 | * 25 | * $Revision: 1.4 $ 26 | * $Author: keithmarshall $ 27 | * $Date: 2009/01/04 17:35:36 $ 28 | * 29 | */ 30 | #define __GETOPT_H__ 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | extern int optind; /* index of first non-option in argv */ 37 | extern int optopt; /* single option character, as parsed */ 38 | extern int opterr; /* flag to enable built-in diagnostics... */ 39 | /* (user may set to zero, to suppress) */ 40 | 41 | extern char *optarg; /* pointer to argument of current option */ 42 | 43 | extern int getopt( int, char * const [], const char * ); 44 | 45 | #ifdef _BSD_SOURCE 46 | /* 47 | * BSD adds the non-standard `optreset' feature, for reinitialisation 48 | * of `getopt' parsing. We support this feature, for applications which 49 | * proclaim their BSD heritage, before including this header; however, 50 | * to maintain portability, developers are advised to avoid it. 51 | */ 52 | # define optreset __mingw_optreset 53 | 54 | extern int optreset; 55 | #endif 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | /* 60 | * POSIX requires the `getopt' API to be specified in `unistd.h'; 61 | * thus, `unistd.h' includes this header. However, we do not want 62 | * to expose the `getopt_long' or `getopt_long_only' APIs, when 63 | * included in this manner. Thus, close the standard __GETOPT_H__ 64 | * declarations block, and open an additional __GETOPT_LONG_H__ 65 | * specific block, only when *not* __UNISTD_H_SOURCED__, in which 66 | * to declare the extended API. 67 | */ 68 | #endif /* !defined(__GETOPT_H__) */ 69 | #if !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__) 70 | #define __GETOPT_LONG_H__ 71 | 72 | #ifdef __cplusplus 73 | extern "C" { 74 | #endif 75 | 76 | struct option /* specification for a long form option... */ 77 | { 78 | const char *name; /* option name, without leading hyphens */ 79 | int has_arg; /* does it take an argument? */ 80 | int *flag; /* where to save its status, or NULL */ 81 | int val; /* its associated status value */ 82 | }; 83 | 84 | enum /* permitted values for its `has_arg' field... */ 85 | { 86 | no_argument = 0, /* option never takes an argument */ 87 | required_argument, /* option always requires an argument */ 88 | optional_argument /* option may take an argument */ 89 | }; 90 | 91 | extern int getopt_long( int, char * const [], const char *, const struct option *, int * ); 92 | extern int getopt_long_only( int, char * const [], const char *, const struct option *, int * ); 93 | /* 94 | * Previous MinGW implementation had... 95 | */ 96 | #ifndef HAVE_DECL_GETOPT 97 | /* 98 | * ...for the long form API only; keep this for compatibility. 99 | */ 100 | # define HAVE_DECL_GETOPT 1 101 | #endif 102 | 103 | #ifdef __cplusplus 104 | } 105 | #endif 106 | 107 | #endif /* !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__) */ 108 | /* $RCSfile: getopt.h,v $Revision: 1.4 $: end of file */ -------------------------------------------------------------------------------- /ARDOPC/getopt.h: -------------------------------------------------------------------------------- 1 | #ifndef __GETOPT_H__ 2 | /* 3 | * getopt.h 4 | * 5 | * $Id: getopt.h,v 1.4 2009/01/04 17:35:36 keithmarshall Exp $ 6 | * 7 | * Defines constants and function prototypes required to implement 8 | * the `getopt', `getopt_long' and `getopt_long_only' APIs. 9 | * 10 | * This file is part of the MinGW32 package set. 11 | * 12 | * Contributed by Keith Marshall 13 | * 14 | * 15 | * THIS SOFTWARE IS NOT COPYRIGHTED 16 | * 17 | * This source code is offered for use in the public domain. You may 18 | * use, modify or distribute it freely. 19 | * 20 | * This code is distributed in the hope that it will be useful but 21 | * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY 22 | * DISCLAIMED. This includes but is not limited to warranties of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 24 | * 25 | * $Revision: 1.4 $ 26 | * $Author: keithmarshall $ 27 | * $Date: 2009/01/04 17:35:36 $ 28 | * 29 | */ 30 | #define __GETOPT_H__ 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | extern int optind; /* index of first non-option in argv */ 37 | extern int optopt; /* single option character, as parsed */ 38 | extern int opterr; /* flag to enable built-in diagnostics... */ 39 | /* (user may set to zero, to suppress) */ 40 | 41 | extern char *optarg; /* pointer to argument of current option */ 42 | 43 | extern int getopt( int, char * const [], const char * ); 44 | 45 | #ifdef _BSD_SOURCE 46 | /* 47 | * BSD adds the non-standard `optreset' feature, for reinitialisation 48 | * of `getopt' parsing. We support this feature, for applications which 49 | * proclaim their BSD heritage, before including this header; however, 50 | * to maintain portability, developers are advised to avoid it. 51 | */ 52 | # define optreset __mingw_optreset 53 | 54 | extern int optreset; 55 | #endif 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | /* 60 | * POSIX requires the `getopt' API to be specified in `unistd.h'; 61 | * thus, `unistd.h' includes this header. However, we do not want 62 | * to expose the `getopt_long' or `getopt_long_only' APIs, when 63 | * included in this manner. Thus, close the standard __GETOPT_H__ 64 | * declarations block, and open an additional __GETOPT_LONG_H__ 65 | * specific block, only when *not* __UNISTD_H_SOURCED__, in which 66 | * to declare the extended API. 67 | */ 68 | #endif /* !defined(__GETOPT_H__) */ 69 | #if !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__) 70 | #define __GETOPT_LONG_H__ 71 | 72 | #ifdef __cplusplus 73 | extern "C" { 74 | #endif 75 | 76 | struct option /* specification for a long form option... */ 77 | { 78 | const char *name; /* option name, without leading hyphens */ 79 | int has_arg; /* does it take an argument? */ 80 | int *flag; /* where to save its status, or NULL */ 81 | int val; /* its associated status value */ 82 | }; 83 | 84 | enum /* permitted values for its `has_arg' field... */ 85 | { 86 | no_argument = 0, /* option never takes an argument */ 87 | required_argument, /* option always requires an argument */ 88 | optional_argument /* option may take an argument */ 89 | }; 90 | 91 | extern int getopt_long( int, char * const [], const char *, const struct option *, int * ); 92 | extern int getopt_long_only( int, char * const [], const char *, const struct option *, int * ); 93 | /* 94 | * Previous MinGW implementation had... 95 | */ 96 | #ifndef HAVE_DECL_GETOPT 97 | /* 98 | * ...for the long form API only; keep this for compatibility. 99 | */ 100 | # define HAVE_DECL_GETOPT 1 101 | #endif 102 | 103 | #ifdef __cplusplus 104 | } 105 | #endif 106 | 107 | #endif /* !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__) */ 108 | /* $RCSfile: getopt.h,v $Revision: 1.4 $: end of file */ -------------------------------------------------------------------------------- /ARDOP1OFDM/getopt.h: -------------------------------------------------------------------------------- 1 | #ifndef __GETOPT_H__ 2 | /* 3 | * getopt.h 4 | * 5 | * $Id: getopt.h,v 1.4 2009/01/04 17:35:36 keithmarshall Exp $ 6 | * 7 | * Defines constants and function prototypes required to implement 8 | * the `getopt', `getopt_long' and `getopt_long_only' APIs. 9 | * 10 | * This file is part of the MinGW32 package set. 11 | * 12 | * Contributed by Keith Marshall 13 | * 14 | * 15 | * THIS SOFTWARE IS NOT COPYRIGHTED 16 | * 17 | * This source code is offered for use in the public domain. You may 18 | * use, modify or distribute it freely. 19 | * 20 | * This code is distributed in the hope that it will be useful but 21 | * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY 22 | * DISCLAIMED. This includes but is not limited to warranties of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 24 | * 25 | * $Revision: 1.4 $ 26 | * $Author: keithmarshall $ 27 | * $Date: 2009/01/04 17:35:36 $ 28 | * 29 | */ 30 | #define __GETOPT_H__ 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | extern int optind; /* index of first non-option in argv */ 37 | extern int optopt; /* single option character, as parsed */ 38 | extern int opterr; /* flag to enable built-in diagnostics... */ 39 | /* (user may set to zero, to suppress) */ 40 | 41 | extern char *optarg; /* pointer to argument of current option */ 42 | 43 | extern int getopt( int, char * const [], const char * ); 44 | 45 | #ifdef _BSD_SOURCE 46 | /* 47 | * BSD adds the non-standard `optreset' feature, for reinitialisation 48 | * of `getopt' parsing. We support this feature, for applications which 49 | * proclaim their BSD heritage, before including this header; however, 50 | * to maintain portability, developers are advised to avoid it. 51 | */ 52 | # define optreset __mingw_optreset 53 | 54 | extern int optreset; 55 | #endif 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | /* 60 | * POSIX requires the `getopt' API to be specified in `unistd.h'; 61 | * thus, `unistd.h' includes this header. However, we do not want 62 | * to expose the `getopt_long' or `getopt_long_only' APIs, when 63 | * included in this manner. Thus, close the standard __GETOPT_H__ 64 | * declarations block, and open an additional __GETOPT_LONG_H__ 65 | * specific block, only when *not* __UNISTD_H_SOURCED__, in which 66 | * to declare the extended API. 67 | */ 68 | #endif /* !defined(__GETOPT_H__) */ 69 | #if !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__) 70 | #define __GETOPT_LONG_H__ 71 | 72 | #ifdef __cplusplus 73 | extern "C" { 74 | #endif 75 | 76 | struct option /* specification for a long form option... */ 77 | { 78 | const char *name; /* option name, without leading hyphens */ 79 | int has_arg; /* does it take an argument? */ 80 | int *flag; /* where to save its status, or NULL */ 81 | int val; /* its associated status value */ 82 | }; 83 | 84 | enum /* permitted values for its `has_arg' field... */ 85 | { 86 | no_argument = 0, /* option never takes an argument */ 87 | required_argument, /* option always requires an argument */ 88 | optional_argument /* option may take an argument */ 89 | }; 90 | 91 | extern int getopt_long( int, char * const [], const char *, const struct option *, int * ); 92 | extern int getopt_long_only( int, char * const [], const char *, const struct option *, int * ); 93 | /* 94 | * Previous MinGW implementation had... 95 | */ 96 | #ifndef HAVE_DECL_GETOPT 97 | /* 98 | * ...for the long form API only; keep this for compatibility. 99 | */ 100 | # define HAVE_DECL_GETOPT 1 101 | #endif 102 | 103 | #ifdef __cplusplus 104 | } 105 | #endif 106 | 107 | #endif /* !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__) */ 108 | /* $RCSfile: getopt.h,v $Revision: 1.4 $: end of file */ -------------------------------------------------------------------------------- /ARDOPOFDM/getopt.h: -------------------------------------------------------------------------------- 1 | #ifndef __GETOPT_H__ 2 | /* 3 | * getopt.h 4 | * 5 | * $Id: getopt.h,v 1.4 2009/01/04 17:35:36 keithmarshall Exp $ 6 | * 7 | * Defines constants and function prototypes required to implement 8 | * the `getopt', `getopt_long' and `getopt_long_only' APIs. 9 | * 10 | * This file is part of the MinGW32 package set. 11 | * 12 | * Contributed by Keith Marshall 13 | * 14 | * 15 | * THIS SOFTWARE IS NOT COPYRIGHTED 16 | * 17 | * This source code is offered for use in the public domain. You may 18 | * use, modify or distribute it freely. 19 | * 20 | * This code is distributed in the hope that it will be useful but 21 | * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY 22 | * DISCLAIMED. This includes but is not limited to warranties of 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 24 | * 25 | * $Revision: 1.4 $ 26 | * $Author: keithmarshall $ 27 | * $Date: 2009/01/04 17:35:36 $ 28 | * 29 | */ 30 | #define __GETOPT_H__ 31 | 32 | #ifdef __cplusplus 33 | extern "C" { 34 | #endif 35 | 36 | extern int optind; /* index of first non-option in argv */ 37 | extern int optopt; /* single option character, as parsed */ 38 | extern int opterr; /* flag to enable built-in diagnostics... */ 39 | /* (user may set to zero, to suppress) */ 40 | 41 | extern char *optarg; /* pointer to argument of current option */ 42 | 43 | extern int getopt( int, char * const [], const char * ); 44 | 45 | #ifdef _BSD_SOURCE 46 | /* 47 | * BSD adds the non-standard `optreset' feature, for reinitialisation 48 | * of `getopt' parsing. We support this feature, for applications which 49 | * proclaim their BSD heritage, before including this header; however, 50 | * to maintain portability, developers are advised to avoid it. 51 | */ 52 | # define optreset __mingw_optreset 53 | 54 | extern int optreset; 55 | #endif 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | /* 60 | * POSIX requires the `getopt' API to be specified in `unistd.h'; 61 | * thus, `unistd.h' includes this header. However, we do not want 62 | * to expose the `getopt_long' or `getopt_long_only' APIs, when 63 | * included in this manner. Thus, close the standard __GETOPT_H__ 64 | * declarations block, and open an additional __GETOPT_LONG_H__ 65 | * specific block, only when *not* __UNISTD_H_SOURCED__, in which 66 | * to declare the extended API. 67 | */ 68 | #endif /* !defined(__GETOPT_H__) */ 69 | #if !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__) 70 | #define __GETOPT_LONG_H__ 71 | 72 | #ifdef __cplusplus 73 | extern "C" { 74 | #endif 75 | 76 | struct option /* specification for a long form option... */ 77 | { 78 | const char *name; /* option name, without leading hyphens */ 79 | int has_arg; /* does it take an argument? */ 80 | int *flag; /* where to save its status, or NULL */ 81 | int val; /* its associated status value */ 82 | }; 83 | 84 | enum /* permitted values for its `has_arg' field... */ 85 | { 86 | no_argument = 0, /* option never takes an argument */ 87 | required_argument, /* option always requires an argument */ 88 | optional_argument /* option may take an argument */ 89 | }; 90 | 91 | extern int getopt_long( int, char * const [], const char *, const struct option *, int * ); 92 | extern int getopt_long_only( int, char * const [], const char *, const struct option *, int * ); 93 | /* 94 | * Previous MinGW implementation had... 95 | */ 96 | #ifndef HAVE_DECL_GETOPT 97 | /* 98 | * ...for the long form API only; keep this for compatibility. 99 | */ 100 | # define HAVE_DECL_GETOPT 1 101 | #endif 102 | 103 | #ifdef __cplusplus 104 | } 105 | #endif 106 | 107 | #endif /* !defined(__UNISTD_H_SOURCED__) && !defined(__GETOPT_LONG_H__) */ 108 | /* $RCSfile: getopt.h,v $Revision: 1.4 $: end of file */ --------------------------------------------------------------------------------