Add the QB50 deframer block
The block is able to separate WOD AX.25 frames from normal ones.
This commit is contained in:
parent
6a063956b4
commit
a92eb283ff
|
@ -66,7 +66,7 @@
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>run_options</key>
|
<key>run_options</key>
|
||||||
<value>prompt</value>
|
<value>run</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>run</key>
|
<key>run</key>
|
||||||
|
@ -313,7 +313,7 @@ TX sampling rate</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_coordinate</key>
|
<key>_coordinate</key>
|
||||||
<value>(672, 917)</value>
|
<value>(760, 885)</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_rotation</key>
|
<key>_rotation</key>
|
||||||
|
@ -341,7 +341,7 @@ TX sampling rate</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_coordinate</key>
|
<key>_coordinate</key>
|
||||||
<value>(672, 805)</value>
|
<value>(760, 773)</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_rotation</key>
|
<key>_rotation</key>
|
||||||
|
@ -1100,7 +1100,7 @@ we shift the LO a little further</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_coordinate</key>
|
<key>_coordinate</key>
|
||||||
<value>(360, 774)</value>
|
<value>(864, 774)</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_rotation</key>
|
<key>_rotation</key>
|
||||||
|
@ -3958,7 +3958,7 @@ we shift the LO a little further</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_coordinate</key>
|
<key>_coordinate</key>
|
||||||
<value>(560, 902)</value>
|
<value>(648, 870)</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_rotation</key>
|
<key>_rotation</key>
|
||||||
|
@ -4009,7 +4009,7 @@ we shift the LO a little further</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_coordinate</key>
|
<key>_coordinate</key>
|
||||||
<value>(1176, 568)</value>
|
<value>(1176, 592)</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_rotation</key>
|
<key>_rotation</key>
|
||||||
|
@ -4045,7 +4045,7 @@ we shift the LO a little further</value>
|
||||||
</param>
|
</param>
|
||||||
</block>
|
</block>
|
||||||
<block>
|
<block>
|
||||||
<key>satnogs_multi_format_msg_sink</key>
|
<key>satnogs_qb50_deframer</key>
|
||||||
<param>
|
<param>
|
||||||
<key>alias</key>
|
<key>alias</key>
|
||||||
<value></value>
|
<value></value>
|
||||||
|
@ -4060,11 +4060,11 @@ we shift the LO a little further</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_enabled</key>
|
<key>_enabled</key>
|
||||||
<value>1</value>
|
<value>True</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_coordinate</key>
|
<key>_coordinate</key>
|
||||||
<value>(920, 684)</value>
|
<value>(968, 624)</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_rotation</key>
|
<key>_rotation</key>
|
||||||
|
@ -4072,11 +4072,19 @@ we shift the LO a little further</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>id</key>
|
<key>id</key>
|
||||||
<value>satnogs_multi_format_msg_sink_0_0</value>
|
<value>satnogs_qb50_deframer_0</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>format</key>
|
<key>maxoutbuf</key>
|
||||||
<value>1</value>
|
<value>0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>minoutbuf</key>
|
||||||
|
<value>0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>wod_ssid</key>
|
||||||
|
<value>0xe</value>
|
||||||
</param>
|
</param>
|
||||||
</block>
|
</block>
|
||||||
<block>
|
<block>
|
||||||
|
@ -4099,7 +4107,7 @@ we shift the LO a little further</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_coordinate</key>
|
<key>_coordinate</key>
|
||||||
<value>(936, 598)</value>
|
<value>(728, 670)</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_rotation</key>
|
<key>_rotation</key>
|
||||||
|
@ -4122,6 +4130,49 @@ we shift the LO a little further</value>
|
||||||
<value>send_port</value>
|
<value>send_port</value>
|
||||||
</param>
|
</param>
|
||||||
</block>
|
</block>
|
||||||
|
<block>
|
||||||
|
<key>satnogs_udp_msg_sink</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>(728, 598)</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_rotation</key>
|
||||||
|
<value>180</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>id</key>
|
||||||
|
<value>satnogs_udp_msg_sink_0_0_0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>addr</key>
|
||||||
|
<value>dest_addr</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>mtu</key>
|
||||||
|
<value>1500</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>port</key>
|
||||||
|
<value>wod_port</value>
|
||||||
|
</param>
|
||||||
|
</block>
|
||||||
<block>
|
<block>
|
||||||
<key>satnogs_udp_msg_source</key>
|
<key>satnogs_udp_msg_source</key>
|
||||||
<param>
|
<param>
|
||||||
|
@ -4321,7 +4372,7 @@ similar to produce dynamic payloads.</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_coordinate</key>
|
<key>_coordinate</key>
|
||||||
<value>(560, 806)</value>
|
<value>(648, 774)</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_rotation</key>
|
<key>_rotation</key>
|
||||||
|
@ -4348,6 +4399,49 @@ similar to produce dynamic payloads.</value>
|
||||||
<value>usrpb200</value>
|
<value>usrpb200</value>
|
||||||
</param>
|
</param>
|
||||||
</block>
|
</block>
|
||||||
|
<block>
|
||||||
|
<key>parameter</key>
|
||||||
|
<param>
|
||||||
|
<key>alias</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>comment</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_enabled</key>
|
||||||
|
<value>True</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_coordinate</key>
|
||||||
|
<value>(352, 846)</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_rotation</key>
|
||||||
|
<value>0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>id</key>
|
||||||
|
<value>wod_port</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>label</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>short_id</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>type</key>
|
||||||
|
<value>intx</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>value</key>
|
||||||
|
<value>5023</value>
|
||||||
|
</param>
|
||||||
|
</block>
|
||||||
<connection>
|
<connection>
|
||||||
<source_block_id>analog_frequency_modulator_fc_0</source_block_id>
|
<source_block_id>analog_frequency_modulator_fc_0</source_block_id>
|
||||||
<sink_block_id>pfb_arb_resampler_xxx_0</sink_block_id>
|
<sink_block_id>pfb_arb_resampler_xxx_0</sink_block_id>
|
||||||
|
@ -4416,14 +4510,20 @@ similar to produce dynamic payloads.</value>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
<connection>
|
||||||
<source_block_id>satnogs_ax25_decoder_bm_0</source_block_id>
|
<source_block_id>satnogs_ax25_decoder_bm_0</source_block_id>
|
||||||
<sink_block_id>satnogs_multi_format_msg_sink_0_0</sink_block_id>
|
<sink_block_id>satnogs_qb50_deframer_0</sink_block_id>
|
||||||
<source_key>pdu</source_key>
|
<source_key>pdu</source_key>
|
||||||
<sink_key>in</sink_key>
|
<sink_key>in</sink_key>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
<connection>
|
||||||
<source_block_id>satnogs_ax25_decoder_bm_0</source_block_id>
|
<source_block_id>satnogs_qb50_deframer_0</source_block_id>
|
||||||
<sink_block_id>satnogs_udp_msg_sink_0_0</sink_block_id>
|
<sink_block_id>satnogs_udp_msg_sink_0_0</sink_block_id>
|
||||||
<source_key>pdu</source_key>
|
<source_key>out</source_key>
|
||||||
|
<sink_key>in</sink_key>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<source_block_id>satnogs_qb50_deframer_0</source_block_id>
|
||||||
|
<sink_block_id>satnogs_udp_msg_sink_0_0_0</sink_block_id>
|
||||||
|
<source_key>wod</source_key>
|
||||||
<sink_key>in</sink_key>
|
<sink_key>in</sink_key>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
<connection>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# Title: Upsat Transceiver Cli
|
# Title: Upsat Transceiver Cli
|
||||||
# Author: Manolis Surligas (surligas@gmail.com)
|
# Author: Manolis Surligas (surligas@gmail.com)
|
||||||
# Description: SATNOGS transceiver for UPSAT satellite
|
# Description: SATNOGS transceiver for UPSAT satellite
|
||||||
# Generated: Sun Jul 24 21:44:09 2016
|
# Generated: Wed Jul 27 17:36:54 2016
|
||||||
##################################################
|
##################################################
|
||||||
|
|
||||||
from gnuradio import analog
|
from gnuradio import analog
|
||||||
|
@ -27,7 +27,7 @@ import time
|
||||||
|
|
||||||
class upsat_transceiver_cli(gr.top_block):
|
class upsat_transceiver_cli(gr.top_block):
|
||||||
|
|
||||||
def __init__(self, bind_addr="0.0.0.0", dest_addr="127.0.0.1", lo_offset=100e3, recv_port=16886, rx_sdr_device="usrpb200", send_port=5022, tx_sdr_device="usrpb200"):
|
def __init__(self, bind_addr="0.0.0.0", dest_addr="127.0.0.1", recv_port=16886, send_port=5022, tx_sdr_device="usrpb200", rx_sdr_device="usrpb200", lo_offset=100e3, wod_port=5023):
|
||||||
gr.top_block.__init__(self, "Upsat Transceiver Cli")
|
gr.top_block.__init__(self, "Upsat Transceiver Cli")
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
|
@ -35,11 +35,12 @@ class upsat_transceiver_cli(gr.top_block):
|
||||||
##################################################
|
##################################################
|
||||||
self.bind_addr = bind_addr
|
self.bind_addr = bind_addr
|
||||||
self.dest_addr = dest_addr
|
self.dest_addr = dest_addr
|
||||||
self.lo_offset = lo_offset
|
|
||||||
self.recv_port = recv_port
|
self.recv_port = recv_port
|
||||||
self.rx_sdr_device = rx_sdr_device
|
|
||||||
self.send_port = send_port
|
self.send_port = send_port
|
||||||
self.tx_sdr_device = tx_sdr_device
|
self.tx_sdr_device = tx_sdr_device
|
||||||
|
self.rx_sdr_device = rx_sdr_device
|
||||||
|
self.lo_offset = lo_offset
|
||||||
|
self.wod_port = wod_port
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
# Variables
|
# Variables
|
||||||
|
@ -66,8 +67,9 @@ class upsat_transceiver_cli(gr.top_block):
|
||||||
##################################################
|
##################################################
|
||||||
self.satnogs_upsat_fsk_frame_encoder_0 = satnogs.upsat_fsk_frame_encoder([0x33]*8 , [0x7A, 0x0E], False, False, False, True, True, "ABCD", 0, "ON02GR", 0, 64)
|
self.satnogs_upsat_fsk_frame_encoder_0 = satnogs.upsat_fsk_frame_encoder([0x33]*8 , [0x7A, 0x0E], False, False, False, True, True, "ABCD", 0, "ON02GR", 0, 64)
|
||||||
self.satnogs_udp_msg_source_0 = satnogs.udp_msg_source(bind_addr, recv_port, 1500)
|
self.satnogs_udp_msg_source_0 = satnogs.udp_msg_source(bind_addr, recv_port, 1500)
|
||||||
|
self.satnogs_udp_msg_sink_0_0_0 = satnogs.udp_msg_sink(dest_addr, wod_port, 1500)
|
||||||
self.satnogs_udp_msg_sink_0_0 = satnogs.udp_msg_sink(dest_addr, send_port, 1500)
|
self.satnogs_udp_msg_sink_0_0 = satnogs.udp_msg_sink(dest_addr, send_port, 1500)
|
||||||
self.satnogs_multi_format_msg_sink_0_0 = satnogs.multi_format_msg_sink(1)
|
self.satnogs_qb50_deframer_0 = satnogs.qb50_deframer(0xe)
|
||||||
self.satnogs_ax25_decoder_bm_0 = satnogs.ax25_decoder_bm('GND', 0, False, True, 256)
|
self.satnogs_ax25_decoder_bm_0 = satnogs.ax25_decoder_bm('GND', 0, False, True, 256)
|
||||||
self.pfb_arb_resampler_xxx_0 = pfb.arb_resampler_ccf(
|
self.pfb_arb_resampler_xxx_0 = pfb.arb_resampler_ccf(
|
||||||
samp_rate_tx / (baud_rate * samples_per_symbol_tx),
|
samp_rate_tx / (baud_rate * samples_per_symbol_tx),
|
||||||
|
@ -111,8 +113,9 @@ class upsat_transceiver_cli(gr.top_block):
|
||||||
##################################################
|
##################################################
|
||||||
# Connections
|
# Connections
|
||||||
##################################################
|
##################################################
|
||||||
self.msg_connect((self.satnogs_ax25_decoder_bm_0, 'pdu'), (self.satnogs_multi_format_msg_sink_0_0, 'in'))
|
self.msg_connect((self.satnogs_ax25_decoder_bm_0, 'pdu'), (self.satnogs_qb50_deframer_0, 'in'))
|
||||||
self.msg_connect((self.satnogs_ax25_decoder_bm_0, 'pdu'), (self.satnogs_udp_msg_sink_0_0, 'in'))
|
self.msg_connect((self.satnogs_qb50_deframer_0, 'out'), (self.satnogs_udp_msg_sink_0_0, 'in'))
|
||||||
|
self.msg_connect((self.satnogs_qb50_deframer_0, 'wod'), (self.satnogs_udp_msg_sink_0_0_0, 'in'))
|
||||||
self.msg_connect((self.satnogs_udp_msg_source_0, 'msg'), (self.satnogs_upsat_fsk_frame_encoder_0, 'pdu'))
|
self.msg_connect((self.satnogs_udp_msg_source_0, 'msg'), (self.satnogs_upsat_fsk_frame_encoder_0, 'pdu'))
|
||||||
self.connect((self.analog_frequency_modulator_fc_0, 0), (self.pfb_arb_resampler_xxx_0, 0))
|
self.connect((self.analog_frequency_modulator_fc_0, 0), (self.pfb_arb_resampler_xxx_0, 0))
|
||||||
self.connect((self.analog_quadrature_demod_cf_0_0, 0), (self.digital_clock_recovery_mm_xx_0, 0))
|
self.connect((self.analog_quadrature_demod_cf_0_0, 0), (self.digital_clock_recovery_mm_xx_0, 0))
|
||||||
|
@ -138,34 +141,12 @@ class upsat_transceiver_cli(gr.top_block):
|
||||||
def set_dest_addr(self, dest_addr):
|
def set_dest_addr(self, dest_addr):
|
||||||
self.dest_addr = dest_addr
|
self.dest_addr = dest_addr
|
||||||
|
|
||||||
def get_lo_offset(self):
|
|
||||||
return self.lo_offset
|
|
||||||
|
|
||||||
def set_lo_offset(self, lo_offset):
|
|
||||||
self.lo_offset = lo_offset
|
|
||||||
self.analog_sig_source_x_0.set_frequency(self.lo_offset )
|
|
||||||
self.osmosdr_sink_0.set_center_freq(self.tx_frequency - self.lo_offset, 0)
|
|
||||||
self.osmosdr_source_0.set_center_freq(self.rx_frequency - self.lo_offset, 0)
|
|
||||||
self.freq_xlating_fir_filter_xxx_0.set_center_freq(self.lo_offset)
|
|
||||||
|
|
||||||
def get_recv_port(self):
|
def get_recv_port(self):
|
||||||
return self.recv_port
|
return self.recv_port
|
||||||
|
|
||||||
def set_recv_port(self, recv_port):
|
def set_recv_port(self, recv_port):
|
||||||
self.recv_port = recv_port
|
self.recv_port = recv_port
|
||||||
|
|
||||||
def get_rx_sdr_device(self):
|
|
||||||
return self.rx_sdr_device
|
|
||||||
|
|
||||||
def set_rx_sdr_device(self, rx_sdr_device):
|
|
||||||
self.rx_sdr_device = rx_sdr_device
|
|
||||||
self.set_samp_rate_rx(satnogs.hw_rx_settings[self.rx_sdr_device]['samp_rate'])
|
|
||||||
self.set_samp_rate_tx(satnogs.hw_tx_settings[self.rx_sdr_device]['samp_rate'])
|
|
||||||
self.osmosdr_source_0.set_gain(satnogs.hw_rx_settings[self.rx_sdr_device]['rf_gain'], 0)
|
|
||||||
self.osmosdr_source_0.set_if_gain(satnogs.hw_rx_settings[self.rx_sdr_device]['if_gain'], 0)
|
|
||||||
self.osmosdr_source_0.set_bb_gain(satnogs.hw_rx_settings[self.rx_sdr_device]['bb_gain'], 0)
|
|
||||||
self.osmosdr_source_0.set_antenna(satnogs.hw_rx_settings[self.rx_sdr_device]['antenna'], 0)
|
|
||||||
|
|
||||||
def get_send_port(self):
|
def get_send_port(self):
|
||||||
return self.send_port
|
return self.send_port
|
||||||
|
|
||||||
|
@ -182,6 +163,34 @@ class upsat_transceiver_cli(gr.top_block):
|
||||||
self.osmosdr_sink_0.set_bb_gain(satnogs.hw_tx_settings[self.tx_sdr_device]['bb_gain'], 0)
|
self.osmosdr_sink_0.set_bb_gain(satnogs.hw_tx_settings[self.tx_sdr_device]['bb_gain'], 0)
|
||||||
self.osmosdr_sink_0.set_antenna(satnogs.hw_tx_settings[self.tx_sdr_device]['antenna'], 0)
|
self.osmosdr_sink_0.set_antenna(satnogs.hw_tx_settings[self.tx_sdr_device]['antenna'], 0)
|
||||||
|
|
||||||
|
def get_rx_sdr_device(self):
|
||||||
|
return self.rx_sdr_device
|
||||||
|
|
||||||
|
def set_rx_sdr_device(self, rx_sdr_device):
|
||||||
|
self.rx_sdr_device = rx_sdr_device
|
||||||
|
self.osmosdr_source_0.set_gain(satnogs.hw_rx_settings[self.rx_sdr_device]['rf_gain'], 0)
|
||||||
|
self.osmosdr_source_0.set_if_gain(satnogs.hw_rx_settings[self.rx_sdr_device]['if_gain'], 0)
|
||||||
|
self.osmosdr_source_0.set_bb_gain(satnogs.hw_rx_settings[self.rx_sdr_device]['bb_gain'], 0)
|
||||||
|
self.osmosdr_source_0.set_antenna(satnogs.hw_rx_settings[self.rx_sdr_device]['antenna'], 0)
|
||||||
|
self.set_samp_rate_tx(satnogs.hw_tx_settings[self.rx_sdr_device]['samp_rate'])
|
||||||
|
self.set_samp_rate_rx(satnogs.hw_rx_settings[self.rx_sdr_device]['samp_rate'])
|
||||||
|
|
||||||
|
def get_lo_offset(self):
|
||||||
|
return self.lo_offset
|
||||||
|
|
||||||
|
def set_lo_offset(self, lo_offset):
|
||||||
|
self.lo_offset = lo_offset
|
||||||
|
self.analog_sig_source_x_0.set_frequency(self.lo_offset )
|
||||||
|
self.freq_xlating_fir_filter_xxx_0.set_center_freq(self.lo_offset)
|
||||||
|
self.osmosdr_sink_0.set_center_freq(self.tx_frequency - self.lo_offset, 0)
|
||||||
|
self.osmosdr_source_0.set_center_freq(self.rx_frequency - self.lo_offset, 0)
|
||||||
|
|
||||||
|
def get_wod_port(self):
|
||||||
|
return self.wod_port
|
||||||
|
|
||||||
|
def set_wod_port(self, wod_port):
|
||||||
|
self.wod_port = wod_port
|
||||||
|
|
||||||
def get_samples_per_symbol_tx(self):
|
def get_samples_per_symbol_tx(self):
|
||||||
return self.samples_per_symbol_tx
|
return self.samples_per_symbol_tx
|
||||||
|
|
||||||
|
@ -235,9 +244,9 @@ class upsat_transceiver_cli(gr.top_block):
|
||||||
def set_baud_rate(self, baud_rate):
|
def set_baud_rate(self, baud_rate):
|
||||||
self.baud_rate = baud_rate
|
self.baud_rate = baud_rate
|
||||||
self.set_modulation_index(self.deviation / (self.baud_rate / 2.0))
|
self.set_modulation_index(self.deviation / (self.baud_rate / 2.0))
|
||||||
self.pfb_arb_resampler_xxx_0.set_rate(self.samp_rate_tx / (self.baud_rate * self.samples_per_symbol_tx))
|
|
||||||
self.analog_quadrature_demod_cf_0_0.set_gain(((self.first_stage_samp_rate_rx) / self.baud_rate)/(math.pi*self.modulation_index))
|
self.analog_quadrature_demod_cf_0_0.set_gain(((self.first_stage_samp_rate_rx) / self.baud_rate)/(math.pi*self.modulation_index))
|
||||||
self.digital_clock_recovery_mm_xx_0.set_omega(self.first_stage_samp_rate_rx/self.baud_rate)
|
self.digital_clock_recovery_mm_xx_0.set_omega(self.first_stage_samp_rate_rx/self.baud_rate)
|
||||||
|
self.pfb_arb_resampler_xxx_0.set_rate(self.samp_rate_tx / (self.baud_rate * self.samples_per_symbol_tx))
|
||||||
|
|
||||||
def get_tx_frequency(self):
|
def get_tx_frequency(self):
|
||||||
return self.tx_frequency
|
return self.tx_frequency
|
||||||
|
@ -259,9 +268,9 @@ class upsat_transceiver_cli(gr.top_block):
|
||||||
def set_samp_rate_tx(self, samp_rate_tx):
|
def set_samp_rate_tx(self, samp_rate_tx):
|
||||||
self.samp_rate_tx = samp_rate_tx
|
self.samp_rate_tx = samp_rate_tx
|
||||||
self.analog_sig_source_x_0.set_sampling_freq(self.samp_rate_tx)
|
self.analog_sig_source_x_0.set_sampling_freq(self.samp_rate_tx)
|
||||||
self.pfb_arb_resampler_xxx_0.set_rate(self.samp_rate_tx / (self.baud_rate * self.samples_per_symbol_tx))
|
|
||||||
self.osmosdr_sink_0.set_sample_rate(self.samp_rate_tx)
|
self.osmosdr_sink_0.set_sample_rate(self.samp_rate_tx)
|
||||||
self.osmosdr_sink_0.set_bandwidth(self.samp_rate_tx, 0)
|
self.osmosdr_sink_0.set_bandwidth(self.samp_rate_tx, 0)
|
||||||
|
self.pfb_arb_resampler_xxx_0.set_rate(self.samp_rate_tx / (self.baud_rate * self.samples_per_symbol_tx))
|
||||||
|
|
||||||
def get_rx_frequency(self):
|
def get_rx_frequency(self):
|
||||||
return self.rx_frequency
|
return self.rx_frequency
|
||||||
|
@ -302,21 +311,24 @@ def argument_parser():
|
||||||
parser.add_option(
|
parser.add_option(
|
||||||
"", "--dest-addr", dest="dest_addr", type="string", default="127.0.0.1",
|
"", "--dest-addr", dest="dest_addr", type="string", default="127.0.0.1",
|
||||||
help="Set dest_addr [default=%default]")
|
help="Set dest_addr [default=%default]")
|
||||||
parser.add_option(
|
|
||||||
"", "--lo-offset", dest="lo_offset", type="eng_float", default=eng_notation.num_to_str(100e3),
|
|
||||||
help="Set lo_offset [default=%default]")
|
|
||||||
parser.add_option(
|
parser.add_option(
|
||||||
"", "--recv-port", dest="recv_port", type="intx", default=16886,
|
"", "--recv-port", dest="recv_port", type="intx", default=16886,
|
||||||
help="Set recv_port [default=%default]")
|
help="Set recv_port [default=%default]")
|
||||||
parser.add_option(
|
|
||||||
"", "--rx-sdr-device", dest="rx_sdr_device", type="string", default="usrpb200",
|
|
||||||
help="Set rx_sdr_device [default=%default]")
|
|
||||||
parser.add_option(
|
parser.add_option(
|
||||||
"", "--send-port", dest="send_port", type="intx", default=5022,
|
"", "--send-port", dest="send_port", type="intx", default=5022,
|
||||||
help="Set send_port [default=%default]")
|
help="Set send_port [default=%default]")
|
||||||
parser.add_option(
|
parser.add_option(
|
||||||
"", "--tx-sdr-device", dest="tx_sdr_device", type="string", default="usrpb200",
|
"", "--tx-sdr-device", dest="tx_sdr_device", type="string", default="usrpb200",
|
||||||
help="Set tx_sdr_device [default=%default]")
|
help="Set tx_sdr_device [default=%default]")
|
||||||
|
parser.add_option(
|
||||||
|
"", "--rx-sdr-device", dest="rx_sdr_device", type="string", default="usrpb200",
|
||||||
|
help="Set rx_sdr_device [default=%default]")
|
||||||
|
parser.add_option(
|
||||||
|
"", "--lo-offset", dest="lo_offset", type="eng_float", default=eng_notation.num_to_str(100e3),
|
||||||
|
help="Set lo_offset [default=%default]")
|
||||||
|
parser.add_option(
|
||||||
|
"", "--wod-port", dest="wod_port", type="intx", default=5023,
|
||||||
|
help="Set wod_port [default=%default]")
|
||||||
return parser
|
return parser
|
||||||
|
|
||||||
|
|
||||||
|
@ -324,13 +336,8 @@ def main(top_block_cls=upsat_transceiver_cli, options=None):
|
||||||
if options is None:
|
if options is None:
|
||||||
options, _ = argument_parser().parse_args()
|
options, _ = argument_parser().parse_args()
|
||||||
|
|
||||||
tb = top_block_cls(bind_addr=options.bind_addr, dest_addr=options.dest_addr, lo_offset=options.lo_offset, recv_port=options.recv_port, rx_sdr_device=options.rx_sdr_device, send_port=options.send_port, tx_sdr_device=options.tx_sdr_device)
|
tb = top_block_cls(bind_addr=options.bind_addr, dest_addr=options.dest_addr, recv_port=options.recv_port, send_port=options.send_port, tx_sdr_device=options.tx_sdr_device, rx_sdr_device=options.rx_sdr_device, lo_offset=options.lo_offset, wod_port=options.wod_port)
|
||||||
tb.start()
|
tb.start()
|
||||||
try:
|
|
||||||
raw_input('Press Enter to quit: ')
|
|
||||||
except EOFError:
|
|
||||||
pass
|
|
||||||
tb.stop()
|
|
||||||
tb.wait()
|
tb.wait()
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1067,6 +1067,49 @@ is too great and becomes a bottlneck.</value>
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
</param>
|
</param>
|
||||||
</block>
|
</block>
|
||||||
|
<block>
|
||||||
|
<key>parameter</key>
|
||||||
|
<param>
|
||||||
|
<key>alias</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>comment</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_enabled</key>
|
||||||
|
<value>True</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_coordinate</key>
|
||||||
|
<value>(208, 918)</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_rotation</key>
|
||||||
|
<value>0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>id</key>
|
||||||
|
<value>dest_addr</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>label</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>short_id</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>type</key>
|
||||||
|
<value>string</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>value</key>
|
||||||
|
<value>127.0.0.1</value>
|
||||||
|
</param>
|
||||||
|
</block>
|
||||||
<block>
|
<block>
|
||||||
<key>digital_binary_slicer_fb</key>
|
<key>digital_binary_slicer_fb</key>
|
||||||
<param>
|
<param>
|
||||||
|
@ -4278,7 +4321,42 @@ is too great and becomes a bottlneck.</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_coordinate</key>
|
<key>_coordinate</key>
|
||||||
<value>(928, 860)</value>
|
<value>(1056, 916)</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_rotation</key>
|
||||||
|
<value>0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>id</key>
|
||||||
|
<value>satnogs_multi_format_msg_sink_0_0_0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>format</key>
|
||||||
|
<value>1</value>
|
||||||
|
</param>
|
||||||
|
</block>
|
||||||
|
<block>
|
||||||
|
<key>satnogs_qb50_deframer</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>True</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_coordinate</key>
|
||||||
|
<value>(1024, 792)</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_rotation</key>
|
<key>_rotation</key>
|
||||||
|
@ -4286,11 +4364,19 @@ is too great and becomes a bottlneck.</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>id</key>
|
<key>id</key>
|
||||||
<value>satnogs_multi_format_msg_sink_0_0</value>
|
<value>satnogs_qb50_deframer_0</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>format</key>
|
<key>maxoutbuf</key>
|
||||||
<value>1</value>
|
<value>0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>minoutbuf</key>
|
||||||
|
<value>0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>wod_ssid</key>
|
||||||
|
<value>0xe</value>
|
||||||
</param>
|
</param>
|
||||||
</block>
|
</block>
|
||||||
<block>
|
<block>
|
||||||
|
@ -4313,7 +4399,7 @@ is too great and becomes a bottlneck.</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_coordinate</key>
|
<key>_coordinate</key>
|
||||||
<value>(928, 766)</value>
|
<value>(744, 862)</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>_rotation</key>
|
<key>_rotation</key>
|
||||||
|
@ -4321,11 +4407,11 @@ is too great and becomes a bottlneck.</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>id</key>
|
<key>id</key>
|
||||||
<value>satnogs_udp_msg_sink_0_0</value>
|
<value>satnogs_udp_msg_sink_0_0_0</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>addr</key>
|
<key>addr</key>
|
||||||
<value>"10.0.10.10"</value>
|
<value>dest_addr</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>mtu</key>
|
<key>mtu</key>
|
||||||
|
@ -4333,7 +4419,50 @@ is too great and becomes a bottlneck.</value>
|
||||||
</param>
|
</param>
|
||||||
<param>
|
<param>
|
||||||
<key>port</key>
|
<key>port</key>
|
||||||
<value>5021</value>
|
<value>send_port</value>
|
||||||
|
</param>
|
||||||
|
</block>
|
||||||
|
<block>
|
||||||
|
<key>satnogs_udp_msg_sink</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>(744, 774)</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_rotation</key>
|
||||||
|
<value>180</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>id</key>
|
||||||
|
<value>satnogs_udp_msg_sink_0_0_0_0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>addr</key>
|
||||||
|
<value>dest_addr</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>mtu</key>
|
||||||
|
<value>1500</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>port</key>
|
||||||
|
<value>wod_port</value>
|
||||||
</param>
|
</param>
|
||||||
</block>
|
</block>
|
||||||
<block>
|
<block>
|
||||||
|
@ -4476,6 +4605,92 @@ similar to produce dynamic payloads.</value>
|
||||||
<value>False</value>
|
<value>False</value>
|
||||||
</param>
|
</param>
|
||||||
</block>
|
</block>
|
||||||
|
<block>
|
||||||
|
<key>parameter</key>
|
||||||
|
<param>
|
||||||
|
<key>alias</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>comment</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_enabled</key>
|
||||||
|
<value>True</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_coordinate</key>
|
||||||
|
<value>(24, 918)</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_rotation</key>
|
||||||
|
<value>0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>id</key>
|
||||||
|
<value>send_port</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>label</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>short_id</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>type</key>
|
||||||
|
<value>intx</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>value</key>
|
||||||
|
<value>5022</value>
|
||||||
|
</param>
|
||||||
|
</block>
|
||||||
|
<block>
|
||||||
|
<key>parameter</key>
|
||||||
|
<param>
|
||||||
|
<key>alias</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>comment</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_enabled</key>
|
||||||
|
<value>True</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_coordinate</key>
|
||||||
|
<value>(112, 918)</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>_rotation</key>
|
||||||
|
<value>0</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>id</key>
|
||||||
|
<value>wod_port</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>label</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>short_id</key>
|
||||||
|
<value></value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>type</key>
|
||||||
|
<value>intx</value>
|
||||||
|
</param>
|
||||||
|
<param>
|
||||||
|
<key>value</key>
|
||||||
|
<value>5023</value>
|
||||||
|
</param>
|
||||||
|
</block>
|
||||||
<connection>
|
<connection>
|
||||||
<source_block_id>analog_frequency_modulator_fc_0</source_block_id>
|
<source_block_id>analog_frequency_modulator_fc_0</source_block_id>
|
||||||
<sink_block_id>pfb_arb_resampler_xxx_0</sink_block_id>
|
<sink_block_id>pfb_arb_resampler_xxx_0</sink_block_id>
|
||||||
|
@ -4544,13 +4759,7 @@ similar to produce dynamic payloads.</value>
|
||||||
</connection>
|
</connection>
|
||||||
<connection>
|
<connection>
|
||||||
<source_block_id>satnogs_ax25_decoder_bm_0</source_block_id>
|
<source_block_id>satnogs_ax25_decoder_bm_0</source_block_id>
|
||||||
<sink_block_id>satnogs_multi_format_msg_sink_0_0</sink_block_id>
|
<sink_block_id>satnogs_qb50_deframer_0</sink_block_id>
|
||||||
<source_key>pdu</source_key>
|
|
||||||
<sink_key>in</sink_key>
|
|
||||||
</connection>
|
|
||||||
<connection>
|
|
||||||
<source_block_id>satnogs_ax25_decoder_bm_0</source_block_id>
|
|
||||||
<sink_block_id>satnogs_udp_msg_sink_0_0</sink_block_id>
|
|
||||||
<source_key>pdu</source_key>
|
<source_key>pdu</source_key>
|
||||||
<sink_key>in</sink_key>
|
<sink_key>in</sink_key>
|
||||||
</connection>
|
</connection>
|
||||||
|
@ -4560,6 +4769,30 @@ similar to produce dynamic payloads.</value>
|
||||||
<source_key>msg</source_key>
|
<source_key>msg</source_key>
|
||||||
<sink_key>pdu</sink_key>
|
<sink_key>pdu</sink_key>
|
||||||
</connection>
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<source_block_id>satnogs_qb50_deframer_0</source_block_id>
|
||||||
|
<sink_block_id>satnogs_multi_format_msg_sink_0_0_0</sink_block_id>
|
||||||
|
<source_key>out</source_key>
|
||||||
|
<sink_key>in</sink_key>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<source_block_id>satnogs_qb50_deframer_0</source_block_id>
|
||||||
|
<sink_block_id>satnogs_udp_msg_sink_0_0_0</sink_block_id>
|
||||||
|
<source_key>out</source_key>
|
||||||
|
<sink_key>in</sink_key>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<source_block_id>satnogs_qb50_deframer_0</source_block_id>
|
||||||
|
<sink_block_id>satnogs_multi_format_msg_sink_0_0_0</sink_block_id>
|
||||||
|
<source_key>wod</source_key>
|
||||||
|
<sink_key>in</sink_key>
|
||||||
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<source_block_id>satnogs_qb50_deframer_0</source_block_id>
|
||||||
|
<sink_block_id>satnogs_udp_msg_sink_0_0_0_0</sink_block_id>
|
||||||
|
<source_key>wod</source_key>
|
||||||
|
<sink_key>in</sink_key>
|
||||||
|
</connection>
|
||||||
<connection>
|
<connection>
|
||||||
<source_block_id>satnogs_udp_msg_source_0</source_block_id>
|
<source_block_id>satnogs_udp_msg_source_0</source_block_id>
|
||||||
<sink_block_id>satnogs_upsat_fsk_frame_encoder_0</sink_block_id>
|
<sink_block_id>satnogs_upsat_fsk_frame_encoder_0</sink_block_id>
|
||||||
|
|
|
@ -37,5 +37,6 @@ install(FILES
|
||||||
satnogs_coarse_doppler_correction_cc.xml
|
satnogs_coarse_doppler_correction_cc.xml
|
||||||
satnogs_debug_msg_source_raw.xml
|
satnogs_debug_msg_source_raw.xml
|
||||||
satnogs_ax25_encoder_mb.xml
|
satnogs_ax25_encoder_mb.xml
|
||||||
satnogs_ax25_decoder_bm.xml DESTINATION share/gnuradio/grc/blocks
|
satnogs_ax25_decoder_bm.xml
|
||||||
|
satnogs_qb50_deframer.xml DESTINATION share/gnuradio/grc/blocks
|
||||||
)
|
)
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<block>
|
||||||
|
<name>QB50 AX.25 Deframer</name>
|
||||||
|
<key>satnogs_qb50_deframer</key>
|
||||||
|
<category>satnogs</category>
|
||||||
|
<import>import satnogs</import>
|
||||||
|
<make>satnogs.qb50_deframer($wod_ssid)</make>
|
||||||
|
|
||||||
|
<param>
|
||||||
|
<name>WOD SSID</name>
|
||||||
|
<key>wod_ssid</key>
|
||||||
|
<value>0xe</value>
|
||||||
|
<type>int</type>
|
||||||
|
</param>
|
||||||
|
|
||||||
|
<sink>
|
||||||
|
<name>in</name>
|
||||||
|
<type>message</type>
|
||||||
|
</sink>
|
||||||
|
|
||||||
|
<source>
|
||||||
|
<name>out</name>
|
||||||
|
<type>message</type>
|
||||||
|
</source>
|
||||||
|
|
||||||
|
<source>
|
||||||
|
<name>wod</name>
|
||||||
|
<type>message</type>
|
||||||
|
</source>
|
||||||
|
|
||||||
|
</block>
|
|
@ -49,5 +49,6 @@ install(FILES
|
||||||
coarse_doppler_correction_cc.h
|
coarse_doppler_correction_cc.h
|
||||||
debug_msg_source_raw.h
|
debug_msg_source_raw.h
|
||||||
ax25_encoder_mb.h
|
ax25_encoder_mb.h
|
||||||
ax25_decoder_bm.h DESTINATION include/satnogs
|
ax25_decoder_bm.h
|
||||||
|
qb50_deframer.h DESTINATION include/satnogs
|
||||||
)
|
)
|
||||||
|
|
|
@ -133,6 +133,19 @@ namespace gr
|
||||||
return AX25_MIN_ADDR_LEN;
|
return AX25_MIN_ADDR_LEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the destination SSID of an AX.25 frame
|
||||||
|
* @param in the AX.25 frame buffer
|
||||||
|
* @return the destination SSID
|
||||||
|
*/
|
||||||
|
static inline uint8_t
|
||||||
|
ax25_get_dest_ssid(const uint8_t *in)
|
||||||
|
{
|
||||||
|
uint8_t ret;
|
||||||
|
ret = in[AX25_CALLSIGN_MAX_LEN];
|
||||||
|
return (ret >> 1) & 0b1111;
|
||||||
|
}
|
||||||
|
|
||||||
static inline size_t
|
static inline size_t
|
||||||
ax25_prepare_frame (uint8_t *out, const uint8_t *info, size_t info_len,
|
ax25_prepare_frame (uint8_t *out, const uint8_t *info, size_t info_len,
|
||||||
ax25_frame_type_t type, uint8_t *addr, size_t addr_len,
|
ax25_frame_type_t type, uint8_t *addr, size_t addr_len,
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
/* -*- c++ -*- */
|
||||||
|
/*
|
||||||
|
* gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
|
||||||
|
*
|
||||||
|
* Copyright (C) 2016, Libre Space Foundation <http://librespacefoundation.org/>
|
||||||
|
*
|
||||||
|
* This program 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 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef INCLUDED_SATNOGS_QB50_DEFRAMER_H
|
||||||
|
#define INCLUDED_SATNOGS_QB50_DEFRAMER_H
|
||||||
|
|
||||||
|
#include <satnogs/api.h>
|
||||||
|
#include <gnuradio/block.h>
|
||||||
|
|
||||||
|
namespace gr
|
||||||
|
{
|
||||||
|
namespace satnogs
|
||||||
|
{
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Parses the received AX.25 and separates the
|
||||||
|
* telecommand and control frames from the WOD frames.
|
||||||
|
* \ingroup satnogs
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
class SATNOGS_API qb50_deframer : virtual public gr::block
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef boost::shared_ptr<qb50_deframer> sptr;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Parses the received AX.25 and separates the
|
||||||
|
* telecommand and control frames from the WOD frames.
|
||||||
|
*
|
||||||
|
* @param wod_ssid the SSID that separates the WOD frames from the others
|
||||||
|
*/
|
||||||
|
static sptr
|
||||||
|
make (uint8_t wod_ssid);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace satnogs
|
||||||
|
} // namespace gr
|
||||||
|
|
||||||
|
#endif /* INCLUDED_SATNOGS_QB50_DEFRAMER_H */
|
||||||
|
|
|
@ -47,7 +47,8 @@ list(APPEND satnogs_sources
|
||||||
coarse_doppler_correction_cc_impl.cc
|
coarse_doppler_correction_cc_impl.cc
|
||||||
debug_msg_source_raw_impl.cc
|
debug_msg_source_raw_impl.cc
|
||||||
ax25_encoder_mb_impl.cc
|
ax25_encoder_mb_impl.cc
|
||||||
ax25_decoder_bm_impl.cc )
|
ax25_decoder_bm_impl.cc
|
||||||
|
qb50_deframer_impl.cc )
|
||||||
|
|
||||||
set(satnogs_sources "${satnogs_sources}" PARENT_SCOPE)
|
set(satnogs_sources "${satnogs_sources}" PARENT_SCOPE)
|
||||||
if(NOT satnogs_sources)
|
if(NOT satnogs_sources)
|
||||||
|
|
|
@ -313,13 +313,10 @@ namespace gr
|
||||||
| d_frame_buffer[d_received_bytes - 2];
|
| d_frame_buffer[d_received_bytes - 2];
|
||||||
|
|
||||||
if (fcs == recv_fcs) {
|
if (fcs == recv_fcs) {
|
||||||
/*
|
|
||||||
* FIXME: Skip the right amount of header bytes based on the frame type
|
|
||||||
*/
|
|
||||||
message_port_pub (
|
message_port_pub (
|
||||||
pmt::mp ("pdu"),
|
pmt::mp ("pdu"),
|
||||||
pmt::make_blob (d_frame_buffer + AX25_MIN_ADDR_LEN + 2,
|
pmt::make_blob (d_frame_buffer,
|
||||||
d_received_bytes - AX25_MIN_ADDR_LEN - 2 - sizeof(uint16_t)));
|
d_received_bytes - sizeof(uint16_t)));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
message_port_pub (
|
message_port_pub (
|
||||||
|
|
|
@ -0,0 +1,95 @@
|
||||||
|
/* -*- c++ -*- */
|
||||||
|
/*
|
||||||
|
* gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
|
||||||
|
*
|
||||||
|
* Copyright (C) 2016, Libre Space Foundation <http://librespacefoundation.org/>
|
||||||
|
*
|
||||||
|
* This program 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 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "config.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <gnuradio/io_signature.h>
|
||||||
|
#include "qb50_deframer_impl.h"
|
||||||
|
#include <satnogs/ax25.h>
|
||||||
|
|
||||||
|
namespace gr
|
||||||
|
{
|
||||||
|
namespace satnogs
|
||||||
|
{
|
||||||
|
|
||||||
|
qb50_deframer::sptr
|
||||||
|
qb50_deframer::make (uint8_t wod_ssid)
|
||||||
|
{
|
||||||
|
return gnuradio::get_initial_sptr (new qb50_deframer_impl (wod_ssid));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
qb50_deframer_impl::msg_handler (pmt::pmt_t msg)
|
||||||
|
{
|
||||||
|
const uint8_t *frame;
|
||||||
|
uint8_t dest_ssid;
|
||||||
|
size_t frame_len;
|
||||||
|
|
||||||
|
frame = (const uint8_t *) pmt::blob_data(msg);
|
||||||
|
frame_len = pmt::blob_length(msg);
|
||||||
|
|
||||||
|
if(frame_len < AX25_MIN_ADDR_LEN){
|
||||||
|
LOG_ERROR("Invalid AX.25 frame size");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Get the destination SSID and decide in which port the frame should
|
||||||
|
* be forwarded. Also skip the leading headers and leave only the payload
|
||||||
|
*/
|
||||||
|
dest_ssid = ax25_get_dest_ssid(frame);
|
||||||
|
if(dest_ssid == d_wod_ssid){
|
||||||
|
message_port_pub (
|
||||||
|
pmt::mp ("wod"),
|
||||||
|
pmt::make_blob (frame + AX25_MIN_ADDR_LEN + 2,
|
||||||
|
frame_len - AX25_MIN_ADDR_LEN - 2));
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
message_port_pub (
|
||||||
|
pmt::mp ("out"),
|
||||||
|
pmt::make_blob (frame + AX25_MIN_ADDR_LEN + 2,
|
||||||
|
frame_len - AX25_MIN_ADDR_LEN - 2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The private constructor
|
||||||
|
*/
|
||||||
|
qb50_deframer_impl::qb50_deframer_impl(uint8_t wod_ssid)
|
||||||
|
: gr::block("qb50_deframer",
|
||||||
|
gr::io_signature::make(0, 0, 0),
|
||||||
|
gr::io_signature::make(0, 0, 0)),
|
||||||
|
d_wod_ssid(wod_ssid)
|
||||||
|
{
|
||||||
|
message_port_register_in(pmt::mp("in"));
|
||||||
|
message_port_register_out(pmt::mp("out"));
|
||||||
|
message_port_register_out(pmt::mp("wod"));
|
||||||
|
|
||||||
|
set_msg_handler (
|
||||||
|
pmt::mp ("in"),
|
||||||
|
boost::bind (&qb50_deframer_impl::msg_handler, this, _1));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} /* namespace satnogs */
|
||||||
|
} /* namespace gr */
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
/* -*- c++ -*- */
|
||||||
|
/*
|
||||||
|
* gr-satnogs: SatNOGS GNU Radio Out-Of-Tree Module
|
||||||
|
*
|
||||||
|
* Copyright (C) 2016, Libre Space Foundation <http://librespacefoundation.org/>
|
||||||
|
*
|
||||||
|
* This program 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 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef INCLUDED_SATNOGS_QB50_DEFRAMER_IMPL_H
|
||||||
|
#define INCLUDED_SATNOGS_QB50_DEFRAMER_IMPL_H
|
||||||
|
|
||||||
|
#include <satnogs/qb50_deframer.h>
|
||||||
|
|
||||||
|
namespace gr
|
||||||
|
{
|
||||||
|
namespace satnogs
|
||||||
|
{
|
||||||
|
|
||||||
|
class qb50_deframer_impl : public qb50_deframer
|
||||||
|
{
|
||||||
|
private:
|
||||||
|
const uint8_t d_wod_ssid;
|
||||||
|
|
||||||
|
void msg_handler(pmt::pmt_t msg);
|
||||||
|
|
||||||
|
public:
|
||||||
|
qb50_deframer_impl (uint8_t wod_ssid);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace satnogs
|
||||||
|
} // namespace gr
|
||||||
|
|
||||||
|
#endif /* INCLUDED_SATNOGS_QB50_DEFRAMER_IMPL_H */
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
#include "satnogs/debug_msg_source_raw.h"
|
#include "satnogs/debug_msg_source_raw.h"
|
||||||
#include "satnogs/ax25_encoder_mb.h"
|
#include "satnogs/ax25_encoder_mb.h"
|
||||||
#include "satnogs/ax25_decoder_bm.h"
|
#include "satnogs/ax25_decoder_bm.h"
|
||||||
|
#include "satnogs/qb50_deframer.h"
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
||||||
|
@ -75,3 +76,5 @@ GR_SWIG_BLOCK_MAGIC2(satnogs, debug_msg_source_raw);
|
||||||
GR_SWIG_BLOCK_MAGIC2(satnogs, ax25_encoder_mb);
|
GR_SWIG_BLOCK_MAGIC2(satnogs, ax25_encoder_mb);
|
||||||
%include "satnogs/ax25_decoder_bm.h"
|
%include "satnogs/ax25_decoder_bm.h"
|
||||||
GR_SWIG_BLOCK_MAGIC2(satnogs, ax25_decoder_bm);
|
GR_SWIG_BLOCK_MAGIC2(satnogs, ax25_decoder_bm);
|
||||||
|
%include "satnogs/qb50_deframer.h"
|
||||||
|
GR_SWIG_BLOCK_MAGIC2(satnogs, qb50_deframer);
|
||||||
|
|
Loading…
Reference in New Issue