1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我用微信摇一摇周边摇不到自己的设备,信息如下,请问有什么问题吗? 10055 =0x2747, 19495=0x4c27
|
|
相关推荐
6 个讨论
|
|
下面是微信的测试摇一摇,肯定摇得到,其他跟微信相关的属于应用问题,需要自己去看微信的标准改了。//微信的测试摇一摇
static uint8 advertData[] = [ // Preamble: 0x4c000215 // 02 01 06 1A FF 4C 00 02 15: iBeacon prefix (fixed) // UUID: E2C56DB5-DFFB-48D2-B060-D0F5A71096E0 // Major: 1 (0x0001) // Minor: 1 (0x0001) // Measured Power: -59 (0xc5) 0x02, 0x01, 0x06, 0x1a, 0xff, 0x4c, 0x00, 0x02, 0x15, 0xfd, 0xa5, 0x06, 0x93, 0xa4, 0xe2, 0x4f, 0xb1, 0xaf, 0xcf, 0xc6, 0xeb, 0x07, 0x64, 0x78, 0x25, 0x00, 0x0a, 0x00, 0x04, 0xc5 ]; 安装 TI 官方的 CC254x 开发环境 复制 C:Texas InstrumentsBLE-CC254x-1.3.2ProjectsbleSimpleBLEBroadcaster 文件夹 粘贴到:C:Texas InstrumentsBLE-CC254x-1.3.2ProjectsbleiBeacon 运行 IAR Embedded Workbench,点击 File > Open > Workspace 修改源代码 simpleBLEBroadcaster.c // 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, // 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 advertisement data type 1, 2, 3 ]; 修改下面关键字 UID: E2C56DB5-DFFB-48D2-B060-D0F5A71096E0 Major: 1 (0x0001) Minor: 1 (0x0001) Measured Power: -59 (0xc5) // GAP - Advertisement data (max size = 31 bytes, though this is // best kept short to conserve power while advertisting) static uint8 advertData[] = [ // 25 byte ibeacon advertising data // Preamble: 0x4c000215 // UUID: E2C56DB5-DFFB-48D2-B060-D0F5A71096E0 // 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 advertisement data type 0x4c, 0x00, 0x02, 0x15, 0xe2, 0xc5, 0x6d, 0xb5, 0xdf, 0xfb, 0x48, 0xd2, 0xb0, 0x60, 0xd0, 0xf5, 0xa7, 0x10, 0x96, 0xe0, 0x00, 0x01, 0x00, 0x01, 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( uint16 ), &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( uint16 ), &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 CC2540 Key Fob Select Debug > Go to Run the code on the CC2540 Key Fob. |
|
|
|
|
|
只有小组成员才能发言,加入小组>>
332 浏览 1 评论
528 浏览 2 评论
NA555DR VCC最低电压需要在5V供电,为什么用3.3V供电搭了个单稳态触发器也使用正常?
772 浏览 3 评论
MSP430F249TPMR出现高温存储后失效了的情况,怎么解决?
649 浏览 1 评论
对于多级放大电路板,在PCB布局中,电源摆放的位置应该注意什么?
1124 浏览 1 评论
AT32F407在USART2 DMA发送数据时,接包接到了要发送的数据,程序还是处于等待传输完成的标识判断中,为什么?
54浏览 29评论
94浏览 23评论
请问下tpa3220实际测试引脚功能和官方资料不符,哪位大佬可以帮忙解答下
248浏览 20评论
请教下关于TAS5825PEVM评估模块原理图中不太明白的地方,寻求答疑
196浏览 14评论
两个TMP117传感器一个可以正常读取温度值,一个读取的值一直是0,为什么?
54浏览 13评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-21 22:46 , Processed in 0.799543 second(s), Total 52, Slave 46 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号