kopia lustrzana https://github.com/rpp0/gr-lora
				
				
				
			Convert blocks and sample flowgraphs to 3.8
							rodzic
							
								
									a94b204fee
								
							
						
					
					
						commit
						35ed1f519f
					
				| 
						 | 
				
			
			@ -1,622 +1,275 @@
 | 
			
		|||
<?xml version='1.0' encoding='utf-8'?>
 | 
			
		||||
<?grc format='1' created='3.7.11'?>
 | 
			
		||||
<flow_graph>
 | 
			
		||||
  <timestamp>Tue Apr 12 11:23:34 2016</timestamp>
 | 
			
		||||
  <block>
 | 
			
		||||
    <key>options</key>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>author</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>window_size</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>category</key>
 | 
			
		||||
      <value>Custom</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>comment</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>description</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_enabled</key>
 | 
			
		||||
      <value>True</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_coordinate</key>
 | 
			
		||||
      <value>(8, 12)</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_rotation</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>generate_options</key>
 | 
			
		||||
      <value>wx_gui</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>hier_block_src_path</key>
 | 
			
		||||
      <value>.:</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>id</key>
 | 
			
		||||
      <value>lora_receive_file</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>max_nouts</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>qt_qss_theme</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>realtime_scheduling</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>run_command</key>
 | 
			
		||||
      <value>{python} -u {filename}</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>run_options</key>
 | 
			
		||||
      <value>prompt</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>run</key>
 | 
			
		||||
      <value>True</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>thread_safe_setters</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>title</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
  </block>
 | 
			
		||||
  <block>
 | 
			
		||||
    <key>variable</key>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>comment</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_enabled</key>
 | 
			
		||||
      <value>True</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_coordinate</key>
 | 
			
		||||
      <value>(552, 13)</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_rotation</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>id</key>
 | 
			
		||||
      <value>bitrate</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>value</key>
 | 
			
		||||
      <value>sf * (1 / (2**sf / float(bw)))</value>
 | 
			
		||||
    </param>
 | 
			
		||||
  </block>
 | 
			
		||||
  <block>
 | 
			
		||||
    <key>variable</key>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>comment</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_enabled</key>
 | 
			
		||||
      <value>True</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_coordinate</key>
 | 
			
		||||
      <value>(456, 13)</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_rotation</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>id</key>
 | 
			
		||||
      <value>bw</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>value</key>
 | 
			
		||||
      <value>125000</value>
 | 
			
		||||
    </param>
 | 
			
		||||
  </block>
 | 
			
		||||
  <block>
 | 
			
		||||
    <key>variable</key>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>comment</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_enabled</key>
 | 
			
		||||
      <value>True</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_coordinate</key>
 | 
			
		||||
      <value>(280, 13)</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_rotation</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>id</key>
 | 
			
		||||
      <value>capture_freq</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>value</key>
 | 
			
		||||
      <value>866.0e6</value>
 | 
			
		||||
    </param>
 | 
			
		||||
  </block>
 | 
			
		||||
  <block>
 | 
			
		||||
    <key>variable</key>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>comment</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_enabled</key>
 | 
			
		||||
      <value>True</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_coordinate</key>
 | 
			
		||||
      <value>(800, 13)</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_rotation</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>id</key>
 | 
			
		||||
      <value>firdes_tap</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>value</key>
 | 
			
		||||
      <value>firdes.low_pass(1, samp_rate, bw, 10000, firdes.WIN_HAMMING, 6.67)</value>
 | 
			
		||||
    </param>
 | 
			
		||||
  </block>
 | 
			
		||||
  <block>
 | 
			
		||||
    <key>variable</key>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>comment</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_enabled</key>
 | 
			
		||||
      <value>True</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_coordinate</key>
 | 
			
		||||
      <value>(184, 13)</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_rotation</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>id</key>
 | 
			
		||||
      <value>samp_rate</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>value</key>
 | 
			
		||||
      <value>10e6</value>
 | 
			
		||||
    </param>
 | 
			
		||||
  </block>
 | 
			
		||||
  <block>
 | 
			
		||||
    <key>variable</key>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>comment</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_enabled</key>
 | 
			
		||||
      <value>True</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_coordinate</key>
 | 
			
		||||
      <value>(384, 12)</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_rotation</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>id</key>
 | 
			
		||||
      <value>sf</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>value</key>
 | 
			
		||||
      <value>7</value>
 | 
			
		||||
    </param>
 | 
			
		||||
  </block>
 | 
			
		||||
  <block>
 | 
			
		||||
    <key>variable</key>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>comment</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_enabled</key>
 | 
			
		||||
      <value>True</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_coordinate</key>
 | 
			
		||||
      <value>(664, 13)</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_rotation</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>id</key>
 | 
			
		||||
      <value>symbols_per_sec</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>value</key>
 | 
			
		||||
      <value>float(bw) / (2**sf)</value>
 | 
			
		||||
    </param>
 | 
			
		||||
  </block>
 | 
			
		||||
  <block>
 | 
			
		||||
    <key>variable</key>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>comment</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_enabled</key>
 | 
			
		||||
      <value>True</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_coordinate</key>
 | 
			
		||||
      <value>(184, 76)</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_rotation</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>id</key>
 | 
			
		||||
      <value>target_freq</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>value</key>
 | 
			
		||||
      <value>868.1e6</value>
 | 
			
		||||
    </param>
 | 
			
		||||
  </block>
 | 
			
		||||
  <block>
 | 
			
		||||
    <key>blocks_file_source</key>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>alias</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>comment</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>affinity</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_enabled</key>
 | 
			
		||||
      <value>1</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>file</key>
 | 
			
		||||
      <value>counting_cr4_sf7.cfile</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_coordinate</key>
 | 
			
		||||
      <value>(8, 188)</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_rotation</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>id</key>
 | 
			
		||||
      <value>blocks_file_source_0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>maxoutbuf</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>minoutbuf</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>type</key>
 | 
			
		||||
      <value>complex</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>repeat</key>
 | 
			
		||||
      <value>True</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>vlen</key>
 | 
			
		||||
      <value>1</value>
 | 
			
		||||
    </param>
 | 
			
		||||
  </block>
 | 
			
		||||
  <block>
 | 
			
		||||
    <key>blocks_throttle</key>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>alias</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>comment</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>affinity</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_enabled</key>
 | 
			
		||||
      <value>1</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_coordinate</key>
 | 
			
		||||
      <value>(232, 196)</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_rotation</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>id</key>
 | 
			
		||||
      <value>blocks_throttle_0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>ignoretag</key>
 | 
			
		||||
      <value>True</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>maxoutbuf</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>minoutbuf</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>samples_per_second</key>
 | 
			
		||||
      <value>samp_rate</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>type</key>
 | 
			
		||||
      <value>complex</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>vlen</key>
 | 
			
		||||
      <value>1</value>
 | 
			
		||||
    </param>
 | 
			
		||||
  </block>
 | 
			
		||||
  <block>
 | 
			
		||||
    <key>lora_lora_receiver</key>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>bandwidth</key>
 | 
			
		||||
      <value>bw</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>alias</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>crc</key>
 | 
			
		||||
      <value>True</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>center_freq</key>
 | 
			
		||||
      <value>capture_freq</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>channel_list</key>
 | 
			
		||||
      <value>[target_freq]</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>cr</key>
 | 
			
		||||
      <value>4</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>comment</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>conj</key>
 | 
			
		||||
      <value>False</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>affinity</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>decimation</key>
 | 
			
		||||
      <value>10</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>disable_channelization</key>
 | 
			
		||||
      <value>False</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>disable_drift_correction</key>
 | 
			
		||||
      <value>False</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_enabled</key>
 | 
			
		||||
      <value>1</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_coordinate</key>
 | 
			
		||||
      <value>(416, 156)</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_rotation</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>id</key>
 | 
			
		||||
      <value>lora_lora_receiver_0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>implicit</key>
 | 
			
		||||
      <value>False</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>maxoutbuf</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>minoutbuf</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>reduced_rate</key>
 | 
			
		||||
      <value>False</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>samp_rate</key>
 | 
			
		||||
      <value>samp_rate</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>sf</key>
 | 
			
		||||
      <value>sf</value>
 | 
			
		||||
    </param>
 | 
			
		||||
  </block>
 | 
			
		||||
  <block>
 | 
			
		||||
    <key>wxgui_fftsink2</key>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>avg_alpha</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>average</key>
 | 
			
		||||
      <value>False</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>baseband_freq</key>
 | 
			
		||||
      <value>capture_freq</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>alias</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>comment</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>affinity</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_enabled</key>
 | 
			
		||||
      <value>1</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>fft_size</key>
 | 
			
		||||
      <value>1024</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>freqvar</key>
 | 
			
		||||
      <value>None</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_coordinate</key>
 | 
			
		||||
      <value>(416, 300)</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>_rotation</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>grid_pos</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>id</key>
 | 
			
		||||
      <value>wxgui_fftsink2_1</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>notebook</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>peak_hold</key>
 | 
			
		||||
      <value>False</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>ref_level</key>
 | 
			
		||||
      <value>0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>ref_scale</key>
 | 
			
		||||
      <value>2.0</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>fft_rate</key>
 | 
			
		||||
      <value>15</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>samp_rate</key>
 | 
			
		||||
      <value>samp_rate</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>title</key>
 | 
			
		||||
      <value>FFT Plot</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>type</key>
 | 
			
		||||
      <value>complex</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>win_size</key>
 | 
			
		||||
      <value></value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>win</key>
 | 
			
		||||
      <value>None</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>y_divs</key>
 | 
			
		||||
      <value>10</value>
 | 
			
		||||
    </param>
 | 
			
		||||
    <param>
 | 
			
		||||
      <key>y_per_div</key>
 | 
			
		||||
      <value>10</value>
 | 
			
		||||
    </param>
 | 
			
		||||
  </block>
 | 
			
		||||
  <connection>
 | 
			
		||||
    <source_block_id>blocks_file_source_0</source_block_id>
 | 
			
		||||
    <sink_block_id>blocks_throttle_0</sink_block_id>
 | 
			
		||||
    <source_key>0</source_key>
 | 
			
		||||
    <sink_key>0</sink_key>
 | 
			
		||||
  </connection>
 | 
			
		||||
  <connection>
 | 
			
		||||
    <source_block_id>blocks_throttle_0</source_block_id>
 | 
			
		||||
    <sink_block_id>lora_lora_receiver_0</sink_block_id>
 | 
			
		||||
    <source_key>0</source_key>
 | 
			
		||||
    <sink_key>0</sink_key>
 | 
			
		||||
  </connection>
 | 
			
		||||
  <connection>
 | 
			
		||||
    <source_block_id>blocks_throttle_0</source_block_id>
 | 
			
		||||
    <sink_block_id>wxgui_fftsink2_1</sink_block_id>
 | 
			
		||||
    <source_key>0</source_key>
 | 
			
		||||
    <sink_key>0</sink_key>
 | 
			
		||||
  </connection>
 | 
			
		||||
</flow_graph>
 | 
			
		||||
options:
 | 
			
		||||
  parameters:
 | 
			
		||||
    author: ''
 | 
			
		||||
    category: Custom
 | 
			
		||||
    cmake_opt: ''
 | 
			
		||||
    comment: ''
 | 
			
		||||
    copyright: ''
 | 
			
		||||
    description: ''
 | 
			
		||||
    gen_cmake: 'On'
 | 
			
		||||
    gen_linking: dynamic
 | 
			
		||||
    generate_options: qt_gui
 | 
			
		||||
    hier_block_src_path: '.:'
 | 
			
		||||
    id: lora_receive_file
 | 
			
		||||
    max_nouts: '0'
 | 
			
		||||
    output_language: python
 | 
			
		||||
    placement: (0,0)
 | 
			
		||||
    qt_qss_theme: ''
 | 
			
		||||
    realtime_scheduling: ''
 | 
			
		||||
    run: 'True'
 | 
			
		||||
    run_command: '{python} -u {filename}'
 | 
			
		||||
    run_options: prompt
 | 
			
		||||
    sizing_mode: fixed
 | 
			
		||||
    thread_safe_setters: ''
 | 
			
		||||
    title: ''
 | 
			
		||||
    window_size: ''
 | 
			
		||||
  states:
 | 
			
		||||
    bus_sink: false
 | 
			
		||||
    bus_source: false
 | 
			
		||||
    bus_structure: null
 | 
			
		||||
    coordinate: [8, 12]
 | 
			
		||||
    rotation: 0
 | 
			
		||||
    state: enabled
 | 
			
		||||
 | 
			
		||||
blocks:
 | 
			
		||||
- name: bitrate
 | 
			
		||||
  id: variable
 | 
			
		||||
  parameters:
 | 
			
		||||
    comment: ''
 | 
			
		||||
    value: sf * (1 / (2**sf / float(bw)))
 | 
			
		||||
  states:
 | 
			
		||||
    bus_sink: false
 | 
			
		||||
    bus_source: false
 | 
			
		||||
    bus_structure: null
 | 
			
		||||
    coordinate: [552, 13]
 | 
			
		||||
    rotation: 0
 | 
			
		||||
    state: enabled
 | 
			
		||||
- name: bw
 | 
			
		||||
  id: variable
 | 
			
		||||
  parameters:
 | 
			
		||||
    comment: ''
 | 
			
		||||
    value: '125000'
 | 
			
		||||
  states:
 | 
			
		||||
    bus_sink: false
 | 
			
		||||
    bus_source: false
 | 
			
		||||
    bus_structure: null
 | 
			
		||||
    coordinate: [456, 13]
 | 
			
		||||
    rotation: 0
 | 
			
		||||
    state: enabled
 | 
			
		||||
- name: capture_freq
 | 
			
		||||
  id: variable
 | 
			
		||||
  parameters:
 | 
			
		||||
    comment: ''
 | 
			
		||||
    value: 866.0e6
 | 
			
		||||
  states:
 | 
			
		||||
    bus_sink: false
 | 
			
		||||
    bus_source: false
 | 
			
		||||
    bus_structure: null
 | 
			
		||||
    coordinate: [280, 13]
 | 
			
		||||
    rotation: 0
 | 
			
		||||
    state: enabled
 | 
			
		||||
- name: samp_rate
 | 
			
		||||
  id: variable
 | 
			
		||||
  parameters:
 | 
			
		||||
    comment: ''
 | 
			
		||||
    value: 10e6
 | 
			
		||||
  states:
 | 
			
		||||
    bus_sink: false
 | 
			
		||||
    bus_source: false
 | 
			
		||||
    bus_structure: null
 | 
			
		||||
    coordinate: [184, 13]
 | 
			
		||||
    rotation: 0
 | 
			
		||||
    state: enabled
 | 
			
		||||
- name: sf
 | 
			
		||||
  id: variable
 | 
			
		||||
  parameters:
 | 
			
		||||
    comment: ''
 | 
			
		||||
    value: '7'
 | 
			
		||||
  states:
 | 
			
		||||
    bus_sink: false
 | 
			
		||||
    bus_source: false
 | 
			
		||||
    bus_structure: null
 | 
			
		||||
    coordinate: [384, 12]
 | 
			
		||||
    rotation: 0
 | 
			
		||||
    state: enabled
 | 
			
		||||
- name: symbols_per_sec
 | 
			
		||||
  id: variable
 | 
			
		||||
  parameters:
 | 
			
		||||
    comment: ''
 | 
			
		||||
    value: float(bw) / (2**sf)
 | 
			
		||||
  states:
 | 
			
		||||
    bus_sink: false
 | 
			
		||||
    bus_source: false
 | 
			
		||||
    bus_structure: null
 | 
			
		||||
    coordinate: [664, 13]
 | 
			
		||||
    rotation: 0
 | 
			
		||||
    state: enabled
 | 
			
		||||
- name: target_freq
 | 
			
		||||
  id: variable
 | 
			
		||||
  parameters:
 | 
			
		||||
    comment: ''
 | 
			
		||||
    value: 868.1e6
 | 
			
		||||
  states:
 | 
			
		||||
    bus_sink: false
 | 
			
		||||
    bus_source: false
 | 
			
		||||
    bus_structure: null
 | 
			
		||||
    coordinate: [184, 76]
 | 
			
		||||
    rotation: 0
 | 
			
		||||
    state: enabled
 | 
			
		||||
- name: blocks_file_source_0
 | 
			
		||||
  id: blocks_file_source
 | 
			
		||||
  parameters:
 | 
			
		||||
    affinity: ''
 | 
			
		||||
    alias: ''
 | 
			
		||||
    begin_tag: pmt.PMT_NIL
 | 
			
		||||
    comment: ''
 | 
			
		||||
    file: counting_cr4_sf7.cfile
 | 
			
		||||
    length: '0'
 | 
			
		||||
    maxoutbuf: '0'
 | 
			
		||||
    minoutbuf: '0'
 | 
			
		||||
    offset: '0'
 | 
			
		||||
    repeat: 'True'
 | 
			
		||||
    type: complex
 | 
			
		||||
    vlen: '1'
 | 
			
		||||
  states:
 | 
			
		||||
    bus_sink: false
 | 
			
		||||
    bus_source: false
 | 
			
		||||
    bus_structure: null
 | 
			
		||||
    coordinate: [8, 164.0]
 | 
			
		||||
    rotation: 0
 | 
			
		||||
    state: enabled
 | 
			
		||||
- name: blocks_throttle_0
 | 
			
		||||
  id: blocks_throttle
 | 
			
		||||
  parameters:
 | 
			
		||||
    affinity: ''
 | 
			
		||||
    alias: ''
 | 
			
		||||
    comment: ''
 | 
			
		||||
    ignoretag: 'True'
 | 
			
		||||
    maxoutbuf: '0'
 | 
			
		||||
    minoutbuf: '0'
 | 
			
		||||
    samples_per_second: samp_rate
 | 
			
		||||
    type: complex
 | 
			
		||||
    vlen: '1'
 | 
			
		||||
  states:
 | 
			
		||||
    bus_sink: false
 | 
			
		||||
    bus_source: false
 | 
			
		||||
    bus_structure: null
 | 
			
		||||
    coordinate: [240, 196.0]
 | 
			
		||||
    rotation: 0
 | 
			
		||||
    state: enabled
 | 
			
		||||
- name: lora_lora_receiver_0
 | 
			
		||||
  id: lora_lora_receiver
 | 
			
		||||
  parameters:
 | 
			
		||||
    affinity: ''
 | 
			
		||||
    alias: ''
 | 
			
		||||
    bandwidth: bw
 | 
			
		||||
    center_freq: capture_freq
 | 
			
		||||
    channel_list: '[target_freq]'
 | 
			
		||||
    comment: ''
 | 
			
		||||
    conj: 'False'
 | 
			
		||||
    cr: '4'
 | 
			
		||||
    crc: 'True'
 | 
			
		||||
    decimation: '10'
 | 
			
		||||
    disable_channelization: 'False'
 | 
			
		||||
    disable_drift_correction: 'False'
 | 
			
		||||
    implicit: 'False'
 | 
			
		||||
    maxoutbuf: '0'
 | 
			
		||||
    minoutbuf: '0'
 | 
			
		||||
    reduced_rate: 'False'
 | 
			
		||||
    samp_rate: samp_rate
 | 
			
		||||
    sf: sf
 | 
			
		||||
  states:
 | 
			
		||||
    bus_sink: false
 | 
			
		||||
    bus_source: false
 | 
			
		||||
    bus_structure: null
 | 
			
		||||
    coordinate: [440, 148.0]
 | 
			
		||||
    rotation: 0
 | 
			
		||||
    state: enabled
 | 
			
		||||
- name: qtgui_freq_sink_x_0
 | 
			
		||||
  id: qtgui_freq_sink_x
 | 
			
		||||
  parameters:
 | 
			
		||||
    affinity: ''
 | 
			
		||||
    alias: ''
 | 
			
		||||
    alpha1: '1.0'
 | 
			
		||||
    alpha10: '1.0'
 | 
			
		||||
    alpha2: '1.0'
 | 
			
		||||
    alpha3: '1.0'
 | 
			
		||||
    alpha4: '1.0'
 | 
			
		||||
    alpha5: '1.0'
 | 
			
		||||
    alpha6: '1.0'
 | 
			
		||||
    alpha7: '1.0'
 | 
			
		||||
    alpha8: '1.0'
 | 
			
		||||
    alpha9: '1.0'
 | 
			
		||||
    autoscale: 'False'
 | 
			
		||||
    average: '1.0'
 | 
			
		||||
    axislabels: 'True'
 | 
			
		||||
    bw: samp_rate
 | 
			
		||||
    color1: '"blue"'
 | 
			
		||||
    color10: '"dark blue"'
 | 
			
		||||
    color2: '"red"'
 | 
			
		||||
    color3: '"green"'
 | 
			
		||||
    color4: '"black"'
 | 
			
		||||
    color5: '"cyan"'
 | 
			
		||||
    color6: '"magenta"'
 | 
			
		||||
    color7: '"yellow"'
 | 
			
		||||
    color8: '"dark red"'
 | 
			
		||||
    color9: '"dark green"'
 | 
			
		||||
    comment: ''
 | 
			
		||||
    ctrlpanel: 'False'
 | 
			
		||||
    fc: capture_freq
 | 
			
		||||
    fftsize: '1024'
 | 
			
		||||
    freqhalf: 'True'
 | 
			
		||||
    grid: 'False'
 | 
			
		||||
    gui_hint: ''
 | 
			
		||||
    label: Relative Gain
 | 
			
		||||
    label1: ''
 | 
			
		||||
    label10: ''''''
 | 
			
		||||
    label2: ''''''
 | 
			
		||||
    label3: ''''''
 | 
			
		||||
    label4: ''''''
 | 
			
		||||
    label5: ''''''
 | 
			
		||||
    label6: ''''''
 | 
			
		||||
    label7: ''''''
 | 
			
		||||
    label8: ''''''
 | 
			
		||||
    label9: ''''''
 | 
			
		||||
    legend: 'True'
 | 
			
		||||
    maxoutbuf: '0'
 | 
			
		||||
    minoutbuf: '0'
 | 
			
		||||
    name: '""'
 | 
			
		||||
    nconnections: '1'
 | 
			
		||||
    showports: 'False'
 | 
			
		||||
    tr_chan: '0'
 | 
			
		||||
    tr_level: '0.0'
 | 
			
		||||
    tr_mode: qtgui.TRIG_MODE_FREE
 | 
			
		||||
    tr_tag: '""'
 | 
			
		||||
    type: complex
 | 
			
		||||
    units: dB
 | 
			
		||||
    update_time: '0.10'
 | 
			
		||||
    width1: '1'
 | 
			
		||||
    width10: '1'
 | 
			
		||||
    width2: '1'
 | 
			
		||||
    width3: '1'
 | 
			
		||||
    width4: '1'
 | 
			
		||||
    width5: '1'
 | 
			
		||||
    width6: '1'
 | 
			
		||||
    width7: '1'
 | 
			
		||||
    width8: '1'
 | 
			
		||||
    width9: '1'
 | 
			
		||||
    wintype: firdes.WIN_BLACKMAN_hARRIS
 | 
			
		||||
    ymax: '10'
 | 
			
		||||
    ymin: '-140'
 | 
			
		||||
  states:
 | 
			
		||||
    bus_sink: false
 | 
			
		||||
    bus_source: false
 | 
			
		||||
    bus_structure: null
 | 
			
		||||
    coordinate: [440, 304.0]
 | 
			
		||||
    rotation: 0
 | 
			
		||||
    state: true
 | 
			
		||||
 | 
			
		||||
connections:
 | 
			
		||||
- [blocks_file_source_0, '0', blocks_throttle_0, '0']
 | 
			
		||||
- [blocks_throttle_0, '0', lora_lora_receiver_0, '0']
 | 
			
		||||
- [blocks_throttle_0, '0', qtgui_freq_sink_x_0, '0']
 | 
			
		||||
 | 
			
		||||
metadata:
 | 
			
		||||
  file_format: 1
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,10 +1,14 @@
 | 
			
		|||
#!/usr/bin/env python2
 | 
			
		||||
#!/usr/bin/env python3
 | 
			
		||||
# -*- coding: utf-8 -*-
 | 
			
		||||
##################################################
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# SPDX-License-Identifier: GPL-3.0
 | 
			
		||||
#
 | 
			
		||||
# GNU Radio Python Flow Graph
 | 
			
		||||
# Title: Lora Receive File
 | 
			
		||||
# Generated: Mon Jan  8 15:44:58 2018
 | 
			
		||||
##################################################
 | 
			
		||||
# GNU Radio version: 3.8.0.0
 | 
			
		||||
 | 
			
		||||
from distutils.version import StrictVersion
 | 
			
		||||
 | 
			
		||||
if __name__ == '__main__':
 | 
			
		||||
    import ctypes
 | 
			
		||||
| 
						 | 
				
			
			@ -14,95 +18,145 @@ if __name__ == '__main__':
 | 
			
		|||
            x11 = ctypes.cdll.LoadLibrary('libX11.so')
 | 
			
		||||
            x11.XInitThreads()
 | 
			
		||||
        except:
 | 
			
		||||
            print "Warning: failed to XInitThreads()"
 | 
			
		||||
            print("Warning: failed to XInitThreads()")
 | 
			
		||||
 | 
			
		||||
from gnuradio import blocks
 | 
			
		||||
from gnuradio import eng_notation
 | 
			
		||||
from gnuradio import gr
 | 
			
		||||
from gnuradio import wxgui
 | 
			
		||||
from gnuradio.eng_option import eng_option
 | 
			
		||||
from gnuradio.fft import window
 | 
			
		||||
from PyQt5 import Qt
 | 
			
		||||
from gnuradio import qtgui
 | 
			
		||||
from gnuradio.filter import firdes
 | 
			
		||||
from gnuradio.wxgui import fftsink2
 | 
			
		||||
from grc_gnuradio import wxgui as grc_wxgui
 | 
			
		||||
from optparse import OptionParser
 | 
			
		||||
import sip
 | 
			
		||||
from gnuradio import blocks
 | 
			
		||||
import pmt
 | 
			
		||||
from gnuradio import gr
 | 
			
		||||
import sys
 | 
			
		||||
import signal
 | 
			
		||||
from argparse import ArgumentParser
 | 
			
		||||
from gnuradio.eng_arg import eng_float, intx
 | 
			
		||||
from gnuradio import eng_notation
 | 
			
		||||
import lora
 | 
			
		||||
import wx
 | 
			
		||||
from gnuradio import qtgui
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class lora_receive_file(grc_wxgui.top_block_gui):
 | 
			
		||||
class lora_receive_file(gr.top_block, Qt.QWidget):
 | 
			
		||||
 | 
			
		||||
    def __init__(self):
 | 
			
		||||
        grc_wxgui.top_block_gui.__init__(self, title="Lora Receive File")
 | 
			
		||||
        gr.top_block.__init__(self, "Lora Receive File")
 | 
			
		||||
        Qt.QWidget.__init__(self)
 | 
			
		||||
        self.setWindowTitle("Lora Receive File")
 | 
			
		||||
        qtgui.util.check_set_qss()
 | 
			
		||||
        try:
 | 
			
		||||
            self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc'))
 | 
			
		||||
        except:
 | 
			
		||||
            pass
 | 
			
		||||
        self.top_scroll_layout = Qt.QVBoxLayout()
 | 
			
		||||
        self.setLayout(self.top_scroll_layout)
 | 
			
		||||
        self.top_scroll = Qt.QScrollArea()
 | 
			
		||||
        self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame)
 | 
			
		||||
        self.top_scroll_layout.addWidget(self.top_scroll)
 | 
			
		||||
        self.top_scroll.setWidgetResizable(True)
 | 
			
		||||
        self.top_widget = Qt.QWidget()
 | 
			
		||||
        self.top_scroll.setWidget(self.top_widget)
 | 
			
		||||
        self.top_layout = Qt.QVBoxLayout(self.top_widget)
 | 
			
		||||
        self.top_grid_layout = Qt.QGridLayout()
 | 
			
		||||
        self.top_layout.addLayout(self.top_grid_layout)
 | 
			
		||||
 | 
			
		||||
        self.settings = Qt.QSettings("GNU Radio", "lora_receive_file")
 | 
			
		||||
 | 
			
		||||
        try:
 | 
			
		||||
            if StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"):
 | 
			
		||||
                self.restoreGeometry(self.settings.value("geometry").toByteArray())
 | 
			
		||||
            else:
 | 
			
		||||
                self.restoreGeometry(self.settings.value("geometry"))
 | 
			
		||||
        except:
 | 
			
		||||
            pass
 | 
			
		||||
 | 
			
		||||
        ##################################################
 | 
			
		||||
        # Variables
 | 
			
		||||
        ##################################################
 | 
			
		||||
        self.sf = sf = 7
 | 
			
		||||
        self.samp_rate = samp_rate = 10e6
 | 
			
		||||
        self.bw = bw = 125000
 | 
			
		||||
        self.target_freq = target_freq = 868.1e6
 | 
			
		||||
        self.symbols_per_sec = symbols_per_sec = float(bw) / (2**sf)
 | 
			
		||||
        self.firdes_tap = firdes_tap = firdes.low_pass(1, samp_rate, bw, 10000, firdes.WIN_HAMMING, 6.67)
 | 
			
		||||
        self.samp_rate = samp_rate = 10e6
 | 
			
		||||
        self.capture_freq = capture_freq = 866.0e6
 | 
			
		||||
        self.bitrate = bitrate = sf * (1 / (2**sf / float(bw)))
 | 
			
		||||
 | 
			
		||||
        ##################################################
 | 
			
		||||
        # Blocks
 | 
			
		||||
        ##################################################
 | 
			
		||||
        self.wxgui_fftsink2_1 = fftsink2.fft_sink_c(
 | 
			
		||||
        	self.GetWin(),
 | 
			
		||||
        	baseband_freq=capture_freq,
 | 
			
		||||
        	y_per_div=10,
 | 
			
		||||
        	y_divs=10,
 | 
			
		||||
        	ref_level=0,
 | 
			
		||||
        	ref_scale=2.0,
 | 
			
		||||
        	sample_rate=samp_rate,
 | 
			
		||||
        	fft_size=1024,
 | 
			
		||||
        	fft_rate=15,
 | 
			
		||||
        	average=False,
 | 
			
		||||
        	avg_alpha=None,
 | 
			
		||||
        	title='FFT Plot',
 | 
			
		||||
        	peak_hold=False,
 | 
			
		||||
        self.qtgui_freq_sink_x_0 = qtgui.freq_sink_c(
 | 
			
		||||
            1024, #size
 | 
			
		||||
            firdes.WIN_BLACKMAN_hARRIS, #wintype
 | 
			
		||||
            capture_freq, #fc
 | 
			
		||||
            samp_rate, #bw
 | 
			
		||||
            "", #name
 | 
			
		||||
            1
 | 
			
		||||
        )
 | 
			
		||||
        self.Add(self.wxgui_fftsink2_1.win)
 | 
			
		||||
        self.lora_lora_receiver_0 = lora.lora_receiver(samp_rate, capture_freq, ([target_freq]), bw, sf, False, 4, True, False, False, 10, False, False)
 | 
			
		||||
        self.qtgui_freq_sink_x_0.set_update_time(0.10)
 | 
			
		||||
        self.qtgui_freq_sink_x_0.set_y_axis(-140, 10)
 | 
			
		||||
        self.qtgui_freq_sink_x_0.set_y_label('Relative Gain', 'dB')
 | 
			
		||||
        self.qtgui_freq_sink_x_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, 0.0, 0, "")
 | 
			
		||||
        self.qtgui_freq_sink_x_0.enable_autoscale(False)
 | 
			
		||||
        self.qtgui_freq_sink_x_0.enable_grid(False)
 | 
			
		||||
        self.qtgui_freq_sink_x_0.set_fft_average(1.0)
 | 
			
		||||
        self.qtgui_freq_sink_x_0.enable_axis_labels(True)
 | 
			
		||||
        self.qtgui_freq_sink_x_0.enable_control_panel(False)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        labels = ['', '', '', '', '',
 | 
			
		||||
            '', '', '', '', '']
 | 
			
		||||
        widths = [1, 1, 1, 1, 1,
 | 
			
		||||
            1, 1, 1, 1, 1]
 | 
			
		||||
        colors = ["blue", "red", "green", "black", "cyan",
 | 
			
		||||
            "magenta", "yellow", "dark red", "dark green", "dark blue"]
 | 
			
		||||
        alphas = [1.0, 1.0, 1.0, 1.0, 1.0,
 | 
			
		||||
            1.0, 1.0, 1.0, 1.0, 1.0]
 | 
			
		||||
 | 
			
		||||
        for i in range(1):
 | 
			
		||||
            if len(labels[i]) == 0:
 | 
			
		||||
                self.qtgui_freq_sink_x_0.set_line_label(i, "Data {0}".format(i))
 | 
			
		||||
            else:
 | 
			
		||||
                self.qtgui_freq_sink_x_0.set_line_label(i, labels[i])
 | 
			
		||||
            self.qtgui_freq_sink_x_0.set_line_width(i, widths[i])
 | 
			
		||||
            self.qtgui_freq_sink_x_0.set_line_color(i, colors[i])
 | 
			
		||||
            self.qtgui_freq_sink_x_0.set_line_alpha(i, alphas[i])
 | 
			
		||||
 | 
			
		||||
        self._qtgui_freq_sink_x_0_win = sip.wrapinstance(self.qtgui_freq_sink_x_0.pyqwidget(), Qt.QWidget)
 | 
			
		||||
        self.top_grid_layout.addWidget(self._qtgui_freq_sink_x_0_win)
 | 
			
		||||
        self.lora_lora_receiver_0 = lora.lora_receiver(samp_rate, capture_freq, [target_freq], bw, sf, False, 4, True, False, False, 10, False, False)
 | 
			
		||||
        self.blocks_throttle_0 = blocks.throttle(gr.sizeof_gr_complex*1, samp_rate,True)
 | 
			
		||||
        self.blocks_file_source_0 = blocks.file_source(gr.sizeof_gr_complex*1, 'counting_cr4_sf7.cfile', True)
 | 
			
		||||
        self.blocks_file_source_0 = blocks.file_source(gr.sizeof_gr_complex*1, 'counting_cr4_sf7.cfile', True, 0, 0)
 | 
			
		||||
        self.blocks_file_source_0.set_begin_tag(pmt.PMT_NIL)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        ##################################################
 | 
			
		||||
        # Connections
 | 
			
		||||
        ##################################################
 | 
			
		||||
        self.connect((self.blocks_file_source_0, 0), (self.blocks_throttle_0, 0))
 | 
			
		||||
        self.connect((self.blocks_throttle_0, 0), (self.lora_lora_receiver_0, 0))
 | 
			
		||||
        self.connect((self.blocks_throttle_0, 0), (self.wxgui_fftsink2_1, 0))
 | 
			
		||||
        self.connect((self.blocks_throttle_0, 0), (self.qtgui_freq_sink_x_0, 0))
 | 
			
		||||
 | 
			
		||||
    def closeEvent(self, event):
 | 
			
		||||
        self.settings = Qt.QSettings("GNU Radio", "lora_receive_file")
 | 
			
		||||
        self.settings.setValue("geometry", self.saveGeometry())
 | 
			
		||||
        event.accept()
 | 
			
		||||
 | 
			
		||||
    def get_sf(self):
 | 
			
		||||
        return self.sf
 | 
			
		||||
 | 
			
		||||
    def set_sf(self, sf):
 | 
			
		||||
        self.sf = sf
 | 
			
		||||
        self.set_bitrate(self.sf * (1 / (2**self.sf / float(self.bw))))
 | 
			
		||||
        self.set_symbols_per_sec(float(self.bw) / (2**self.sf))
 | 
			
		||||
        self.lora_lora_receiver_0.set_sf(self.sf)
 | 
			
		||||
        self.set_bitrate(self.sf * (1 / (2**self.sf / float(self.bw))))
 | 
			
		||||
 | 
			
		||||
    def get_samp_rate(self):
 | 
			
		||||
        return self.samp_rate
 | 
			
		||||
 | 
			
		||||
    def set_samp_rate(self, samp_rate):
 | 
			
		||||
        self.samp_rate = samp_rate
 | 
			
		||||
        self.wxgui_fftsink2_1.set_sample_rate(self.samp_rate)
 | 
			
		||||
        self.set_firdes_tap(firdes.low_pass(1, self.samp_rate, self.bw, 10000, firdes.WIN_HAMMING, 6.67))
 | 
			
		||||
        self.blocks_throttle_0.set_sample_rate(self.samp_rate)
 | 
			
		||||
 | 
			
		||||
    def get_bw(self):
 | 
			
		||||
        return self.bw
 | 
			
		||||
 | 
			
		||||
    def set_bw(self, bw):
 | 
			
		||||
        self.bw = bw
 | 
			
		||||
        self.set_symbols_per_sec(float(self.bw) / (2**self.sf))
 | 
			
		||||
        self.set_firdes_tap(firdes.low_pass(1, self.samp_rate, self.bw, 10000, firdes.WIN_HAMMING, 6.67))
 | 
			
		||||
        self.set_bitrate(self.sf * (1 / (2**self.sf / float(self.bw))))
 | 
			
		||||
        self.set_symbols_per_sec(float(self.bw) / (2**self.sf))
 | 
			
		||||
 | 
			
		||||
    def get_target_freq(self):
 | 
			
		||||
        return self.target_freq
 | 
			
		||||
| 
						 | 
				
			
			@ -116,18 +170,21 @@ class lora_receive_file(grc_wxgui.top_block_gui):
 | 
			
		|||
    def set_symbols_per_sec(self, symbols_per_sec):
 | 
			
		||||
        self.symbols_per_sec = symbols_per_sec
 | 
			
		||||
 | 
			
		||||
    def get_firdes_tap(self):
 | 
			
		||||
        return self.firdes_tap
 | 
			
		||||
    def get_samp_rate(self):
 | 
			
		||||
        return self.samp_rate
 | 
			
		||||
 | 
			
		||||
    def set_firdes_tap(self, firdes_tap):
 | 
			
		||||
        self.firdes_tap = firdes_tap
 | 
			
		||||
    def set_samp_rate(self, samp_rate):
 | 
			
		||||
        self.samp_rate = samp_rate
 | 
			
		||||
        self.blocks_throttle_0.set_sample_rate(self.samp_rate)
 | 
			
		||||
        self.qtgui_freq_sink_x_0.set_frequency_range(self.capture_freq, self.samp_rate)
 | 
			
		||||
 | 
			
		||||
    def get_capture_freq(self):
 | 
			
		||||
        return self.capture_freq
 | 
			
		||||
 | 
			
		||||
    def set_capture_freq(self, capture_freq):
 | 
			
		||||
        self.capture_freq = capture_freq
 | 
			
		||||
        self.wxgui_fftsink2_1.set_baseband_freq(self.capture_freq)
 | 
			
		||||
        self.lora_lora_receiver_0.set_center_freq(self.capture_freq)
 | 
			
		||||
        self.qtgui_freq_sink_x_0.set_frequency_range(self.capture_freq, self.samp_rate)
 | 
			
		||||
 | 
			
		||||
    def get_bitrate(self):
 | 
			
		||||
        return self.bitrate
 | 
			
		||||
| 
						 | 
				
			
			@ -136,11 +193,33 @@ class lora_receive_file(grc_wxgui.top_block_gui):
 | 
			
		|||
        self.bitrate = bitrate
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def main(top_block_cls=lora_receive_file, options=None):
 | 
			
		||||
 | 
			
		||||
    if StrictVersion("4.5.0") <= StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"):
 | 
			
		||||
        style = gr.prefs().get_string('qtgui', 'style', 'raster')
 | 
			
		||||
        Qt.QApplication.setGraphicsSystem(style)
 | 
			
		||||
    qapp = Qt.QApplication(sys.argv)
 | 
			
		||||
 | 
			
		||||
    tb = top_block_cls()
 | 
			
		||||
    tb.Start(True)
 | 
			
		||||
    tb.Wait()
 | 
			
		||||
    tb.start()
 | 
			
		||||
    tb.show()
 | 
			
		||||
 | 
			
		||||
    def sig_handler(sig=None, frame=None):
 | 
			
		||||
        Qt.QApplication.quit()
 | 
			
		||||
 | 
			
		||||
    signal.signal(signal.SIGINT, sig_handler)
 | 
			
		||||
    signal.signal(signal.SIGTERM, sig_handler)
 | 
			
		||||
 | 
			
		||||
    timer = Qt.QTimer()
 | 
			
		||||
    timer.start(500)
 | 
			
		||||
    timer.timeout.connect(lambda: None)
 | 
			
		||||
 | 
			
		||||
    def quitting():
 | 
			
		||||
        tb.stop()
 | 
			
		||||
        tb.wait()
 | 
			
		||||
    qapp.aboutToQuit.connect(quitting)
 | 
			
		||||
    qapp.exec_()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if __name__ == '__main__':
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											
												Plik diff jest za duży
												Load Diff
											
										
									
								
							| 
						 | 
				
			
			@ -1,10 +1,14 @@
 | 
			
		|||
#!/usr/bin/env python2
 | 
			
		||||
#!/usr/bin/env python3
 | 
			
		||||
# -*- coding: utf-8 -*-
 | 
			
		||||
##################################################
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# SPDX-License-Identifier: GPL-3.0
 | 
			
		||||
#
 | 
			
		||||
# GNU Radio Python Flow Graph
 | 
			
		||||
# Title: Lora Receive Realtime
 | 
			
		||||
# Generated: Mon Jan  8 15:32:44 2018
 | 
			
		||||
##################################################
 | 
			
		||||
# GNU Radio version: 3.8.0.0
 | 
			
		||||
 | 
			
		||||
from distutils.version import StrictVersion
 | 
			
		||||
 | 
			
		||||
if __name__ == '__main__':
 | 
			
		||||
    import ctypes
 | 
			
		||||
| 
						 | 
				
			
			@ -14,37 +18,64 @@ if __name__ == '__main__':
 | 
			
		|||
            x11 = ctypes.cdll.LoadLibrary('libX11.so')
 | 
			
		||||
            x11.XInitThreads()
 | 
			
		||||
        except:
 | 
			
		||||
            print "Warning: failed to XInitThreads()"
 | 
			
		||||
            print("Warning: failed to XInitThreads()")
 | 
			
		||||
 | 
			
		||||
from gnuradio import eng_notation
 | 
			
		||||
from gnuradio import gr
 | 
			
		||||
from gnuradio import wxgui
 | 
			
		||||
from gnuradio.eng_option import eng_option
 | 
			
		||||
from gnuradio.fft import window
 | 
			
		||||
from PyQt5 import Qt
 | 
			
		||||
from gnuradio import qtgui
 | 
			
		||||
from gnuradio.filter import firdes
 | 
			
		||||
from gnuradio.wxgui import fftsink2
 | 
			
		||||
from grc_gnuradio import wxgui as grc_wxgui
 | 
			
		||||
from optparse import OptionParser
 | 
			
		||||
import sip
 | 
			
		||||
from gnuradio import gr
 | 
			
		||||
import sys
 | 
			
		||||
import signal
 | 
			
		||||
from argparse import ArgumentParser
 | 
			
		||||
from gnuradio.eng_arg import eng_float, intx
 | 
			
		||||
from gnuradio import eng_notation
 | 
			
		||||
import lora
 | 
			
		||||
import osmosdr
 | 
			
		||||
import wx
 | 
			
		||||
import time
 | 
			
		||||
from gnuradio import qtgui
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class lora_receive_realtime(grc_wxgui.top_block_gui):
 | 
			
		||||
class lora_receive_realtime(gr.top_block, Qt.QWidget):
 | 
			
		||||
 | 
			
		||||
    def __init__(self):
 | 
			
		||||
        grc_wxgui.top_block_gui.__init__(self, title="Lora Receive Realtime")
 | 
			
		||||
        gr.top_block.__init__(self, "Lora Receive Realtime")
 | 
			
		||||
        Qt.QWidget.__init__(self)
 | 
			
		||||
        self.setWindowTitle("Lora Receive Realtime")
 | 
			
		||||
        qtgui.util.check_set_qss()
 | 
			
		||||
        try:
 | 
			
		||||
            self.setWindowIcon(Qt.QIcon.fromTheme('gnuradio-grc'))
 | 
			
		||||
        except:
 | 
			
		||||
            pass
 | 
			
		||||
        self.top_scroll_layout = Qt.QVBoxLayout()
 | 
			
		||||
        self.setLayout(self.top_scroll_layout)
 | 
			
		||||
        self.top_scroll = Qt.QScrollArea()
 | 
			
		||||
        self.top_scroll.setFrameStyle(Qt.QFrame.NoFrame)
 | 
			
		||||
        self.top_scroll_layout.addWidget(self.top_scroll)
 | 
			
		||||
        self.top_scroll.setWidgetResizable(True)
 | 
			
		||||
        self.top_widget = Qt.QWidget()
 | 
			
		||||
        self.top_scroll.setWidget(self.top_widget)
 | 
			
		||||
        self.top_layout = Qt.QVBoxLayout(self.top_widget)
 | 
			
		||||
        self.top_grid_layout = Qt.QGridLayout()
 | 
			
		||||
        self.top_layout.addLayout(self.top_grid_layout)
 | 
			
		||||
 | 
			
		||||
        self.settings = Qt.QSettings("GNU Radio", "lora_receive_realtime")
 | 
			
		||||
 | 
			
		||||
        try:
 | 
			
		||||
            if StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"):
 | 
			
		||||
                self.restoreGeometry(self.settings.value("geometry").toByteArray())
 | 
			
		||||
            else:
 | 
			
		||||
                self.restoreGeometry(self.settings.value("geometry"))
 | 
			
		||||
        except:
 | 
			
		||||
            pass
 | 
			
		||||
 | 
			
		||||
        ##################################################
 | 
			
		||||
        # Variables
 | 
			
		||||
        ##################################################
 | 
			
		||||
        self.sf = sf = 11
 | 
			
		||||
        self.samp_rate = samp_rate = 1e6
 | 
			
		||||
        self.bw = bw = 125000
 | 
			
		||||
        self.target_freq = target_freq = 868.1e6
 | 
			
		||||
        self.symbols_per_sec = symbols_per_sec = float(bw) / (2**sf)
 | 
			
		||||
        self.firdes_tap = firdes_tap = firdes.low_pass(1, samp_rate, bw, 10000, firdes.WIN_HAMMING, 6.67)
 | 
			
		||||
        self.downlink = downlink = False
 | 
			
		||||
        self.samp_rate = samp_rate = 1e6
 | 
			
		||||
        self.decimation = decimation = 1
 | 
			
		||||
        self.capture_freq = capture_freq = 868e6
 | 
			
		||||
        self.bitrate = bitrate = sf * (1 / (2**sf / float(bw)))
 | 
			
		||||
| 
						 | 
				
			
			@ -52,71 +83,91 @@ class lora_receive_realtime(grc_wxgui.top_block_gui):
 | 
			
		|||
        ##################################################
 | 
			
		||||
        # Blocks
 | 
			
		||||
        ##################################################
 | 
			
		||||
        self.wxgui_fftsink2_1 = fftsink2.fft_sink_c(
 | 
			
		||||
        	self.GetWin(),
 | 
			
		||||
        	baseband_freq=capture_freq,
 | 
			
		||||
        	y_per_div=10,
 | 
			
		||||
        	y_divs=10,
 | 
			
		||||
        	ref_level=0,
 | 
			
		||||
        	ref_scale=2.0,
 | 
			
		||||
        	sample_rate=samp_rate,
 | 
			
		||||
        	fft_size=1024,
 | 
			
		||||
        	fft_rate=15,
 | 
			
		||||
        	average=False,
 | 
			
		||||
        	avg_alpha=None,
 | 
			
		||||
        	title='FFT Plot',
 | 
			
		||||
        	peak_hold=False,
 | 
			
		||||
        self.qtgui_freq_sink_x_0 = qtgui.freq_sink_c(
 | 
			
		||||
            1024, #size
 | 
			
		||||
            firdes.WIN_BLACKMAN_hARRIS, #wintype
 | 
			
		||||
            capture_freq, #fc
 | 
			
		||||
            samp_rate, #bw
 | 
			
		||||
            "", #name
 | 
			
		||||
            1
 | 
			
		||||
        )
 | 
			
		||||
        self.Add(self.wxgui_fftsink2_1.win)
 | 
			
		||||
        self.osmosdr_source_0 = osmosdr.source( args="numchan=" + str(1) + " " + '' )
 | 
			
		||||
        self.qtgui_freq_sink_x_0.set_update_time(0.10)
 | 
			
		||||
        self.qtgui_freq_sink_x_0.set_y_axis(-140, 10)
 | 
			
		||||
        self.qtgui_freq_sink_x_0.set_y_label('Relative Gain', 'dB')
 | 
			
		||||
        self.qtgui_freq_sink_x_0.set_trigger_mode(qtgui.TRIG_MODE_FREE, 0.0, 0, "")
 | 
			
		||||
        self.qtgui_freq_sink_x_0.enable_autoscale(False)
 | 
			
		||||
        self.qtgui_freq_sink_x_0.enable_grid(False)
 | 
			
		||||
        self.qtgui_freq_sink_x_0.set_fft_average(1.0)
 | 
			
		||||
        self.qtgui_freq_sink_x_0.enable_axis_labels(True)
 | 
			
		||||
        self.qtgui_freq_sink_x_0.enable_control_panel(False)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        labels = ['', '', '', '', '',
 | 
			
		||||
            '', '', '', '', '']
 | 
			
		||||
        widths = [1, 1, 1, 1, 1,
 | 
			
		||||
            1, 1, 1, 1, 1]
 | 
			
		||||
        colors = ["blue", "red", "green", "black", "cyan",
 | 
			
		||||
            "magenta", "yellow", "dark red", "dark green", "dark blue"]
 | 
			
		||||
        alphas = [1.0, 1.0, 1.0, 1.0, 1.0,
 | 
			
		||||
            1.0, 1.0, 1.0, 1.0, 1.0]
 | 
			
		||||
 | 
			
		||||
        for i in range(1):
 | 
			
		||||
            if len(labels[i]) == 0:
 | 
			
		||||
                self.qtgui_freq_sink_x_0.set_line_label(i, "Data {0}".format(i))
 | 
			
		||||
            else:
 | 
			
		||||
                self.qtgui_freq_sink_x_0.set_line_label(i, labels[i])
 | 
			
		||||
            self.qtgui_freq_sink_x_0.set_line_width(i, widths[i])
 | 
			
		||||
            self.qtgui_freq_sink_x_0.set_line_color(i, colors[i])
 | 
			
		||||
            self.qtgui_freq_sink_x_0.set_line_alpha(i, alphas[i])
 | 
			
		||||
 | 
			
		||||
        self._qtgui_freq_sink_x_0_win = sip.wrapinstance(self.qtgui_freq_sink_x_0.pyqwidget(), Qt.QWidget)
 | 
			
		||||
        self.top_grid_layout.addWidget(self._qtgui_freq_sink_x_0_win)
 | 
			
		||||
        self.osmosdr_source_0 = osmosdr.source(
 | 
			
		||||
            args="numchan=" + str(1) + " " + ''
 | 
			
		||||
        )
 | 
			
		||||
        self.osmosdr_source_0.set_time_unknown_pps(osmosdr.time_spec_t())
 | 
			
		||||
        self.osmosdr_source_0.set_sample_rate(samp_rate)
 | 
			
		||||
        self.osmosdr_source_0.set_center_freq(capture_freq, 0)
 | 
			
		||||
        self.osmosdr_source_0.set_freq_corr(0, 0)
 | 
			
		||||
        self.osmosdr_source_0.set_dc_offset_mode(0, 0)
 | 
			
		||||
        self.osmosdr_source_0.set_iq_balance_mode(0, 0)
 | 
			
		||||
        self.osmosdr_source_0.set_gain_mode(False, 0)
 | 
			
		||||
        self.osmosdr_source_0.set_gain(10, 0)
 | 
			
		||||
        self.osmosdr_source_0.set_if_gain(20, 0)
 | 
			
		||||
        self.osmosdr_source_0.set_bb_gain(20, 0)
 | 
			
		||||
        self.osmosdr_source_0.set_antenna('', 0)
 | 
			
		||||
        self.osmosdr_source_0.set_bandwidth(0, 0)
 | 
			
		||||
 | 
			
		||||
        self.lora_message_socket_sink_0 = lora.message_socket_sink('127.0.0.1', 40868, 0)
 | 
			
		||||
        self.lora_lora_receiver_0 = lora.lora_receiver(1e6, capture_freq, ([target_freq]), bw, sf, False, 4, True, False, downlink, decimation, False, False)
 | 
			
		||||
        self.lora_lora_receiver_0 = lora.lora_receiver(1e6, capture_freq, [target_freq], bw, sf, False, 4, True, False, False, decimation, False, False)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        ##################################################
 | 
			
		||||
        # Connections
 | 
			
		||||
        ##################################################
 | 
			
		||||
        self.msg_connect((self.lora_lora_receiver_0, 'frames'), (self.lora_message_socket_sink_0, 'in'))
 | 
			
		||||
        self.connect((self.osmosdr_source_0, 0), (self.lora_lora_receiver_0, 0))
 | 
			
		||||
        self.connect((self.osmosdr_source_0, 0), (self.wxgui_fftsink2_1, 0))
 | 
			
		||||
        self.connect((self.osmosdr_source_0, 0), (self.qtgui_freq_sink_x_0, 0))
 | 
			
		||||
 | 
			
		||||
    def closeEvent(self, event):
 | 
			
		||||
        self.settings = Qt.QSettings("GNU Radio", "lora_receive_realtime")
 | 
			
		||||
        self.settings.setValue("geometry", self.saveGeometry())
 | 
			
		||||
        event.accept()
 | 
			
		||||
 | 
			
		||||
    def get_sf(self):
 | 
			
		||||
        return self.sf
 | 
			
		||||
 | 
			
		||||
    def set_sf(self, sf):
 | 
			
		||||
        self.sf = sf
 | 
			
		||||
        self.set_bitrate(self.sf * (1 / (2**self.sf / float(self.bw))))
 | 
			
		||||
        self.set_symbols_per_sec(float(self.bw) / (2**self.sf))
 | 
			
		||||
        self.lora_lora_receiver_0.set_sf(self.sf)
 | 
			
		||||
        self.set_bitrate(self.sf * (1 / (2**self.sf / float(self.bw))))
 | 
			
		||||
 | 
			
		||||
    def get_samp_rate(self):
 | 
			
		||||
        return self.samp_rate
 | 
			
		||||
 | 
			
		||||
    def set_samp_rate(self, samp_rate):
 | 
			
		||||
        self.samp_rate = samp_rate
 | 
			
		||||
        self.wxgui_fftsink2_1.set_sample_rate(self.samp_rate)
 | 
			
		||||
        self.osmosdr_source_0.set_sample_rate(self.samp_rate)
 | 
			
		||||
        self.set_firdes_tap(firdes.low_pass(1, self.samp_rate, self.bw, 10000, firdes.WIN_HAMMING, 6.67))
 | 
			
		||||
 | 
			
		||||
    def get_bw(self):
 | 
			
		||||
        return self.bw
 | 
			
		||||
 | 
			
		||||
    def set_bw(self, bw):
 | 
			
		||||
        self.bw = bw
 | 
			
		||||
        self.set_symbols_per_sec(float(self.bw) / (2**self.sf))
 | 
			
		||||
        self.set_firdes_tap(firdes.low_pass(1, self.samp_rate, self.bw, 10000, firdes.WIN_HAMMING, 6.67))
 | 
			
		||||
        self.set_bitrate(self.sf * (1 / (2**self.sf / float(self.bw))))
 | 
			
		||||
        self.set_symbols_per_sec(float(self.bw) / (2**self.sf))
 | 
			
		||||
 | 
			
		||||
    def get_target_freq(self):
 | 
			
		||||
        return self.target_freq
 | 
			
		||||
| 
						 | 
				
			
			@ -130,17 +181,13 @@ class lora_receive_realtime(grc_wxgui.top_block_gui):
 | 
			
		|||
    def set_symbols_per_sec(self, symbols_per_sec):
 | 
			
		||||
        self.symbols_per_sec = symbols_per_sec
 | 
			
		||||
 | 
			
		||||
    def get_firdes_tap(self):
 | 
			
		||||
        return self.firdes_tap
 | 
			
		||||
    def get_samp_rate(self):
 | 
			
		||||
        return self.samp_rate
 | 
			
		||||
 | 
			
		||||
    def set_firdes_tap(self, firdes_tap):
 | 
			
		||||
        self.firdes_tap = firdes_tap
 | 
			
		||||
 | 
			
		||||
    def get_downlink(self):
 | 
			
		||||
        return self.downlink
 | 
			
		||||
 | 
			
		||||
    def set_downlink(self, downlink):
 | 
			
		||||
        self.downlink = downlink
 | 
			
		||||
    def set_samp_rate(self, samp_rate):
 | 
			
		||||
        self.samp_rate = samp_rate
 | 
			
		||||
        self.osmosdr_source_0.set_sample_rate(self.samp_rate)
 | 
			
		||||
        self.qtgui_freq_sink_x_0.set_frequency_range(self.capture_freq, self.samp_rate)
 | 
			
		||||
 | 
			
		||||
    def get_decimation(self):
 | 
			
		||||
        return self.decimation
 | 
			
		||||
| 
						 | 
				
			
			@ -153,8 +200,9 @@ class lora_receive_realtime(grc_wxgui.top_block_gui):
 | 
			
		|||
 | 
			
		||||
    def set_capture_freq(self, capture_freq):
 | 
			
		||||
        self.capture_freq = capture_freq
 | 
			
		||||
        self.wxgui_fftsink2_1.set_baseband_freq(self.capture_freq)
 | 
			
		||||
        self.lora_lora_receiver_0.set_center_freq(self.capture_freq)
 | 
			
		||||
        self.osmosdr_source_0.set_center_freq(self.capture_freq, 0)
 | 
			
		||||
        self.qtgui_freq_sink_x_0.set_frequency_range(self.capture_freq, self.samp_rate)
 | 
			
		||||
 | 
			
		||||
    def get_bitrate(self):
 | 
			
		||||
        return self.bitrate
 | 
			
		||||
| 
						 | 
				
			
			@ -163,11 +211,33 @@ class lora_receive_realtime(grc_wxgui.top_block_gui):
 | 
			
		|||
        self.bitrate = bitrate
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def main(top_block_cls=lora_receive_realtime, options=None):
 | 
			
		||||
 | 
			
		||||
    if StrictVersion("4.5.0") <= StrictVersion(Qt.qVersion()) < StrictVersion("5.0.0"):
 | 
			
		||||
        style = gr.prefs().get_string('qtgui', 'style', 'raster')
 | 
			
		||||
        Qt.QApplication.setGraphicsSystem(style)
 | 
			
		||||
    qapp = Qt.QApplication(sys.argv)
 | 
			
		||||
 | 
			
		||||
    tb = top_block_cls()
 | 
			
		||||
    tb.Start(True)
 | 
			
		||||
    tb.Wait()
 | 
			
		||||
    tb.start()
 | 
			
		||||
    tb.show()
 | 
			
		||||
 | 
			
		||||
    def sig_handler(sig=None, frame=None):
 | 
			
		||||
        Qt.QApplication.quit()
 | 
			
		||||
 | 
			
		||||
    signal.signal(signal.SIGINT, sig_handler)
 | 
			
		||||
    signal.signal(signal.SIGTERM, sig_handler)
 | 
			
		||||
 | 
			
		||||
    timer = Qt.QTimer()
 | 
			
		||||
    timer.start(500)
 | 
			
		||||
    timer.timeout.connect(lambda: None)
 | 
			
		||||
 | 
			
		||||
    def quitting():
 | 
			
		||||
        tb.stop()
 | 
			
		||||
        tb.wait()
 | 
			
		||||
    qapp.aboutToQuit.connect(quitting)
 | 
			
		||||
    qapp.exec_()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
if __name__ == '__main__':
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,26 @@
 | 
			
		|||
# Copyright 2018 Free Software Foundation, Inc.
 | 
			
		||||
#
 | 
			
		||||
# This file is part of GNU Radio
 | 
			
		||||
#
 | 
			
		||||
# GNU Radio is free software; you can redistribute it and/or modify
 | 
			
		||||
# it under the terms of the GNU General Public License as published by
 | 
			
		||||
# the Free Software Foundation; either version 3, or (at your option)
 | 
			
		||||
# any later version.
 | 
			
		||||
#
 | 
			
		||||
# GNU Radio is distributed in the hope that it will be useful,
 | 
			
		||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
# GNU General Public License for more details.
 | 
			
		||||
#
 | 
			
		||||
# You should have received a copy of the GNU General Public License
 | 
			
		||||
# along with GNU Radio; see the file COPYING.  If not, write to
 | 
			
		||||
# the Free Software Foundation, Inc., 51 Franklin Street,
 | 
			
		||||
# Boston, MA 02110-1301, USA.
 | 
			
		||||
 | 
			
		||||
include(CMakeFindDependencyMacro)
 | 
			
		||||
 | 
			
		||||
set(target_deps "@TARGET_DEPENDENCIES@")
 | 
			
		||||
foreach(dep IN LISTS target_deps)
 | 
			
		||||
    find_dependency(${dep})
 | 
			
		||||
endforeach()
 | 
			
		||||
include("${CMAKE_CURRENT_LIST_DIR}/@TARGET@Targets.cmake")
 | 
			
		||||
| 
						 | 
				
			
			@ -18,14 +18,15 @@
 | 
			
		|||
# Boston, MA 02110-1301, USA.
 | 
			
		||||
 | 
			
		||||
install(FILES
 | 
			
		||||
    lora_receiver.xml
 | 
			
		||||
    lora_message_file_sink.xml
 | 
			
		||||
    lora_message_socket_sink.xml
 | 
			
		||||
    lora_message_socket_source.xml DESTINATION share/gnuradio/grc/blocks
 | 
			
		||||
    lora_controller.block.yml
 | 
			
		||||
    lora_receiver.block.yml
 | 
			
		||||
    lora_message_file_sink.block.yml
 | 
			
		||||
    lora_message_socket_sink.block.yml
 | 
			
		||||
    lora_message_socket_source.block.yml DESTINATION share/gnuradio/grc/blocks
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
if(HAS_MONGODB)
 | 
			
		||||
    install(FILES
 | 
			
		||||
        lora_message_mongodb_sink.xml DESTINATION share/gnuradio/grc/blocks
 | 
			
		||||
        lora_message_mongodb_sink.block.yml DESTINATION share/gnuradio/grc/blocks
 | 
			
		||||
    )
 | 
			
		||||
endif(HAS_MONGODB)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,11 @@
 | 
			
		|||
# auto-generated by grc.converter
 | 
			
		||||
 | 
			
		||||
id: lora_controller
 | 
			
		||||
label: Controller
 | 
			
		||||
category: '[LoRa]'
 | 
			
		||||
 | 
			
		||||
templates:
 | 
			
		||||
    imports: import lora
 | 
			
		||||
    make: lora.controller(${parent})
 | 
			
		||||
 | 
			
		||||
file_format: 1
 | 
			
		||||
| 
						 | 
				
			
			@ -1,9 +0,0 @@
 | 
			
		|||
<?xml version="1.0"?>
 | 
			
		||||
<block>
 | 
			
		||||
  <name>controller</name>
 | 
			
		||||
  <key>lora_controller</key>
 | 
			
		||||
  <category></category>
 | 
			
		||||
  <import>import lora</import>
 | 
			
		||||
  <make>lora.controller($parent)</make>
 | 
			
		||||
 | 
			
		||||
</block>
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,20 @@
 | 
			
		|||
# auto-generated by grc.converter
 | 
			
		||||
 | 
			
		||||
id: lora_message_file_sink
 | 
			
		||||
label: Message File Sink
 | 
			
		||||
category: '[LoRa]'
 | 
			
		||||
 | 
			
		||||
parameters:
 | 
			
		||||
-   id: path
 | 
			
		||||
    label: Path
 | 
			
		||||
    dtype: file_open
 | 
			
		||||
 | 
			
		||||
inputs:
 | 
			
		||||
-   domain: message
 | 
			
		||||
    id: in
 | 
			
		||||
 | 
			
		||||
templates:
 | 
			
		||||
    imports: import lora
 | 
			
		||||
    make: lora.message_file_sink(${path})
 | 
			
		||||
 | 
			
		||||
file_format: 1
 | 
			
		||||
| 
						 | 
				
			
			@ -1,19 +0,0 @@
 | 
			
		|||
<?xml version="1.0"?>
 | 
			
		||||
<block>
 | 
			
		||||
  <name>Message File Sink</name>
 | 
			
		||||
  <key>lora_message_file_sink</key>
 | 
			
		||||
  <category>[LoRa]</category>
 | 
			
		||||
  <import>import lora</import>
 | 
			
		||||
  <make>lora.message_file_sink($path)</make>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
    <name>Path</name>
 | 
			
		||||
    <key>path</key>
 | 
			
		||||
    <type>string</type>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <sink>
 | 
			
		||||
    <name>in</name>
 | 
			
		||||
    <type>message</type>
 | 
			
		||||
  </sink>
 | 
			
		||||
</block>
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,36 @@
 | 
			
		|||
# auto-generated by grc.converter
 | 
			
		||||
 | 
			
		||||
id: lora_message_mongodb_sink
 | 
			
		||||
label: Message MongoDB Sink
 | 
			
		||||
category: '[LoRa]'
 | 
			
		||||
 | 
			
		||||
parameters:
 | 
			
		||||
-   id: ip
 | 
			
		||||
    label: IP Address
 | 
			
		||||
    dtype: string
 | 
			
		||||
    default: 127.0.0.1
 | 
			
		||||
-   id: port
 | 
			
		||||
    label: Port
 | 
			
		||||
    dtype: int
 | 
			
		||||
    default: 27017
 | 
			
		||||
-   id: db
 | 
			
		||||
    label: Database
 | 
			
		||||
    dtype: string
 | 
			
		||||
    default: lora
 | 
			
		||||
-   id: collection
 | 
			
		||||
    label: Collection
 | 
			
		||||
    dtype: string
 | 
			
		||||
    default: chirps
 | 
			
		||||
-   id: tag
 | 
			
		||||
    label: Tag
 | 
			
		||||
    dtype: string
 | 
			
		||||
 | 
			
		||||
inputs:
 | 
			
		||||
-   domain: message
 | 
			
		||||
    id: in
 | 
			
		||||
 | 
			
		||||
templates:
 | 
			
		||||
    imports: import lora
 | 
			
		||||
    make: lora.message_mongodb_sink(${ip}, ${port}, ${db}, ${collection}, ${tag})
 | 
			
		||||
 | 
			
		||||
file_format: 1
 | 
			
		||||
| 
						 | 
				
			
			@ -1,47 +0,0 @@
 | 
			
		|||
<?xml version="1.0"?>
 | 
			
		||||
<block>
 | 
			
		||||
  <name>Message MongoDB Sink</name>
 | 
			
		||||
  <key>lora_message_mongodb_sink</key>
 | 
			
		||||
  <category>[LoRa]</category>
 | 
			
		||||
  <import>import lora</import>
 | 
			
		||||
  <make>lora.message_mongodb_sink($ip, $port, $db, $collection, $tag)</make>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
    <name>IP Address</name>
 | 
			
		||||
    <key>ip</key>
 | 
			
		||||
    <value>127.0.0.1</value>
 | 
			
		||||
    <type>string</type>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
    <name>Port</name>
 | 
			
		||||
    <key>port</key>
 | 
			
		||||
    <value>27017</value>
 | 
			
		||||
    <type>int</type>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
    <name>Database</name>
 | 
			
		||||
    <key>db</key>
 | 
			
		||||
    <value>lora</value>
 | 
			
		||||
    <type>string</type>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
    <name>Collection</name>
 | 
			
		||||
    <key>collection</key>
 | 
			
		||||
    <value>chirps</value>
 | 
			
		||||
    <type>string</type>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
    <name>Tag</name>
 | 
			
		||||
    <key>tag</key>
 | 
			
		||||
    <type>string</type>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <sink>
 | 
			
		||||
    <name>in</name>
 | 
			
		||||
    <type>message</type>
 | 
			
		||||
  </sink>
 | 
			
		||||
</block>
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,30 @@
 | 
			
		|||
# auto-generated by grc.converter
 | 
			
		||||
 | 
			
		||||
id: lora_message_socket_sink
 | 
			
		||||
label: Message Socket Sink
 | 
			
		||||
category: '[LoRa]'
 | 
			
		||||
 | 
			
		||||
parameters:
 | 
			
		||||
-   id: ip
 | 
			
		||||
    label: IP
 | 
			
		||||
    dtype: string
 | 
			
		||||
    default: 127.0.0.1
 | 
			
		||||
-   id: port
 | 
			
		||||
    label: Port
 | 
			
		||||
    dtype: int
 | 
			
		||||
    default: 40868
 | 
			
		||||
-   id: layer
 | 
			
		||||
    label: Layer
 | 
			
		||||
    dtype: enum
 | 
			
		||||
    options: ['0', '1', '2']
 | 
			
		||||
    option_labels: [LoRa TAP, LoRa PHY, LoRa MAC]
 | 
			
		||||
 | 
			
		||||
inputs:
 | 
			
		||||
-   domain: message
 | 
			
		||||
    id: in
 | 
			
		||||
 | 
			
		||||
templates:
 | 
			
		||||
    imports: import lora
 | 
			
		||||
    make: lora.message_socket_sink(${ip}, ${port}, ${layer})
 | 
			
		||||
 | 
			
		||||
file_format: 1
 | 
			
		||||
| 
						 | 
				
			
			@ -1,45 +0,0 @@
 | 
			
		|||
<?xml version="1.0"?>
 | 
			
		||||
<block>
 | 
			
		||||
  <name>Message Socket Sink</name>
 | 
			
		||||
  <key>lora_message_socket_sink</key>
 | 
			
		||||
  <category>[LoRa]</category>
 | 
			
		||||
  <import>import lora</import>
 | 
			
		||||
  <make>lora.message_socket_sink($ip, $port, $layer)</make>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
    <name>IP</name>
 | 
			
		||||
    <key>ip</key>
 | 
			
		||||
    <value>127.0.0.1</value>
 | 
			
		||||
    <type>string</type>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
    <name>Port</name>
 | 
			
		||||
    <key>port</key>
 | 
			
		||||
    <value>40868</value>
 | 
			
		||||
    <type>int</type>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
    <name>Layer</name>
 | 
			
		||||
    <key>layer</key>
 | 
			
		||||
    <type>enum</type>
 | 
			
		||||
    <option>
 | 
			
		||||
        <name>LoRa TAP</name>
 | 
			
		||||
        <key>0</key>
 | 
			
		||||
    </option>
 | 
			
		||||
    <option>
 | 
			
		||||
        <name>LoRa PHY</name>
 | 
			
		||||
        <key>1</key>
 | 
			
		||||
    </option>
 | 
			
		||||
    <option>
 | 
			
		||||
        <name>LoRa MAC</name>
 | 
			
		||||
        <key>2</key>
 | 
			
		||||
    </option>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <sink>
 | 
			
		||||
    <name>in</name>
 | 
			
		||||
    <type>message</type>
 | 
			
		||||
  </sink>
 | 
			
		||||
</block>
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,25 @@
 | 
			
		|||
# auto-generated by grc.converter
 | 
			
		||||
 | 
			
		||||
id: lora_message_socket_source
 | 
			
		||||
label: Message Socket Source
 | 
			
		||||
category: '[LoRa]'
 | 
			
		||||
 | 
			
		||||
parameters:
 | 
			
		||||
-   id: addr
 | 
			
		||||
    label: UDP IP Address
 | 
			
		||||
    dtype: string
 | 
			
		||||
    default: 127.0.0.1
 | 
			
		||||
-   id: port
 | 
			
		||||
    label: UDP Port
 | 
			
		||||
    dtype: int
 | 
			
		||||
    default: 40868
 | 
			
		||||
 | 
			
		||||
outputs:
 | 
			
		||||
-   domain: message
 | 
			
		||||
    id: out
 | 
			
		||||
 | 
			
		||||
templates:
 | 
			
		||||
    imports: import lora
 | 
			
		||||
    make: lora.message_socket_source(${addr}, ${port})
 | 
			
		||||
 | 
			
		||||
file_format: 1
 | 
			
		||||
| 
						 | 
				
			
			@ -1,28 +0,0 @@
 | 
			
		|||
<?xml version="1.0"?>
 | 
			
		||||
<block>
 | 
			
		||||
    <name>Message Socket Source</name>
 | 
			
		||||
    <key>lora_message_socket_source</key>
 | 
			
		||||
    <category>[LoRa]</category>
 | 
			
		||||
    <import>import lora</import>
 | 
			
		||||
    <make>lora.message_socket_source($addr, $port)</make>
 | 
			
		||||
 | 
			
		||||
    <param>
 | 
			
		||||
        <name>UDP IP Address</name>
 | 
			
		||||
        <key>addr</key>
 | 
			
		||||
        <value>"127.0.0.1"</value>
 | 
			
		||||
        <type>string</type>
 | 
			
		||||
    </param>
 | 
			
		||||
 | 
			
		||||
    <param>
 | 
			
		||||
        <name>UDP Port</name>
 | 
			
		||||
        <key>port</key>
 | 
			
		||||
        <value>40868</value>
 | 
			
		||||
        <type>int</type>
 | 
			
		||||
    </param>
 | 
			
		||||
 | 
			
		||||
    <source>
 | 
			
		||||
        <name>out</name>
 | 
			
		||||
        <type>message</type>
 | 
			
		||||
    </source>
 | 
			
		||||
 | 
			
		||||
</block>
 | 
			
		||||
| 
						 | 
				
			
			@ -0,0 +1,87 @@
 | 
			
		|||
# auto-generated by grc.converter
 | 
			
		||||
 | 
			
		||||
id: lora_lora_receiver
 | 
			
		||||
label: LoRa Receiver
 | 
			
		||||
category: '[LoRa]'
 | 
			
		||||
 | 
			
		||||
parameters:
 | 
			
		||||
-   id: samp_rate
 | 
			
		||||
    label: Sample rate
 | 
			
		||||
    dtype: float
 | 
			
		||||
    default: 1e6
 | 
			
		||||
-   id: center_freq
 | 
			
		||||
    label: Center frequency
 | 
			
		||||
    dtype: float
 | 
			
		||||
    default: 868e6
 | 
			
		||||
-   id: channel_list
 | 
			
		||||
    label: Channel list
 | 
			
		||||
    dtype: float_vector
 | 
			
		||||
    default: [868.1e6]
 | 
			
		||||
    hide: ${ 'all' if disable_channelization else 'none' }
 | 
			
		||||
-   id: bandwidth
 | 
			
		||||
    label: Bandwidth
 | 
			
		||||
    dtype: int
 | 
			
		||||
    default: 125000
 | 
			
		||||
-   id: sf
 | 
			
		||||
    label: Spreading factor
 | 
			
		||||
    dtype: int
 | 
			
		||||
    default: 7
 | 
			
		||||
-   id: implicit
 | 
			
		||||
    label: Implicit header
 | 
			
		||||
    dtype: bool
 | 
			
		||||
    default: False
 | 
			
		||||
-   id: cr
 | 
			
		||||
    label: Coding rate
 | 
			
		||||
    dtype: enum
 | 
			
		||||
    options: [4, 3, 2, 1]
 | 
			
		||||
    option_labels: [4/8, 4/7, 4/6, 4/5]
 | 
			
		||||
    hide: ${ 'none' if implicit else 'all' }
 | 
			
		||||
-   id: crc
 | 
			
		||||
    label: CRC
 | 
			
		||||
    dtype: bool
 | 
			
		||||
    default: True
 | 
			
		||||
    hide: ${ 'none' if implicit else 'all' }
 | 
			
		||||
-   id: reduced_rate
 | 
			
		||||
    label: Reduced rate
 | 
			
		||||
    dtype: bool
 | 
			
		||||
    default: False
 | 
			
		||||
-   id: conj
 | 
			
		||||
    label: Conjugate downlink signal
 | 
			
		||||
    dtype: bool
 | 
			
		||||
    default: False
 | 
			
		||||
    hide: part
 | 
			
		||||
-   id: decimation
 | 
			
		||||
    label: Decimation
 | 
			
		||||
    dtype: int
 | 
			
		||||
    default: 1
 | 
			
		||||
    hide: part
 | 
			
		||||
-   id: disable_channelization
 | 
			
		||||
    label: Disable channelization
 | 
			
		||||
    dtype: bool
 | 
			
		||||
    default: False
 | 
			
		||||
    hide: part
 | 
			
		||||
-   id: disable_drift_correction
 | 
			
		||||
    label: Disable drift correction
 | 
			
		||||
    dtype: bool
 | 
			
		||||
    default: False
 | 
			
		||||
    hide: part
 | 
			
		||||
 | 
			
		||||
inputs:
 | 
			
		||||
-   domain: stream
 | 
			
		||||
    dtype: complex
 | 
			
		||||
 | 
			
		||||
outputs:
 | 
			
		||||
-   domain: message
 | 
			
		||||
    id: frames
 | 
			
		||||
    optional: true
 | 
			
		||||
 | 
			
		||||
templates:
 | 
			
		||||
    imports: import lora
 | 
			
		||||
    make: lora.lora_receiver(${samp_rate}, ${center_freq}, ${channel_list}, ${bandwidth},
 | 
			
		||||
        ${sf}, ${implicit}, ${cr}, ${crc}, ${reduced_rate}, ${conj}, ${decimation},
 | 
			
		||||
        ${disable_channelization}, ${disable_drift_correction})
 | 
			
		||||
    callbacks:
 | 
			
		||||
    -   set_center_freq(${center_freq})
 | 
			
		||||
    -   set_sf(${sf})
 | 
			
		||||
 | 
			
		||||
file_format: 1
 | 
			
		||||
| 
						 | 
				
			
			@ -1,166 +0,0 @@
 | 
			
		|||
<?xml version="1.0"?>
 | 
			
		||||
<block>
 | 
			
		||||
  <name>LoRa Receiver</name>
 | 
			
		||||
  <key>lora_lora_receiver</key>
 | 
			
		||||
  <category>[LoRa]</category>
 | 
			
		||||
  <import>import lora</import>
 | 
			
		||||
  <make>lora.lora_receiver($samp_rate, $center_freq, $channel_list, $bandwidth, $sf, $implicit, $cr, $crc, $reduced_rate, $conj, $decimation, $disable_channelization, $disable_drift_correction)</make>
 | 
			
		||||
 | 
			
		||||
  <callback>set_center_freq($freq)</callback>
 | 
			
		||||
  <callback>set_sf($sf)</callback>
 | 
			
		||||
 | 
			
		||||
   <param>
 | 
			
		||||
     <name>Sample rate</name>
 | 
			
		||||
     <key>samp_rate</key>
 | 
			
		||||
     <value>1e6</value>
 | 
			
		||||
     <type>float</type>
 | 
			
		||||
   </param>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
    <name>Center frequency</name>
 | 
			
		||||
    <key>center_freq</key>
 | 
			
		||||
    <value>868e6</value>
 | 
			
		||||
    <type>float</type>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
    <name>Channel list</name>
 | 
			
		||||
    <key>channel_list</key>
 | 
			
		||||
    <value>[868.1e6]</value>
 | 
			
		||||
    <type>float_vector</type>
 | 
			
		||||
    <hide>$disable_channelization.hide_channels</hide>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
    <name>Bandwidth</name>
 | 
			
		||||
    <key>bandwidth</key>
 | 
			
		||||
    <value>125000</value>
 | 
			
		||||
    <type>int</type>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
    <name>Spreading factor</name>
 | 
			
		||||
    <key>sf</key>
 | 
			
		||||
    <type>int</type>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
    <name>Implicit header</name>
 | 
			
		||||
    <key>implicit</key>
 | 
			
		||||
    <type>enum</type>
 | 
			
		||||
    <option>
 | 
			
		||||
        <name>No</name>
 | 
			
		||||
        <key>False</key>
 | 
			
		||||
        <opt>hide_imp:all</opt>
 | 
			
		||||
    </option>
 | 
			
		||||
    <option>
 | 
			
		||||
        <name>Yes</name>
 | 
			
		||||
        <key>True</key>
 | 
			
		||||
        <opt>hide_imp:</opt>
 | 
			
		||||
    </option>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
      <name>Coding rate</name>
 | 
			
		||||
      <key>cr</key>
 | 
			
		||||
      <type>enum</type>
 | 
			
		||||
      <hide>$implicit.hide_imp</hide>
 | 
			
		||||
      <option>
 | 
			
		||||
          <name>4/8</name>
 | 
			
		||||
          <key>4</key>
 | 
			
		||||
      </option>
 | 
			
		||||
      <option>
 | 
			
		||||
          <name>4/7</name>
 | 
			
		||||
          <key>3</key>
 | 
			
		||||
      </option>
 | 
			
		||||
      <option>
 | 
			
		||||
          <name>4/6</name>
 | 
			
		||||
          <key>2</key>
 | 
			
		||||
      </option>
 | 
			
		||||
      <option>
 | 
			
		||||
          <name>4/5</name>
 | 
			
		||||
          <key>1</key>
 | 
			
		||||
      </option>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
      <name>CRC</name>
 | 
			
		||||
      <key>crc</key>
 | 
			
		||||
      <type>enum</type>
 | 
			
		||||
      <hide>$implicit.hide_imp</hide>
 | 
			
		||||
      <option>
 | 
			
		||||
          <name>Yes</name>
 | 
			
		||||
          <key>True</key>
 | 
			
		||||
      </option>
 | 
			
		||||
      <option>
 | 
			
		||||
          <name>No</name>
 | 
			
		||||
          <key>False</key>
 | 
			
		||||
      </option>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
      <name>Reduced rate</name>
 | 
			
		||||
      <key>reduced_rate</key>
 | 
			
		||||
      <type>enum</type>
 | 
			
		||||
      <option>
 | 
			
		||||
          <name>No</name>
 | 
			
		||||
          <key>False</key>
 | 
			
		||||
      </option>
 | 
			
		||||
      <option>
 | 
			
		||||
          <name>Yes</name>
 | 
			
		||||
          <key>True</key>
 | 
			
		||||
      </option>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
    <name>Conjugate downlink signal</name>
 | 
			
		||||
    <key>conj</key>
 | 
			
		||||
    <value>False</value>
 | 
			
		||||
    <type>bool</type>
 | 
			
		||||
    <hide>part</hide>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
    <name>Decimation</name>
 | 
			
		||||
    <key>decimation</key>
 | 
			
		||||
    <value>1</value>
 | 
			
		||||
    <type>int</type>
 | 
			
		||||
    <hide>part</hide>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
    <name>Disable channelization</name>
 | 
			
		||||
    <key>disable_channelization</key>
 | 
			
		||||
    <type>enum</type>
 | 
			
		||||
    <hide>part</hide>
 | 
			
		||||
    <option>
 | 
			
		||||
        <name>No</name>
 | 
			
		||||
        <key>False</key>
 | 
			
		||||
        <opt>hide_channels:</opt>
 | 
			
		||||
    </option>
 | 
			
		||||
    <option>
 | 
			
		||||
        <name>Yes</name>
 | 
			
		||||
        <key>True</key>
 | 
			
		||||
        <opt>hide_channels:all</opt>
 | 
			
		||||
    </option>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <param>
 | 
			
		||||
    <name>Disable drift correction</name>
 | 
			
		||||
    <key>disable_drift_correction</key>
 | 
			
		||||
    <value>False</value>
 | 
			
		||||
    <type>bool</type>
 | 
			
		||||
    <hide>part</hide>
 | 
			
		||||
  </param>
 | 
			
		||||
 | 
			
		||||
  <sink>
 | 
			
		||||
    <name>in</name>
 | 
			
		||||
    <type>complex</type>
 | 
			
		||||
  </sink>
 | 
			
		||||
 | 
			
		||||
  <source>
 | 
			
		||||
    <name>frames</name>
 | 
			
		||||
    <type>message</type>
 | 
			
		||||
    <optional>1</optional>
 | 
			
		||||
  </source>
 | 
			
		||||
</block>
 | 
			
		||||
		Ładowanie…
	
		Reference in New Issue