f5oeo / rpitx Goto Github PK
View Code? Open in Web Editor NEWRF transmitter for Raspberry Pi
License: GNU General Public License v3.0
RF transmitter for Raspberry Pi
License: GNU General Public License v3.0
Sometimes, rpitx could not be stopped by a CTL-C.
by a sudo killall rpitx solve the problem.
Maybe a DMA related issue. Still don't know how to be sure that a DMA channel is available : depends on model and Linux version, and maybe Device Tree.
Hello, I just can't get rpitx to work with IQFLOAT data (complex type of GNURadio) to work properly with rpitx. I have a simple FM transmitter under gnu radio and pipe complex floats via network with sampling rate of 190000 (doesn't really matter as no sampling rate is working)
If i use
while true; do (nc -l -p 8011; dd if=/dev/zero bs=4096 count=30); done | sudo rpitx -i- -m IQFLOAT -f 99000 -c 1 -s 190000
and i get an to wide output with 2 peaks in them, the signal is unusable:
If I try the exact same IQ data, but first passing it via csdr
while true; do (nc -l -p 8011; dd if=/dev/zero bs=4096 count=30); done | csdr fmdemod_quadri_cf|csdr gain_ff 75000 |csdr convert_f_samplerf 5263 | sudo rpitx -i- -m RF -f 99000
I get a much better signal (actually quite good one) proper width:
It would be enough to use csdr, but it introduces additional latencies, adds requirement for gain multiplication and in general would be nice if rpitx would properly handle IQ data itself :)
In README.md about streaming from GNURadio its written to "shift" the signal by 5khz, and thats centers the signal on one of 2 peaks. But that doesn't fix the issue that signal itself is not a good representation of passed IQ values
Is there a way to add decimals to frequency? eg: 18.100 would read 18100 kHz ...
Hi, what kind of file is dcfpatern.bin required by pidcf77 ?
Hi.
Kinda new to the raspberry pi and using it to transmit with.
As I've read the signal generated is pretty nasty so it should be cleaned up if it's going to be let out into the wild.
So is there any hardware out there that does this?
Preferably with a amplifier as well.
I did find this QRPi, for the 20M band. But it's not available any more?
I know that this kinda doesn't have anything to do with the software, but some "official" pointers regarding existing hardware/how to build one your self would be great.
I'm not a hw geek or very good at radio technical stuff, but I know how to use a soldering iron, as many others too probably, if only we had some drawings / guide to follow.
Awesome software, keep up the good work!
Thanks for rpitx by the way.
I"m doing something like this to transmit a jt65 cq of a pre-recorded file I recorded via ssb on an original raspberry pi.
sudo /home/pi/radio/rpitx/rpitx -m IQ -i /home/pi/radio/rpitx/jt65/cq.wav.ssb -f 14077.6
I can pick myself up on another receiver and decode the jt65 file 20m away. The peculiar thing is my transmit signal is also transmitting a local am or fm radio station alongside the wav file which makes for a right dirty signal. I have a low pass filter for 20m connected between the pi and the antenna.
Has anyone any thoughts on cleaning up this signal? I don't see this behaviour when I use the VFO option as a test. The pi is currently inside a biscuit tin.
Many thanks,
Chris
Raspberry pi B+ with wire attached to appropriate gpio pin. Receiving with RTL-SDR and HDSDR under windows, tuned to 107Mhz (an unused FM station, low, low power FM Tx is legal in the US).
I cannot observe any Tx from the pi with the RTL-SDR, using either:
sox imperial_march.wav imp.wav rate 48000 channels 1
pifm imp.wav imp.ft
sudo rpitx -m RF -i imp.ft -f 107000
or
convert -depth 8 Picture.jpg picture.rgb
./pisstv picture.rgb picture.ft
sudo ./rpitx -m RF -i picture.ft -f 107000
Both commands return, almost immediately (less than 1 second delay) with:
rpitx Version 0.1 compiled Dec 9 2015 (F5OEO Evariste) running on Model Pi B+
Model Pi 1
END OF PiTx
I have attempted with and without the patch from Issue #1.
The pifm project, on the same pi works perfectly with the antenna attached to a different GPIO pin, as required by the pifm project.
In some legislative areas of the World transmission systems have to be designed and approved to certain standards and may require licensing to broadcast (transmit) even low power signals and only operate in certain frequency bands.
I don't want to be a party-pooper but please include a warning for potential users (on the front page in the README.md perhaps) to check that they can use their RPi for this purpose where they are. If they cannot they may just forfeit their kit if they are lucky; if they are not, they may receive not just a strong signal but a much more personal interaction from their country's legislative arm of Government. 😬
If rpitx
was split into a library that provides C API, and command-line tools that link to the library, then it was possible to build other apps on it. E.g. one could easily add rpitx
support to SoapySDR or gr-osmosdr.
I've captured some AM ASK/OOK signals with an SDR and Audacity. What do I need to do to get these to play back on the same frequency as AM?
I'm trying this and I see a signal in SDR# but it's not sending antyhing close to the original signal. Maybe I'm going about this the wrong way?
sox office.wav os.wav rate 48000 channels1
./piam os.wav am.rfa
sudo ./rpitx -m RFA -i am.rfa -f 314981 -l -c 1
Maybe it's the file that's the problem? Here is the WAV file
https://www.dropbox.com/s/dup38l3fml7yy7k/3passes.wav?dl=0
Another approach is I have the bit sequence and timing (I think), if there's a way to create a data file manually using that information.
Hi,it is great,it is possible for developing it for receiver and transmitter tool.
can anyone offer any idea??
best regards stackprogramer
How can i change the default pin from GPIO18 to GPIO4 ?
Many thanks
(a command line switch would be a suggestion...)
i recently working on a project (actually an assignment from my lecturer). i tried to make my raspberry pi 3 works with a 5" touchscreen, unfortunately the touchscreen requires all the first 26 gpio pins, in other word it covers the pin 12 that supposed to be connected to a wire antenna. so is there any possible way to use another pin for the output signal ? and how to do that
When I do sudo ./rpitx -m VFO -f 1000
is it right to expect basically a square wave at 1000 kHz?
Instead, I get really sporadic pulses, as shown in this video.
Is this some sort of Pulse-Density Modulation trick or similar, or is something wrong? Mostly just trying to wrap my head around this. I am able to hear the FM sample via a broadcast receiver but when I lower the frequencies to what my 100MHz scope is supposed to be able to pick up, I don't see what I would expect.
Very bad program!
The AM modulation is so awful.
I'm trying to understand how to recover my fantastic PiFmRds :(
Today i made an .ft file from a 48000 .wav file using pifm, then transmitted it:
sudo ./rpitx -m RF -i w.ft -f 29820 -l
The transmission was audible in a nearby narrow-FM receiver, but between each syllable of my speech, there is a lot of noise. I tried two different .wav recorders (on my android), and low gain on the recorder, and high gain. ideas on this please? Thanks de wn1z Orrin in Calif
Is it possible that rpitx installation create a conflict with WsprryPi ?
Everything was ok...then i installed rpitx and tryed dcf77 script...no signal on 77.5kHz...and the WsprryPi doesn't transmit anymore (of course...it was closed before rpitx/dcf77).
Should reflash the sd card...
Happened 3 times in a row...
Any idea?
I am trying to capture various RF signals from various household remotes using RTL_SDR for play back using the RPITX software. I am looking to use these signals in a home automation software I am using. I believe I have successfully captured 2 signals as .IQ files and attempted to play them back using RPITX. The signal broadcast as I was able to see it in SDR# but my fan did not turn on as I was hoping. I am not sure if the files need to be converted in any way
I have included links to the files:
Turn fan low: https://drive.google.com/open?id=0B0MQEEqJHGUIcDQtaWpWWEE3OUE
Turn fan off: https://drive.google.com/open?id=0B0MQEEqJHGUIWHlZeTNNNUtpUk0
This is the process I am using:
Run the following command: rtl_sdr -f 303849000 capture.iq and hit the button on the remote. The ceiling fan uses 303.849.000Mhz
Then try to transmith the signal by running this command on the pi: sudo rpitx rpitx -i /home/pi/rpitx/sig/fan_low.iq -f 303849000
Output from rpitx (looks like the wrong frequency is being broadcast)
Warning : Using harmonic 41 memory: 1024 MB processor: Broadcom BCM2836 i2cDevice: /dev/i2c-1 model: Model B Pi 2 manufacturer: Embest pcb revision: 1 warranty void: no revision: a21041 peripheral base: 0x3f000000 Jessie Using mbox device /dev/vcio. 3616000 Size NUM PAGES 883 PAGE_SIZE 4096 MASH 1 Freq PLL# 6 Calibrate : ppm=0 DMA 167ns:1503ns WaitNano=20833 F1=361486188.332892 TuneFrequency 361509780.765417 F2=361518093.5 56929 Initial Resolution(Hz)=31905.224036 ResolutionPWMF 257.300194 NbStep=124 D ELAYStep=9 ****** STARTING TRANSMIT ******** END OF PiTx
i was poking around fm/pifm.c looking for a way to change its excursion to 8k for uhf cb purposes.
do i just change this line (line 88)
int Excursion=6000;
to this
int Excursion=4000;
???
Compilation of pifm.c
and piam.c
has been broken in latest commit fe591b4.
Example:
../fm/pifm.c: In function ‘main’:
../fm/pifm.c:77:37: error: ‘O_RWONLY’ undeclared (first use in this function)
FileFreqTiming = open(outfilename, O_RWONLY);
^
../fm/pifm.c:77:37: note: each undeclared identifier is reported only once for each function it appears in
../am/piam.c: In function ‘main’:
../am/piam.c:77:37: error: ‘O_RWONLY’ undeclared (first use in this function)
FileFreqTiming = open(outfilename, O_RWONLY);
^
../am/piam.c:77:37: note: each undeclared identifier is reported only once for each function it appears in
I have fixed it in pull request #9.
I understand that this project is only an experiment, but its code is barely readable.
I was trying to transmit a simple AM modulated signal by writing the RFA file from my custom C program.
The file format is described in the help:
-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)}
There are no further definitions on what are the ranges for these values. By looking at the sample files and code of various rpitx programs I was able to deduce the following:
typedef struct {
double Frequency;
uint32_t WaitForThisSample;
} samplerf_t;
samplerf_t RfSample;
readWrapper(&SampleRf,sizeof(samplerf_t)); \* sizeof() will return 16, not 12! *\
Please document how AM mode is implemented and used, I have spent two good evenings trying to understand all of this :-)
Also the struct holding frequency and delay will likely produce incompatible files on 32bit and Big Endian CPUs...
Thanks!
I've practically no idea how radio transmission works on the Pi but I would like to use it to push music to my single-CD, AM/FM car audio unit that lacks an AUX input.
However the issues with interference concern me quite a lot.
Is there a way to minimize the interference in software, through a super-short antenna wire, or perhaps with a super-cheap piece of hardware?
This board seems aimed at addressing the interference issue:
https://www.tapr.org/kits_20M-wspr-pi.html
but it's more expensive than a Pi when shipping is factored in.
May sound simplistic but would a steel case, kinda acting as a faraday cage, around the Pi, be enough?
I really only need to transmit maybe 30CM max which is more than the 10CM available without adding a GPIO wire but much less than the 100M apparently attainable with the shortest of GPIO wires.
Hi, thanks for sharing this great project!
I discover that it officially doesn't have support for the A+ model. Why is that? because of memory? do you think there is going to be A+ version working on the future?
Thanks again and congratulations for the good work.
Patricio
I think it should be entirely possible to transmit analog TV. So, if possible I would like this to be implemented.
I've experienced a strange shifting of 2.8 MHz upwards from the carrier. Randomly the nominal 14MHz transmission is just shifted up to 16.8 MHz... then back.
Using latest Raspbian Jessie (as of today 22/04/2016), all the update, upgrade, disti upgrade done before. Cloned and installed riptx just right now from github.
Hi,
I own only a raspberry 3 and i've noticed these problem (i think it's something on my setup since it works for you...)
Any idea?
Make a lib-rpitx for external software build.
Need to write exposed functions.
Requirement and proposals welcomed.
What output Impedance could I expect from Raspberry when I am transmitting with FM on VHF frequency 145Mhz (Ohm)?
On rpi2 and rpi3 I have problem with setTime.py
I connected GPIO18-GND to series resonant LC antenna,
Carrier is great, 77.5 kHz precise to 4 decimals, and can be
cleanly received by the clock few meters away.
the DCF time binary message is correct but the bits transmitted have wrong timing.
everything is slowed down by about 20% so the time distance between 2 adjacent
1-second bits (pulses) actually last about 1.2 seconds, short pause 120ms is too long
(should be 100ms), long pause 240ms is too long, so receiver clock won't accept it
Should I somehow use dt-blob.bin?
(77.5 kHz transmitter uses 19.2 MHz base, I understood the blob matters for
high frequencies which need clock base 1 GHz)
Any help
Hi,
it is possible extend frequency to 77 Khz ?
If yes,
I like to try something like https://github.com/CodingGhost/DCF77-Transmitter/blob/master/DCF77_Protocoll_.ino
With some hint I can do the job.
I try to decode the stream using standard DVB-S receiver ... but when i search the channel the receiver don't found my modulation ... i use the LNA at 9750 I try to check the modulation with HackRF and #SDR amd i see the modulation but i don't have any kind of software for decode DVB-S with HackRF i search online but found nothing ... do you have some suggestions ? If not i order a RTL-SDR ... but i thought that with HackRF i don't need a RTL dongle help me please :)
Thanks
Roberto
I get this while running it on a RasPi Model B (2x USB,512MB RAM):
root@kali:/home/rpitx# rpitx -m RF -i fm.ft -f 90000 -l
rpitx Version 0.1 compiled Jun 15 2016 (F5OEO Evariste) running on Master PLL = 1000000000
Unable to determine hardware version. I see: Hardware : BCM2835
,
- expecting BCM2708 or BCM2709. Please report this to [email protected]
What now? :)
I tried many times to create ft file but i get the same problem
root@raspberrypi:/rpitx# convert -depth 8 img.jpg picture.rgb/rpitx# ./pisstv picture.rgb picture.ft
root@raspberrypi:
Adding VIS header to audio data.
Done adding VIS header to audio data.
Adding VIS trailer to audio data.
Done adding VIS trailer to audio data.
root@raspberrypi:/rpitx# sudo ./rpitx -m RF -i picture.ft -f 100000/rpitx# ./pifm el.wav fm.ft
Failed to read Filein picture.ft
rpitx Version 0.1 compiled Nov 2 2015 (F5OEO Evariste) running on END OF PiTx
root@raspberrypi:
Reading file : el.wav
Sample Rate : 48000
Writing file : fm.ft
root@raspberrypi:~/rpitx# sudo ./rpitx -m RF -i fm.ft -f 100000 -l
Failed to read Filein fm.ft
rpitx Version 0.1 compiled Nov 2 2015 (F5OEO Evariste) running on END OF PiTx
Converted a capture file to 48K mono audio file using audacity. Tried saving at all bit rates. Regardless I see the message, "Input rate must be 48K". What am I missing? Thanks.
In the Readme.md usage you say:
-f float frequency to output on GPIO_18 pin 12 in khz : (130 kHz to 750 MHz),
Is this a typo or can you actually have that high a frequency? In the BCM2835 manual it is stated that the PWM can be most 125 MHz, given the old document assumption on clock freq etc.
Have anyone actually tested this?
How does it differ for different devices?
This is more of a question than an issue - do you think rpitx
should work without modifications on new Raspberry Pi 3? Or if not, are you planning to add support for it?
CPU in RPi3 runs on higher frequency, so maybe rpitx should work better for transmitting on higher frequencies too?
PiFm doesn't work after installing rpitx. How to fix?
Is it possible to stream IQ signal demodulated from rtl_fm or possibly audio from microphone to rpitx?
testing the the sstv function and it is broadcast way too fast. its over in like 5 seconds instead of the 2 minutes it is supposed to take
another issue is when broadcast, it is broadcast at 291.6MHz instead of the 145.8MHz i told it to broadcast at
Prompt please, for transmission of DCF77 some special antenna is necessary?
Or the piece of a wire approaches?
Just I connected a piece of a wire, but hours aren't set up and don't see a signal.
But also I noted that in case of start of FM on receivers there are noises.
I would just like to discuss if it would be possible to extend the input options to allow receiving raw/float IQ samples from the network (using either TCP or UDP socket). That would extend the usability of this project as one could then prepare the TX chain in (for example) GNU Radio and output it to the RPiTX to transmit via network.
Comments greatly appreciated.
I have several RF remotes that control various devices (ceiling fan, fire place, blinds) and would like to capture the RF transmission that is sent when a button is pressed so I can capture and incorporate into a home automation solution I use. Wondering if this is possible with RPITX.
Is possible to generate PSK31 signal on GPIO?
Hello,
today I´ve discovered Rpitx, and wanted to try it out on my Raspberry compatible board: OrangePI PC.
I´ve followed the manual for FM Modulation.
When running sudo ./rpitx -m RF -i fm.ft -f 100000 -l
Following happens:
rpitx Version 0.2 compiled Sep 16 2016 (F5OEO Evariste) running on Master PLL = 1000000000
Wheezy
Failed to open mailbox
MASH 1 Freq PLL# 6
END OF PiTx
root@orangepi:~/rpitx#
I guess the error is Failed to open mailbox
- but I have no idea how to fix this error or which problem causes it. Any ideas?
I tired running this on PiZero and it compiles and runs. But does not see the radio transmission. Any plans of supporting Pi Zero?
Hey,
just saw this awesome project and got an idea for my home automatization:
I have a „Hörmann“ garage door opener.
For a long time, I want to use my phone instead of the original sender.
Therefore, I thought to run a raspberry and send the signal from there.
Until now, I had no idea how to make the raspberry send, but this repository seems to have the ideal solution :)
Unfortunately, I found out, that my garage door opener works at 868MHz, which seems to be not supported by rptix. (http://www.hoermann-faq.com/antriebe-funk/welche-sendefrequenz-nutzt-mein-handsender/)
Is it true that 868MHz will not work? Why is limit at 750MHz?
Is there the possibility to make it work? That would be great!
Thank you so much in advance!
The code contains a lot of strange expressions. I ran GCC with -Wall -Wextra to show all the problems.
cc -Wall -Wextra -Werror -O2 -Wno-unused-variable -o ../rpitx RpiTx.c RpiGpio.c mailbox.c RpiDma.c -lm -lrt -lpthread RpiTx.c: In function ‘terminate’: RpiTx.c:172:15: error: unused parameter ‘dummy’ [-Werror=unused-parameter] terminate(int dummy) ^ RpiTx.c: In function ‘FrequencyAmplitudeToRegister’: RpiTx.c:899:16: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if(Relicat>=DelayFromSampleRate) ^ RpiTx.c:906:38: error: comparison of unsigned expression < 0 is always false [-Werror=type-limits] if((DelayFromSampleRate+Relicat)<0) ^ RpiTx.c:571:158: error: unused parameter ‘debug’ [-Werror=unused-parameter] inline void FrequencyAmplitudeToRegister(double TuneFrequency,uint32_t Amplitude,int NoSample,uint32_t WaitNanoSecond,uint32_t SampleRate,char NoUsePWMF,int debug) ^ RpiTx.c: In function ‘pitx_run’: RpiTx.c:1446:15: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if(NbRead!=DmaSampleBurstSize*2*sizeof(float)) ^ cc1: all warnings being treated as errors Makefile:9: recipe for target '../rpitx' failed make: *** [../rpitx] Error 1
how to transmit in am mode?
any idea?
Perhaps I am misunderstanding something, in which case I apologize.
If I do, e.g.,
sudo rpitx -m VFO -f 720000
I see
Warning : Using harmonic 3
and
WaitNano=25000 F1=159993750.244131 TuneFrequency 160000000.000000 F2=160000000.000000 Initial Resolution(Hz)=6249.755869 ResolutionPWMF 41.944670 NbStep=149 DELAYStep=9
Why is TuneFrequency 160 MHz? I expected 720 MHz / 3 * 2 = 480 MHz, or three times what I see, which would produce a 240 MHz fundamental and a 720 MHz third harmonic.
I do indeed see signal at 80 MHz. From the code, it does look like the frequency gets divided by 3 twice: in pitx_SetTuneFrequency there is this:
GlobalTuningFrequency=Frequency/HarmonicNumber;
and then in pitx_run FrequencyAmplitudeToRegister is called with GlobalTuningFrequency//HarmonicNumber. So it looks like my desired frequency is the 9th harmonic rather than the 3rd.
Again, apologies if I have misunderstood.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.