<?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>How to send Hex byte array using UART?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/111195/how-to-send-hex-byte-array-using-uart</link><description>Hi 
 I use nRF7002-DK, SDK:Ｖ2.5.2 with zephyr driver, I need to send recieved data or command from uart, data type is using with hex byte array to send, from example , the tx_buf and rx_buf are sending as string, which API we need to instead for this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 22 May 2024 11:16:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/111195/how-to-send-hex-byte-array-using-uart" /><item><title>RE: How to send Hex byte array using UART?</title><link>https://devzone.nordicsemi.com/thread/485376?ContentTypeID=1</link><pubDate>Wed, 22 May 2024 11:16:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c11cb159-4a59-46a5-b9b1-674a2ea6eec9</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Hi Tina.&lt;br /&gt;&lt;br /&gt;Hex byte arrays, you’ll need to convert them to normal byte arrays (and vice versa), so string format.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send Hex byte array using UART?</title><link>https://devzone.nordicsemi.com/thread/484622?ContentTypeID=1</link><pubDate>Thu, 16 May 2024 07:56:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7f36a31-f222-4f81-a6ec-f804c464e01e</guid><dc:creator>yithwe</dc:creator><description>&lt;p&gt;Hi JONATHAN&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I need to send hex array byte(not for string), &lt;a href="https://github.com/NordicDeveloperAcademy/ncs-fund/blob/main/v1.6.0-v1.9.1/lesson5/fund_less5_exer1_solution/src/main.c"&gt;example&lt;/a&gt;&amp;nbsp;is only provide for string send, I mean isn&amp;#39;t the tx transmit API for hex array byte?&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Tina&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send Hex byte array using UART?</title><link>https://devzone.nordicsemi.com/thread/484610?ContentTypeID=1</link><pubDate>Thu, 16 May 2024 06:27:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1eee811-a07e-49f9-8db3-4b7098a9750e</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Maybe have a look at the solution to convert array to string here.&amp;nbsp;&lt;a href="https://stackoverflow.com/questions/6357031/how-do-you-convert-a-byte-array-to-a-hexadecimal-string-in-c"&gt;https://stackoverflow.com/questions/6357031/how-do-you-convert-a-byte-array-to-a-hexadecimal-string-in-c&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send Hex byte array using UART?</title><link>https://devzone.nordicsemi.com/thread/484588?ContentTypeID=1</link><pubDate>Thu, 16 May 2024 00:53:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfc0cd16-fd04-4d25-985b-a552bfb6af30</guid><dc:creator>yithwe</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Thanks for your reply, for your information, I already use&amp;nbsp;&lt;a href="https://github.com/NordicDeveloperAcademy/ncs-fund/blob/main/v1.6.0-v1.9.1/lesson5/fund_less5_exer1_solution/src/main.c"&gt;this&lt;/a&gt;&amp;nbsp;sample code(&lt;a href="https://academy.nordicsemi.com/courses/nrf-connect-sdk-fundamentals/lessons/lesson-4-serial-communication-uart/topic/exercise-1-5/"&gt;academy example&lt;/a&gt;) to change tx buffer for send hex byte array, it&amp;#39;s can&amp;#39;t work.&lt;/p&gt;
&lt;p&gt;As&amp;nbsp;below tx transmit code, it&amp;#39;s use for string to transmit,&amp;nbsp;it&amp;#39;s can&amp;#39;t work for hex byte array.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static uint8_t tx_buf[] =   {&amp;quot;nRF Connect SDK Fundamentals Course\n\r&amp;quot;
                             &amp;quot;Press 1-3 on your keyboard to toggle LEDS 1-3 on your development kit\n\r&amp;quot;};

ret = uart_tx(uart, tx_buf, sizeof(tx_buf), SYS_FOREVER_MS);
	if (ret) {
		return 1;
	}&lt;/pre&gt;Best Regards&lt;/p&gt;
&lt;p&gt;&amp;nbsp; &amp;nbsp; Tina&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send Hex byte array using UART?</title><link>https://devzone.nordicsemi.com/thread/483528?ContentTypeID=1</link><pubDate>Wed, 15 May 2024 13:42:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3f9fdc1-de4b-48c3-acfc-43b372e50f72</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;You can find the solutions here:&amp;nbsp;&lt;a href="https://github.com/NordicDeveloperAcademy/ncs-fund/tree/main/v1.6.0-v1.9.1/lesson5/fund_less5_exer1_solution"&gt;https://github.com/NordicDeveloperAcademy/ncs-fund/tree/main/v1.6.0-v1.9.1/lesson5/fund_less5_exer1_solution&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>