Hi JRs:
请教下,我想在发布的版本里增加软件版本号,并且能显示出来。
请问有什么地方可以增加这样的版本号?
我的想法是在 scanRspData 里增加一个栏位,但是 scanRspData 默认没有 Version 的 flag。
请问有什么办法吗?
谢谢
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi JRs:
请教下,我想在发布的版本里增加软件版本号,并且能显示出来。
请问有什么地方可以增加这样的版本号?
我的想法是在 scanRspData 里增加一个栏位,但是 scanRspData 默认没有 Version 的 flag。
请问有什么办法吗?
谢谢
scanRspData最大只能有31字节,放置版本号注意大小。也可以在advertData[]放置
类似下面:
/ GAP - Advertisement data (max size = 31 bytes, though this is
// best kept short to conserve power while advertisting)
static uint8 advertData[] =
{
// Flags; this sets the device to use limited discoverable
// mode (advertises for 30 seconds at a time) instead of general
// discoverable mode (advertises indefinitely)
0x02, // length of this data
GAP_ADTYPE_FLAGS,
GAP_ADTYPE_FLAGS_BREDR_NOT_SUPPORTED,
#ifndef BEACON_FEATURE
// three-byte broadcast of the data "1 2 3"
0x04, // length of this data including the data type byte
GAP_ADTYPE_MANUFACTURER_SPECIFIC, // manufacturer specific adv data type
1,
2,
3
#else
// 25 byte beacon advertisement data
// Preamble: Company ID - 0x000D for TI, refer to www.bluetooth.org/.../company-identifiers
// Data type: Beacon (0x02)
// Data length: 0x15
// UUID: 00000000-0000-0000-0000-000000000000 (null beacon)
// Major: 1 (0x0001)
// Minor: 1 (0x0001)
// Measured Power: -59 (0xc5)
0x1A, // length of this data including the data type byte
GAP_ADTYPE_MANUFACTURER_SPECIFIC, // manufacturer specific adv data type
0x0D, // Company ID - Fixed
0x00, // Company ID - Fixed
0x02, // Data Type - Fixed
0x15, // Data Length - Fixed
0x00, // UUID - Variable based on different use cases/applications
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // UUID
0x00, // Major
0x01, // Major
0x00, // Minor
0x01, // Minor
0xc5 // Power - The 2's complement of the calibrated Tx Power
#endif // !BEACON_FEATURE
};