Re: Should we adopt the KD8CEC firmware?

K9HZ <bill@...>
 

Perfect for those who need it and easily defeat-able for those who don't. 

Dr. William J. Schmidt - K9HZ

email:  bill@...

 

On May 20, 2018, at 1:42 PM, Jerry Gaffke via Groups.Io <jgaffke@...> wrote:

Here's a code scrap from the uBitx firmware I'm currently working on,
returns a 1 if the transmission is illegal and transmission should be blocked.
Easily edited for other regions or specific license classes.
Not tested.

//#############################################################################
//########    TX Lowpass Filters  and Band Check   ############################
 
char  setTXFilters(uint32_t  freq){ // Adapted from Ashhar's code
  uint16_t f = (freq+500)/1000; // Only 16 bits needed if in khz
 
  // Check if within legal amateur bands for region 2 (the Americas) 
  if (!(
     // ((f>1800)  && (f<2000))  || // 160m  // needs external LPF!
((f>3500)  && (f<4000))  || // 80m
        ((f>5250)  && (f<5450))  || // 60m
        ((f>7000)  && (f<7300))  || // 40m
        ((f>10100) && (f<10150)) || // 30m
        ((f>14000) && (f<14350)) || // 20m
        ((f>18068) && (f<18168)) || // 17m
        ((f>21000) && (f<21450)) || // 15m
        ((f>24890) && (f<24990)) || // 12m
        ((f>28000) && (f<29700)) ))  { // 10m
    return(1); // failed, out of band
  } else {
 
    if (f >= 21000) {  // Default filter, above 21mhz
      digitalWrite(TX_LPF_A, 0);
      digitalWrite(TX_LPF_B, 0);
      digitalWrite(TX_LPF_C, 0);
    }
    else if (f >= 14000) { // 14-21mhz
      digitalWrite(TX_LPF_A, 1);
      digitalWrite(TX_LPF_B, 0);
      digitalWrite(TX_LPF_C, 0);
    }
    else if (f >= 7000) { // 7-14mhz
      digitalWrite(TX_LPF_A, 1);
      digitalWrite(TX_LPF_B, 1);
      digitalWrite(TX_LPF_C, 0);
    }
    else { // 3-7mhz
      digitalWrite(TX_LPF_A, 1);
      digitalWrite(TX_LPF_B, 1);
      digitalWrite(TX_LPF_C, 1);
    }
    return(0); // success, a mostly legal transmission
  }
}
 

On Sun, May 20, 2018 at 10:29 am, Rod Davis wrote:

William,

In some countries, I believe especially the British Isles, it is illegal to own (that is OWN, not simply OPERATE) a
ham radio rig that can transmit outside of the ham bands.

Rod KM6SN

 

Join BITX20@groups.io to automatically receive all group messages.