常见泽1 发表于 2023-8-8 21:02

【ST NUCLEO-WBA52CG】第五篇 BLE测试2之 BLE APP测试

<div class='showpostmsg'><p>&nbsp;</p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;">好多年没有在玩蓝牙的板子了,这次拾起来,也不知道怎么玩,就来个基本的测试吧</span></span></p>

<p >&nbsp;</p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;">手里正好有个蓝牙小米手环BAND7,来做个蓝牙测试吧</span></span></p>

<p >&nbsp;</p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;">首先小米手环采用的芯片是Dialog Semiconductor-DA14706-低功耗蓝牙SOC芯片</span></span></p>

<p >&nbsp;</p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;"> &nbsp;</span></span></p>

<p >&nbsp;</p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;">而测评对象STM32WBA52的资料如下</span></span></p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;"> &nbsp;</span></span></p>

<p >&nbsp;</p>

<p >&nbsp;</p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;">看下发射功率的概念</span></span></p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;"> &nbsp;</span></span></p>

<p >&nbsp;</p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;">理论上应该STM32WBA52的传输距离更远,我们来测试一下,把两个东西放在一起</span></span></p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;"> &nbsp;</span></span></p>

<p >&nbsp;</p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;">打开BLE APP</span></span></p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;"> &nbsp;</span></span></p>

<p >&nbsp;</p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;"> &nbsp;</span></span></p>

<p >&nbsp;</p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;">离开数米,没有任何遮挡,两个APP都能识别到小米手环和STM32W</span></span></p>

<p >&nbsp;</p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;">从房间走出去,离开大概十米不到吧,继续测试</span></span></p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;"> &nbsp;</span></span></p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;"> &nbsp;</span></span></p>

<p >&nbsp;</p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;">两个APP都无法连接到STM32WBA</span></span></p>

<p >&nbsp;</p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;">很奇怪为什么呢?看下程序代码发射功率配置</span></span></p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;">/**</span></span></p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;">&nbsp;* Define Tx Power</span></span></p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;">&nbsp;*/</span></span></p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;">#define CFG_TX_POWER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (0x19) /* 0x19 &lt;=&gt; -0.3 dBm */</span></span></p>

<p >&nbsp;</p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;">ret = aci_hal_set_tx_power_level(1, CFG_TX_POWER);</span></span></p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;"> &nbsp;</span></span></p>

<p >&nbsp;</p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;">修改这个发射功率尝试</span></span></p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;"> &nbsp;</span></span></p>

<p ><span style="font-family:宋体;"><span style="font-size:16px;">不管怎么修改,貌似都是不如小米手环的强度,经常要么两个都搜不到,要么只能搜到小米手环</span></span></p>
</div><script>                                        var loginstr = '<div class="locked">查看本帖全部内容,请<a href="javascript:;"   style="color:#e60000" class="loginf">登录</a>或者<a href="https://bbs.eeworld.com.cn/member.php?mod=register_eeworld.php&action=wechat" style="color:#e60000" target="_blank">注册</a></div>';
                                       
                                        if(parseInt(discuz_uid)==0){
                                                                                                (function($){
                                                        var postHeight = getTextHeight(400);
                                                        $(".showpostmsg").html($(".showpostmsg").html());
                                                        $(".showpostmsg").after(loginstr);
                                                        $(".showpostmsg").css({height:postHeight,overflow:"hidden"});
                                                })(jQuery);
                                        }                </script><script type="text/javascript">(function(d,c){var a=d.createElement("script"),m=d.getElementsByTagName("script"),eewurl="//counter.eeworld.com.cn/pv/count/";a.src=eewurl+c;m.parentNode.insertBefore(a,m)})(document,523)</script>

ljj3166 发表于 2023-8-8 21:15

<p>看手册st的最大发射功率是小米的2倍多,可能天线性能有差别或者两者广播的模式不同。</p>

lugl4313820 发表于 2023-8-9 06:58

<p>这性能不错呀。</p>
页: [1]
查看完整版本: 【ST NUCLEO-WBA52CG】第五篇 BLE测试2之 BLE APP测试