<?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>nRF52840 - sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/39467/nrf52840---sd_ble_gattc_exchange_mtu_request-returned-nrf_error_invalid_param</link><description>Hi All. 
 I have modified the ble_app_multilink_central project, and replaced the button service LBS with the NUS service. When I switch on my peripheral device (based on the ble_app_uart project), then I get the following errors; 
 &amp;lt;info&amp;gt; app: Multilink</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Oct 2018 14:48:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/39467/nrf52840---sd_ble_gattc_exchange_mtu_request-returned-nrf_error_invalid_param" /><item><title>RE: nRF52840 - sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.</title><link>https://devzone.nordicsemi.com/thread/153677?ContentTypeID=1</link><pubDate>Fri, 19 Oct 2018 14:48:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46b10d82-13f8-4441-a4bf-dbd56803725d</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;That is great news! Very strange though. I can&amp;#39;t remember seeing anything like it before, and I have no idea what it could have been.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have nice weekend.&lt;/p&gt;
&lt;p&gt;-Martin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 - sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.</title><link>https://devzone.nordicsemi.com/thread/153675?ContentTypeID=1</link><pubDate>Fri, 19 Oct 2018 14:32:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56597c92-d169-437e-8953-59ce16afc476</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Hi Martin.&lt;/p&gt;
&lt;p&gt;So, I made a copy of the original multilink_central example from the SDK, and made all the NUS changes I did first time around to it again as a fresh project and it now works!? I did a diff on the two main files and they are the same, so are the configs. Not sure what is going on but must be a weird issue with the first project.&lt;/p&gt;
&lt;p&gt;The m_gatt structure variables are now set and don&amp;#39;t start changing all the time.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think a good thing to take from this is that rebuilding the project may help solve some weird issues like this one.&lt;/p&gt;
&lt;p&gt;Thanks for your help Martin, ended up pointing me in the right direction.&lt;/p&gt;
&lt;p&gt;Phil&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 - sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.</title><link>https://devzone.nordicsemi.com/thread/153604?ContentTypeID=1</link><pubDate>Fri, 19 Oct 2018 09:45:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30ce8307-d590-48ff-99e8-bedc14a713b3</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;I get the same on my central. However if I let it run after the breakpoint (while peripheral switched off i.e. not connecting) the values all start jumping around to random numbers.&lt;/p&gt;
&lt;p&gt;I am using SEGGER embedded studio.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1539942180377v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 - sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.</title><link>https://devzone.nordicsemi.com/thread/153562?ContentTypeID=1</link><pubDate>Fri, 19 Oct 2018 07:25:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:381e8685-45e6-471c-9e58-f64689ed0cd3</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;It may look like your &lt;em&gt;att_mtu_desired&lt;/em&gt; variables are not initialized properly,&amp;nbsp;but just contain some random value. Can you try to debug and keep an eye on your &lt;em&gt;m_gatt&lt;/em&gt; variable? In the picture below I put a break point below &lt;em&gt;gatt_init()&lt;/em&gt; and I can see that my&amp;nbsp;&lt;span&gt;&lt;em&gt;att_mtu_desired&lt;/em&gt; variables all hold the value 247.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-06f374528cee405c85a55b3b0ed7a25d/pastedimage1539933688634v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;What compiler are you using? It is strange, because your desired MTUs should all be set when you call &lt;em&gt;nrf_ble_gatt_init().&lt;/em&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 - sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.</title><link>https://devzone.nordicsemi.com/thread/153532?ContentTypeID=1</link><pubDate>Thu, 18 Oct 2018 20:15:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fdce2a6-eadb-4f6d-a5e6-80fbc682d053</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;I think my problem is definately something to do with this before the&amp;nbsp;&lt;span&gt;NRF_ERROR_INVALID_PARAM.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: Updating ATT MTU to 247 bytes (desired: 4352) on connection 0x0.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Have no idea where the 4352 is coming from.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 - sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.</title><link>https://devzone.nordicsemi.com/thread/153528?ContentTypeID=1</link><pubDate>Thu, 18 Oct 2018 19:15:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8ab9a7e-727e-4558-bc16-e18184a63eaa</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Hi, so it connects and stays connected ok for you?&lt;/p&gt;
&lt;p&gt;1 - Same code&lt;/p&gt;
&lt;p&gt;2 -&amp;nbsp;nRF5_SDK_15.0.0_a53641a on both applications&lt;/p&gt;
&lt;p&gt;3 - Central is nRF52840 dev board, peripheral is nRF52832 dev board.&lt;/p&gt;
&lt;p&gt;4 - SD on the nRF52832 is S132, SD on the nRF52840 is S140.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t have an extra dev kit to act as a sniffer. We could buy another I suppose.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 - sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.</title><link>https://devzone.nordicsemi.com/thread/153412?ContentTypeID=1</link><pubDate>Thu, 18 Oct 2018 08:59:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f202ac5c-8da1-4eb0-b55c-a7fd861a98c9</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Disconnect reason 0x13 (&lt;span&gt;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v6.0.0/group___b_l_e___h_c_i___s_t_a_t_u_s___c_o_d_e_s.html#gad4caeb4bcc901a4f1b00068c498a090c"&gt;BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION&lt;/a&gt;) indicates that the device&amp;nbsp;in the other&amp;nbsp;end of the link (your peripheral) decided to disconnect. It could&amp;nbsp;very well be because&amp;nbsp;of the failed MTU update procedure.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But I&amp;#39;m still not able to recreate the problem. &lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span&gt;Are you still using the same code as you have shown here, both on the peripheral and the central?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Are you using SDK 15.0.0 on both applications?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span&gt;Are both devices nRF52840s?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;Are you using S140 v6.0.0 on both applications?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span&gt;Can you provide a sniffer log? If you have an extra Nordic dev kit to spare you can use our&amp;nbsp;&lt;a title="nRF Tools" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.tools/dita/tools/sniffer/sniffer_intro.html?resultof=%22%73%6e%69%66%66%65%72%22%20"&gt;nRF Bluetooth Sniffer&lt;/a&gt;&amp;nbsp;solution.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 - sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.</title><link>https://devzone.nordicsemi.com/thread/153325?ContentTypeID=1</link><pubDate>Wed, 17 Oct 2018 16:10:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e55ed085-bc29-4405-b244-cadf7804d5ee</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Hi. I have just added the answer in this other question (link below), which has solved one issue of it crashing. Now the remaining issue seems to be that the MTU exchange fails, so the link disconnects after about 20 seconds.&lt;/p&gt;
&lt;p&gt;&amp;lt;info&amp;gt; app: NUS central link 0x0 disconnected (reason: 0x13)&lt;/p&gt;
&lt;p&gt;Here is the log.&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/0027.log.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/27464/multiple-connect-discover-service-multiple-why"&gt;devzone.nordicsemi.com/.../multiple-connect-discover-service-multiple-why&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 - sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.</title><link>https://devzone.nordicsemi.com/thread/153234?ContentTypeID=1</link><pubDate>Wed, 17 Oct 2018 12:41:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:432e00a9-39c1-43b2-8bb7-b88a021d7333</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Hi, I have changed the debug level and get this;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;info&amp;gt; app: Multilink example started.&lt;br /&gt;&amp;lt;info&amp;gt; app: Start scanning for device name SWTG1.&lt;br /&gt;&amp;lt;info&amp;gt; app: Name is a match&lt;br /&gt;&amp;lt;error&amp;gt; nrf_ble_gatt: sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.&lt;br /&gt;&amp;lt;info&amp;gt; app: Connection 0x0 established, starting DB discovery.&lt;br /&gt;&amp;lt;debug&amp;gt; ble_db_disc: Starting discovery of service with UUID 0x1 on connection handle 0x0.&lt;br /&gt;&amp;lt;info&amp;gt; app: Start scanning for device name SWTG1.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: Peer on connection 0x0 requested an ATT MTU of 247 bytes.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: Updating ATT MTU to 247 bytes (desired: 4352) on connection 0x0.&lt;br /&gt;&amp;lt;error&amp;gt; nrf_ble_gatt: sd_ble_gatts_exchange_mtu_reply() returned NRF_ERROR_INVALID_PARAM.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: Peer on connection 0x0 requested a data length of 251 bytes.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: Updating data length to 182 on connection 0x0.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: Data length updated to 182 on connection 0x0.&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: max_rx_octets: 182&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: max_tx_octets: 182&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: max_rx_time: 2120&lt;br /&gt;&amp;lt;debug&amp;gt; nrf_ble_gatt: max_tx_time: 2120&lt;br /&gt;&amp;lt;error&amp;gt; nrf_ble_gatt: sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.&lt;br /&gt;&amp;lt;debug&amp;gt; ble_db_disc: Found service UUID 0x1.&lt;br /&gt;&amp;lt;debug&amp;gt; ble_db_disc: Found service UUID 0x0.&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; ble_db_disc: Found service UUID 0x0.&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; ble_db_disc: Found service UUID 0x0.&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; ble_db_disc: Found service UUID 0x0.&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; ble_db_disc: Found service UUID 0x0.&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; ble_db_disc: Found service UUID 0x0.&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; ble_db_disc: Found service UUID 0x0.&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;error&amp;gt; nrf_ble_gatt: sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;error&amp;gt; nrf_ble_gatt: sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;error&amp;gt; nrf_ble_gatt: sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;error&amp;gt; nrf_ble_gatt: sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.&lt;br /&gt;&amp;lt;debug&amp;gt; ble_db_disc: Discovery of service with UUID 0x1 completed with success on connection handle 0x0.&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;info&amp;gt; app: NUS service discovered on conn_handle 0x0&lt;br /&gt;&amp;lt;info&amp;gt; app: Connected to device with Nordic UART Service.&lt;br /&gt;&amp;lt;debug&amp;gt; ble_db_disc: Discovery of service with UUID 0x1 completed with success on connection handle 0x0.&lt;br /&gt;&amp;lt;debug&amp;gt; app: call to ble_nus_on_db_disc_evt for instance 0 and link 0x0!&lt;br /&gt;&amp;lt;info&amp;gt; app: NUS service discovered on conn_handle 0x0&lt;br /&gt;&amp;lt;error&amp;gt; app: ERROR 17 [NRF_ERROR_BUSY] at C:\Nordic_Semi\nRF5_SDK_15.0.0_a53641a\examples\ble_central\ble_app_multilink_central - Dock\main.c:215&lt;br /&gt;PC at: 0x0002D77D&lt;br /&gt;&amp;lt;error&amp;gt; app: End of error report&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 - sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.</title><link>https://devzone.nordicsemi.com/thread/153226?ContentTypeID=1</link><pubDate>Wed, 17 Oct 2018 12:29:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33237b9e-d2e5-4774-b826-1985480a0281</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;I still don&amp;#39;t get the same output as you. Can you try to set log default level to &amp;#39;debug&amp;#39;?&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-06f374528cee405c85a55b3b0ed7a25d/pastedimage1539779010751v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;After I did that I get this output:&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-06f374528cee405c85a55b3b0ed7a25d/pastedimage1539779328055v3.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 - sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.</title><link>https://devzone.nordicsemi.com/thread/153064?ContentTypeID=1</link><pubDate>Tue, 16 Oct 2018 12:55:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1aef9b2a-2af4-4183-be4b-76ec0e01c49d</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Hi Martin, here are the files. Same a before, apart from maybe a few logging bits.&lt;/p&gt;
&lt;p&gt;I have also attached the peripheral main.c, because I added some manufacturer data, don&amp;#39;t think that will have an impact.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/multilink_5F00_central_5F00_nus.zip"&gt;devzone.nordicsemi.com/.../multilink_5F00_central_5F00_nus.zip&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2867.uart_5F00_peripheral.zip"&gt;devzone.nordicsemi.com/.../2867.uart_5F00_peripheral.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 - sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.</title><link>https://devzone.nordicsemi.com/thread/153061?ContentTypeID=1</link><pubDate>Tue, 16 Oct 2018 12:47:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2995eb48-583d-48ea-88f4-cf0390a470cd</guid><dc:creator>MartinBL</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How can I reproduce this? I tested your code, but just I got this output:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-06f374528cee405c85a55b3b0ed7a25d/pastedimage1539693959662v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Can you upload your most recent code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 - sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.</title><link>https://devzone.nordicsemi.com/thread/152906?ContentTypeID=1</link><pubDate>Mon, 15 Oct 2018 13:58:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:468185f9-c36d-48c5-a0cc-68da768a4a72</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;Have added some logging and in nrf_ble_gatt.c the code below is trying to set the desired mtu to&amp;nbsp;4352 bytes?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;NRF_LOG_INFO(&amp;quot;MTU to %u bytes&amp;quot;, p_gatt-&amp;gt;links[conn_handle].att_mtu_desired);&lt;/p&gt;
&lt;p&gt;err_code = sd_ble_gattc_exchange_mtu_request(conn_handle,&lt;br /&gt; p_gatt-&amp;gt;links[conn_handle].att_mtu_desired);&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52840 - sd_ble_gattc_exchange_mtu_request() returned NRF_ERROR_INVALID_PARAM.</title><link>https://devzone.nordicsemi.com/thread/152856?ContentTypeID=1</link><pubDate>Mon, 15 Oct 2018 11:41:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb3fed1b-7119-430e-ac12-a0a332bd9e34</guid><dc:creator>Philip</dc:creator><description>&lt;p&gt;EDIT- Forgot this method gatt_evt_handler, and edited void gatt_init(void). Still the same error tho.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;/**@brief Function for handling events from the GATT library. */
void gatt_evt_handler(nrf_ble_gatt_t * p_gatt, nrf_ble_gatt_evt_t const * p_evt)
{
    if (p_evt-&amp;gt;evt_id == NRF_BLE_GATT_EVT_ATT_MTU_UPDATED)
    {
        NRF_LOG_INFO(&amp;quot;ATT MTU exchange completed.&amp;quot;);

        m_ble_nus_max_data_len = p_evt-&amp;gt;params.att_mtu_effective - OPCODE_LENGTH - HANDLE_LENGTH;
        NRF_LOG_INFO(&amp;quot;Ble NUS max data length set to 0x%X(%d)&amp;quot;, m_ble_nus_max_data_len, m_ble_nus_max_data_len);
    }
}

/**@brief Function for initializing the GATT library. */
void gatt_init(void)
{
    ret_code_t err_code;

    err_code = nrf_ble_gatt_init(&amp;amp;m_gatt, gatt_evt_handler);
    APP_ERROR_CHECK(err_code);

    err_code = nrf_ble_gatt_att_mtu_central_set(&amp;amp;m_gatt, NRF_SDH_BLE_GATT_MAX_MTU_SIZE);
    APP_ERROR_CHECK(err_code);
}
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>