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".

  • No Martin,I have done printing device names and corresponding device address once uniquely.next i want to connect one device and get its GATT profile services and characteristics.For example i have connected to one device and in its GATT profile it has Device information service with UUID:0x180A and model number character with UUID:0x2A24. i need to get details of those when connected. I am unable to find where to do necessary changes,right now i am using ble_app_hrs_c_pca10056_s140 when connected i am getting battery status.please Help me how to do it. Thank you.

Reply
  • No Martin,I have done printing device names and corresponding device address once uniquely.next i want to connect one device and get its GATT profile services and characteristics.For example i have connected to one device and in its GATT profile it has Device information service with UUID:0x180A and model number character with UUID:0x2A24. i need to get details of those when connected. I am unable to find where to do necessary changes,right now i am using ble_app_hrs_c_pca10056_s140 when connected i am getting battery status.please Help me how to do it. Thank you.

Children
No Data
Related