Usually I do test with following commands.
$ ./benchmakr_tx.py -f 450e6 --tx-gain=30 -r 100e3 -S 10 -m psk (or gmsk) --tx-amplitude=0.02 (for a signal not being clipped)
Of course, I modified receive_path.py to have an appropriate carrier sensing threshold value:
# Carrier Sensing Blocks
alpha = 0.001
thresh = 30 # in dB, will have to adjust
self.probe = gr.probe_avg_mag_sqrd_c(thresh,alpha)
I changed thresh = 30 with thresh = -60 (it varies from 0 to -80 as I want)
So, everything is fine, but when I run programs, a PC on a rx side doesn't print
"ok = %5s pktno = %4d n_rcvd = %4d n_right = %4d" % (ok, pktno, n_rcvd, n_right)
which is in rx_callback()
When I modified following codes in receive_path.py:
# receiver
self.packet_receiver = \
digital.demod_pkts(self.demodulator,
access_code=None,
callback=self._rx_callback,
threshold=-1) # by default, threshold=-1 results into threshold=12
I changed threshold=-1 with threshold=x (x is some arbitrary negative integer except -1)
Then, rx_callback is properly invoked. However, CRC check fails and it prints
ok = False pktno = xxx n_rcvd = xxx n_right = xxx
and also throws an error like
(pktno,) = struct.unpack('!H', payload[0:2])
error: unpack requires a string argument of length 2
From all of these modification and results, I conclude that
a signal is not clipped and its spectrum looks good,
sensing a carrier is fine,
but it fails to correlate a signal with an access code which causes rx_callback keep silent
I'm confused because this basic and fundamental example doesn't work well...
please give me some advices
and I appreciate to all of you in advance
--
Seokseong Jeon, PhD Candidate
Communication & Networks Lab
IT Convergence Engineering (ITCE), POSTECH, Korea
+82 10 8338 1229, gee.songsong at gmail . com