This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Getting scanned device names:adv_report_parse() device names are printed repeatedly?

I am using adv_report_parse to try and return the device names the scanner picks up. However device names are being printed repeatedly.

I have 4 to 5 devices around me and all the device names are being keep on printing and how can i stop and print unique device names only once.

I am using ble_app_hrs_c_pca10056_s140.

I would appreciate any help, Thanks

Parents
  • @endnode has explained why you get continuous printouts. To make sure every device is only printed once (or to make any action happen when a new device appears within range) you will have to store pieces of information identifying each advertiser. It can e.g. be the address of the device or the name (if they all have different names). Then, when you get adv reports, just compare the report to your "database".

Reply
  • @endnode has explained why you get continuous printouts. To make sure every device is only printed once (or to make any action happen when a new device appears within range) you will have to store pieces of information identifying each advertiser. It can e.g. be the address of the device or the name (if they all have different names). Then, when you get adv reports, just compare the report to your "database".

Children
Related