|
主要是從官方範例改過來的,把部分不需要的東西去掉,
透過 nRF51-DK 和 nRF51-Dongle 實現,
nRF51-Dongle 做廣播,不斷廣播 UUID, Major, Minor 和 TX Power,
nRF51-DK 做掃描,並將收到的廣播封包透過 UART 傳到電腦上顯示。
**** 開發環境
Window 7 64
MDK 5.14
nRF51 SDK 7.2.0
SoftDevice s110 7.1.0
SoftDevice s120 1.0.1
// Advertising Data Format
//
// 02 01 04 1A FF 59 00 02 15 E2 C5 6D B5 DF FB 48 D2 B0 60 D0 F5 A7 10 96 E0 00 00 00 00 C3 00
//
// 02 # Number of bytes that follow in first AD structure
// 01 # Flags AD type
// 04 # Flags value
// 1A # Number of bytes that follow in second (and last) AD structure
// FF # Manufacturer specific data AD type
// 59 00 # Company identifier code (0x0059 == Nordic Semiconductor ASA)
// 02 # Device type (0x02 refers to Beacon)
// 15 # Length of specific data
// E2 C5 6D B5 DF FB 48 D2 B0 60 D0 F5 A7 10 96 E0 # Beacon proximity uuid
// 00 00 # Major
// 00 00 # Minor
// C3 # The 2's complement of the calibrated Tx Power
其他自己寫的 nRF51 測試代碼目前都放在 Github 上,有需要可以自行下載
https://github.com/Hom-Wang/NRF51
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
阿莫论坛20周年了!感谢大家的支持与爱护!!
一只鸟敢站在脆弱的枝条上歇脚,它依仗的不是枝条不会断,而是自己有翅膀,会飞。
|