• Thank for the reply. The post misses the checksum. The real code is:

    function checksum(str) {
    	var cs = 0;
      
    	for (const c of str) {
    		cs = cs ^ c.charCodeAt(0); //XOR
    	}
      
    	return cs.toString(16).toUpperCase().padStart(2, '0');
    }
    
    function configureSBAS() {
       const thisTime = new Date(); 
       let timeString = thisTime.toISOString();
    	
      // SBAS satellite (SBAS satellite No. 1-19, corresponding to PRN 120-138
      var cmd = "PCAS15,4,FFFF"; //turn on satellites 1-16 of SBAS
      //var cmd = "PCAS15,4,7FFFF"; //turn on satellites 1-19 of SBAS
    
      cmd = "$" + cmd + "*" + checksum(cmd);
      Serial1.println(cmd);
      writeLogFile(timeString + ": " + cmd + "\n");
      
      SBASon = true;
    }
    
About

Avatar for halemmerich @halemmerich started