<?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のトピックCan BleServDisc_FindService be uses in a Peripheral device ?</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/Can-BleServDisc-FindService-be-uses-in-a-Peripheral-device/m-p/865353#M6032</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In the sample project Wireless Uart, there is a section of code in&amp;nbsp;wireless_uart.c like this:&lt;/P&gt;&lt;P&gt;//-------------------------&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void BleApp_StateMachineHandler(deviceId_t peerDeviceId, uint8_t event)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; uint16_t tempMtu = 0;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/* invalid client information */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; if(gInvalidDeviceId_c == maPeerInformation[peerDeviceId].deviceId)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; return;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;switch (maPeerInformation[peerDeviceId].appState)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; case mAppIdle_c:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; if (event == mAppEvt_PeerConnected_c)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; /* Let the central device initiate the Exchange MTU procedure*/&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; if (mGapRole == gGapCentral_c)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; /* Moving to Exchange MTU State */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; maPeerInformation[peerDeviceId].appState = mAppExchangeMtu_c;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; GattClient_ExchangeMtu(peerDeviceId);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; else&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; /* Moving to Service Discovery State*/&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; maPeerInformation[peerDeviceId].appState = mAppServiceDisc_c;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/* Start Service Discovery*/&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; &lt;STRONG&gt;BleServDisc_FindService&lt;/STRONG&gt;(peerDeviceId,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;gBleUuidType128_c,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; (bleUuid_t*) &amp;amp;uuid_service_wireless_uart);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; break;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//-------------------&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It shows if the device is a Peripheral device,&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;BleServDisc_FindService &lt;/STRONG&gt;&lt;/EM&gt;needs to be called. But from my point of view,&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;BleServDisc_FindService&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;is a API for Central device, not for Peripheral.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, why&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;BleServDisc_FindService &lt;/STRONG&gt;&lt;/EM&gt;needs to be called here ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B.R&lt;/P&gt;&lt;P&gt;Daniel Xiao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Mar 2019 06:58:22 GMT</pubDate>
    <dc:creator>xl_xmu</dc:creator>
    <dc:date>2019-03-18T06:58:22Z</dc:date>
    <item>
      <title>Can BleServDisc_FindService be uses in a Peripheral device ?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Can-BleServDisc-FindService-be-uses-in-a-Peripheral-device/m-p/865353#M6032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In the sample project Wireless Uart, there is a section of code in&amp;nbsp;wireless_uart.c like this:&lt;/P&gt;&lt;P&gt;//-------------------------&lt;/P&gt;&lt;P&gt;&lt;EM&gt;void BleApp_StateMachineHandler(deviceId_t peerDeviceId, uint8_t event)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;{&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; uint16_t tempMtu = 0;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/* invalid client information */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; if(gInvalidDeviceId_c == maPeerInformation[peerDeviceId].deviceId)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; return;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;switch (maPeerInformation[peerDeviceId].appState)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; case mAppIdle_c:&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; if (event == mAppEvt_PeerConnected_c)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; /* Let the central device initiate the Exchange MTU procedure*/&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; if (mGapRole == gGapCentral_c)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; /* Moving to Exchange MTU State */&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; maPeerInformation[peerDeviceId].appState = mAppExchangeMtu_c;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; GattClient_ExchangeMtu(peerDeviceId);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; else&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; {&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; /* Moving to Service Discovery State*/&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; maPeerInformation[peerDeviceId].appState = mAppServiceDisc_c;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/* Start Service Discovery*/&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; &lt;STRONG&gt;BleServDisc_FindService&lt;/STRONG&gt;(peerDeviceId,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;gBleUuidType128_c,&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; (bleUuid_t*) &amp;amp;uuid_service_wireless_uart);&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; }&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt; break;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;//-------------------&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It shows if the device is a Peripheral device,&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;BleServDisc_FindService &lt;/STRONG&gt;&lt;/EM&gt;needs to be called. But from my point of view,&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;BleServDisc_FindService&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;is a API for Central device, not for Peripheral.&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, why&amp;nbsp;&lt;EM&gt;&lt;STRONG&gt;BleServDisc_FindService &lt;/STRONG&gt;&lt;/EM&gt;needs to be called here ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B.R&lt;/P&gt;&lt;P&gt;Daniel Xiao&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Mar 2019 06:58:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Can-BleServDisc-FindService-be-uses-in-a-Peripheral-device/m-p/865353#M6032</guid>
      <dc:creator>xl_xmu</dc:creator>
      <dc:date>2019-03-18T06:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Can BleServDisc_FindService be uses in a Peripheral device ?</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/Can-BleServDisc-FindService-be-uses-in-a-Peripheral-device/m-p/865354#M6033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The example has the capabilities to set the device as a central or as a peripheral, you can connect two boards and one can act as a central and one as a peripheral, that it's the reason why both capabilities are added.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards ,&lt;BR /&gt;Estephania&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2019 21:26:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/Can-BleServDisc-FindService-be-uses-in-a-Peripheral-device/m-p/865354#M6033</guid>
      <dc:creator>stephanie_m</dc:creator>
      <dc:date>2019-03-19T21:26:59Z</dc:date>
    </item>
  </channel>
</rss>

