<?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: KW36 can switch Central / peripheral？</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/KW36-can-switch-Central-peripheral/m-p/989919#M8339</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel, I hope you're doing well!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is possible to change the Bluetooth role of a device without resetting it. Could you please take a look at the Wireless UART SDK example?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;…\SDK_2.2.2_FRDM-KW36 - MCUXpresso\boards\frdmkw36\wireless_examples\bluetooth\w_uart&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This example allow for the device to change roles by pressing a &lt;STRONG&gt;SW3&lt;/STRONG&gt; and then pressing &lt;STRONG&gt;SW2&lt;/STRONG&gt;. This calls two different events in the &lt;STRONG&gt;BleApp_HandleKeys&lt;/STRONG&gt; (located in the &lt;STRONG&gt;wireless_uart&lt;/STRONG&gt;.c source file):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL type="disc"&gt;&lt;LI&gt;The &lt;STRONG&gt;gKBD_EventPressPB2_c&lt;/STRONG&gt; event first checks which mode is the device currently operating in, and then sets the global mGapRole variable to the opposite role (i.e. if it's in Central, the variable will be set to Peripheral and vice-versa).&lt;/LI&gt;&lt;LI&gt;Then, the &lt;STRONG&gt;gKBD_EventPressPB1_c&lt;/STRONG&gt; event calls the BleApp_Start function with the previously set GAP role, which in turn either calls the App_StartScanning or the BleApp_Advertise function, depending on the role set by the gapRole local variable.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if you need any more information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Mar 2020 18:31:05 GMT</pubDate>
    <dc:creator>Sebastian_Del_Rio</dc:creator>
    <dc:date>2020-03-20T18:31:05Z</dc:date>
    <item>
      <title>KW36 can switch Central / peripheral？</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW36-can-switch-Central-peripheral/m-p/989918#M8338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" title=""&gt;Continuing the previous question,&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://community.nxp.com/thread/526695"&gt;KW36A OTA &lt;/A&gt; &amp;nbsp;&lt;BR /&gt;&lt;SPAN title=""&gt;Now there is an idea:&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN class="" title=""&gt;We want to integrate the two OTA updates&lt;/SPAN&gt; as following&lt;BR /&gt;&lt;SPAN class="" title=""&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A. BLE Demo Applications User Guide.pdf , ch 5.19.5 with IOT toolbox&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="" title=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; B. BLE Demo Applications User Guide.pdf , ch 5.19.4 with Test tool&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" title=""&gt;&lt;SPAN class=""&gt;Based on the original two OTAs update(A. B.), the architecture is modified as follows&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/104222iA74663FF0C1E5789/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 1:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Master(pre-burn BL+AP1).&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AP1 and AP2 are packaged into one Image(AP1+AP2).&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class=""&gt;&lt;SPAN class="" title=""&gt;Master (AP1) [ use the receive function in "bootloader_otap" ]&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp; for &lt;SPAN class=""&gt;&lt;SPAN class="" title=""&gt;receive Image from the OTA phone&lt;/SPAN&gt;&lt;/SPAN&gt;.&lt;BR /&gt;Step 2:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OTA update from phone to external Flash via Master(AP1) with one package(AP1+AP2).&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" title=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The purpose is to transfer data to external flash for storage.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;Step 3:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; After reset the Master, the Master(Bootloader) will update Master(AP1) from external flash to AP1.&lt;BR /&gt;Step 4:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Master(AP1) reads external flash and send AP2 to 4 Slave via OTA.&lt;BR /&gt;Step 5:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; After Slave(Bootloader) receiving the Image(AP2) from the Master, Slave does the Image update by itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Question:&lt;BR /&gt;&amp;nbsp;&amp;nbsp; 1. &lt;SPAN class=""&gt;&lt;SPAN class="" title=""&gt;Because Master(AP1) needs to be in a different role (peripheral or central),&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" title=""&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; can Master(AP1) be switched from peripheral to central without reset chip?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; 2. What function to switch between the two roles?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Mar 2020 10:20:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW36-can-switch-Central-peripheral/m-p/989918#M8338</guid>
      <dc:creator>danieltseng</dc:creator>
      <dc:date>2020-03-19T10:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: KW36 can switch Central / peripheral？</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW36-can-switch-Central-peripheral/m-p/989919#M8339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel, I hope you're doing well!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is possible to change the Bluetooth role of a device without resetting it. Could you please take a look at the Wireless UART SDK example?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;…\SDK_2.2.2_FRDM-KW36 - MCUXpresso\boards\frdmkw36\wireless_examples\bluetooth\w_uart&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This example allow for the device to change roles by pressing a &lt;STRONG&gt;SW3&lt;/STRONG&gt; and then pressing &lt;STRONG&gt;SW2&lt;/STRONG&gt;. This calls two different events in the &lt;STRONG&gt;BleApp_HandleKeys&lt;/STRONG&gt; (located in the &lt;STRONG&gt;wireless_uart&lt;/STRONG&gt;.c source file):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL type="disc"&gt;&lt;LI&gt;The &lt;STRONG&gt;gKBD_EventPressPB2_c&lt;/STRONG&gt; event first checks which mode is the device currently operating in, and then sets the global mGapRole variable to the opposite role (i.e. if it's in Central, the variable will be set to Peripheral and vice-versa).&lt;/LI&gt;&lt;LI&gt;Then, the &lt;STRONG&gt;gKBD_EventPressPB1_c&lt;/STRONG&gt; event calls the BleApp_Start function with the previously set GAP role, which in turn either calls the App_StartScanning or the BleApp_Advertise function, depending on the role set by the gapRole local variable.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know if you need any more information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Mar 2020 18:31:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW36-can-switch-Central-peripheral/m-p/989919#M8339</guid>
      <dc:creator>Sebastian_Del_Rio</dc:creator>
      <dc:date>2020-03-20T18:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: KW36 can switch Central / peripheral？</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW36-can-switch-Central-peripheral/m-p/989920#M8340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="" lang="en"&gt;&lt;SPAN class="" title=""&gt;Thank you for providing a good example explanation for my reference, thanks&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2020 07:31:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW36-can-switch-Central-peripheral/m-p/989920#M8340</guid>
      <dc:creator>danieltseng</dc:creator>
      <dc:date>2020-03-25T07:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: KW36 can switch Central / peripheral？</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW36-can-switch-Central-peripheral/m-p/989921#M8341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Daniel!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if you need any more information.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Sebastian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2020 15:13:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW36-can-switch-Central-peripheral/m-p/989921#M8341</guid>
      <dc:creator>Sebastian_Del_Rio</dc:creator>
      <dc:date>2020-03-25T15:13:39Z</dc:date>
    </item>
  </channel>
</rss>

