# Access code detection threshold in benchmark tx/rx scripts

**URL:** <https://www.ruby-forum.com/t/access-code-detection-threshold-in-benchmark-tx-rx-scripts/229751>\
**Category:** GNU Radio\
**Created:** [February 15, 2013, 3:03am UTC](https://www.ruby-forum.com/t/access-code-detection-threshold-in-benchmark-tx-rx-scripts/229751 "2013-02-15T03:03:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NowlanS\_Sean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f05b48/32.png) [@NowlanS\_Sean](https://www.ruby-forum.com/u/NowlanS_Sean)\
**Post date:** [February 15, 2013, 3:03am UTC](https://www.ruby-forum.com/t/access-code-detection-threshold-in-benchmark-tx-rx-scripts/229751/1 "2013-02-15T03:03:16Z")

</div>

I’m trying to understand the benchmark receive path. The access code  
detection threshold is set to -1 in receive\_path.py. After looking at  
the digital\_correlate\_access\_code\_bb block, it appears the INT32  
threshold, -1, is being compared with the _UINT32_ Hamming distance  
between the known code and the received code. If I’m not mistaken, C/C++  
will do unsigned comparison and therefore _any_ number of errors \<  
UINT32\_MAX (2^32 - 1) will be accepted. Am I reading this incorrectly?

–sean

---

<div class="post-metadata">

**Author:** ![NowlanS\_Sean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f05b48/32.png) [@NowlanS\_Sean](https://www.ruby-forum.com/u/NowlanS_Sean)\
**Post date:** [February 15, 2013, 11:32am UTC](https://www.ruby-forum.com/t/access-code-detection-threshold-in-benchmark-tx-rx-scripts/229751/2 "2013-02-15T11:32:10Z")

</div>

Inside receive path you have packet\_demod block, which is hier block  
written i npython. Inside you can find that they assign positive value.

Nemanja

On Fri, Feb 15, 2013 at 3:02 AM, Nowlan, Sean

---

<div class="post-metadata">

**Author:** ![NowlanS\_Sean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/f05b48/32.png) [@NowlanS\_Sean](https://www.ruby-forum.com/u/NowlanS_Sean)\
**Post date:** [February 15, 2013, 3:04pm UTC](https://www.ruby-forum.com/t/access-code-detection-threshold-in-benchmark-tx-rx-scripts/229751/3 "2013-02-15T15:04:55Z")

</div>

> Inside receive path you have packet\_demod block, which is hier block written i  
> npython. Inside you can  
> find that they assign positive value.

Ah, just found it.

gnuradio/gr-digital/python/pkt.py lines 140-141 in class demod\_pkts:

if threshold == -1:  
threshold = 12

Thanks for pointing this out.

> Nemanja

–sean
