<?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>nRF Connect MQTT returns -22 invalid argument</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89810/nrf-connect-mqtt-returns--22-invalid-argument</link><description>Hello Support, 
 In my project I use the nrf52840 with the nRF Connect SDK to create a OpenThread device with an Secure MQTT connection to a broker. 
 I&amp;#39;ve got the OpenThread working, I can use the Zephyr DNS and Sockets. 
 I would like to connect with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Jul 2022 08:13:16 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89810/nrf-connect-mqtt-returns--22-invalid-argument" /><item><title>RE: nRF Connect MQTT returns -22 invalid argument</title><link>https://devzone.nordicsemi.com/thread/377537?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2022 08:13:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50ab790e-dcfe-40bc-806a-c54aa315cf1c</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Frank,&lt;br /&gt;&lt;br /&gt;Thank you for this information.&lt;br /&gt;&lt;br /&gt;I am glad to hear that everything is working out well for now.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect MQTT returns -22 invalid argument</title><link>https://devzone.nordicsemi.com/thread/377515?ContentTypeID=1</link><pubDate>Tue, 19 Jul 2022 06:52:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ca699de-701b-4a31-b6a1-cfbe9a233cec</guid><dc:creator>fhfs</dc:creator><description>&lt;p&gt;I was able to connect to the Azure IoT Hub using the zephyr dns and the Openthread network, and I got an error in the MQTT Connack. I supplied bad credentials, this was expected. This is all based on the Zephyr Azure sample.&lt;/p&gt;
&lt;p&gt;I am now trying to get the nRF Connect SDK&amp;#39;s Azure Sample working. Because we use DPS, for our device provisioning. I will let you know, if it doesnt work, but it seems very possible.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect MQTT returns -22 invalid argument</title><link>https://devzone.nordicsemi.com/thread/377349?ContentTypeID=1</link><pubDate>Mon, 18 Jul 2022 08:20:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73dfe687-68f0-44eb-aabd-2037124b1a36</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Frank,&lt;br /&gt;&lt;br /&gt;Could you please provide information about the current status?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect MQTT returns -22 invalid argument</title><link>https://devzone.nordicsemi.com/thread/377259?ContentTypeID=1</link><pubDate>Fri, 15 Jul 2022 20:51:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4972495-dc91-413b-b0c7-51e36a365756</guid><dc:creator>fhfs</dc:creator><description>&lt;p&gt;I had to modify the broker_init function to support ipv6 instead of ipv4.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect MQTT returns -22 invalid argument</title><link>https://devzone.nordicsemi.com/thread/377051?ContentTypeID=1</link><pubDate>Thu, 14 Jul 2022 21:31:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39d331a8-ba4c-492f-ae6f-dea51a5fef51</guid><dc:creator>brown27</dc:creator><description>&lt;p&gt;Hello, looks like some nice work! Out of curiosity, how much have you had to adapt the Azure IoT Hub sample and other files so far (other than the prj.conf and MBedTLS that you showed here)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect MQTT returns -22 invalid argument</title><link>https://devzone.nordicsemi.com/thread/376406?ContentTypeID=1</link><pubDate>Mon, 11 Jul 2022 11:37:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eacc3447-6c4a-41da-be1c-c9974c33c512</guid><dc:creator>fhfs</dc:creator><description>&lt;p&gt;I tracked the error to mbedtls_x509_crt_parse failed&lt;/p&gt;
&lt;p&gt;Where it failed with error -9774 (-0x262e). Google showed this means &amp;quot;Signature algorithm (oid) isunsupported&amp;quot;&lt;/p&gt;
&lt;p&gt;It had trouble parsing the certificate because it was missing the proper algorithms to parse them.&lt;/p&gt;
&lt;p&gt;So I enabled the required algorithms in MBedTLS.&lt;/p&gt;
&lt;p&gt;For me this was:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define MBEDTLS_ECDSA_C
#define MBEDTLS_SHA256_C
#define MBEDTLS_RSA_C
#define MBEDTLS_AES_C
#define MBEDTLS_PKCS1_V21&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Now the TCP TLS connection connects and returns handshake error -0x7280&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>