From fb2a962e76a2378392ec98707d1b0ef61b326534 Mon Sep 17 00:00:00 2001 From: ha7ilm Date: Sat, 31 Oct 2015 15:48:39 +0000 Subject: [PATCH 1/7] Add "make install" --- src/Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index ac7b9cd..ed64909 100644 --- a/src/Makefile +++ b/src/Makefile @@ -37,4 +37,10 @@ clean: rm -f RpiTx.o mailbox.o RpiGpio.o RpiDma.o - +install: all + install -m 0755 ../pisstv /usr/bin + install -m 0755 ../pifm /usr/bin + install -m 0755 ../piam /usr/bin + install -m 0755 ../pissb /usr/bin + install -m 0755 ../pifsq /usr/bin + install -m 0755 ../rpitx /usr/bin From da303d15bbb6f681977ac6361c7276e0c2086647 Mon Sep 17 00:00:00 2001 From: ha7ilm Date: Sat, 31 Oct 2015 15:58:35 +0000 Subject: [PATCH 2/7] Now "make" only builds those targets that have a source file that has changed. --- src/Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Makefile b/src/Makefile index ed64909..8d2d55a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1,41 +1,41 @@ -all: PiTx Pissb pisstv pifsq pifm piam +all: ../rpitx ../pissb ../pisstv ../pifsq ../pifm ../piam #CFLAGS = -Wall -g -O2 -D DIGITHIN CFLAGS = -Wall -g -O2 -Wno-unused-variable LDFLAGS = -lm -lrt -lpthread -PiTx : RpiGpio.c RpiTx.c mailbox.c RpiDma.c +../rpitx: RpiGpio.c RpiTx.c mailbox.c RpiDma.c $(CC) $(CFLAGS) -o ../rpitx RpiTx.c RpiGpio.c mailbox.c RpiDma.c $(LDFLAGS) CFLAGS_Pissb = -Wall -g -O2 -Wno-unused-variable LDFLAGS_Pissb = -lm -lrt -lpthread -lsndfile -Pissb : ../ssbgen/test_ssb.c ../ssbgen/ssb_gen.c +../pissb: ../ssbgen/test_ssb.c ../ssbgen/ssb_gen.c $(CC) $(CFLAGS_Pissb) -o ../pissb ../ssbgen/ssb_gen.c ../ssbgen/test_ssb.c $(LDFLAGS_Pissb) CFLAGS_Pisstv = -Wall -g -O2 -Wno-unused-variable LDFLAGS_Pisstv = -lm -lrt -lpthread -pisstv : ../sstv/pisstv.c +../pisstv : ../sstv/pisstv.c $(CC) $(CFLAGS_Pisstv) -o ../pisstv ../sstv/pisstv.c $(LDFLAGS_Pisstv) CFLAGS_Pifsq = -Wall -g -O2 -Wno-unused-variable LDFLAGS_Pifsq = -lm -lrt -lpthread -pifsq : ../fsq/pifsq.c +../pifsq : ../fsq/pifsq.c $(CC) $(CFLAGS_Pisfq) -o ../pifsq ../fsq/pifsq.c $(LDFLAGS_Pisfq) CFLAGS_Pifm = -Wall -g -O2 -Wno-unused-variable LDFLAGS_Pifm = -lm -lrt -lpthread -lsndfile -pifm : ../fm/pifm.c +../pifm : ../fm/pifm.c $(CC) $(CFLAGS_Pifm) -o ../pifm ../fm/pifm.c $(LDFLAGS_Pifm) CFLAGS_Piam = -Wall -g -O2 -Wno-unused-variable LDFLAGS_Piam = -lm -lrt -lpthread -lsndfile -piam : ../am/piam.c +../piam : ../am/piam.c $(CC) $(CFLAGS_Piam) -o ../piam ../am/piam.c $(LDFLAGS_Piam) clean: - rm -f RpiTx.o mailbox.o RpiGpio.o RpiDma.o + rm -f ../rpitx ../pissb ../pisstv ../pifsq ../pifm ../piam RpiTx.o mailbox.o RpiGpio.o RpiDma.o install: all install -m 0755 ../pisstv /usr/bin From aa5d104626944feaf7c67050f8c9bd6c1f88a352 Mon Sep 17 00:00:00 2001 From: ha7ilm Date: Sat, 31 Oct 2015 18:15:15 +0100 Subject: [PATCH 3/7] Add STDIN_FILENO for file handle when -I- --- src/RpiTx.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/RpiTx.c b/src/RpiTx.c index 7ae5a78..a9c2ff4 100644 --- a/src/RpiTx.c +++ b/src/RpiTx.c @@ -901,7 +901,11 @@ main(int argc, char **argv) //Open File Input for modes which need it if((Mode==MODE_IQ)||(Mode==MODE_IQ_FLOAT)||(Mode==MODE_RF)||(Mode==MODE_RFA)) { - FileInHandle = open(FileName, 'r'); + if(strcmp(FileName,"-")==0) + { + FileInHandle = STDIN_FILENO; + } + else FileInHandle = open(FileName, 'r'); if (FileInHandle < 0) { fatal("Failed to read Filein %s\n",FileName); From c158af058212cf61aedbd41e7182b84bb175fe8c Mon Sep 17 00:00:00 2001 From: ha7ilm Date: Sat, 31 Oct 2015 18:20:36 +0100 Subject: [PATCH 4/7] Update README.md --- Readme.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Readme.md b/Readme.md index 077cd65..1c5a665 100644 --- a/Readme.md +++ b/Readme.md @@ -16,20 +16,20 @@ Plug a wire on GPIO 18, means Pin 12 of the GPIO header ([header P1](http://elin **rpitx** is the main software to transmit. It allows to transmit - from **IQ** files *.iq (could be generated by external software like gnuradio or by some few examples of modulations). - from **Frequency/Time** files *.ft (generally used implement easily digital modes) - -Usage:rpitx [-i File Input][-m ModeInput] [-f frequency output] [-s Samplerate] [-l] [-p ppm] [-h] --m {IQ(FileInput is a Stereo Wav contains I on left Channel, Q on right channel)} - {IQFLOAT(FileInput is a Raw float interlaced I,Q)} - {RF(FileInput is a (double)Frequency,Time in nanoseconds} - {RFA(FileInput is a (double)Frequency,(int)Time in nanoseconds,(float)Amplitude} - {VFO (constant frequency)} --i path to File Input --f float frequency to output on GPIO_18 pin 12 in khz : (130 kHz to 750 MHz), --l loop mode for file input --p float frequency correction in parts per million (ppm), positive or negative, for calibration, default 0. --d int DMABurstSize (default 1000) but for very short message, could be decrease --h help (this help). - + + Usage:rpitx [-i File Input][-m ModeInput] [-f frequency output] [-s Samplerate] [-l] [-p ppm] [-h] + -m {IQ(FileInput is a Stereo Wav contains I on left Channel, Q on right channel)} + {IQFLOAT(FileInput is a Raw float interlaced I,Q)} + {RF(FileInput is a (double)Frequency,Time in nanoseconds} + {RFA(FileInput is a (double)Frequency,(int)Time in nanoseconds,(float)Amplitude} + {VFO (constant frequency)} + -i path to File Input + -f float frequency to output on GPIO_18 pin 12 in khz : (130 kHz to 750 MHz), + -l loop mode for file input + -p float frequency correction in parts per million (ppm), positive or negative, for calibration, default 0. + -d int DMABurstSize (default 1000) but for very short message, could be decrease + -h help (this help). +

Modulation samples

Some modulations are included in the software and can be easily extended. They create files which could be ingest by rpitx. Some output in IQ (like ssb) other in FT(like sstv) From 26fe38210f1d5a100cd5f93b0604ec39cc2546c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Retzler?= Date: Sat, 31 Oct 2015 18:22:40 +0100 Subject: [PATCH 5/7] Update README.md --- Readme.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 1c5a665..c0026a1 100644 --- a/Readme.md +++ b/Readme.md @@ -16,8 +16,10 @@ Plug a wire on GPIO 18, means Pin 12 of the GPIO header ([header P1](http://elin **rpitx** is the main software to transmit. It allows to transmit - from **IQ** files *.iq (could be generated by external software like gnuradio or by some few examples of modulations). - from **Frequency/Time** files *.ft (generally used implement easily digital modes) - - Usage:rpitx [-i File Input][-m ModeInput] [-f frequency output] [-s Samplerate] [-l] [-p ppm] [-h] + +Usage: + + rpitx [-i File Input][-m ModeInput] [-f frequency output] [-s Samplerate] [-l] [-p ppm] [-h] -m {IQ(FileInput is a Stereo Wav contains I on left Channel, Q on right channel)} {IQFLOAT(FileInput is a Raw float interlaced I,Q)} {RF(FileInput is a (double)Frequency,Time in nanoseconds} From 82b8d405c18a13e1645a2379b4aa88e034d7fd94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20Retzler?= Date: Sun, 1 Nov 2015 20:31:49 +0100 Subject: [PATCH 6/7] Add "sudo make install" to install.sh --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 378008f..b8d88dc 100755 --- a/install.sh +++ b/install.sh @@ -6,5 +6,6 @@ sudo apt-get install imagemagick sudo mknod /dev/rpidatv-mb c 100 0 cd src make -j4 +sudo make install cd .. echo Installation done From 38ae5944f8453f417986cbe5edfe10710a9fc818 Mon Sep 17 00:00:00 2001 From: ha7ilm Date: Sun, 1 Nov 2015 21:35:47 +0000 Subject: [PATCH 7/7] Added support for stdin input for RFA, RF modes. --- src/RpiTx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/RpiTx.c b/src/RpiTx.c index a9c2ff4..d94b98b 100644 --- a/src/RpiTx.c +++ b/src/RpiTx.c @@ -1163,7 +1163,7 @@ for (;;) close(FileInHandle); FileInHandle = open(FileName, 'r'); } - else + else if (FileInHandle != STDIN_FILENO) terminate(0); @@ -1231,7 +1231,7 @@ for (;;) FileInHandle = open(FileName, 'r'); NbRead=read(FileInHandle,TabRfSample+i,sizeof(samplerf_t)); } - else + else if (FileInHandle != STDIN_FILENO) { sleep(1); terminate(0); @@ -1279,7 +1279,7 @@ for (;;) FileInHandle = open(FileName, 'r'); NbRead=read(FileInHandle,TabRfSample+i,sizeof(samplerf_t)); } - else + else if (FileInHandle != STDIN_FILENO) terminate(0); } //for(i=0;i