0
  • 聊天消息
  • 系统消息
  • 评论与回复
登录后你可以
  • 下载海量资料
  • 学习在线课程
  • 观看技术视频
  • 写文章/发帖/加入社区
会员中心
创作中心

完善资料让更多小伙伴认识你,还能领取20积分哦,立即完善>

3天内不再提示

NanoBeacon™ BLE扫描器教程(第二部分)

橙群微电子 2023-06-07 10:51 次阅读
加入交流群
微信小助手二维码

扫码添加小助手

加入工程师交流群

在本系列的上一篇教程中,我们介绍了最近发布的NanoBeacon BLE扫描器移动应用程序,包括移动应用程序的概述、从哪里安装、如何使用它从NanoBeacon 配置工具桌面应用程序导入IN100配置等。


In this tutorial, we will cover the following:

在本教程中,我们将介绍以下内容:

A detailed look into device filters

对设备过滤器的详细了解

Differences between the iOS and Android versions of the app

该应用程序的iOS和Android版本之间的差异

Let’s get started!

让我们开始吧!


Device Filters 设备过滤器

Here’s a look at the various filters available within the app for filtering for specific devices:

下面我们来看看应用程序中可用于过滤特定设备的各种过滤器:


dd976f78-ff4a-11ed-ba01-dac502259ad0.png

To recap, the available filters are:

简而言之,可用的过滤器是:

Name: this allows you to filter by device name.

名称:这允许你按设备名称过滤。

Advanced: allows you to filter by raw data included in the advertising data, company name, etc.

高级:允许你按广播数据中包含的原始数据、公司名称等进行过滤。

On Android, filtering by Bluetooth Address is possible (iOS does not expose the device’s Bluetooth address).

在安卓系统上,可以通过蓝牙地址进行过滤(iOS系统不暴露设备的蓝牙地址)。

Minimum RSSI: this allows you to filter out devices that are discovered with an RSSI lower than the set value.

最小RSSI:这允许你过滤掉那些发现的RSSI低于设定值的设备。

Hide unnamed devices: this allows you to hide devices that donotadvertise a device name.

隐藏未命名的设备:这允许你隐藏那些没有公布设备名称的设备。

Only show project configuration matches:this allows you to show only devices that match the imported IN100 configuration (via scanning the QR code from the NanoBeacon Config Tool app).

只显示项目配置匹配:这允许你只显示与导入的IN100配置匹配的设备(通过扫描NanoBeacon配置工具应用程序的QR码)。

Sort by RSSI: this allows you to sort the list of devices by detected RSSI (starting with the device with the strongest signal).

按RSSI排序: 这允许你按检测到的RSSI对设备列表进行排序(从信号最强的设备开始)。

Type:allows you to show any combination of iBeacon, Eddystone UID, and Eddystone TLM advertising devices (while excluding other non-selected devices), as shown below:

类型:允许你显示iBeacon、Eddystone UID和Eddystone TLM广播设备的任何组合(同时排除其他未选择的设备),如下所示:

ddab61b8-ff4a-11ed-ba01-dac502259ad0.png

Let’s dig into each of these in more detail.

让我们更详细地挖掘其中的每一点。


Device Name and Unnamed Devices

设备名称和未命名的设备


When scanning for advertising BLE devices, you will typically see dozens of devices being discovered. This can make it challenging to find the device of interest. To address this (and if you know the device name), you can type in a portion of the device name (case-sensitive), and the scanner will only display the devices that match the entered device name.

在扫描广播BLE设备时,你通常会看到有几十个设备被发现。这可能会使找到感兴趣的设备成为一种挑战。为了解决这个问题(如果您知道设备名称),您可以输入设备名称的一部分(区分大小写),扫描器将只显示与输入的设备名称相符的设备。


For example, here I’ve set up an IN100 with one advertising set (custom data type), and I’ve set the device name to be “IN100”:

例如,在这里我设置了一个IN100的广播集(自定义数据类型),我将设备名称设置为 "IN100":


ddb8f7a6-ff4a-11ed-ba01-dac502259ad0.png

In the scanner view, the device will show up but among tens of other devices, making it challenging to find. Let’s add a device name filter to make it easier to find:

在扫描器视图中,该设备将显示出来,但在几十个其他设备中,使其难以找到。让我们添加一个设备名称过滤器,使其更容易找到:


ddc759f4-ff4a-11ed-ba01-dac502259ad0.png

Once we enter the device name filter, we can click to the filter icon to go back to the scanner view. In the scanner view, we should be able to see the device now without all the other devices:

一旦我们输入了设备名称过滤器,我们就可以点击过滤器图标回到扫描仪视图。在扫描器视图中,我们现在应该能够看到这个设备,而没有其他所有的设备:


dddb3190-ff4a-11ed-ba01-dac502259ad0.png

This also works by entering partial strings, for example “IN”.

这也可以通过输入部分字符串来实现,例如 "IN"。


Another useful filter is the “Hide unnamed devices” checkbox. Once that’s checked, the scanner will only display devices that have included a device name in the advertising data:

另一个有用的过滤器是 "隐藏未命名的设备 "复选框。一旦选中,扫描器将只显示在广播数据中包含设备名称的设备:


ddf0ba1a-ff4a-11ed-ba01-dac502259ad0.png

Sorting by RSSI and Min RSSI

按RSSI和最小RSSI排序

Two other useful filters are the “Sort by RSSI” and “Minimum RSSI” filters.

另外两个有用的过滤器是 "按RSSI排序 "和 "最小RSSI "过滤器。

“Minimum RSSI” is helpful for filtering out devices that are too far and that typically add clutter to the scan results. For relatively nearby devices, we recommend discovering devices with an RSSI of -70 or greater. This will ensure you are only looking at devices that are in proximity to your smartphone.

"最小RSSI "有助于过滤掉太远的设备,这些设备通常会给扫描结果带来混乱。对于相对较近的设备,我们建议发现RSSI为-70或更高的设备。这将确保你只看到与你的智能手机相近的设备。

Once you’ve set the minimum RSSI, it is also helpful to utilize the “Sort by RSSI” filter, which allows you to see a sorted list of discovered devices starting with the highest RSSI.

一旦你设置了最低RSSI,利用 "按RSSI排序 "过滤器也是很有帮助的,它可以让你看到一个从最高RSSI开始的已发现设备的排序列表。

Here’s an example screenshot showing the results:

下面是一个显示结果的屏幕截图示例:


de021530-ff4a-11ed-ba01-dac502259ad0.png

As you can see, the devices are sorted by RSSI in descending order.

你可以看到,设备是按RSSI降序排序的。

Type Filter 类型过滤器

With the “Type” filter, you can ensure that only specific devices (iBeacon, Eddystone TLM, and Eddystone UID) are being listed in scanner view. You can select one or more of these types to show matching devices. The selected type is the only one that will be matched in the list. For example, selecting “Eddystone TLM” will only show Eddystone TLM advertising devices.

通过 "类型 "过滤器,你可以确保只有特定的设备(iBeacon、Eddystone TLM和Eddystone UID)被列在扫描仪视图中。你可以选择这些类型中的一个或多个来显示匹配的设备。所选的类型是列表中唯一会被匹配的类型。例如,选择 "Eddystone TLM "将只显示Eddystone TLM广播设备。


de12e9fa-ff4a-11ed-ba01-dac502259ad0.png

Note that all configured filters will be applied to the scan results. Also, there are certain restrictions on discovered iBeacon devices in the iOS version of the app. We’ll cover more on that in a later section within the tutorial.

请注意,所有配置的过滤器都将应用于扫描结果。另外,在iOS版本的应用程序中,对发现的iBeacon设备有一定的限制。我们将在本教程的后面一节中详细介绍。

“Only show project configuration matches” Filter

"仅显示项目配置匹配 "过滤器


The “Only show project configuration matches” filter is a unique feature of our NanoBeacon BLE Scanner mobile app. It allows you to only show devices that match the imported configuration from the NanoBeacon Config Tool.

"仅显示项目配置匹配 "过滤器是我们的NanoBeacon BLE扫描器移动应用程序的一个独特功能。它允许你只显示与从NanoBeacon配置工具导入的配置相匹配的设备。


This is a very powerful filter that will not only let you focus on analyzing your IN100 device’s advertising data but also view it in a human-readable format, which no other mobile app on the market can do!

这是一个非常强大的过滤器,不仅可以让你专注于分析IN100设备的广播数据,还可以以人类可读的格式查看,这是市场上其他移动应用程序所不能做到的!


We covered how to import configurations via the QR code scan functionality in theprevious tutorial in this series.

我们在本系列的上一篇教程中介绍了如何通过二维码扫描功能导入配置。


After importing the configuration and selecting this filter, the scanner will only show your device:

导入配置并选择该过滤器后,扫描仪将只显示你的设备:


de267524-ff4a-11ed-ba01-dac502259ad0.png

And to make things even more user-friendly, you can navigate into each of the discovered advertising sets to view the detailed parsed advertising data:

为了使事情变得更加方便,你可以导航到每一个被发现的广播集,以查看详细的解析广播数据:

de42d8d6-ff4a-11ed-ba01-dac502259ad0.png

de63d04a-ff4a-11ed-ba01-dac502259ad0.png

de77526e-ff4a-11ed-ba01-dac502259ad0.png

Advanced Filters 高级过滤器


The last filter we want to cover is the “Advanced” entry field. This allows us to filter by:

我们要介绍的最后一个过滤器是 "高级 "条目栏。这使我们可以通过以下方式进行过滤:

Raw bytes in the advertising data (hex values)

广播数据中的原始字节(十六进制值)

Company ID (hex values)

公司ID (十六进制值)

Company Name (string values)

公司名称(字符串值)

Device Name as well (string values)

设备名称也是(字符串值)

Let’s take a look at an example of a discovered device and which parts can be matched using the Advanced Filter:

让我们来看看一个被发现的设备的例子,以及哪些部分可以用高级过滤器来匹配:


de866182-ff4a-11ed-ba01-dac502259ad0.png

As you can see, there are various types of filters that can help you match only the devices you’re interested in discovering and having show up in the list.

正如你所看到的,有各种类型的过滤器,可以帮助你只匹配你有兴趣发现并显示在列表中的设备。


Differences Between iOS and Android Versions of the App

应用程序的iOS和Android版本之间的差异

There are quite a few differences between iOS and Android when it comes to UI, the functionality and APIs available to apps, BLE behavior, etc.

在用户界面、应用程序可用的功能和API、BLE行为等方面,iOS和Android之间有相当多的差异。

It’s essential to be aware of these differences not just as a developer but also as a user of our mobile app. This will help you better understand how things work on each platform and are aware of any differences in behavior between the two that could affect your development and testing activities when working with BLE devices, specifically our NanoBeacon IN100.

不仅仅是作为一个开发者,而且作为我们的移动应用的用户,意识到这些差异是非常重要的。这将有助于你更好地了解每个平台上的工作方式,并意识到两者之间的任何行为差异,这可能会影响你在使用BLE设备时的开发和测试活动,特别是我们的NanoBeacon IN100。


Here’s a summary of the differences between the two platforms as it pertains to Bluetooth Low Energy functionality and the functionality of our NanoBeacon BLE Scanner mobile app:

以下是两个平台之间的差异总结,它涉及到蓝牙低能量功能和我们的NanoBeacon BLE扫描器移动应用程序的功能:


Advertisement Data 广播数据

iOS does not give apps visibility of the Bluetooth address, so it’s not possible to search by or view the Bluetooth address of the discovered device(s).

iOS不给应用程序提供蓝牙地址的可见性,所以不可能通过搜索或查看所发现设备的蓝牙地址。

iBeacons come through the Core Location framework on iOS and are reported once per second, so the adv interval cannot be estimated.

iBeacons通过iOS上的核心定位框架,每秒报告一次,所以无法估计广播时间间隔。

iOS does not provide access to the raw advertisement data, so user-defined data types are not supported.

iOS不提供对原始广播数据的访问,所以不支持用户定义的数据类型。

On iOS, it’s not possible to scan for unspecified iBeacons, and they will not show up in scan results unless you have scanned in a configuration that contains an iBeacon. The app registers the iBeacon when you load the configuration.

在iOS上,不可能扫描未指定的iBeacon,除非你在包含iBeacon的配置中进行了扫描,否则它们不会在扫描结果中显示出来。当你加载配置时,应用程序会注册iBeacon。

iOS will report iBeacons RSSI as 0 if iOS cannot determine the iBeacons proximity based on the TX power included in the iBeacon payload. The algorithm used by iOS is not public.

如果iOS无法根据iBeacon有效载荷中包含的发射功率确定iBeacon的距离,那么iOS将把iBeacons的RSSI报告为0。iOS使用的算法并不公开。

iOS will continue to report an iBeacon for up to 30 seconds after it has been powered down (or goes out of range).

在iBeacon断电(或超出范围)后,iOS将继续报告该iBeacon长达30秒。


General Scanning 一般扫描

iOS will miss more advertisement packets than Android when using a larger advertisement interval (greater than 1000 ms).

当使用较大的广播间隔(大于1000毫秒)时,iOS将比Android错过更多的广播数据包


Background Scanning 背景扫描

iOS does not allow continuous background scanning for advertisement data, with the exception of iBeacons.

除了iBeacons之外,iOS不允许对广播数据进行连续的后台扫描。

Android will allow continuous background scanning for all BLE advertisements.

Android将允许对所有BLE广播进行连续的后台扫描。


Notifications 通知

Android supports background notifications for all types of Triggered advertisements.

Android支持所有类型的Triggered广播的后台通知。

iOS only supports background notifications for Triggered iBeacon advertisements.

iOS只支持Triggered iBeacon广播的后台通知。


Conclusion 总结

And that’s it for this tutorial. We covered a lot of topics, including:

本教程到此结束。我们涵盖了很多主题,包括:

Device Filters:

设备过滤器:

Device Name

设备名称

Minimum RSSI

最小RSSI

Sort by RSSI

按RSSI排序

Hide Unnamed Devices

隐藏未命名的设备

Advanced Filters (raw data/bytes, text/strings, etc.)

高级过滤器(原始数据/字节、文本/字符串等)

Only Show Configuration Matches

只显示配置匹配的设备

Filter by Type (Eddystone TLM, Eddystone UID, and iBeacon)

按类型过滤(Eddystone TLM,Eddystone UID,和iBeacon)

The differences between the iOS and Android versions of the mobile app.

移动应用程序的iOS和Android版本之间的差异。


In the upcoming tutorials in the series, we will cover:

在接下来的系列教程中,我们将介绍:

How to export logging data for captured advertising sets and analyze them

如何为捕获的广播集导出记录数据并进行分析

App notifications for Triggered Advertising Mode advertising sets

触发式广播模式广播集的应用程序通知

The new NanoBeaconLib mobile app library (allows you to develop a custom IN100-interfacing mobile app in no time!)

新的NanoBeaconLib移动应用程序库(允许你在短时间内开发一个自定义的IN100界面的移动应用程序!)。

and more!

以及更多!

声明:本文内容及配图由入驻作者撰写或者入驻合作网站授权转载。文章观点仅代表作者本人,不代表电子发烧友网立场。文章及其配图仅供工程师学习之用,如有内容侵权或者其他违规问题,请联系本站处理。 举报投诉
  • BLE
    BLE
    +关注

    关注

    13

    文章

    804

    浏览量

    66563
  • 扫描器
    +关注

    关注

    0

    文章

    198

    浏览量

    12794
收藏 人收藏
加入交流群
微信小助手二维码

扫码添加小助手

加入工程师交流群

    评论

    相关推荐
    热点推荐

    深入了解TCA8424:低电压8x16键盘扫描器的技术剖析

    深入了解TCA8424:低电压8x16键盘扫描器的技术剖析 在当今的电子设备中,键盘输入是不可或缺的一部分。而TCA8424作为一款低电压8x16键盘扫描器,凭借其独特的特性和功能,在众多设备中得到
    的头像 发表于 01-30 17:20 823次阅读

    远景达LV4500R嵌入式维码扫描器:智能终端的高效解码利器

    在智能设备普及的当下,维码已成为信息交互、身份验证、移动支付的核心载体,嵌入式维码阅读的性能直接影响各类终端设备的使用体验。远景达LV4500R嵌入式维码
    的头像 发表于 01-21 14:44 282次阅读
    远景达LV4500R嵌入式<b class='flag-5'>二</b>维码<b class='flag-5'>扫描器</b>:智能终端的高效解码利器

    远景达LV3000H工业固定式扫描器:工业自动化的高效数据采集利器

    在智能制造与物流自动化加速推进的今天,工业固定式扫描器已成为生产效率提升的核心设备。远景达LV3000H工业固定式扫描器凭借硬核技术与广泛适配性,成为制造业、物流等领域的优选固定式条形码扫描器,为
    的头像 发表于 01-19 15:07 242次阅读
    远景达LV3000H工业固定式<b class='flag-5'>扫描器</b>:工业自动化的高效数据采集利器

    固态断路采用SiC JFET的四个理由

    性能。我们已介绍过浪涌电流、应对不断攀升的电力需求、为什么要使用固态断路。本文为系列教程的第二部分,将介绍SSCB 采用 SiC JFET 的四个理由。
    的头像 发表于 01-16 15:45 1.4w次阅读
    固态断路<b class='flag-5'>器</b>采用SiC JFET的四个理由

    汽车声学测量趋势洞察(

    在第一部分中,我们探讨了向1/4"传声的转变、电动汽车的低底噪型号以及专为恶劣测试条件而设计的坚固耐用传感。在第二部分中,我们重点关注可提高效率、降低设置复杂性并支持CFD验证和车
    的头像 发表于 11-04 09:02 289次阅读
    汽车声学测量趋势洞察(<b class='flag-5'>二</b>)

    PDA条码扫描器选购指南:仓储物流老板亲测5G手持终端推荐

    PDA条码扫描器是仓库物流的效率利器!本文从中小企业主视角,分享选购PDA条码扫描器的实战经验,涵盖5G全网通、IP67防护、续航等关键点,助你提升库存管理效率,降低出错率。适合仓储、快递、制造等场景,快来看详细评测!
    的头像 发表于 09-10 11:06 1586次阅读
    PDA条码<b class='flag-5'>扫描器</b>选购指南:仓储物流老板亲测5G手持终端推荐

    雷卯针对香橙派Orange Pi 5 Pro开发板防雷防静电方案

    第一部分 应用场景 高端平板、边缘计算、人工智能、云计算、AR/VR、智能安防、智能家居、Linux 桌面计算机、Linux 网络服务、Android 平板、Android 游戏机 第二部分 功能
    的头像 发表于 08-19 17:31 886次阅读
    雷卯针对香橙派Orange Pi 5 Pro开发板防雷防静电方案

    如何更好选择维码识别扫描器厂家?

    在采购维码识别扫描器时,选对厂家直接影响设备的使用效果和后续保障。想要找到靠谱的合作方,以下几个关键因素值得重点考量:▣产品品质是核心维码识别扫描器的品质直接决定了使用体验,这其中
    的头像 发表于 08-13 16:09 1098次阅读
    如何更好选择<b class='flag-5'>二</b>维码识别<b class='flag-5'>扫描器</b>厂家?

    维码固定式扫描器扫码演示,可读取多种码制的一维维码

    扫描器
    深圳市远景达物联网技术有限公司
    发布于 :2025年08月08日 15:57:28

    固定式条码扫描器能在条码移动情况下扫描吗?

    扫描器之所以能应对移动条码,核心在于其动态捕捉能力。这类设备通常搭载高帧率图像传感,主流产品的帧率可达30-120帧/秒,部分工业级设备甚至能达到200帧以上。高帧
    的头像 发表于 08-04 15:18 826次阅读
    固定式条码<b class='flag-5'>扫描器</b>能在条码移动情况下<b class='flag-5'>扫描</b>吗?

    提高篇——C语言核心技术(中文版)

    严谨的术语表介绍C语言;第二部分描述标准链接库;第三部分介绍GNU软件包中常用的编译和测试工具。 获取完整文档资料可下载附件哦!!!!如果内容有帮助可以关注、点赞、评论支持一下哦~
    发表于 06-13 16:39

    TI大学计划-电源篇

    本手册将分为以下几部分介绍信号链和电源相关的知识及 TI 产品在大学生创新活动中的应用: 第一部分:运算放大器的原理和设计; 第二部分:数据转换的原理和设计; 第三
    发表于 05-19 15:33

    如何用 Raspberry Pi 500 搭建家庭录音室?

    是时候安装并配置家庭录音室中高质量音频制作所需的软件了。这是来自《树莓派官方杂志》系列教程的第三部分,也是最后一部分。若想阅读整个系列教程,请先回顾第一部分(关于录音空间设置),再阅读第二部分
    的头像 发表于 05-18 08:33 1576次阅读
    如何用 Raspberry Pi 500 搭建家庭录音室?

    实用电子电路设计(全6本)—— 数字系统设计

    由于资料内存过大,分开上传,有需要的朋友可以去主页搜索下载哦~ 本文内容主要分为两部分: 第一部分是以数字技术的思维方法作为主体论述; 第二部分是从实践角度出发,对数字技术实际应用方法进行详细介绍
    发表于 05-15 15:25

    自助售货机内嵌扫描器应该要如何选用?

    随着移动支付和新零售的蓬勃发展,自助售货机作为"无人零售"的重要载体,正经历着智能化升级的浪潮。作为设备核心组件的内嵌扫描器,其性能表现直接影响着交易效率与用户体验。本文将从
    的头像 发表于 05-07 14:25 756次阅读
    自助售货机内嵌<b class='flag-5'>扫描器</b>应该要如何选用?