언어 설정

Menu
Sites
Language
SAP: HELLOACCESSORY 에서 findpeer_service_not_found 에러

provider가 gear이고 consumer가 android인 sample code를 실행하고있는데요

android 휴대폰에 HelloAccessory를 실행시키고 gear s2에 tizen을 통해 hello 파일을 생성한 후 android 폰과 gear s2를 연결하려고 하면

findpeer_service_not_found 에러가 발생합니다. 그래서 FAQ에 있는 해결방법으로 해봤지만 고쳐지지 않아서 질문드립니다.

제 tizen에서 accessortservices.xml은

<?xml version="1.0" encoding="UTF-8"?>
<resources>
    <application name="HelloAccessoryProvider" >
        <serviceProfile
            id="/sample/hello"
            name="helloaccessory"
            autoLaunchAppId="UM2FcDkLYZ.HelloAccessoryProvider"
            role="provider"
            version="1.0"http://developer.samsung.com/sample-app/view.do?v=S000000069D
            serviceLimit="ANY"
                serviceTimeout="10">
            <supportedTransports>
                <transport type="TRANSPORT_BT" />
                <transport type="TRANSPORT_WIFI"/>
            </supportedTransports>
            <serviceChannel
                id="101"
                dataRate="high"
                priority="low"
                reliability= "enable"/>
        </serviceProfile>
    </application>
</resources>

 

 

이고 android에서 accessortservices.xml은

<!DOCTYPE resources [

<!ELEMENT resources (application)>

<!ELEMENT application (serviceProfile)+>

<!ATTLIST application name CDATA #REQUIRED>

<!ELEMENT serviceProfile (supportedTransports, serviceChannel+) >

<!ATTLIST application xmlns:android CDATA #IMPLIED>

<!ATTLIST serviceProfile xmlns:android CDATA #IMPLIED>

<!ATTLIST serviceProfile serviceImpl CDATA #REQUIRED>

<!ATTLIST serviceProfile role (PROVIDER | CONSUMER | provider | consumer) #REQUIRED>

<!ATTLIST serviceProfile name CDATA #REQUIRED>

<!ATTLIST serviceProfile id CDATA #REQUIRED>

<!ATTLIST serviceProfile version CDATA #REQUIRED>

<!ATTLIST serviceProfile serviceLimit (ANY | ONE_ACCESSORY | ONE_PEERAGENT | any | one_accessory | one_peeragent) #IMPLIED>

<!ATTLIST serviceProfile serviceTimeout CDATA #IMPLIED>

<!ELEMENT supportedTransports (transport)+>

<!ATTLIST supportedTransports xmlns:android CDATA #IMPLIED>

<!ELEMENT transport EMPTY> 

<!ATTLIST transport xmlns:android CDATA #IMPLIED>

<!ATTLIST transport type (TRANSPORT_WIFI | TRANSPORT_BT | TRANSPORT_BLE | TRANSPORT_USB |

                          transport_wifi | transport_bt | transport_ble | transport_usb) #REQUIRED>

<!ELEMENT serviceChannel EMPTY> 

<!ATTLIST serviceChannel xmlns:android CDATA #IMPLIED>

<!ATTLIST serviceChannel id CDATA #REQUIRED>

<!ATTLIST serviceChannel dataRate (LOW | HIGH | low | high) #REQUIRED>

<!ATTLIST serviceChannel priority (LOW | MEDIUM | HIGH | low | medium | high) #REQUIRED>

<!ATTLIST serviceChannel reliability (ENABLE | DISABLE | enable | disable ) #REQUIRED>

]>

<resources>


    <application name="HelloAccessoryConsumer" >

        <serviceProfile

            id="/sample/hello"

            name="helloaccessory"

            role="consumer"

            serviceImpl="com.samsung.android.sdk.accessory.example.helloaccessory.consumer.ConsumerService"

            version="1.0"

            serviceLimit="ANY"

            serviceTimeout="10">

            <supportedTransports>

                <transport type="TRANSPORT_BT" />

                <transport type="TRANSPORT_WIFI" />

            </supportedTransports>

            <serviceChannel

                id="101"

                dataRate="low"

                priority="low"

                reliability= "enable"/>   

    </serviceProfile>

    </application>



</resources>

 

인데 다른점도 없는것 같은데 왜 휴대폰과 기어s2가 연결이 안될까요?

블루투스와 와이파이로 기어와 휴대폰을 연동한 상태에서 실행했습니다. 뭐가 문제인지 알려주세요

Edited by: 창현 김 on 04 4월, 2016
답변 바로가기

Responses

2 댓글
Mark as answer
daniel kim

안녕하세요.

provider를 다시 만드신 것 같은데, accessoryservice.xml에 있는 app id는 sample의 것이 들어있는 것 같습니다.

     autoLaunchAppId="UM2FcDkLYZ.HelloAccessoryProvider"

그리고 provider의 config.xml에 아래 내용이 추가되어 있는지 확인이 되어야 할 것 같습니다.

    <feature name="http://developer.samsung.com/tizen/feature/network.accessory_protocol"/>
    <tizen:metadata key="AccessoryServicesLocation" value="res/xml/accessoryservices.xml"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/accessoryprotocol"/

   <tizen:setting background-support="enable" encryption="disable" hwkey-event="enable"/>

AVSukhov

Hello,

More info about companion type can be found here:

http://developer.samsung.com/html/techdoc/Creating_Gear_Companion_Apps.pdf