Permalink
Browse files

Add banned frequency ranges

  • Loading branch information...
juribeparada committed Oct 7, 2018
1 parent bc48446 commit 7020510f2ee945bcba8021b93912cb09bda2183d
Showing with 16 additions and 0 deletions.
  1. +9 −0 IO.cpp
  2. +7 −0 IO.h
9 IO.cpp
@@ -323,6 +323,15 @@ uint8_t CIO::setFreq(uint32_t frequency_rx, uint32_t frequency_tx, uint8_t rf_po
((pocsag_freq_tx >= UHF2_MIN)&&(pocsag_freq_tx < UHF2_MAX)) ) )
return 4U;

// Check banned frequency ranges
if( ((frequency_rx >= BAN1_MIN)&&(frequency_rx <= BAN1_MAX)) || ((frequency_tx >= BAN1_MIN)&&(frequency_tx <= BAN1_MAX)) || \
((frequency_rx >= BAN2_MIN)&&(frequency_rx <= BAN2_MAX)) || ((frequency_tx >= BAN2_MIN)&&(frequency_tx <= BAN2_MAX)) )
return 4U;

if( ((pocsag_freq_tx >= BAN1_MIN)&&(pocsag_freq_tx <= BAN1_MAX)) || \
((pocsag_freq_tx >= BAN2_MIN)&&(pocsag_freq_tx <= BAN2_MAX)) )
return 4U;

// Configure frequency
m_frequency_rx = frequency_rx;
m_frequency_tx = frequency_tx;
7 IO.h
@@ -28,6 +28,7 @@
#define LOW 0
#define HIGH 1

// HS frequency ranges
#define VHF1_MIN 144000000
#define VHF1_MAX 148000000
#define VHF2_MIN 219000000
@@ -37,6 +38,12 @@
#define UHF2_MIN 842000000
#define UHF2_MAX 950000000

// Banned amateur frequency ranges (satellite only, ISS, etc)
#define BAN1_MIN 145800000
#define BAN1_MAX 146000000
#define BAN2_MIN 435000000
#define BAN2_MAX 438000000

#define SCAN_TIME 1920
#define SCAN_PAUSE 20000

8 comments on commit 7020510

@TheOriginalFreddoFrog

This comment has been minimized.

Copy link

TheOriginalFreddoFrog replied Oct 7, 2018

I do not think that this should be hardcoded in … Though I appreciate why this has been done. I can foresee further issues down the line especially with the 435 - 438MHz range. Sometimes it is desirable to use a repeater frequency that is offline... OR sometimes these hotspots are being used for "local area repeaters".

@juribeparada

This comment has been minimized.

Copy link
Owner Author

juribeparada replied Oct 7, 2018

OK, I also think should not be hardcoded, but I received many requests about this, and many people are producing problems in satellite frequencies for their bad frequency selections. Could you open an issue about this?, I think this should be discussed and then decide a modification or just remove this.

@vk7hse

This comment has been minimized.

Copy link

vk7hse replied Oct 7, 2018

I too understand the reason for implementing this policy as it protects the international satellite bands for the potential of interference but mmdvm users. I've not researched this in detail, but does every country have a dedicated satellite segment? Here in VK (Australia) this aligns with the WIA Recommended frequencies to avoid to prevent interference. So it's a +1 from me as this is the first thing I request of people who have just used the default frequency (iirc it used to be 435MHz the openspot uses 436MHz) I can also see why some would be unhappy with this move, but it's not too difficult to disable! (for those who are familiar with the code)

@juribeparada

This comment has been minimized.

Copy link
Owner Author

juribeparada replied Oct 7, 2018

@vk7hse

This comment has been minimized.

Copy link

vk7hse replied Oct 8, 2018

I support this move hence my +1

@rogerclarkmelbourne

This comment has been minimized.

Copy link

rogerclarkmelbourne replied Oct 8, 2018

Is there indication back to MMDVM Host (e.g. PiStar) that the hotspot can't operate on the selected frequency

I agree that its probably a good idea to disable use of worldwide satellite frequencies, but this change should also be implemented in PiStar, as the majority of users are probably using PiStar and it could give instant feedback to tell them that those frequencies are reserved

(VK3KYY)

@juribeparada

This comment has been minimized.

Copy link
Owner Author

juribeparada replied Oct 8, 2018

I agree Roger, maybe a message from Pi-Star GUI could be nice to inform people when they enter a wrong frequency. With this change you will get a NAK from the modem (and MMDVMHost will not start), and without more information could be confusing for people without experience with MMDVM. Andy Taylor should know this.

@umj

This comment has been minimized.

Copy link

umj replied Oct 8, 2018

Please sign in to comment.