<?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>topic service is not defined error when running bluetooth developer studio plugin in Wireless MCU</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/service-is-not-defined-error-when-running-bluetooth-developer/m-p/703461#M3571</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;BR /&gt;While running the bluetooth developer studio plugin v1.0.0 code generator with some custom services I was running into a runtime error "service is not defined".&lt;/P&gt;&lt;P&gt;I digged a bit into the code of Plugin.js and found that the variable service is indeed used without declaration and that the following changeset to fix the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@@ -741,7 +741,7 @@ function GetGapScanningAndAdvertisingData() {&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (var i = 0; i &amp;lt; GAPProperties.ServicesAdvertisement.length; i++) {&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var serviceAdvertisement = GAPProperties.ServicesAdvertisement[i];&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;// generate only custom services&lt;BR /&gt;-&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;if (serviceAdvertisement.Selected &amp;amp;&amp;amp; isCustom(serviceAdvertisement) &amp;amp;&amp;amp; service.UUID.length &amp;gt; 8) {&lt;BR /&gt;+&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;if (serviceAdvertisement.Selected &amp;amp;&amp;amp; isCustom(serviceAdvertisement) &amp;amp;&amp;amp; serviceAdvertisement.UUID.length &amp;gt; 8) {&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;var uuidArray = serviceAdvertisement.UUID.match(/.{1,2}/g)&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;.map(function (a) {&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#&lt;/SPAN&gt;return "0x" + a;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is just to let both NXP know about the issue and help others in the same situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Bernhard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Oct 2017 08:53:32 GMT</pubDate>
    <dc:creator>fittrack</dc:creator>
    <dc:date>2017-10-11T08:53:32Z</dc:date>
    <item>
      <title>service is not defined error when running bluetooth developer studio plugin</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/service-is-not-defined-error-when-running-bluetooth-developer/m-p/703461#M3571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;BR /&gt;While running the bluetooth developer studio plugin v1.0.0 code generator with some custom services I was running into a runtime error "service is not defined".&lt;/P&gt;&lt;P&gt;I digged a bit into the code of Plugin.js and found that the variable service is indeed used without declaration and that the following changeset to fix the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@@ -741,7 +741,7 @@ function GetGapScanningAndAdvertisingData() {&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;for (var i = 0; i &amp;lt; GAPProperties.ServicesAdvertisement.length; i++) {&lt;BR /&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;var serviceAdvertisement = GAPProperties.ServicesAdvertisement[i];&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;// generate only custom services&lt;BR /&gt;-&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;if (serviceAdvertisement.Selected &amp;amp;&amp;amp; isCustom(serviceAdvertisement) &amp;amp;&amp;amp; service.UUID.length &amp;gt; 8) {&lt;BR /&gt;+&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;if (serviceAdvertisement.Selected &amp;amp;&amp;amp; isCustom(serviceAdvertisement) &amp;amp;&amp;amp; serviceAdvertisement.UUID.length &amp;gt; 8) {&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;var uuidArray = serviceAdvertisement.UUID.match(/.{1,2}/g)&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;.map(function (a) {&lt;BR /&gt; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#&lt;/SPAN&gt;return "0x" + a;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is just to let both NXP know about the issue and help others in the same situation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Bernhard&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Oct 2017 08:53:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/service-is-not-defined-error-when-running-bluetooth-developer/m-p/703461#M3571</guid>
      <dc:creator>fittrack</dc:creator>
      <dc:date>2017-10-11T08:53:32Z</dc:date>
    </item>
  </channel>
</rss>

