<?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>Using &amp;quot;ble_nus_c_string_send&amp;quot; to send a long hex number</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23829/using-ble_nus_c_string_send-to-send-a-long-hex-number</link><description>I am running a modified version of the app_uart_c example on a nRF52832 using softdevice 132. 
 I want to send a large hex number to the peripheral I&amp;#39;m connected to. Is it enough to break up the entire hex number into 8 bit integers, create an array</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 27 Jul 2017 00:00:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23829/using-ble_nus_c_string_send-to-send-a-long-hex-number" /><item><title>RE: Using "ble_nus_c_string_send" to send a long hex number</title><link>https://devzone.nordicsemi.com/thread/93750?ContentTypeID=1</link><pubDate>Thu, 27 Jul 2017 00:00:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec6d39a0-a984-4b21-b25e-41e9a11facd3</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;Length in bytes&lt;/p&gt;
&lt;p&gt;e.g. unit32_t would be 4 bytes&lt;/p&gt;
&lt;p&gt;You can also get this using sizeof&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using "ble_nus_c_string_send" to send a long hex number</title><link>https://devzone.nordicsemi.com/thread/93748?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2017 23:52:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10817888-cf28-44b6-9027-49c096542cda</guid><dc:creator>tolab</dc:creator><description>&lt;p&gt;The function calls for the length of the message as one of its arguments. Is this referring to the length of the array, or the length of the number in bits?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using "ble_nus_c_string_send" to send a long hex number</title><link>https://devzone.nordicsemi.com/thread/93749?ContentTypeID=1</link><pubDate>Wed, 26 Jul 2017 22:34:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85e46e7d-a497-44c8-b772-11e54f2532b7</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;You can just pass a pointer to the &amp;quot;large hex number&amp;quot;, however you will need to deal with the &amp;quot;endianness&amp;quot; of the data when its received.&lt;/p&gt;
&lt;p&gt;Or you could copy the number e.g. unit32_t to a array of bytes, byte by byte in the order in which your receiver expects the int to be formatted.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>