分享自己寫的 nRF51 beacon 廣播 & 掃描代碼
主要是從官方範例改過來的,把部分不需要的東西去掉,透過 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
感谢分享,楼主分享了很多好东西 最近在学习蓝牙无线的东西,感谢楼主 低功耗蓝牙!~ 谢谢分享。。。 感谢楼主无私分享 {:smile:}thanks! 低功耗蓝牙 mark一下 广播有时间限制?Nordic例程都是180秒,怎么设也改不了 谢谢楼主,学习了。。。
谢谢楼主,学习了。。。 谢谢楼主分享!
页:
[1]