<?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>Invalid parameter error returned on sd_ble_gattc_char_values_read()</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91694/invalid-parameter-error-returned-on-sd_ble_gattc_char_values_read</link><description>Hello, 
 
 I am getting 0x07 error code when invoking sd_ble_gattc_char_values_read(..) function. 
 
 I am using SoftDevice 140 v6.1.1 APIs. I have an NRF52 dongle and I programmed PC-BLE-Driver (connectivity_4.1.4_usb_with_s140_6.1.1_dfu_pkg package</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 08 Sep 2022 07:15:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91694/invalid-parameter-error-returned-on-sd_ble_gattc_char_values_read" /><item><title>RE: Invalid parameter error returned on sd_ble_gattc_char_values_read()</title><link>https://devzone.nordicsemi.com/thread/385161?ContentTypeID=1</link><pubDate>Thu, 08 Sep 2022 07:15:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56944a65-e094-45a4-876a-8d37d21e482a</guid><dc:creator>TheThirdFriend</dc:creator><description>&lt;p&gt;Thank you so much. I used&amp;nbsp;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;sd_ble_gattc_read() and it&amp;#39;s working. also&amp;nbsp;&amp;nbsp;sd_ble_gattc_char_values_read()&amp;nbsp; worked with two handles. You made me happy &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f603.svg" title="Smiley"&gt;&amp;#x1f603;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid parameter error returned on sd_ble_gattc_char_values_read()</title><link>https://devzone.nordicsemi.com/thread/384967?ContentTypeID=1</link><pubDate>Wed, 07 Sep 2022 09:12:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69d05dec-080f-464f-925b-4ac4b1963f1a</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;NRF_ERROR_INVALID_PARAM can be returned in two cases:&lt;/p&gt;
&lt;p&gt;- provided handle_count is too big and cannot fit in ATT_MTU&lt;br /&gt;-&amp;nbsp;provided handle_count is less than 2&lt;/p&gt;
&lt;p&gt;In your case I can see the hndl count is only 1, so this is causing the issue. Also see:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/31049/ble-commands-on-nrf52840---multiple-reads-and-descriptor/122597"&gt;RE: BLE commands on nRF52840 - multiple reads and descriptor&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you only want to read one handle maybe consider using&amp;nbsp;&lt;span&gt;sd_ble_gattc_read() instead?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kenneth&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid parameter error returned on sd_ble_gattc_char_values_read()</title><link>https://devzone.nordicsemi.com/thread/384846?ContentTypeID=1</link><pubDate>Tue, 06 Sep 2022 16:04:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8d3f71e-ad70-48c6-a8e8-afbb49dd4b0f</guid><dc:creator>TheThirdFriend</dc:creator><description>&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2022_2D00_09_2D00_06-180206.png" /&gt;&lt;/p&gt;
&lt;p&gt;Yes, it returns 0x07 error code. I don&amp;#39;t understand which parameter is invalid. could you please tell me how can I debug it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid parameter error returned on sd_ble_gattc_char_values_read()</title><link>https://devzone.nordicsemi.com/thread/384821?ContentTypeID=1</link><pubDate>Tue, 06 Sep 2022 13:46:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd3bbfb5-29ae-482c-8728-153c39fb3e2c</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Are you sure that&amp;nbsp;sd_ble_gattc_char_values_read() return 0x07?&amp;nbsp;From nrf_error.h I can find that 0x07 means&amp;nbsp;NRF_ERROR_INVALID_PARAM, though I can&amp;#39;t find that specific error code listed in the api, but in any case the error code seems to give a hint that one of the parameters are invalid.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Initiate a GATT Read Multiple Characteristic Values procedure.
 *
 * @details This function initiates a GATT Read Multiple Characteristic Values procedure.
 *
 * @events
 * @event{@ref BLE_GATTC_EVT_CHAR_VALS_READ_RSP}
 * @endevents
 *
 * @mscs
 * @mmsc{@ref BLE_GATTC_READ_MULT_MSC}
 * @endmscs
 *
 * @param[in] conn_handle The connection handle identifying the connection to perform this procedure on.
 * @param[in] p_handles A pointer to the handle(s) of the attribute(s) to be read.
 * @param[in] handle_count The number of handles in p_handles.
 *
 * @retval ::NRF_SUCCESS Successfully started the Read Multiple Characteristic Values procedure.
 * @retval ::BLE_ERROR_INVALID_CONN_HANDLE Invalid Connection Handle.
 * @retval ::NRF_ERROR_INVALID_STATE Invalid Connection State.
 * @retval ::NRF_ERROR_INVALID_ADDR Invalid pointer supplied.
 * @retval ::NRF_ERROR_BUSY Client procedure already in progress.
 * @retval ::NRF_ERROR_TIMEOUT There has been a GATT procedure timeout. No new GATT procedure can be performed without reestablishing the connection.
 */
SVCALL(SD_BLE_GATTC_CHAR_VALUES_READ, uint32_t, sd_ble_gattc_char_values_read(uint16_t conn_handle, uint16_t const *p_handles, uint16_t handle_count));&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>