diff --git a/cw.py b/cw.py index 525b6c6..fff20e1 100644 --- a/cw.py +++ b/cw.py @@ -41,9 +41,9 @@ def __init__(self,_serial_port,_dev_addr): # timeout for write self._ser.writeTimeout = 0 - #print "Resetting LoRa Tranceiver..." + print "Resetting LoRa Tranceiver..." self.write_command('sys reset',False) - #print "Configuring Tranceiver..." + print "Configuring Tranceiver..." self.write_command('radio set mod lora') self.write_command('mac pause') @@ -60,7 +60,7 @@ def write(self, str): self._ser.write(str + '\r\n') return self.read() - def write_command(self, config_str, check_resp=False): + def write_command(self, config_str, check_resp=True): ''' writes out a command ''' @@ -103,19 +103,27 @@ def receive_message(self): while True: print "Sending V..." loramote.write('radio cw on') + print "Read: ", loramote.read() time.sleep(0.1) loramote.write('radio cw off') + print "Read: ", loramote.read() time.sleep(0.1) loramote.write('radio cw on') + print "Read: ", loramote.read() time.sleep(0.1) loramote.write('radio cw off') + print "Read: ", loramote.read() time.sleep(0.1) loramote.write('radio cw on') + print "Read: ", loramote.read() time.sleep(0.1) loramote.write('radio cw off') + print "Read: ", loramote.read() time.sleep(0.1) loramote.write('radio cw on') + print "Read: ", loramote.read() time.sleep(2) loramote.write('radio cw off') + print "Read: ", loramote.read() time.sleep(0.5)