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

Unable to print BLE devices Complete local Name?

Hi, I am trying to print ble device names around my board by scanning and i am able to print some devices and i am unable to print other device names even though they are advertising but by printing through device address i am able to print all the devices addresses,even though it has complete local name available i am unable to print it's name.

please tell me why if i print addresses i am able to see that device but why not by printing device name?? Thank you

Parents Reply Children
  • Hi Sigurd,

    When i enabled m_scan_param.active = 1 i was getting data(i.e device name and address )2 times.

    <info> app: Starting scan.
    <info> app: ADDRESS=D0:5F:B8:22:6:14
    <info> app: DEVICE NAME:Pronto
    <info> app: ADDRESS=D0:5F:B8:22:6:14
    <info> app: DEVICE NAME:Pronto
    <info> app: ADDRESS=D0:5F:B8:21:FA:C4
    

    app: ADDRESS=63:F8:3C:FE:CA:B9 app: DEVICE NAME:Sankeerthan app: ADDRESS=48:3:D:C8:A7:EE app: DEVICE NAME:Sankeerthan app: ADDRESS=48:3:D:C8:A7:EE

    And when i disabled m_scan_param.active = 0 i was getting data only once i.e advertising packet but some devices are not advertising their name through advertising packet.

    <info> app: Starting scan.
    <info> app: ADDRESS=D0:5F:B8:21:FA:C4
    <info> app: ADDRESS=D0:5F:B8:22:6:14
    <info> app: DEVICE NAME:Sankeerthan
    <info> app: ADDRESS=6D:63:15:58:38:5A
    

    You can see above only address are being printed but not names but in 1st picture names are also being printed but 2 times.

    I think i should disable advertising packet data and active scan response packet either one should be active.

    Please suggest me how can i correct it??

    Thank you.

  • You can check the scan_rsp field in the ble_gap_evt_adv_report_t to see if the packet is a normal advertising packet or a scan response packet. If 1, the report corresponds to a scan response packet.

Related