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
  • Well "printing" is probably just consequence of your internal state machine in the scanner. E.g. if you scan continuously then obviously Adv. report events keep coming to your BLE event handler from stack (Soft Device) and if you parse and print each of them then there are as many print-out as many events you get. If you want to stop receiving something then you need to do that inside your application logic... If this is not the case or I've misunderstood of what you don't like then please make screenshot and comment on how often these print-outs appear in the terminal.

Reply
  • Well "printing" is probably just consequence of your internal state machine in the scanner. E.g. if you scan continuously then obviously Adv. report events keep coming to your BLE event handler from stack (Soft Device) and if you parse and print each of them then there are as many print-out as many events you get. If you want to stop receiving something then you need to do that inside your application logic... If this is not the case or I've misunderstood of what you don't like then please make screenshot and comment on how often these print-outs appear in the terminal.

Children
Related