Rpitx2
Rpitx, but has better pifmrds
Install / Use
/learn @KubaPro010/Rpitx2README
if you wanna use pifmrds, then scroll down to pifmrds usage (here)
also im not gonna be adding stuff here, because for fm i've moved onto BH1415F based transmitters (CZE-7C), with that i use a chinese PCM5122 dac (allo boss dac driver), and on the pi 3b, i have my fm95, rds95 running with cutting edge features (rds95 has 9-bit af codes, while no other open-source encoder has)

About rpitx2
rpitx2 is a general radio frequency transmitter for Raspberry Pi which doesn't require any other hardware unless filter to avoid interference. It can handle frequencies from 5 KHz up to 1500 MHz.
Rpitx2 is a software made for educational on RF system. It has not been tested for compliance with regulations governing transmission of radio signals. You are responsible for using your Raspberry Pi legally.
RPITX2 IS BASED ON RPITX
A forum is available : https://groups.io/g/rpitx
_Created by Evariste Courjaud F5OEO. See Licence for using it.
Installation
Assuming a Raspberry Pi OS Lite installation (raspios-bookworm) : https://www.raspberrypi.org/downloads/raspbian/
Be sure to have git package installed :
sudo apt-get update
sudo apt-get install git
You can now clone the repository. A script (install.sh) is there for easy installation. You could inspect it and make steps manually in case of any doubt. You can note that /boot/config.txt should be prompt to be modified during the installation. If it is not accepted, rpitx2 will be unstable.
git clone https://github.com/KubaPro010/rpitx2
cd rpitx2
./install.sh
Make a reboot in order to use rpitx2 in a stable state. That's it !
sudo reboot
Update
you wanna update? sure, just run ./compile.sh if you have a error, type in chmod +x ./compile.sh and there you go it will update and compile!
Hardware
note: you probably don't need it, i've been transmitting since summer 2023 without it, and no one knocked at my door, but your country laws can be stricter and if you live where a lot of people do
| Raspberry Model | Status | | ---------------------|:-------:| | Pizero|OK| | PizeroW|OK| | PiA+|OK| | PiB|Partial| | PiB+|OK| | P2B|OK| | Pi3B|OK| | Pi3B+|OK| | Pi3A+|OK| | Pi4|Sure (maybe)| | Pi400|Sure (maybe)| | Pi5|No.|
Plug a wire on GPIO 4, means Pin 7 of the GPIO header (header P1). This acts as the antenna. The optimal length of the wire depends the frequency you want to transmit on, but it works with a few centimeters for local testing. (Use this to calculate the lenght, make sure to use the 1/4 wave setting, as for 1/2 wave you'd need a impedance transformator, and these are not cheap [also yes, i learned it the hard way after having to cut my antenna])
Hardware (detailed compatibility)
It definitly works on a RPI 3 A+, as im testing this program on it, ive used it on a pi 400, it sometimes works with no problem, but sometime it just crashes, possible cause can be this: "the rpi swtiches the gpio pin so fast it cant tell it states, for example if its 0.5 instead of high or low, whats next?" but, that just a theory, A ELECTRONIC THEORY
How to use it

Easytest
easytest is the easiest way to start and see some demonstration. All transmission are made on free ISM band (434MHZ). To launch it, go to rpitx folder and launch easytest.sh :
cd rpitx
./easytest.sh
Choose your choice with arrows and enter to start it.Don't forget, some test are made in loop, you have to press CTRL^C to exit and back to menu.
Easy way to monitor what you are doing is by using a SDR software and a SDR receiver like a rtl-sdr one and set the frequency to 434MHZ.
Carrier
A simple carrier generated at 434MHZ.
Chirp
A carrier which move around 434MHZ.
Spectrum
A picture is displayed on the waterfall on your SDR. Note that you should make some tweaks in order to obtain contrast and correct size depending on your reception and SDR software you use.
RfMyFace
Spectrum painting of your face using the raspicam for fun !
FM with RDS
Broadcast FM with RDS. You should receive it with your SDR. This is the modulation that you should hear on your classical FM Radio receiver, but at this time, the frequency is too high.
Single Side Band modulation (SSB)
This is the classical Hamradio analog voice modulation. Use your SDR in USB mode.
Slow Scan Television (SSTV)
This is a picture transmission mode using audio modulation (USB mode). You need an extra software to decode and display it (qsstv,msstv...). This demo uses the Martin1 mode of sstv.
Pocsag (pager mode)
This is a mode used by pagers. You need an extra software to decode. Set your SDR in NFM mode.
Freedv (digital voice)
This is state of the art opensource digital modulation. You need Freedv for demodulation.
Opera (Beacon)
This a beacon mode which sound like Morse. You need opera in mode 0.5 to decode.
Rpitx and low cost RTL-SDR dongle

rtlmenu allows to use rtl-sdr receiver dongle and rpitx2 together. This combine receiver and transmission for experimenting. To launch it, go to rpitx folder and launch rtlmenu.sh :
./rtlmenu.sh
You have first to set receiver frequency and gain of rtl-sdr. Warning about gain, you should ensure that you have enough gain to receive the signal but not to strong which could saturate it and will not be useful by rpitx2.
Choose your choice with arrows and enter to start it.Don't forget, some test are made in loop, you have to press CTRL^C to exit and back to menu.
Record and play

A typical application, is to replay a signal. Picture above shows a replay of a signal from a RF remote switch. So first, record few seconds of signal, CTRL^C for stop recording. Then replay it with play.
Transponder
We can also live transmitting a received band frequency. Here the input frequency is a FM broadcast station which is retransmit on 434MHZ.
Relay with transmodulation
We assume that input frequency is tuned on FM station. It is demodulated and modulate to SSB on 434MHZ. SSB is not HiFi, so prefere to choose a talk radio, music sounds like bit weird !
PiFMRds
Usage
See https://github.com/ChristopheJacquet/PiFmRds/blob/master/README.md and https://github.com/miegl/PiFmAdv/blob/master/README.md, it will show what you can do, but theres MORE, yeah, this ain't some that undeveloped code, this is developed, but whats the quality of the code? lets not talk about that, okay? anyways, let me show you the features of this :)
first, the normal args, like pifmrds -arg argtoarg?<br>
if you have a arg with no argume... wait what args with args? anyways like the input of the arg, right? if we'd take -disablerds, you need to pass something to it or the arg parser will shit itself, pass in anything, i always do mhm, have fuck, i mean fun (blud trying to be funny, blud saing blud, blud missplled saying)<br>
-compressordecay - compressor decay, specify in float (like: 0.999, default: 0.999995)<br>
-compressorattack - same thing but attack (default: 1.0)<br>
-compressormaxgainrecip - internally, it does something with division, so this is to not do devision by 0 (default: 0.01)<br>
-bfr - by default a 65-108 freq range is defined, a freq outside makes the program crash, this bypasses the range, also it requires a arg, it can be anything as the arg is not parsed, so pass: -bfr thisbypassescrap (tl;dr: unlocks full band of rpitx)<br>
-deviation - sets how much does the fm signal deviates from its center freq, in khz, default is 75khz<br>
-raw - same arg as bfr, but this disables the format of the audio and sets channels and samplerate forcefully<br>
-rawchannels - change the sample rate if raw<br>
-rawsamplerate - same stuff but sample rate<br>
-cutofffreq - fm broadcast uses a cut off freq of 15 khz, to avoid interferance with the 19khz stereo pilot, however if you do wanna get more freqs then just change this i guess<br>
-audiogain - audio too loud or too quiet? use this, this defines how many times the audio can be (example: -audiogain 2)<br>
-disablerds - same arg as bfr, pass this in and no rds anymore<br>
-disablecompressor - same as bfr, dont pass this please as that is a bad idea<br>
-disablect - disable rds ct if you've decided that you have too much of a shitty clock<br>
-preemphasis - you can enter 0 or off for disabled, or us (75μs), default is 50μs, you can also enter any num and have that μs of pre-emp, (example: -preemphasis us, -preemphasis 22)<br>
-af - same as pifmadv<br>
-rdsvolume - rds volume, so how many times is the rds "louder", this can potentially increase rds range<br>
-limiterthreshold - limiter threshold, limits to 10, i think that its in linear ratio, so the algorithm to convert from db is gonna be 10 ** (db/20) (actually its pcm value)<br><br>
-ecc - see the control pipe entry
now you know what you can pass as the args to the program, but theres a pipe still, it wont include the ones in pifmadv or pifmrds:<br>
PI - you can change pi code while runtime, useful when you forgot to set a pi code, but you probably won't care about it<br>
CT - turn ct on or off, but while runtime<br>
PWR - same as arg -power<br>
RTB - there are 2 r
