<?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>Inquiry regarding Manual Pairing Code length</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/126960/inquiry-regarding-manual-pairing-code-length</link><description>I am using nRF Connect SDK (NCS) v2.9.0 for a Matter project. 
 Currently, the Manual Pairing Code generated is 21 digits long. I need to change this output to be 11 digits. 
 How should I modify the configuration or the project to achieve this?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 11 Mar 2026 14:51:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/126960/inquiry-regarding-manual-pairing-code-length" /><item><title>RE: Inquiry regarding Manual Pairing Code length</title><link>https://devzone.nordicsemi.com/thread/563046?ContentTypeID=1</link><pubDate>Wed, 11 Mar 2026 14:51:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8ba9ec0-1853-48fe-bce2-d4ec1ad802a3</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Thanks for your patience here. So&amp;nbsp; you need it programmatically. I assume you have tried&amp;nbsp;&lt;span&gt;&lt;a href="https://github.com/nrfconnect/sdk-connectedhomeip/blob/ee5eba1e42904a926d5f6e829ca7b3c83f1cce46/src/setup_payload/OnboardingCodesUtil.cpp#L39-L75"&gt;PrintOnboardingCodes&lt;/a&gt;, which is used in some of our SDK samples (&lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/samples/matter/common/src/app/matter_init.cpp#L345C2-L345C22"&gt;eg. this one&lt;/a&gt;). I am a bit uncertain if that gives you the short version, but I believe it does.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;EDIT: Got some input from R&amp;amp;D here:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;More specifically he needs to use this util GetManualPairingCode. Please note however, that Manual Pairing Code includes the Passcode. While device should have just SPAKE2+ Verifier (which is &amp;quot;encoded&amp;quot; passcode). The API will work only when Passcode is part of Factory Data.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;span&gt;In general both QR Code and Manual Pairing Code should be created during manufacturing and the fact we are showcasing QR code and Manual Pairing Code in the uart logs is just for debugging purpose -&amp;gt; but this is not always (in fact it should not be) possible to get from firmware (because of this passcode).&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inquiry regarding Manual Pairing Code length</title><link>https://devzone.nordicsemi.com/thread/562273?ContentTypeID=1</link><pubDate>Mon, 02 Mar 2026 05:56:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d1cf7b1-04d6-404d-a9e3-d7f88afc162a</guid><dc:creator>SunHuang</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p data-path-to-node="6"&gt;Thanks for the response, but I think there&amp;#39;s a misunderstanding. I am not looking for how to generate the code via &lt;code data-path-to-node="6" data-index-in-node="115"&gt;chip-tool&lt;/code&gt;.&lt;/p&gt;
&lt;p data-path-to-node="7"&gt;My requirement is to &lt;b data-path-to-node="7" data-index-in-node="21"&gt;retrieve the 11-digit Manual Pairing Code format directly via an API call within the MCU firmware&lt;/b&gt; (e.g., after a reboot). I need the device to be able to read its own 11-digit pairing code programmatically to display it on a local screen or output it via UART.&lt;/p&gt;
&lt;p data-path-to-node="8"&gt;In NCS (nRF Connect SDK), is there a specific API or a helper function in the Matter stack (connectedhomeip) to calculate or fetch the &lt;b data-path-to-node="8" data-index-in-node="135"&gt;Short Format (11-digit)&lt;/b&gt; manual pairing code instead of the 21-digit one?&lt;/p&gt;
&lt;p data-path-to-node="9"&gt;I have looked into &lt;code data-path-to-node="9" data-index-in-node="19"&gt;ConfigurationManager&lt;/code&gt; and &lt;code data-path-to-node="9" data-index-in-node="44"&gt;SetupPayload&lt;/code&gt;, but I would appreciate a code snippet or a specific function name that returns the 11-digit string.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inquiry regarding Manual Pairing Code length</title><link>https://devzone.nordicsemi.com/thread/561077?ContentTypeID=1</link><pubDate>Fri, 13 Feb 2026 08:22:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e2d2eaa-258c-4816-8d16-d640242b16ee</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Then I understand the reasoning behind it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you have any problems using the chip-tool command?&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/120882/how-to-change-the-manual-pairing-code-of-the-matter-sample-project/532378"&gt;&amp;nbsp;My coworker here might describe its use better than I.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inquiry regarding Manual Pairing Code length</title><link>https://devzone.nordicsemi.com/thread/561064?ContentTypeID=1</link><pubDate>Fri, 13 Feb 2026 02:09:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1c20b8a-b6b3-4560-97f1-09b5cc1902ee</guid><dc:creator>SunHuang</dc:creator><description>&lt;p&gt;My goal is to implement a way for an external controller to read the Manual Pairing Code during mass production.&lt;/p&gt;
&lt;p&gt;Since the 21-digit code is quite long for labeling and manual entry, I&amp;rsquo;m looking into using APIs to recalculate and force it into the 11-digit format.&lt;/p&gt;
&lt;p&gt;I already have a general direction for the implementation (likely by stripping the VID/PID from the payload generation logic), but I&amp;rsquo;d appreciate it if you could share any other methods or best practices you&amp;rsquo;ve encountered. I&amp;#39;m always looking for a more robust or efficient approach for the production line.&lt;/p&gt;
&lt;p&gt;Looking forward to your thoughts!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Inquiry regarding Manual Pairing Code length</title><link>https://devzone.nordicsemi.com/thread/560982?ContentTypeID=1</link><pubDate>Thu, 12 Feb 2026 09:22:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12e6c8c2-d7f7-43c5-b17d-334e3fe8fd73</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Having a quick look at the spec, I see that:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;The required and optional elements, along with a check digit, are encoded into either an 11-digit or 21-digit decimal numeric string, depending on whether the optional Vendor and Product ID information is included.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Have you tried &amp;#39;force-short&amp;#39; with the chip-tool?&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;&amp;nbsp; ./chip-tool&amp;nbsp;payload generate-manualcode [--existing-payload] [--discriminator] [--setup-pin-code] [--version] [--vendor-id] [--product-id] [--commissioning-mode] [--allow-invalid-payload] [--force-short-code]&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>