<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Wireless MCU中的主题 Re: Wireless UART Demo with USB-KW41Z</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/Wireless-UART-Demo-with-USB-KW41Z/m-p/604341#M1700</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Juan!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Mar 2017 18:18:35 GMT</pubDate>
    <dc:creator>kevinlfw</dc:creator>
    <dc:date>2017-03-01T18:18:35Z</dc:date>
    <item>
      <title>Wireless UART Demo with USB-KW41Z</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Wireless-UART-Demo-with-USB-KW41Z/m-p/604337#M1696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the USB-KW41Z and I'm currently running the "wireless_uart" demo on the KW41Z. &amp;nbsp;I am running the "usb_device_cdc_vcom" demo found in NXP/MKW41Z_ConnSw_1.0.2/boards/usbkw41z_k22f/usb_examples. &amp;nbsp;I can connect to the KW41Z with the Kinetis BLE Toolbox app on my Android. &amp;nbsp;I can open up a terminal session on TeraTerm (115.2k baud) successfully. &amp;nbsp;I'm using IAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I type data into the console/uart and send it, I hit breakpoints in the wireless_uart project, so I know the data is getting transferred to the KW41Z. &amp;nbsp;However, it seems to stop there. &amp;nbsp;Nothing gets sent to the terminal. &amp;nbsp;If I type into the terminal, nothing gets sent to the Kinetis BLE Toolbox Wirelress UART app either. &amp;nbsp;I'd say the "link" between the wireless_uart demo and the usb_device_vcom demo is "broken." &amp;nbsp;How do I fix it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In wireless_uart demo, when I send data to the KW41Z via the smartphone app, it hits this method (located in app.c):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;static&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;BleApp_ReceivedUartStream&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;uint8_t &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;pStream&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; uint16_t streamLength&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; uint8_t &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;pBuffer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; NULL&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="comment token"&gt;/* Allocate buffer for asynchronous write */&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; pBuffer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;MEM_BufferAlloc&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;streamLength&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pBuffer &lt;SPAN class="operator token"&gt;!=&lt;/SPAN&gt; NULL&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="token function"&gt;Serial_AsyncWrite&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;gAppSerMgrIf&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; pStream&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; streamLength&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; Uart_TxCallBack&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; pBuffer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It eventually calls &lt;STRONG&gt;Serial_AsyncWrite&lt;/STRONG&gt;, which then steps into the method defined inSerialManager.c and look like it "successfully" completes since it returns gSerial_Success_c. &amp;nbsp;&lt;STRONG&gt;Uart_TxCallBack&lt;/STRONG&gt;&amp;nbsp;is called and in that method is a simple:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;static&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;Uart_TxCallBack&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;void&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;pBuffer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="token function"&gt;MEM_BufferFree&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pBuffer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;So my guess is I'm supposed to do something in Uart_TxCallBack to get it over to the PC terminal, something is wrong with&amp;nbsp;&lt;STRONG&gt;Serial_AsyncWrite&lt;/STRONG&gt;, or the configuration of the device/board in the project is not set up properly. &amp;nbsp;FYI,&amp;nbsp;&lt;STRONG&gt;Serial_AsyncWrite&lt;/STRONG&gt; does call&amp;nbsp;&lt;STRONG&gt;Serial_WriteInternal&lt;/STRONG&gt; which calls&amp;nbsp;&lt;STRONG&gt;LPUART_SendData(pSer-&amp;gt;serialChannel, pSer-&amp;gt;txQueue[idx].pData, pSer-&amp;gt;txQueue[idx].dataSize)&lt;/STRONG&gt;, and even after that, I see nothing in terminal. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S.&amp;nbsp;&lt;A href="https://community.nxp.com/thread/387224" rel="nofollow noopener noreferrer" target="_blank"&gt;BLE pairing&lt;/A&gt;&amp;nbsp;doesn't help. &amp;nbsp;&lt;STRONG&gt;UartStreamFlushTimerCallback&lt;/STRONG&gt;&amp;nbsp;is never executed, so does code exist in this example that is never used, and what is safe to remove?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2017 22:14:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Wireless-UART-Demo-with-USB-KW41Z/m-p/604337#M1696</guid>
      <dc:creator>kevinlfw</dc:creator>
      <dc:date>2017-02-27T22:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: Wireless UART Demo with USB-KW41Z</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Wireless-UART-Demo-with-USB-KW41Z/m-p/604338#M1697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kevin,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "usb_device_cdc_vcom" demo found in NXP/MKW41Z_ConnSw_1.0.2/boards/usbkw41z_k22f/usb_examples &amp;nbsp;is a simple demonstration program that uses the KSDK software. That enumerates the board as a COM port, which the users can open using terminal tools, such as TeraTerm. &lt;SPAN style="text-decoration: underline;"&gt;The demo echoes back any character it receives.&lt;/SPAN&gt;&lt;BR /&gt;The purpose of this demo is to show how to build a device of USB CDC class and to provide a simple project for further&lt;BR /&gt;development.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the BLE wireless_uart demo (...\usbkw41z_kw41z\wireless_examples\bluetooth\wireless_uart), you require to have the OpenSDA firmware on the K22 uC. Please follow steps provided in &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/thread/444708"&gt;this post&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&amp;nbsp;to flash your K22 with the correct OpenSDA firmware. Then follow steps on &lt;STRONG&gt;&lt;EM&gt;Chapter 5.15 Wireless UART&lt;/EM&gt;&lt;/STRONG&gt; at&amp;nbsp;&lt;EM&gt;BLE Demo Applications User's Guide.pdf&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;-JC&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2017 15:57:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Wireless-UART-Demo-with-USB-KW41Z/m-p/604338#M1697</guid>
      <dc:creator>jc_pacheco</dc:creator>
      <dc:date>2017-02-28T15:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Wireless UART Demo with USB-KW41Z</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Wireless-UART-Demo-with-USB-KW41Z/m-p/604339#M1698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks &lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/jcpacheco"&gt;jcpacheco&lt;/A&gt;‌, that worked.&amp;nbsp; Is the OpenSDA firmware source code publicly available?&amp;nbsp; I'd like to take the USB VCOM example and add in the UART functionality so that I can, 1. make it my own USB device and 2. remove the MSD functionality that the OpenSDA image has.&amp;nbsp;If not, do I just have to use the USB VCOM example (w/ the K22) and make use of the UART drivers in the SDK?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 15:48:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Wireless-UART-Demo-with-USB-KW41Z/m-p/604339#M1698</guid>
      <dc:creator>kevinlfw</dc:creator>
      <dc:date>2017-03-01T15:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Wireless UART Demo with USB-KW41Z</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Wireless-UART-Demo-with-USB-KW41Z/m-p/604340#M1699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kevin,&amp;nbsp;&lt;/P&gt;&lt;P&gt;The OpenSDA firmware source code is not public, so yes, you can use the other demo as base example, the K22 is basically serving as a "USB2SER" interface which you can replicate using the UART driver from the KSDK.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 16:10:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Wireless-UART-Demo-with-USB-KW41Z/m-p/604340#M1699</guid>
      <dc:creator>jc_pacheco</dc:creator>
      <dc:date>2017-03-01T16:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Wireless UART Demo with USB-KW41Z</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Wireless-UART-Demo-with-USB-KW41Z/m-p/604341#M1700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Juan!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Mar 2017 18:18:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Wireless-UART-Demo-with-USB-KW41Z/m-p/604341#M1700</guid>
      <dc:creator>kevinlfw</dc:creator>
      <dc:date>2017-03-01T18:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Wireless UART Demo with USB-KW41Z</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Wireless-UART-Demo-with-USB-KW41Z/m-p/604342#M1701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="jx-jive-macro-user" href="https://community.nxp.com/people/jcpacheco"&gt;jcpacheco&lt;/A&gt;‌ I'm back.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I put a demo UART program on the K22 that uses UART1, expecting that when I connect via BLE and send a message, I would see the UART1 interrupt get hit, meaning the KW41Z passed the data along to K22, however that is not the case. &amp;nbsp;Is there something I'm missing? &amp;nbsp;Via BLE, I do see my data on the KW41Z, so that isn't the problem. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;Kevin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 14:39:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Wireless-UART-Demo-with-USB-KW41Z/m-p/604342#M1701</guid>
      <dc:creator>kevinlfw</dc:creator>
      <dc:date>2017-03-09T14:39:53Z</dc:date>
    </item>
  </channel>
</rss>

