1.å¦ä½ä½¿ç¨ CC2540 å¶ä½ä¸ä¸ª iBeacon
2.2552552550是源码多少位掩码
å¦ä½ä½¿ç¨ CC2540 å¶ä½ä¸ä¸ª iBeacon
åå¤å·¥ä½
ä¸å° PC
IAR Embedded Workbench éæå¼åç¯å¢ï¼å¯ä»¥ç¨å¤©è¯ç¨çæ¬ã
æ¯æ èç 4.0 çæºè½ææºä¸é¨ï¼å¹¶å®è£ ä¸ååºç¨ä¹ä¸
Android Google Play Store.
iPhone App Store.
CC å¼åæ¿
CCDebugger ä¸è½½å¨
å建 iBeacon å·¥ç¨ææ¡£
å®è£ TI å®æ¹ç CCx å¼åç¯å¢
å¤å¶ C:\Texas Instruments\BLE-CCx-1.3.2\Projects\ble\SimpleBLEBroadcaster æ件夹
ç²è´´å°ï¼C:\Texas Instruments\BLE-CCx-1.3.2\Projects\ble\iBeacon
è¿è¡ IAR Embedded Workbenchï¼ç¹å» File > Open > Workspace
ä¿®æ¹æºä»£ç
simpleBLEBroadcaster.c
// GAP - Advertisement data (max size = 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 seconds at a time) instead of general
// discoverable mode (advertises indefinitely)
0x, // length of this data
GAP_ADTYPE_FLAGS,
GAP_ADTYPE_FLAGS_BREDR_NOT_SUPPORTED,
// three-byte broadcast of the data "1 2 3"
0x, // length of this data including the data type byte
GAP_ADTYPE_MANUFACTURER_SPECIFIC, // manufacturer specific advertisement data type
1,
2,
3
};
ä¿®æ¹ä¸é¢å ³é®å
UID: E2CDB5-DFFB-D2-B-D0F5AE0
Major: 1 (0x)
Minor: 1 (0x)
Measured Power: - (0xc5)
// GAP - Advertisement data (max size = bytes, though this is
// best kept short to conserve power while advertisting)
static uint8 advertData[] =
{
// byte ibeacon advertising data
// Preamble: 0x4c
// UUID: E2CDB5-DFFB-D2-B-D0F5AE0
// Major: 1 (0x)
// Minor: 1 (0x)
// Measured Power: - (0xc5)
0x1A, // length of this data including the data type byte
GAP_ADTYPE_MANUFACTURER_SPECIFIC, // manufacturer specific advertisement data type
0x4c,
0x,
0x,
0x,
0xe2,
0xc5,
0x6d,
0xb5,
0xdf,
0xfb,
0x,
0xd2,
0xb0,
0x,
0xd0,
0xf5,
0xa7,
0x,
0x,
0xe0,
0x,
0x,
0x,
0x,
0xc5
};
æ¥ä¸æ¥ä¿®æ¹å¹¿æç±»åï¼å°ä¸é¢ä»£ç
//uint8 advType = GAP_ADTYPE_ADV_NONCONN_IND;// use non-connectable advertisements
uint8 advType = GAP_ADTYPE_ADV_DISCOVER_IND; // use scannable unidirected advertisements
ä¿®æ¹ä¸º
uint8 advType = GAP_ADTYPE_ADV_NONCONN_IND; // use non-connectable advertisements
//uint8 advType = GAP_ADTYPE_ADV_DISCOVER_IND; // use scannable unidirected advertisements
æ¥ä¸æ¥ä¿®æ¹ GAP
// Set the GAP Role Parameters
GAPRole_SetParameter( GAPROLE_ADVERT_ENABLED, sizeof( uint8 ), &initial_advertising_enable );
GAPRole_SetParameter( GAPROLE_ADVERT_OFF_TIME, sizeof( uint ), &gapRole_AdvertOffTime );
GAPRole_SetParameter( GAPROLE_SCAN_RSP_DATA, sizeof ( scanRspData ), scanRspData );
GAPRole_SetParameter( GAPROLE_ADVERT_DATA, sizeof( advertData ), advertData );
GAPRole_SetParameter( GAPROLE_ADV_EVENT_TYPE, sizeof( uint8 ), &advType );
å 为 iBeacon å¿ é¡»ä¸é´æ广æï¼å¹¶ä¸ä¸ååºä»»ä½æ°æ®è¯·æ±ï¼æ以æ们è¦ä¿®æ¹ GAPROLE_ADVERT_OFF_TIME å GAPROLE_SCAN_RSP_DATAã
// Set the GAP Role Parameters
GAPRole_SetParameter( GAPROLE_ADVERT_ENABLED, sizeof( uint8 ), &initial_advertising_enable );
//GAPRole_SetParameter( GAPROLE_ADVERT_OFF_TIME, sizeof( uint ), &gapRole_AdvertOffTime );
//GAPRole_SetParameter( GAPROLE_SCAN_RSP_DATA, sizeof ( scanRspData ), scanRspData );
GAPRole_SetParameter( GAPROLE_ADVERT_DATA, sizeof( advertData ), advertData );
GAPRole_SetParameter( GAPROLE_ADV_EVENT_TYPE, sizeof( uint8 ), &advType );
ä¿åå·¥ç¨åï¼è¿è¡ç¼è¯ï¼å¹¶éè¿ CCDebugger ä¸è½½ç¨åºå°å¼åæ¿ä¸ã
Select Project > Clean to clean the project.
Select Project > Make to make the project.
Select Project > Download and Debug to send the code to the CC Key Fob
Select Debug > Go to Run the code on the CC Key Fob.
BLE iBeacon
TI Displayport ESD Protection â TPD8S
Arduino SPI ç²¾å课ç¨
TAGS
Arduino Arduino Due Arduino Esplora Atmegau4 Atmel BacklightBMP Bootloader CC3x DatasheetDisplayport EasyDriver EDID eDPEsplora HDMI HMCL I2CJoystick LCD LED Luban LVDS MIPIMPU MySQL Nginx PCB PHP pinModePWM PX4 Raspberry Pi RGB Sensor SPIStepper Motor Ubuntu Wifi ææ æ èæ´¾æ¥è¿çµæº çµæº èå èç
CATEGORIES
3D Printer
Android
Application Notes
Arduino
AVR
Backlight Driver
C
CC3x
Datasheet
Development Environment
HDMI
Imaging & Graphics
iOS
Javascript
LCD/LCM
Material
Others
PCB Design
Power Management
Prototyping
Raspberry Pi
Rostock
Sensor
Server
Software
STM
Super Manual
Tutorials
Work
是多少位掩码
是一个位的掩码,是源码一个标准C类网络的掩码,该网络可以由个有效IP地址,源码影视视频源码也是源码目前使用最多的掩码。掩码是源码好的溯源码燕窝招商一串二进制代码对目标字段进行位与运算,屏蔽当前的源码易语言源码怎么修改字输入位。
掩码是源码将源码与掩码经过按位运算或逻辑运算得出新的操作数。其中要用到按位运算如OR运算和AND运算。源码用于如将ASCII码中大写字母改作小写字母。源码子网掩码的源码主要功能是告知网络设备,一个特定的源码IP地址的哪一部分是包含网络地址与子网地址,哪一部分是源码主机地址。网络的源码海南商品溯源码是正品路由设备只要识别出目的地址的网络号与子网号即可作出路由寻址决策,IP地址的源码主机部分不参与路由器的路由寻址操作,只用于在网段中唯一标识一个网络设备的源码厦门网上买溯源码燕窝接口。
2024-11-20 12:19
2024-11-20 12:18
2024-11-20 12:05
2024-11-20 11:59
2024-11-20 11:21
2024-11-20 10:29
2024-11-20 10:16
2024-11-20 10:06