<?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>NFCのトピックRe: PN7150 - Example code issues</title>
    <link>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/1251062#M8318</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;jeremygeslin.&amp;nbsp;After testing the code I see that the issue upon restarting the application seems solved (hang reported by&amp;nbsp;oyvindi). However, it&amp;nbsp;&lt;FONT face="inherit"&gt;still &lt;/FONT&gt;doesn't&lt;FONT face="inherit"&gt;&amp;nbsp;correctly addresses resets of the device. When plugging the dongle out and back in - the library continues to wait for discovery, and the only way to overcome it is to restart the application.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The cleanup code is till commented (in&amp;nbsp;&lt;EM&gt;tml_hid_Disconnect()&lt;/EM&gt;), hence not sure if the cleanup is done correctly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 24 Mar 2021 08:59:55 GMT</pubDate>
    <dc:creator>tzuriel-spearuav</dc:creator>
    <dc:date>2021-03-24T08:59:55Z</dc:date>
    <item>
      <title>PN7150 - Example code issues</title>
      <link>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/737662#M3117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am evaluating an&amp;nbsp;PN7150 dongle for possible future use. I compiled the code in Visual Studio, and&amp;nbsp;ran into these issues:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) When starting the application the first time, it&amp;nbsp;seems to communicate well with the dongle. However, if I quit/stop the application, and restart it, it will hang forever. I have to pull out and reinsert the dongle&amp;nbsp;in order to make it talk again. My guess is that this may be caused by the onboard MCU or I2C going into some state, and doesn't reset. Note that I get this issue with the precompiled&amp;nbsp;&lt;STRONG&gt;NXP-NCI_Windows_example.exe&amp;nbsp;&lt;/STRONG&gt;that follows the example zip package.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) The&amp;nbsp;library/API itself leaks memory. That is, several alloc()'ed objects never gets free()'d. For example, I tracked this one down in &lt;STRONG&gt;tml_hid.c&lt;/STRONG&gt;:&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;void&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;tml_hid_Disconnect&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="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;/* I2C_Reset(mDriverHandle);
 I2C_CancelAllRequest(mDriverHandle);
 I2C_Close(mDriverHandle);
 Sleep(2000);*/&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For some reason&amp;nbsp;those I2C-functions are commented away, which will prevent several memory chunks to be free'd.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this code meant to be used in production, or is there some other SDK or library avaliable ? If not, I will have to clean this up or write new code from scratch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Oyvind&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2018 13:03:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/737662#M3117</guid>
      <dc:creator>oyvindi</dc:creator>
      <dc:date>2018-05-09T13:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: PN7150 - Example code issues</title>
      <link>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/737663#M3118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have issue on the code, on the elektronika web sites is wrote that this dongle is capable to write,read tag, and p2p communication, but no support from MIKROELEKTRONIKA, no support from NXP that say try with forum, not found any documentation for programming and the sample is'nt usable. I require if any people can help us to edit the sample or to have documentation. All vendor have an sdk, NXP don't^?????&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2018 13:13:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/737663#M3118</guid>
      <dc:creator>n_bavarone</dc:creator>
      <dc:date>2018-10-08T13:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: PN7150 - Example code issues</title>
      <link>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/1249182#M8306</link>
      <description>&lt;P&gt;I'm seeing the same issue.&lt;/P&gt;&lt;P&gt;Any other alternative for an API to the dongle ?&lt;/P&gt;</description>
      <pubDate>Sun, 21 Mar 2021 09:28:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/1249182#M8306</guid>
      <dc:creator>tzuriel-spearuav</dc:creator>
      <dc:date>2021-03-21T09:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: PN7150 - Example code issues</title>
      <link>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/1249730#M8310</link>
      <description>&lt;P&gt;Such issue may be fixed with the improvment of the hidapi implementation as provided in the attached VisualStudio project. Also included is an update of the NfcLibrary.&lt;/P&gt;
&lt;P&gt;Please give it a try and feedback.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Mar 2021 13:51:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/1249730#M8310</guid>
      <dc:creator>jeremygeslin</dc:creator>
      <dc:date>2021-03-22T13:51:29Z</dc:date>
    </item>
    <item>
      <title>Re: PN7150 - Example code issues</title>
      <link>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/1251062#M8318</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;jeremygeslin.&amp;nbsp;After testing the code I see that the issue upon restarting the application seems solved (hang reported by&amp;nbsp;oyvindi). However, it&amp;nbsp;&lt;FONT face="inherit"&gt;still &lt;/FONT&gt;doesn't&lt;FONT face="inherit"&gt;&amp;nbsp;correctly addresses resets of the device. When plugging the dongle out and back in - the library continues to wait for discovery, and the only way to overcome it is to restart the application.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The cleanup code is till commented (in&amp;nbsp;&lt;EM&gt;tml_hid_Disconnect()&lt;/EM&gt;), hence not sure if the cleanup is done correctly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 08:59:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/1251062#M8318</guid>
      <dc:creator>tzuriel-spearuav</dc:creator>
      <dc:date>2021-03-24T08:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: PN7150 - Example code issues</title>
      <link>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/1251319#M8321</link>
      <description>&lt;P&gt;I confirm the current software implementation doesn't support hot unplug/replug of the USB dongle.&lt;/P&gt;
&lt;P&gt;We don't have any plan to update the library in order to support this.&lt;/P&gt;
&lt;P&gt;However, in case it could help, please find attached fix for the detection of USB dongle removal leading to kill the running application. Then with appropriate batch file (also provided as example) you can manage restarting the application when the device is back.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Mar 2021 14:37:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/1251319#M8321</guid>
      <dc:creator>jeremygeslin</dc:creator>
      <dc:date>2021-03-24T14:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: PN7150 - Example code issues</title>
      <link>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/1251896#M8323</link>
      <description>&lt;P&gt;There's a lot of code in the library - not easy to identify the API vs the driver, which makes it hard to integrate the code into other application.&lt;/P&gt;&lt;P&gt;There are still leaks in this application, and possibly also memory corruption. The elaborate use of &lt;EM&gt;statics&lt;/EM&gt; and &lt;EM&gt;infinite waits&lt;/EM&gt; essentially hangs and not clean up correctly, practical allowing to use it only as standalone application restarted each time a device is switched on or off or plugged back in.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Mar 2021 07:18:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/1251896#M8323</guid>
      <dc:creator>tzuriel-spearuav</dc:creator>
      <dc:date>2021-03-25T07:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: PN7150 - Example code issues</title>
      <link>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/1507551#M9592</link>
      <description>&lt;P&gt;The problem still exists with the modified example above. The dongle hangs after a few restarts, especially when waiting for 20 - 30s between shutdown and restart. Only unplugging and re-plugging helps. I ran the exe from the zip for testing.&lt;BR /&gt;&lt;BR /&gt;Any chance that NXP investigates and fixes the bug?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Peter&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 14:13:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/1507551#M9592</guid>
      <dc:creator>peterhorn</dc:creator>
      <dc:date>2022-08-17T14:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: PN7150 - Example code issues</title>
      <link>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/1513985#M9615</link>
      <description>&lt;P&gt;Same problem here, did you find any solution?&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 14:19:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/1513985#M9615</guid>
      <dc:creator>christine1</dc:creator>
      <dc:date>2022-08-30T14:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: PN7150 - Example code issues</title>
      <link>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/1514053#M9616</link>
      <description>&lt;P&gt;No, unfortunately not&lt;BR /&gt;&lt;BR /&gt;I've tried to build an updated firmware for the dongle based on the LPCSIO example form LPCOpen for LPC11U68. While I was able to connect, the same problem still exists.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.nxp.com/design/microcontrollers-developer-resources/lpcopen-libraries-and-examples/lpcopen-software-development-platform-lpc11xx:LPCOPEN-SOFTWARE-FOR-LPC11XX" target="_blank"&gt;https://www.nxp.com/design/microcontrollers-developer-resources/lpcopen-libraries-and-examples/lpcopen-software-development-platform-lpc11xx:LPCOPEN-SOFTWARE-FOR-LPC11XX&lt;/A&gt;&lt;/P&gt;&lt;P&gt;As others have already reported, the problem doesn't exist with Linux hosts. The next thing that comes to mind is capturing USB traffic and comparing Linux vs. Windows, but I don't have experience with reverse engineering USB traffic.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 16:19:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/NFC/PN7150-Example-code-issues/m-p/1514053#M9616</guid>
      <dc:creator>peterhorn</dc:creator>
      <dc:date>2022-08-30T16:19:04Z</dc:date>
    </item>
  </channel>
</rss>

