<?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>Ble_nus characters not sent to emStudio Terminal using ble_app_uart_c</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/52555/ble_nus-characters-not-sent-to-emstudio-terminal-using-ble_app_uart_c</link><description>I am using SDK v15.3 and modifying the ble_app_uart_c example to setup ble_nus connection between nRF DK board and a custom peripheral. I can use nRF Connect to send and receive various length hex strings to/from the peripheral device. When using ble_app_uart_c</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 01 Oct 2019 12:10:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/52555/ble_nus-characters-not-sent-to-emstudio-terminal-using-ble_app_uart_c" /><item><title>RE: Ble_nus characters not sent to emStudio Terminal using ble_app_uart_c</title><link>https://devzone.nordicsemi.com/thread/212806?ContentTypeID=1</link><pubDate>Tue, 01 Oct 2019 12:10:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07cb6655-faaf-4792-828d-fa1c9c4cb5e4</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Maybe&amp;nbsp;I&amp;#39;m misunderstanding your requirements, but it seems to work as expected here. I used the original UART client/server example from SDK 15.3.0 and only changed the log level to print debug &amp;#39;level&amp;#39; messages. The screenshot below shows the input data in Realterm and when it&amp;#39;s being received by the server.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-7392378937b34b04ab2fdf8e73bb94ee/pastedimage1569931726022v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble_nus characters not sent to emStudio Terminal using ble_app_uart_c</title><link>https://devzone.nordicsemi.com/thread/212366?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2019 19:24:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24a1242b-747c-46e8-91a5-b86622b0fc6a</guid><dc:creator>EricDelangis</dc:creator><description>&lt;p&gt;I tried using RealTerm to send hex strings to the peripheral device using the BLE NUS service.&amp;nbsp; When I send the string using RealTerm by pressing the &amp;quot;Send ASCII&amp;quot; button, I see the UART buffer filled with the ASCII equivalent of my hex string - exactly what you&amp;#39;d expect.&amp;nbsp; But when I try to send the raw hex string using various combinations of hex representations such as 0xFF, 0xffff, FFFF, FF, FF FF FF, etc. the hex values never show up in the UART buffer found in function&amp;nbsp;void uart_event_handle(app_uart_evt_t * p_event).&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have to believe that RealTerm is actually sending the hex string (sense it sends the ASCII string OK) but the example code must be parsing the console input for printable (ASCII) characters and fills the buffer only with printable characters.&amp;nbsp; Seemingly, none printable, i.e. hex, characters don&amp;#39;t show up in the UART buffer as is displayed in the debug window with this&amp;nbsp; NRF_LOG_HEXDUMP_DEBUG(data_array, index) command.&lt;/p&gt;
&lt;p&gt;If the example code does parse the console input where can I find this code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble_nus characters not sent to emStudio Terminal using ble_app_uart_c</title><link>https://devzone.nordicsemi.com/thread/212317?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2019 13:59:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bceb859d-2275-4214-9d59-5349fc017db3</guid><dc:creator>EricDelangis</dc:creator><description>&lt;p&gt;I am using the Segger emTerminal to enter information that I want sent over the BLE NUS service to the peripheral device.&amp;nbsp; I am using the Segger RTT debug messaging to do a HexDump of the UART transmit buffer.&amp;nbsp; This buffer contains the ASCII character representation of the hex characters that I am trying to send to the peripheral device as hex.&amp;nbsp; I will try RealTerm to see if it transmits raw hex values.&amp;nbsp; However, I would like to find a function in your source that does convert ASCII characters to hex.&amp;nbsp; When I try to do this, the uart_event_handle() routine in main.c of the&amp;nbsp;&lt;span&gt;ble_app_uart_c example, to my surprise, it causes the routine to be called with every character I type as opposed to actually waiting for the buffer to be filled before calling the routine. I added my code under the first case statement:&amp;nbsp;case APP_UART_DATA_READY:&amp;nbsp;UNUSED_VARIABLE(app_uart_get(&amp;amp;data_array[index])); and the case statement is triggered with every character entered in the emTerminal.&amp;nbsp; I need the buffer to be full in order to convert the characters from the ASCII representation to raw hex.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If you can direct me as to how and where I can intercept the ASCII characters so I can convert them to hex in the transmit buffer, I would appreciate it.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble_nus characters not sent to emStudio Terminal using ble_app_uart_c</title><link>https://devzone.nordicsemi.com/thread/212282?ContentTypeID=1</link><pubDate>Fri, 27 Sep 2019 12:20:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ef5d7d4-2800-4e97-b9e5-98af1e14c5c4</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;&lt;span&gt;Are you referring to the debug terminal in SES&amp;nbsp;&lt;/span&gt;&lt;span&gt;that displays&amp;nbsp;&lt;/span&gt;&lt;span&gt;debug messages from Segger RTT&lt;/span&gt;&lt;span&gt;, and a&lt;/span&gt;&lt;span&gt;re you using RTT&amp;nbsp;&lt;/span&gt;&lt;span&gt;instead of&lt;/span&gt;&lt;span&gt;&amp;nbsp;UART to transfer the data? Anyway, I think it&amp;nbsp;&lt;/span&gt;&lt;span&gt;would&amp;nbsp;&lt;/span&gt;&lt;span&gt;be better to try a more&lt;/span&gt;&lt;span&gt;&amp;nbsp;advanced serial client like RealTerm which allow you to specify arbitrary values.&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble_nus characters not sent to emStudio Terminal using ble_app_uart_c</title><link>https://devzone.nordicsemi.com/thread/212118?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2019 16:02:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d504235b-d59e-4a39-9ce0-a57f2713effa</guid><dc:creator>EricDelangis</dc:creator><description>&lt;p&gt;No. I am entering a hex string into the emStudio Terminal to be sent to the peripheral device.&amp;nbsp; emStudio is entering the characters that I enter into the transmit buffer as ASCII characters.&amp;nbsp; The peripheral device requires hex data to be sent, not ASCII.&amp;nbsp; I am trying to send a string like &amp;quot;fdfc038300651c&amp;quot; I&amp;#39;ve tried preceding these characters with a &amp;quot;0x&amp;quot; but the transmit&amp;nbsp; buffer is filled with the ASCII equivalent characters of &amp;quot;66 64 66 63 30 33 38 33 30 30 36 35 31 63&amp;quot;.&amp;nbsp; I wrote a routine to try to convert the ASCII characters in the FIFO buffer to hex values but it causes some odd behavior with the application.&amp;nbsp; If you can tell me how to send raw hex values over the BLE NUS connection from the terminal session, that would help.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble_nus characters not sent to emStudio Terminal using ble_app_uart_c</title><link>https://devzone.nordicsemi.com/thread/211970?ContentTypeID=1</link><pubDate>Thu, 26 Sep 2019 08:13:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab0b8572-ce01-4521-975d-bfdd6c47ef30</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You can use the&amp;nbsp;NRF_LOG_HEXDUMP_INFO(p_data, len) macro&amp;nbsp;for printing the hex values. But they are converted to ASCII to make it readable in the terminal. Is that not what you want?&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ble_nus characters not sent to emStudio Terminal using ble_app_uart_c</title><link>https://devzone.nordicsemi.com/thread/211842?ContentTypeID=1</link><pubDate>Wed, 25 Sep 2019 13:13:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0866968-6808-462c-90b7-b4dd8aeba694</guid><dc:creator>EricDelangis</dc:creator><description>&lt;p&gt;It turns out that the &amp;quot;hex&amp;quot; values are actually converted to &amp;quot;ASCII&amp;quot; values.&amp;nbsp; Now the question is... How do I send hex values through SES&amp;#39;s emTerminal?&amp;nbsp; &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>