<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Identify peripheral based on advertised data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/6635/identify-peripheral-based-on-advertised-data</link><description>For my application I need to identify the peripheral source advertising packets are coming from. How is this best done with BLE and SDK 7.1? I would prefer not to set a a different device name for every source.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 22 Apr 2015 07:29:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/6635/identify-peripheral-based-on-advertised-data" /><item><title>RE: Identify peripheral based on advertised data</title><link>https://devzone.nordicsemi.com/thread/23247?ContentTypeID=1</link><pubDate>Wed, 22 Apr 2015 07:29:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e7aad80-afdf-4d23-8be2-cedce2bcd842</guid><dc:creator>shibshab</dc:creator><description>&lt;p&gt;After turning on scanning on your central device, you will receive an &lt;code&gt;BLE_GAP_EVT_ADV_REPORT&lt;/code&gt; event for each received advertising packet.&lt;/p&gt;
&lt;p&gt;This event contains the following information:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;/**@brief Event data for advertising report event. */
typedef struct
{
  ble_gap_addr_t peer_addr;                     /**&amp;lt; Bluetooth address of the peer device. */
  int8_t         rssi;                          /**&amp;lt; Received Signal Strength Indication in dBm. */
  uint8_t        scan_rsp : 1;                  /**&amp;lt; If 1, the report corresponds to a scan response and          the type field may be ignored. */
  uint8_t        type     : 2;                  /**&amp;lt; See @ref BLE_GAP_ADV_TYPES. Only valid if the    scan_rsp field is 0. */
  uint8_t        dlen     : 5;                  /**&amp;lt; Advertising or scan response data length. */
  uint8_t        data[BLE_GAP_ADV_MAX_SIZE];    /**&amp;lt; Advertising or scan response data. */
} ble_gap_evt_adv_report_t;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The simplest way would be to use the &lt;code&gt;peer_addr&lt;/code&gt; field. This will most likely (VERY likely if set randomly) be unique for each device, and not change on reboot (you cannot rely on this in a real life implementation however).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>