<?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>Problem with sending data from central to peripheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/78006/problem-with-sending-data-from-central-to-peripheral</link><description>Hello, 
 recently i made software for peripheral with custom service and five custom characteristics and everything works just fine. Now I want to make central capable of writing to my custom characteristics on perpiheral. I&amp;#39;m working with Central/Uart</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 02 Aug 2021 16:19:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/78006/problem-with-sending-data-from-central-to-peripheral" /><item><title>RE: Problem with sending data from central to peripheral</title><link>https://devzone.nordicsemi.com/thread/322949?ContentTypeID=1</link><pubDate>Mon, 02 Aug 2021 16:19:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ae2bb33-1d5a-444c-b858-bb80e9cffa08</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;And you can write to them from the nRF Connect app? They are writeable?&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with sending data from central to peripheral</title><link>https://devzone.nordicsemi.com/thread/322489?ContentTypeID=1</link><pubDate>Thu, 29 Jul 2021 13:38:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ef66e1c0-951e-4db8-a95d-260c048f1d00</guid><dc:creator>stopbar</dc:creator><description>&lt;p&gt;Ok so handle 0x0003 is asigned to Device Name in Generic Access service. My custom characteristics are as follow: 0x000D, 0x000F, 0x0011, 0x0013, 0x0015.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with sending data from central to peripheral</title><link>https://devzone.nordicsemi.com/thread/322482?ContentTypeID=1</link><pubDate>Thu, 29 Jul 2021 13:27:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee0957c1-5600-453c-b3f0-07f5d1d996d8</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;You need to &amp;quot;hover&amp;quot; over the different characteristics to find which is handle 0x0003, for instance for a random BLE&amp;nbsp;peripheral I could find:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1627565102334v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The service changed characteristic (handle 0x0003) is indicate only, and is not writeable.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with sending data from central to peripheral</title><link>https://devzone.nordicsemi.com/thread/322469?ContentTypeID=1</link><pubDate>Thu, 29 Jul 2021 13:00:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2c3b85cd-1b76-495e-ab16-7a670a28d376</guid><dc:creator>stopbar</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://i.postimg.cc/6qCCHLKV/2021-07-29-145202.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;characteristics creating:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;uint32_t ble_config_init(ble_config_t *p_config, ble_config_init_t const *p_config_init)
{
    ret_code_t err_code;
    ble_uuid_t ble_uuid;
    ble_uuid128_t config_base_uuid = BLE_UUID_CONFIG_SERVICE_BASE_UUID;
    ble_add_char_params_t add_char_params;

    VERIFY_PARAM_NOT_NULL(p_config);
    VERIFY_PARAM_NOT_NULL(p_config_init);

    // Initialize the service structure.
    p_config-&amp;gt;data_handler = p_config_init-&amp;gt;data_handler;

    /**@snippet [Adding proprietary Service to the SoftDevice] */
    // Add a custom base UUID.
    err_code = sd_ble_uuid_vs_add(&amp;amp;config_base_uuid, &amp;amp;p_config-&amp;gt;uuid_type);
    VERIFY_SUCCESS(err_code);

    ble_uuid.type = p_config-&amp;gt;uuid_type;
    ble_uuid.uuid = BLE_UUID_CONFIG_SERVICE;
   

    // Add the service.
    err_code = sd_ble_gatts_service_add(BLE_GATTS_SRVC_TYPE_PRIMARY,
        &amp;amp;ble_uuid,
        &amp;amp;p_config-&amp;gt;service_handle);
    /**@snippet [Adding proprietary Service to the SoftDevice] */
    VERIFY_SUCCESS(err_code);

    // Add the RX Characteristic.
    memset(&amp;amp;add_char_params, 0, sizeof(add_char_params));
    add_char_params.uuid = BLE_UUID_CONFIG_ID_RX_CHARACTERISTIC;
    add_char_params.uuid_type = p_config-&amp;gt;uuid_type;
    add_char_params.max_len = BLE_CONFIG_MAX_RX_ID_CHAR_LEN;
    add_char_params.init_len = sizeof(uint8_t);
    add_char_params.is_var_len = true;
    add_char_params.char_props.write = 1;
    add_char_params.char_props.write_wo_resp = 1;
    add_char_params.char_props.read = 1;

    add_char_params.read_access = SEC_OPEN;
    add_char_params.write_access = SEC_OPEN;

    err_code = characteristic_add(p_config-&amp;gt;service_handle, &amp;amp;add_char_params, &amp;amp;p_config-&amp;gt;rx_handlesID);
    if (err_code != NRF_SUCCESS)
    {
        return err_code;
    }

    // Add the RX Characteristic.
    memset(&amp;amp;add_char_params, 0, sizeof(add_char_params));
    add_char_params.uuid = BLE_UUID_CONFIG_MEASURMENT_INTERVAL_CHARACTERISTIC;
    add_char_params.uuid_type = p_config-&amp;gt;uuid_type;
    add_char_params.max_len = BLE_CONFIG_MAX_RX_MEASURMENT_INTERVA_CHAR_LEN;
    add_char_params.init_len = sizeof(uint8_t);
    add_char_params.is_var_len = true;
    add_char_params.char_props.write = 1;
    add_char_params.char_props.write_wo_resp = 1;
    add_char_params.char_props.read = 1;
  
    add_char_params.read_access = SEC_OPEN;
    add_char_params.write_access = SEC_OPEN;

    err_code = characteristic_add(p_config-&amp;gt;service_handle, &amp;amp;add_char_params, &amp;amp;p_config-&amp;gt;rx_handlesMeasurment_interval);
    if (err_code != NRF_SUCCESS)
    {
        return err_code;
    }
    // Add the RX Characteristic.
    memset(&amp;amp;add_char_params, 0, sizeof(add_char_params));
    add_char_params.uuid = BLE_UUID_CONFIG_ADVERTISING_INTERVAL_CHARACTERISTIC;
    add_char_params.uuid_type = p_config-&amp;gt;uuid_type;
    add_char_params.max_len = BLE_CONFIG_MAX_RX_ADVERTISING_INTERVA_CHAR_LEN;
    add_char_params.init_len = sizeof(uint16_t);
    add_char_params.is_var_len = true;
    add_char_params.char_props.write = 1;
    add_char_params.char_props.write_wo_resp = 1;
    add_char_params.char_props.read = 1;

    add_char_params.read_access = SEC_OPEN;
    add_char_params.write_access = SEC_OPEN;

    err_code = characteristic_add(p_config-&amp;gt;service_handle, &amp;amp;add_char_params, &amp;amp;p_config-&amp;gt;rx_handlesAdvertising_interval);
    if (err_code != NRF_SUCCESS)
    {
        return err_code;
    }

    // Add the RX Characteristic.
    memset(&amp;amp;add_char_params, 0, sizeof(add_char_params));
    add_char_params.uuid = BLE_UUID_CONFIG_LOW_ALARM_CHARACTERISTIC;
    add_char_params.uuid_type = p_config-&amp;gt;uuid_type;
    add_char_params.max_len = BLE_CONFIG_MAX_RX_LOW_ALARM_CHAR_LEN;
    add_char_params.init_len = sizeof(uint8_t);
    add_char_params.is_var_len = true;
    add_char_params.char_props.write = 1;
    add_char_params.char_props.write_wo_resp = 1;
    add_char_params.char_props.read = 1;

    add_char_params.read_access = SEC_OPEN;
    add_char_params.write_access = SEC_OPEN;

    err_code = characteristic_add(p_config-&amp;gt;service_handle, &amp;amp;add_char_params, &amp;amp;p_config-&amp;gt;rx_handlesLow_alarm);
    if (err_code != NRF_SUCCESS)
    {
        return err_code;
    }

    memset(&amp;amp;add_char_params, 0, sizeof(add_char_params));
    add_char_params.uuid = BLE_UUID_CONFIG_HIGH_ALARM_CHARACTERISTIC;
    add_char_params.uuid_type = p_config-&amp;gt;uuid_type;
    add_char_params.max_len = BLE_CONFIG_MAX_RX_HIGH_ALARM_CHAR_LEN;
    add_char_params.init_len = sizeof(uint8_t);
    add_char_params.is_var_len = true;
    add_char_params.char_props.write = 1;
    add_char_params.char_props.write_wo_resp = 1;
    add_char_params.char_props.read = 1;

    add_char_params.read_access = SEC_OPEN;
    add_char_params.write_access = SEC_OPEN;

    err_code = characteristic_add(p_config-&amp;gt;service_handle, &amp;amp;add_char_params, &amp;amp;p_config-&amp;gt;rx_handlesHigh_alarm);
    return err_code;

    // Add the RX Characteristic.
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with sending data from central to peripheral</title><link>https://devzone.nordicsemi.com/thread/322460?ContentTypeID=1</link><pubDate>Thu, 29 Jul 2021 12:41:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:702523b1-bd8f-4328-a62d-5b6e0132db99</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Can you connect&amp;nbsp;using&amp;nbsp;the nRF Connect for desktop : Bluetooth Low Energy app, then we can see which entry in the peer GATT table is handle 0x0003, this may be helpful in understanding what is occuring.&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with sending data from central to peripheral</title><link>https://devzone.nordicsemi.com/thread/322316?ContentTypeID=1</link><pubDate>Wed, 28 Jul 2021 19:25:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:93081d00-47e4-4d05-aece-f6e5c2a468d5</guid><dc:creator>stopbar</dc:creator><description>&lt;p&gt;Discovery seems fine to me. All the discovered handles matches handles assigned on peripheral. I think there is something wrong with sending or receiving, because even if i hardcode the handle on sending function it doesn&amp;quot;t work. Except this strange situation with 0x0003 value which i mentioned.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problem with sending data from central to peripheral</title><link>https://devzone.nordicsemi.com/thread/322313?ContentTypeID=1</link><pubDate>Wed, 28 Jul 2021 19:14:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00616bd1-eab9-4aec-a6bd-579845575808</guid><dc:creator>Darkenkade</dc:creator><description>&lt;p&gt;Hard to say without seeing more of the service/discovery code. Are you assigning all the handles properly after you perform the discovery on central?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>