<?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>Is it possible to ble_app_buttonless_dfu transmit beacons?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68145/is-it-possible-to-ble_app_buttonless_dfu-transmit-beacons</link><description>I tested &amp;quot;ble_app_buttonless_dfu&amp;quot; example and &amp;quot;ble_app_beacon&amp;quot; example. Everything was fine. Now, I am trying to make an application that advertise as a beacon and supports DFU OTA. 
 This is my advertising_init function: 
 
 
 
 when I uncomment the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 11 Nov 2020 14:21:55 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68145/is-it-possible-to-ble_app_buttonless_dfu-transmit-beacons" /><item><title>RE: Is it possible to ble_app_buttonless_dfu transmit beacons?</title><link>https://devzone.nordicsemi.com/thread/279519?ContentTypeID=1</link><pubDate>Wed, 11 Nov 2020 14:21:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4726709-20fb-4355-8058-d9194c3aa809</guid><dc:creator>Gabriel Jiro </dc:creator><description>&lt;p&gt;Thank you again, Vidar.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s working now!&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to ble_app_buttonless_dfu transmit beacons?</title><link>https://devzone.nordicsemi.com/thread/279492?ContentTypeID=1</link><pubDate>Wed, 11 Nov 2020 13:19:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6158796b-5a11-40c8-9189-112e956f29fe</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Gabriel,&lt;/p&gt;
&lt;p&gt;It is too big if you also need to include device name and Service UUIDs. Please try this implementation:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define APP_ADV_DURATION     BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED           

static void advertising_init(void)
{
    uint32_t               err_code;
    ble_advertising_init_t init;
    ble_advdata_manuf_data_t manuf_specific_data;

    manuf_specific_data.company_identifier = APP_COMPANY_IDENTIFIER;

#if defined(USE_UICR_FOR_MAJ_MIN_VALUES)
    // If USE_UICR_FOR_MAJ_MIN_VALUES is defined, the major and minor values will be read from the
    // UICR instead of using the default values. The major and minor values obtained from the UICR
    // are encoded into advertising data in big endian order (MSB First).
    // To set the UICR used by this example to a desired value, write to the address 0x10001080
    // using the nrfjprog tool. The command to be used is as follows.
    // nrfjprog --snr &amp;lt;Segger-chip-Serial-Number&amp;gt; --memwr 0x10001080 --val &amp;lt;your major/minor value&amp;gt;
    // For example, for a major value and minor value of 0xabcd and 0x0102 respectively, the
    // the following command should be used.
    // nrfjprog --snr &amp;lt;Segger-chip-Serial-Number&amp;gt; --memwr 0x10001080 --val 0xabcd0102
    uint16_t major_value = ((*(uint32_t *)UICR_ADDRESS) &amp;amp; 0xFFFF0000) &amp;gt;&amp;gt; 16;
    uint16_t minor_value = ((*(uint32_t *)UICR_ADDRESS) &amp;amp; 0x0000FFFF);

    uint8_t index = MAJ_VAL_OFFSET_IN_BEACON_INFO;

    m_beacon_info[index++] = MSB_16(major_value);
    m_beacon_info[index++] = LSB_16(major_value);

    m_beacon_info[index++] = MSB_16(minor_value);
    m_beacon_info[index++] = LSB_16(minor_value);
#endif

    manuf_specific_data.data.p_data = (uint8_t *) m_beacon_info;
    manuf_specific_data.data.size   = APP_BEACON_INFO_LENGTH;

    memset(&amp;amp;init, 0, sizeof(init));

    init.advdata.name_type               = BLE_ADVDATA_NO_NAME;
    //init.advdata.include_appearance      = true;
    init.advdata.flags                   = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
    //init.advdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
    //init.advdata.uuids_complete.p_uuids  = m_adv_uuids;
    init.advdata.p_manuf_specific_data     = &amp;amp;manuf_specific_data;

    advertising_config_get(&amp;amp;init.config);

    init.evt_handler = on_adv_evt;

    err_code = ble_advertising_init(&amp;amp;m_advertising, &amp;amp;init);
    APP_ERROR_CHECK(err_code);

    ble_advertising_conn_cfg_tag_set(&amp;amp;m_advertising, APP_BLE_CONN_CFG_TAG);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to ble_app_buttonless_dfu transmit beacons?</title><link>https://devzone.nordicsemi.com/thread/279447?ContentTypeID=1</link><pubDate>Wed, 11 Nov 2020 10:20:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7be90837-fc77-461a-9fa5-68736d327cb1</guid><dc:creator>Gabriel Jiro </dc:creator><description>&lt;p&gt;Thanks for your answer, Vidar&lt;/p&gt;
&lt;p&gt;I made these changes in my code, but the nRF5232 still doesn&amp;#39;t transmit beacons...&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think that the manufacturer field isn&amp;#39;t too big, as you can see:&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define APP_BEACON_INFO_LENGTH          0x17                               /**&amp;lt; Total length of information advertised by the Beacon. */
#define APP_ADV_DATA_LENGTH             0x15                               /**&amp;lt; Length of manufacturer specific data in the advertisement. */
#define APP_DEVICE_TYPE                 0x02                               /**&amp;lt; 0x02 refers to Beacon. */
#define APP_MEASURED_RSSI               0xC3                               /**&amp;lt; The Beacon&amp;#39;s measured RSSI at 1 meter distance in dBm. */
#define APP_COMPANY_IDENTIFIER          0x0059                             /**&amp;lt; Company identifier for Nordic Semiconductor ASA. as per www.bluetooth.org. */
#define APP_MAJOR_VALUE                 0x01, 0x02                         /**&amp;lt; Major value used to identify Beacons. */
#define APP_MINOR_VALUE                 0x03, 0x04                         /**&amp;lt; Minor value used to identify Beacons. */
#define APP_BEACON_UUID                 0x01, 0x12, 0x23, 0x34, \
                                        0x45, 0x56, 0x67, 0x78, \
                                        0x89, 0x9a, 0xab, 0xbc, \
                                        0xcd, 0xde, 0xef, 0xf0            /**&amp;lt; Proprietary UUID for Beacon. */
                                        


static uint8_t m_beacon_info[APP_BEACON_INFO_LENGTH] =                    /**&amp;lt; Information advertised by the Beacon. */
{
    APP_DEVICE_TYPE,     // Manufacturer specific information. Specifies the device type in this
                         // implementation.
    APP_ADV_DATA_LENGTH, // Manufacturer specific information. Specifies the length of the
                         // manufacturer specific data in this implementation.
    APP_BEACON_UUID,     // 128 bit UUID value.
    APP_MAJOR_VALUE,     // Major arbitrary value that can be used to distinguish between Beacons.
    APP_MINOR_VALUE,     // Minor arbitrary value that can be used to distinguish between Beacons.
    APP_MEASURED_RSSI    // Manufacturer specific information. The Beacon&amp;#39;s measured TX power in
                         // this implementation.
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Gabriel&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible to ble_app_buttonless_dfu transmit beacons?</title><link>https://devzone.nordicsemi.com/thread/279309?ContentTypeID=1</link><pubDate>Tue, 10 Nov 2020 14:40:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:843157f5-0dd3-464d-a612-8df0ac320784</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The manufacturer field is probably too big to fint into the advertisment packet which is 31 bytes. Please try to comment these to lines:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp; init.advdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]); /* Advertise Service UUIDs*/&lt;br /&gt;&amp;nbsp; init.advdata.uuids_complete.p_uuids&amp;nbsp; = m_adv_uuids;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&amp;nbsp; init.advdata.name_type =&amp;nbsp;BLE_ADVDATA_FULL_NAME&lt;/p&gt;
&lt;p&gt;Then uncomment the &amp;quot;init.advdata.p_manuf_specific_data&amp;quot; to include the manufacturer field. You will also need to change the BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED flag to make the device connectable.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>