<?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>scanf is not working in NRF5340 using nrf-connect SDK</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109320/scanf-is-not-working-in-nrf5340-using-nrf-connect-sdk</link><description>Hi, 
 I am trying to use scanf to take the user input from the debug console for the app core. 
 I have added the below code snippet in my application. 
 
 #include &amp;lt;stdio.h&amp;gt; 
 
 
 int read_data = 0; 
 printk(&amp;quot;press anything to scan \r\n&amp;quot;); 
 scanf(&amp;quot;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 18 Mar 2024 14:01:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109320/scanf-is-not-working-in-nrf5340-using-nrf-connect-sdk" /><item><title>RE: scanf is not working in NRF5340 using nrf-connect SDK</title><link>https://devzone.nordicsemi.com/thread/474359?ContentTypeID=1</link><pubDate>Mon, 18 Mar 2024 14:01:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9c4a090f-26f9-43c7-ac1c-c6238cf0e6cb</guid><dc:creator>khelmutlord</dc:creator><description>&lt;p&gt;Hello Ajit,&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;I see some references to scanf issues in this (very old) GitHub issue:&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://github.com/zephyrproject-rtos/zephyr/issues/25599"&gt;https://github.com/zephyrproject-rtos/zephyr/issues/25599&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Could you try using the &amp;quot;console_getline&amp;quot; calls shown in this example instead?&lt;/p&gt;
&lt;p&gt;&lt;a id="" href="https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/subsys/console/getline"&gt;https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/subsys/console/getline&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Helmut Lord&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>