To communicate in ultrasound frequency band,I changed 1,Program ( originally used in RF band(2.4GHz) ) 2,Daughter board ( RFX2400 2.3-2.9 GHz Rx/Tx -> LFTX Daughterboard 0-30 MHz Tx & LFRX Daughterboard 0-30 MHz Rx ) 3,Antenna (VERT2450 Antenna -> directly connect Tx and Rx by cable without an attenuator)
but it didn't work well. The program is as follows, (Original Tx source code) from gnuradio import gr, blks2, packet_utils, usrp2 import time class my_top_block(gr.top_block): def __init__(self): gr.top_block.__init__(self) self.src = gr.message_source(gr.sizeof_char, 2) self.dbpsk = blks2.dbpsk_mod() self.sink = usrp2.sink_32fc("eth1") self.sink.set_center_freq(2.4e9) self.sink.set_interp(16) self.sink.set_gain(0.0001) self.connect(self.src, self.dbpsk, self.sink) def send_pkt(self): pkt = packet_utils.make_packet("12345", 2, 1, whitening=False) while True: msg = gr.message_from_string(pkt) self.src.msgq().insert_tail(msg) msg = gr.message(1) self.src.msgq().insert_tail(msg) if __name__ == "__main__": tb = my_top_block() tb.start() tb.send_pkt() tb.wait() (Original Rx source code) from gnuradio import gr, usrp2, blks2, packet_utils import threading class my_top_block(gr.top_block): def __init__(self): gr.top_block.__init__(self) self.src = usrp2.source_32fc("eth1") self.src.set_center_freq(2.4e9) self.src.set_decim(16) param = gr.firdes.low_pass(1.0, 2, 1.0, 0.5, gr.firdes.WIN_HANN) self.lpf = gr.fft_filter_ccc(1, param) self.dbpsk = blks2.dbpsk_demod() self.clt = gr.correlate_access_code_bb(packet_utils.default_access_code, 12) self.recvq = gr.msg_queue() self.sink = gr.framer_sink_1(self.recvq) self.connect(self.src, self.lpf, self.dbpsk, self.clt, self.sink) class my_watcher(threading.Thread): def __init__(self, recvq): threading.Thread.__init__(self) self.setDaemon(1) self.recvq = recvq def run(self): while True: msg = self.recvq.delete_head() ok, payload = packet_utils.unmake_packet(msg.to_string(), 0, False) print "payload =", payload if __name__ == "__main__": tb = my_top_block() w = my_watcher(tb.recvq) tb.start() w.start() tb.wait() and in running these two programs, the message ,"payload = 12345" is printed in a terminal window. and I changed (Tx) self.src = gr.message_source(gr.sizeof_char, 2) self.gmsk = blks2.dbpsk_mod(40, 0.35 ,True ,False,False) self.sink = usrp2.sink_32fc("eth1") self.sink.set_center_freq(50e3) self.sink.set_interp(512) self.sink.set_gain(0.001) (Rx) self.src.set_center_freq(50e3) self.src.set_decim(512) param = gr.firdes.low_pass(1.0, 2 (or40) , 1.0, 0.5, gr.firdes.WIN_HANN) self.lpf = gr.fft_filter_ccc(1, param) self.dbpsk = blks2.dbpsk_demod(40, 0.35,True,False,False) I tried to change bit rate to 5kHz(=100M/512(interp,decim)/40(sample per symbol)) and carrier frequency to 50kHz but it didn't work. Then I changed sample per symbol ,from 40 to 2. Then it worked roughly.(Occasionally The Message "12345" changed to "?2345" or "1234H" etc ....) I found that the higher sample per symbol was, the higher error rate was. Is the value of samle per symbol bad? Please give me some advice. Thanks in advance. Kazuki Murahashi.
_______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org https://lists.gnu.org/mailman/listinfo/discuss-gnuradio