Merge pull request #1 from ha7ilm/master

qtcsdr compatibility
This commit is contained in:
F5OEO
2015-11-02 12:07:00 +01:00
4 changed files with 38 additions and 25 deletions

View File

@@ -17,19 +17,21 @@ Plug a wire on GPIO 18, means Pin 12 of the GPIO header ([header P1](http://elin
- 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).
<h2> Modulation samples </h2>
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)

View File

@@ -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

View File

@@ -1,40 +1,46 @@
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
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

View File

@@ -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);
@@ -1159,7 +1163,7 @@ for (;;)
close(FileInHandle);
FileInHandle = open(FileName, 'r');
}
else
else if (FileInHandle != STDIN_FILENO)
terminate(0);
@@ -1227,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);
@@ -1275,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<DmaSampleBurstSize;i++)