首先还是来看下CC2531长什么样子,如图

系统环境为Kali linux rolling,插上电脑后查看下设备列表
root@orange:~# lsusbBus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 015: ID 0451:16ae Texas Instruments, Inc.
Bus 003 Device 012: ID 1a40:0801 Terminus Technology Inc.
Bus 003 Device 003: ID 046a:0011 Cherry GmbH G83 (RS 6000) Keyboard
Bus 003 Device 002: ID 18f8:0f99
Bus 003 Device 004: ID 05ac:12a8 Apple, Inc. iPhone5/5C/5S/6
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
很明显已经识别出来了
Bus 003 Device 015: ID 0451:16ae Texas Instruments, Inc.这个就是CC2531
git上面开源软件的位置 https://github.com/andrewdodd/pyCCSniffer
git回来
git clone https://github.com/andrewdodd/pyCCSniffer.git切换到目录并执行python脚本
cd pyCCSnifferpython pyCCSniffer.py
终端显示
Commands:c: Print current RF Channel
h,?: Print this message
[11,26]: Change RF channel
s: Start/stop the packet capture
d: Toggle frame dissector
a*: Set an annotation (write "a" to remove it)
q: Quit
根据提示来操作,当然,github上有详细的说明,参数的含义,比如博主这里执行
python pyCCSniffer.py -L /root/zigbee.log -D INFO然后数据包
Started loggingDissector enabled
Dissector enabled
Commands:
c: Print current RF Channel
h,?: Print this message
[11,26]: Change RF channel
s: Start/stop the packet capture
d: Toggle frame dissector
a*: Set an annotation (write "a" to remove it)
q: Quit
s
Started