botwave icon indicating copy to clipboard operation
botwave copied to clipboard

Set fm frequency

Open ktyfReal opened this issue 11 months ago • 14 comments

I would like to set the broadcast frequency to 172.8 mhz (as it is licence free in my area) but when I try to do so the client says [ERR] Broadcast error: Backend 'bw_custom' doesn't support 173.8MHz (supports 76.0-108.0MHz) How can I edit bw_custom to allow broadcasting on that frequency or is it not supported

ktyfReal avatar Dec 15 '25 20:12 ktyfReal

It is normal since the backend is made for that range and works best at that one range. I am not going to implement a patch for that, but i can give you a step by step tutorial to remove it:

  1. go in /opt/BotWave/backends/bw_custom/src/
  2. edit bw_custom.c and remove / comment out the lines 651 and 652
  3. rebuild by doing make clean; make
  4. go in /opt/BotWave/shared/
  5. edit bw_custom.py by increasing the value on line 13 to whatever you want, dont delete it tho

also i wanna warn you, since we're using the rpis square clock to gen the wave, there will be BIG harmonics in like 3x, 5x, 7x, 9x the given frequency, so even if you go in a free-to-use band, without a filter you will probably overlap some other reserved bands (it's still fine if you don't use it in long ranges)

douxxtech avatar Dec 15 '25 20:12 douxxtech

How strong will the transmitter be if I am using a wire to connect straight to a small tv antenna (with no other signal enhancer or anything, just metal)

ktyfReal avatar Dec 16 '25 15:12 ktyfReal

It depends, but usually not much since the pi without amplifiers are pretty powerless. The signal can eventually cover your home or a bit more, but won't go further, especially if there is a lot of walls

douxxtech avatar Dec 16 '25 16:12 douxxtech

Well now I have another issue which is when I play a file on 173.8mhz it doesn't do anything and the terminal on the raspberry pi prints out this a second after starting (the file is 245.1 seconds)

[INFO] Playback finished, stopping broadcast...
[WARN] Stopping...
[OK] Stopped
[INFO] Cleanup completed
[BCAST] PiWave stopped

ktyfReal avatar Dec 16 '25 16:12 ktyfReal

Well now I have another issue which is when I play a file on 173.8mhz it doesn't do anything and the terminal on the raspberry pi prints out this a second after starting (the file is 245.1 seconds)

[INFO] Playback finished, stopping broadcast...
[WARN] Stopping...
[OK] Stopped
[INFO] Cleanup completed
[BCAST] PiWave stopped

When I try use PiFmRds or pifm I can't get it working.

ktyfReal avatar Dec 16 '25 17:12 ktyfReal

That's strange. You say that when you use like sudo pi_fm_rds -audio <file> -freq 173.8 it doesn't work either ? Could you provide me the file if possible ?

douxxtech avatar Dec 16 '25 17:12 douxxtech

It also comes up with "unsupported range" but I can't find the file that allows me to go to higher frequencies than 108.0 (in pifmrds)

ktyfReal avatar Dec 16 '25 17:12 ktyfReal

Also it might also be an hardware issue. the pi isnt supported to go that high in frequencies, so it maybe like literally cant produce waves correctly without overclocking it in idk what way. You should eventually try using lower use-free bands, iirc in some countries you can use 69mhz ? im not sure about that either

douxxtech avatar Dec 16 '25 17:12 douxxtech

in pifmrds if you want to change the thing its basically the same as bw_custom, but the file is instead named pi_fm_rds.c

douxxtech avatar Dec 16 '25 17:12 douxxtech

I don't know how to make pi fm rds make me broadcast, because when I removed the lines that say the error message, the error still happens and I don't know if there is a .py file that I should modify to get it working

ktyfReal avatar Dec 16 '25 17:12 ktyfReal

nope the pifmrds is fully written in c, thats strange. did you rebuilt it with make clean; make ?

douxxtech avatar Dec 16 '25 17:12 douxxtech

I got it to work with pifmrds

ktyfReal avatar Dec 16 '25 17:12 ktyfReal

I always forget to do make clean and make and after doing the same to botwave it is now working

ktyfReal avatar Dec 16 '25 22:12 ktyfReal

Oh that explains it x). C programs need to be compiled after each modification, if its not done it will just 'reuse' the old code. Glad it works !

douxxtech avatar Dec 16 '25 22:12 douxxtech