Debug BLE application with nRF Sniffer+wireshark
1. Introduction
The nRF Bluetooth® Smart Sniffer is a tool for debugging Bluetooth low energy (BLE) applications. The sniffer can pick up (sniff) every packet between a selected peripheral and the central device it is communicating with, even when the link is encrypted. When developing a BLE solution, knowing what happens over-the-air between devices can help you isolate, debug and troubleshoot any potential issues.
nRFSniffer trace on Wireshark showing a advertising packets, and the connection established by an iPhone.
2. What you need to get started
Hardware
- An PCA10000 dongle or a nRF51 Evaluation board
- A PC computer running Windows 7 or later
How to set up the hardware
- Connect the hardware to a USB port.
- Place the hardware (PCA10000) close to the Peripheral and Central device.
Hardware setup, if you don’t have the USB extension cable, you can just plug the PCA10000 dongle directly into the USB port, make sure the PCA10000 is in the range of no more than 50 cm to the peripheral and the central.
Software
Download and unzip the following materials:
- nRF tools from www.nordicsemi.com. Download here: /media/uploads/nemovn/nrftools_6_0_0_installer.exe
- ble-sniffer_win_1.0.1_1111_Sniffer.exe found in ble-sniffer_<os>_<version>_Sniffer.zip. Download here: /media/uploads/nemovn/ble-sniffer_win_1.0.1.zip
- Wireshark from wireshark.org.
Download 64-bit version here: /media/uploads/nemovn/wireshark-win64-1.10.9.exe .
Download 32-bit version here: /media/uploads/nemovn/wireshark-win32-1.10.9.exe
Wireshark v1.10 is recommended. The latest Wireshark version, v1.12, may not be fully compatible with the current sniffer software.
3. Flashing the sniffer firmware
- Run ble-sniffer_win_1.0.1_1111_Sniffer.exe from the unziped nRF Sniffer folder.
- nRF Sniffer console interface will appear and search for the sniffer COM Port.
- Press Ctrl+R to start programming
- If you have more than 1 Segger Jlink device you may need to select the correct PCA10000’s SEGGER serial number
- If the sniffer firmware has been installed properly, you should see this interface:
nRFSniffer console showing devices that advertising in the range of the nRF Sniffer
4. Using the sniffer
Once you have the Sniffer console running, the software should automatically find the hardware COM port (you only have to flash the firmware once) and start reporting advertisements and listing nearby devices. If things aren't working as they should, reset the hardware (unplug-wait 5seconds – plugin again) and refresh the device list by typing L or restart the Sniffer program.
Note: If the sniffer console keep searching the COM port when you already pluged the PCA10000 dongle in and already flashed the firmware, you can try to unplug and plug the hardware back again after 5 seconds.
The Sniffer may not manage to pick up all connect requests and will not always pick up on a connection. In such cases, you need to reconnect.
If the sniffer works properly, you can start tracking a connection and debugging by first start with listing the adverting devices by pressing L. Then select the peripheral you want to track by pressing the index number or use up and down arrow buttons and press enter to select. After that you can start wireshark to display the captured packages by pressing “W” and you are ready for shooting trouble.
For more detail on how to use wireshark and analyze the BTLE packets please have a look at chapter 4 in the nRFSniffer user guide included in the zip folder or download here: /media/uploads/nemovn/ble-sniffer_win_1.2_user_guide.pdf
Note: One very useful filter you should try is btle.length!=0 to filter out all empty packet and make it easier to spot meaningful information.
Debug BLE application with nRF Sniffer+wireshark的更多相关文章
- Tomcat debug 模式, Application一直reload,导致内存溢出
在server.xml配置文件中,将reloable改为false.
- Bluefruit LE Sniffer - Bluetooth Low Energy (BLE 4.0) - nRF51822 驱动安装及使用
BLE Sniffer https://www.adafruit.com/product/2269 Bluefruit LE Sniffer - Bluetooth Low Energy (BLE 4 ...
- Debug your ASP.NET Application while Hosted on IIS
转摘:http://www.codeproject.com/Articles/37182/Debug-your-ASP-NET-Application-while-Hosted-on-IIS This ...
- 物联网安全拔“牙”实战——低功耗蓝牙(BLE)初探
物联网安全拔“牙”实战——低功耗蓝牙(BLE)初探 唐朝实验室 · 2015/10/30 10:22 Author: FengGou 0x00 目录 0x00 目录 0x01 前言 0x02 BLE概 ...
- 蓝牙BLE实用教程
蓝牙BLE实用教程 Bluetooth BLE 欢迎使用 小书匠(xiaoshujiang)编辑器,您可以通过 设置 里的修改模板来改变新建文章的内容. 1.蓝牙BLE常见问答 Q: Smart Re ...
- 蓝牙BLE实用教程(转载)
欢迎使用 小书匠(xiaoshujiang)编辑器,您可以通过 设置 里的修改模板来改变新建文章的内容. 1.蓝牙BLE常见问答 Q: Smart Ready 和 Smart 以及传统蓝牙之间是什么关 ...
- Cisco IOS debug command reference Command A through D
debug aaa accounting through debug auto-config debug aaa accounting : to display information on acco ...
- Top Things to Consider When Troubleshooting Complex Application Issues
http://blogs.msdn.com/b/debuggingtoolbox/archive/2011/10/03/top-things-to-consider-when-troubleshoot ...
- eclipse中debug
在需要测试的代码行左侧行号列上双击,生成断点 ,再次双击可以取消断点 如图: 然后右键,选择Debug As-Java Application,(注意,不是选择Run As) 开始调试java ...
随机推荐
- Android 在资源文件(res/strings.xml)定义一维数组,间接定义二维数组
经常我们会在资源文件(res/strings.xml)定义字符串,一维数组,那定义二维数组?直接定义二维数组没找到,可以间接定义. 其实很简单,看过用过一次就可以记住了,一维数组估计大家经常用到,但是 ...
- 洗衣店专用手持智能POS PDA手持设备 上门收衣 现场刷卡 打印票据 开单系统
手持上门收衣设备通过wifi或者3G手机卡等进行联网,功能便捷强大,多功能一体同步使用,通过手持机上门收.取衣物,快速开单收衣消费.取货.新建会员.现场办理会员发卡.手持机读发会员卡和会员用卡消费等. ...
- javascript的window.onload()方法和jQuery的$(document).ready()的对比
jQuery中$(document).ready()的作用类似于传统JavaScript中的window.onload方法,不过与window.onload方法还是有区别的. 1.执行时间 windo ...
- Codeforces Round #294 (Div. 2)
水 A. A and B and Chess /* 水题 */ #include <cstdio> #include <algorithm> #include <iost ...
- css3中的几何图形shape研究
前言 估计大家在日常工作中都会用到css形状,但是目前天朝中使用到最多的估计就是圆(circle).椭圆(ellipse).各种三角形形状,但是你肯定很少看见过用几何图形或者多边图形.假如你不懂什么叫 ...
- Js和asp.net各自设置的cookie相互读取的方法
在Web的开发过程中,避免不了要使用cookie,在这里,我们在前台设置cookie,也可以在后台设置cookie,关键是在前后台设置的cookie,怎么去相互读取,代码如下: (1) 前台 ...
- HDU 4632 Palindrome subsequence(DP)
题目链接 做的我很无奈,当时思路很乱,慌乱之中,起了一个想法,可以做,但是需要优化.尼玛,思路跑偏了,自己挖个坑,封榜之后,才从坑里出来,过的队那么多,开始的时候过的那么快,应该就不是用这种扯淡方法做 ...
- 二、saltstack基础配置
super65 master 192.168.1.65 super66 minion 192.168.1.66 主配置文件: [root@super65 ~]# ll /etc/sa ...
- Scala:使用Sublime开发Scala
Scala:使用Sublime开发Scala 第一步:[Tools][Build System][New Build System] 第二步:在打开的新文件中输入: { //"cmd&quo ...
- 安装phpunit
按照网上的提示,将go-pear.phar和phpunit.phar都放到php.exe所在的目录.但是以管理员身份运行时,输入命令php PEAR/go-pear.phar或php -d phar. ...