¿ªÔÆÌåÓý

New file uploaded to Raspberry_Pi_4-Ham_RADIO


 

Hello,


This email message is a notification to let you know that
a file has been uploaded to the Files area of the Raspberry_Pi_4-Ham_RADIO
group.


File : /nbfm.out
Uploaded by : fotograf_ale <fotografale@...>
Description : This is a Narrow Band FM transmitter derived from pifm. It is able to transmit FM from VLF to UHF with a settable deviation and pre-emphasys, frequency correction and subtones. It runs under debian distr.
In a SSH session type ./nbfm.out for help.
It could be useful for beacons, fox hunting but also as a laboratory instrument to check and calibrate receivers and IFs since it can operate at, for example, 455kHz, 10.7MHz, 21.4MHz and so on.
Over 150MHz it needs to be run in 3rd harmonic; doing so it is possible to use it, for example, on 220 and 430 MHz, paying attention to reduce the deviation properly.


IMPORTANT NOTE<
This program uses the classic GPIO4 (pin7) as RF output port. The GPIO generates a lot of spurs and harmonics all around the spectrum. A filter is absolutely needed if you intend to radiate the signal on air without the risk of causing serious frequency pollution and disturb important radio communications.


enjoy the nbfm transmitter and best 73s
ik1pld




You can access this file at the URL:



To learn more about file sharing for your group, please visit:



Regards,


fotograf_ale <fotografale@...>


 

As for an example, if you wish to transmit the audio file "cq.wav" (sampled at 11025Hz) on 145.500MHz with a standard 5kHz deviation and no frequency correction, no subtone, you can simply type:
./nbfm.out cq.wav 145.5

Another example, using a subaudio tone:
./nbfm.out cq.wav 145.5 11025 -15 5 400 0.01 110.9
It means to transmit on 145.500Mhz the audio file "cq.wav" sampled at 11025Hz, applying a carrier frequency correction of -15ppM, FM deviation of 5kHz, 400us pre-emphasys, adding a 110.9Hz tone with 1% of full scale level.

73s de ik1pld


 

Following is an example of script that makes the Raspy able to say, via radio, its core temperature and load.
It uses nbfm.out as FM transmitter and festival as speech synthesizer.


#!/bin/bash

if [ -e CPUTemp.txt ];
then
??? rm -f CPUTemp.txt
fi

clear

inp1=$1
inp2=$2

if [ -z $1 ]; then
??? echo ""
??? echo "NBFM Transmission of the CPU temp and load, v20140725 by IK1PLD"
??? echo ""
??? echo "Use: ./TX-CPUTemp.sh [Freq [Interval]]"
??? echo "Freq: carrier frequency in MHz (example 145.3125)"
??? echo "Interval: time interval, in sec, between transmissions (default 60)"
??? echo ""?? ?
??? exit
fi

if [ -z $1 ]; then
??? inp1=145.5
fi

if [ -z $2 ]; then
??????? inp2=60
fi

echo ""
echo "CPU temperature and load is transmitted on $inp1 MHz every $inp2 seconds"
echo ""
startN=1

while [ $startN -le 1000 ];
do
??????? temp_gpu=$(/opt/vc/bin/vcgencmd measure_temp | tr -d [a-z,A-Z,"=","'","."][])
??? ?? ?cpuUsageM=$(top -bn 1 | awk '{print $9}' | tail -n +8 | awk '{s+=$1} END {print s}')
??? ?? ??? ?cpuTempString=$(cat /sys/class/thermal/thermal_zone0/temp)
??? ?? ??? ?cpuTempInt=$(($cpuTempString/1000))
??? ?? ??? ?cpuTempDec=$(($cpuTempString/100))
??? ?? ??? ?cpuTempDec=$(($cpuTempDec % $cpuTempInt))
??? ?? ??? ?cpuTemp=$cpuTempInt$cpuTempDec
??? ?? ?let cpuTemp=(${cpuTemp}+${temp_gpu})/2
??? ?? ?TempCoreInt=${cpuTemp:0:2}
??????? TempCoreDec=${cpuTemp:2}
??? ?? ?
??? echo "Core Temperature is ${TempCoreInt}.${TempCoreDec} degrees, load is ${cpuUsageM} %" >> CPUTemp.txt
??? cat CPUTemp.txt
??? text2wave CPUTemp.txt -F 11025 -o CPUTemp.wav
??? #aplay CPUTemp.wav
??? #following line to transmit, digit ./nbfm.out for help
??? ./nbfm.out CPUTemp.wav $inp1 11025
??? rm -f CPUTemp.txt
??? let startN=$startN+1
??? sleep $inp2
done

echo ""
echo "End of transmissions."
exit
?


 

Thank you very much for your work.? I have been hoping someone would figure this out.


 

As for an example, if you wish to transmit the audio file "cq.wav" (sampled at 11025Hz) on 145.500MHz with a standard 5kHz deviation and no frequency correction,

How about sending the same 'data' from the file as 9600 baud IP datagrams...


Bill


 

For those of us in the UK, I should point out that OUR "standard
deviation" on ALL of
the 2m band is 2.5kHz, not 5kHz!

73 Dave G4CLI

--
Dr David J Sadler-Lockwood G4CLI
Secretary and Web Master
Node Operator MB7IWR - IRLP:5918 - EchoIRLP 318283
Member of the RSGB Training and Education Committee
GB2RS Newsreader
Wakefield & District Radio Society
www.wdrs.org.uk
www,northerncrossrally.com


 

You're welcome. I'm happy it can be useful. 73s


 

It is easy to set 2.5 instead of letting the internal default 5 kHz. Please consider it is a DMA modulator so it works as it can ;) 73s


 

Dear Bill I was thinking about 1200bps packet and my idea was to generate APRS or Cluster packets.
Anyway it is possible to transmit audio files containing packet radio baseband tones at any data rate, that is to say also 9600. A good implementation could be writing down a software that generates the audio file starting from the information to be transmitted. Then it's enough to tx the file via nbfm.out.
73s
Ale


 

Please be careful using a script like mine: it writes and deletes 2 files to the SD card at each transmission. So, setting very frequent transmissions for a long time could cause damages to the memory card due to its writes limit.
73s
Ale