Quantcast
Viewing all articles
Browse latest Browse all 262198

CC2640R2F: Getting duplicate scans after discovery process even when filter enabled

Part Number:CC2640R2F

Hi,

I am performing a scan to detect the ibeacons and some ibeacons are detected twice. Note, the duplicate filtering is enabled by default, so I haven't done anything with regards to that. I am using the ibeacon simulator app (Android) to broadcast 5 ibeacons. I have slightly modified the SimpleObserver_addDeviceInfo( ) in the simple_peripheral_observer project to detect and display the ibeacons. The below is the result I get.

#000008 [ 0.206 ] INFO: (simple_peripheral_observer.c:517) Beacon0
#000009 [ 0.206 ] INFO: (simple_peripheral_observer.c:518) Byte 0: Length = 0x1a
#000010 [ 0.206 ] INFO: (simple_peripheral_observer.c:519) Byte 1: Type = 0xff(Custom Manufacture Packet)
#000011 [ 0.206 ] INFO: (simple_peripheral_observer.c:520) Byte 2-3: Manufacture Id = 0x4c 0x00(Apple)
#000012 [ 0.206 ] INFO: (simple_peripheral_observer.c:521) Byte 4: SubType = 0x02(iBeacon)
#000013 [ 0.206 ] INFO: (simple_peripheral_observer.c:522) Byte 5: SubType Length = 0x15
#000014 [ 0.206 ] INFO: (simple_peripheral_observer.c:523) Byte 6-21: Proximity UUID = 0xD4ED5DFDC82D4D03A719A608E94791F3
#000015 [ 0.206 ] INFO: (simple_peripheral_observer.c:524) Byte 22-23: Major = 0x0000
#000016 [ 0.206 ] INFO: (simple_peripheral_observer.c:525) Byte 24-25: Minor = 0x0000
#000017 [ 0.206 ] INFO: (simple_peripheral_observer.c:526) Byte 26: Signal Power = 0xbf
#000018 [ 0.222 ] INFO: (simple_peripheral_observer.c:516) dataLen = 27
#000019 [ 0.222 ] INFO: (simple_peripheral_observer.c:517) Beacon1
#000020 [ 0.222 ] INFO: (simple_peripheral_observer.c:518) Byte 0: Length = 0x1a
#000021 [ 0.222 ] INFO: (simple_peripheral_observer.c:519) Byte 1: Type = 0xff(Custom Manufacture Packet)
#000022 [ 0.222 ] INFO: (simple_peripheral_observer.c:520) Byte 2-3: Manufacture Id = 0x4c 0x00(Apple)
#000023 [ 0.222 ] INFO: (simple_peripheral_observer.c:521) Byte 4: SubType = 0x02(iBeacon)
#000024 [ 0.222 ] INFO: (simple_peripheral_observer.c:522) Byte 5: SubType Length = 0x15
#000025 [ 0.222 ] INFO: (simple_peripheral_observer.c:523) Byte 6-21: Proximity UUID = 0x4B795071D5A54617A89285AAB793D8EF
#000026 [ 0.222 ] INFO: (simple_peripheral_observer.c:524) Byte 22-23: Major = 0x0000
#000027 [ 0.222 ] INFO: (simple_peripheral_observer.c:525) Byte 24-25: Minor = 0x0000
#000028 [ 0.223 ] INFO: (simple_peripheral_observer.c:526) Byte 26: Signal Power = 0xbf
#000029 [ 0.316 ] INFO: (simple_peripheral_observer.c:516) dataLen = 27
#000030 [ 0.316 ] INFO: (simple_peripheral_observer.c:517) Beacon2
#000031 [ 0.316 ] INFO: (simple_peripheral_observer.c:518) Byte 0: Length = 0x1a
#000032 [ 0.316 ] INFO: (simple_peripheral_observer.c:519) Byte 1: Type = 0xff(Custom Manufacture Packet)
#000033 [ 0.316 ] INFO: (simple_peripheral_observer.c:520) Byte 2-3: Manufacture Id = 0x4c 0x00(Apple)
#000034 [ 0.316 ] INFO: (simple_peripheral_observer.c:521) Byte 4: SubType = 0x02(iBeacon)
#000035 [ 0.316 ] INFO: (simple_peripheral_observer.c:522) Byte 5: SubType Length = 0x15
#000036 [ 0.316 ] INFO: (simple_peripheral_observer.c:523) Byte 6-21: Proximity UUID = 0x4B795071D5A54617A89285AAB793D8EF
#000037 [ 0.316 ] INFO: (simple_peripheral_observer.c:524) Byte 22-23: Major = 0x0000
#000038 [ 0.316 ] INFO: (simple_peripheral_observer.c:525) Byte 24-25: Minor = 0x0000
#000039 [ 0.316 ] INFO: (simple_peripheral_observer.c:526) Byte 26: Signal Power = 0xbf
#000040 [ 0.321 ] INFO: (simple_peripheral_observer.c:516) dataLen = 27
#000041 [ 0.321 ] INFO: (simple_peripheral_observer.c:517) Beacon3
#000042 [ 0.321 ] INFO: (simple_peripheral_observer.c:518) Byte 0: Length = 0x1a
#000043 [ 0.321 ] INFO: (simple_peripheral_observer.c:519) Byte 1: Type = 0xff(Custom Manufacture Packet)
#000044 [ 0.321 ] INFO: (simple_peripheral_observer.c:520) Byte 2-3: Manufacture Id = 0x4c 0x00(Apple)
#000045 [ 0.321 ] INFO: (simple_peripheral_observer.c:521) Byte 4: SubType = 0x02(iBeacon)
#000046 [ 0.321 ] INFO: (simple_peripheral_observer.c:522) Byte 5: SubType Length = 0x15
#000047 [ 0.321 ] INFO: (simple_peripheral_observer.c:523) Byte 6-21: Proximity UUID = 0x4B795071D5A54617A89285AAB793D8EF
#000048 [ 0.321 ] INFO: (simple_peripheral_observer.c:524) Byte 22-23: Major = 0x0000
#000049 [ 0.321 ] INFO: (simple_peripheral_observer.c:525) Byte 24-25: Minor = 0x0000
#000050 [ 0.321 ] INFO: (simple_peripheral_observer.c:526) Byte 26: Signal Power = 0xbf
#000051 [ 0.702 ] INFO: (simple_peripheral_observer.c:516) dataLen = 27
#000052 [ 0.703 ] INFO: (simple_peripheral_observer.c:517) Beacon4
#000053 [ 0.703 ] INFO: (simple_peripheral_observer.c:518) Byte 0: Length = 0x1a
#000054 [ 0.703 ] INFO: (simple_peripheral_observer.c:519) Byte 1: Type = 0xff(Custom Manufacture Packet)
#000055 [ 0.703 ] INFO: (simple_peripheral_observer.c:520) Byte 2-3: Manufacture Id = 0x4c 0x00(Apple)
#000056 [ 0.703 ] INFO: (simple_peripheral_observer.c:521) Byte 4: SubType = 0x02(iBeacon)
#000057 [ 0.703 ] INFO: (simple_peripheral_observer.c:522) Byte 5: SubType Length = 0x15
#000058 [ 0.703 ] INFO: (simple_peripheral_observer.c:523) Byte 6-21: Proximity UUID = 0xC148398CB6DC43EEBCCA582A9995DCBA
#000059 [ 0.703 ] INFO: (simple_peripheral_observer.c:524) Byte 22-23: Major = 0x0000
#000060 [ 0.703 ] INFO: (simple_peripheral_observer.c:525) Byte 24-25: Minor = 0x0000
#000061 [ 0.703 ] INFO: (simple_peripheral_observer.c:526) Byte 26: Signal Power = 0xbf

In the above, you can see that ibeacon1, 2 and 3 are same packets. I want to filter out all duplicates and detect only unique packets. Any idea how to fix this and why this may be happening? Does it have anything to do with the Log_Info prints I am using to print them out?

Also, another issue I am facing similar is that, when I use system_printf( ) to print the above instead of Log_info as shown below. It doesn't work. Any idea why this dont work?

           System_printf("dataLen = %u", dataLen);
            System_printf("Beacon%u", deviceCnt);
            System_printf("Byte 0: Length = 0x%02x", data[point]);
            System_printf("Byte 1: Type = 0x%02x(Custom Manufacture Packet)", data[point + 1]);
            System_printf("Byte 2-3: Manufacture Id = 0x%02x 0x%02x(Apple)",data[point + 2], data[point + 3]);
            System_printf("Byte 4: SubType = 0x%02x(iBeacon)", data[point + 4]);
            System_printf("Byte 5: SubType Length = 0x%02x", data[point + 5]);
            System_printf("Byte 6-21: Proximity UUID = %s", Util_convertBdIntArray2Str(data + (point + 6), 16));
            System_printf("Byte 22-23: Major = 0x%04x", (data[point + 22] << 8) + data[point + 23]);
            System_printf("Byte 24-25: Minor = 0x%04x", (data[point + 24] << 8) + data[point + 25]);
            System_printf("Byte 26: Signal Power = 0x%02x", data[point + 26]);
            System_printf("\r\n");
            System_flush();


Viewing all articles
Browse latest Browse all 262198


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>