Languages

Menu
Sites
Language
How to connect Gear2 Emulator to devices or Emulators
Hi, We are trying to create a project with Samsung Gear2. We installed the Gear2 SDK and able to Create the Gear 2 emulator. Installed the sample projects which are stand alone apps and it's working good. Now we are trying to run Linked and Integrated projects. But how we can establish a connection between the Gear Emulator and Samsung Device or Emulators. We have installed the Hostmanager apk in Samsung S4 and it's working, but not able to detect any Gear Emulator which is installed in a Laptop with bluetooth connectivity. In the Emulator control panel there is an option for connecting network using port forwarding. Is it possible to connect the Gear2 Emulator with devices using port forwarding? Please give us some suggestions for this. Thanks in advance.

Responses

44 Replies
Marco Buettner

I think it isnt possible.

sunil sunny

Hmm it really does seem that way, although that seems highly impractical. 
I'm hoping a Samsung representative can shed some more light on this as I don't understand why Samsung would host a contest where the developers can't actually develop an app for the target device without owning the actual device.

Sooj Hwang

Does anyone have an answer for this?

sunil sunny

The answer is still no....

http://developer.samsung.com/forum/thread/how-to-link-the-gear-emulator-to-another-android-emulator-or-physical-device/201/257163?boardName=SDK&startId=zzzzz~

Krishnamoorthy

I am trying to understand the sample applications (Gallery, HelloAccessory) provided in http://developer.samsung.com/samsung-gear  using Samsung S4 physical device / Emulator (provider) and Samsung Gear 2 emulator (consumer). 

Able to run the application from Eclipse to Samsung S4 physical device / Emulator (provider), But status in Eclipse says like below, but not able to see provider application in mobile. 

[2014-04-08 10:26:59 - SAGalleryProvider] Performing sync

[2014-04-08 10:26:59 - SAGalleryProvider] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.

[2014-04-08 10:27:02 - SAGalleryProvider] Uploading SAGalleryProvider.apk onto device 'emulator-5554'

[2014-04-08 10:27:03 - SAGalleryProvider] Installing SAGalleryProvider.apk...

[2014-04-08 10:27:13 - SAGalleryProvider] Success!

[2014-04-08 10:27:14 - SAGalleryProvider] /SAGalleryProvider/bin/SAGalleryProvider.apk installed on device

[2014-04-08 10:27:14 - SAGalleryProvider] Done!

I am able to run and see the Consumer code in Gear 2 Emulator (using Tizen), While Clicking button (connect) an application getting Err message Device not connected.  

Any help is very much appreciated! 

 

sunil sunny

It's because you were not able to connect the Gear Emulator and the S4.It seem's Samsung is not providing a bridge to connect between the two.I have also tried and failed to make a connection.However Google is providing some instructions for connecting the real device and their wear emulator  in this link.

     http://developer.android.com/wear/preview/start.html?utm_source=rss&utm_medium=rss&utm_campaign=get-started-with-the-developer-preview-android-developers 

I have already tried it and i was able to connect the real device with the emulator.I tried the same method in the Gear emulator but failed.You can also try it  maybe you will be able to figure it out.If you got an answer please post .

 

Regards

sunil sunny

http://img-developer.samsung.com/contents/cmm/Guideline_on_Testing_Gear_applications_using_the_Emulator.pdf If anyone is still interested please follow this pdf. Regards,

Dina Hamid

Hi,

This guideline shows how to connect a host device to a gear emulator. Have you found out a way to connect an gear emulator to an android emulator? Do you have any idea why there is port forwarding from 8230 to 8230?

 

 

sunil sunny

Sorry, I am also trying to figure it out..

If you find a way please post it..

AVSukhov

Hello,

 I am trying to connect 2 emulators using Test Gear guideline but could not do it.

Dina Hamid

Same here, I know for sure it has something to do with the port forwarding. the option -d is used to direct commands for the device connected via USB. If you are using an emulator you should use -e or better -s and give the emulator name. The second part (the port number 8230) is a total mystery for me. I can not figure out why specially this number, and why the local AND remote ports are the same! Isn't this like a closed loop? forwarding to oneself?

 

 

nguyen duy an

Hi everyone.

have anyone can connect following this guide http://img-developer.samsung.com/contents/cmm/Guideline_on_Testing_Gear_applications_using_the_Emulator.pdf ,

My HostManagerForEnul always displaying "disconnected". And we have any way to connect twos emulator with each other ?

thanks

Yes, using Note 10.1 and Tizen Gear Emulator - SDK windows 7 32bits

Connected and works fine

FA

I follow the steps written in the guide. I start the Gear emulator and HostManagerForEnul  shows "Connected". I install HelloAccessory on the device and its corresponding widget on the Gear emulator. However, I don't know how to "select HelloAccessoryConsumer and launch it" at the next step. The Gear emulator dispalys a watch with a black screen. There is nothing on it. Is it supposed to be black or is it supposed to show the apps installed on Gear?

sunil sunny

After connecting the device in USB debugging mode.Run this command on CMD  "adb forward tcp:8230 tcp:8230".Also  keep the eclipse and Tizen wearable IDE open.

sunil sunny

omitt the -d from the command and that worked for me.

Lee Nguyen

Thanks sunny for your active

My HostManagerForEmul still shows "Disconnected"

I am using win 7 64 bit, jdk 1.7

any suggestion is really appriciated :)

sunil sunny

I also had this 'Disconnected' problem for a long time.Just type adb in CMD and press enter ,see what happens.If some error is occurring then it means your adb is not correctly configured.If your are getting a long list of instructions when adb entered which means it is correctly configured.After entering the adb -d forward tcp:8230 tcp:8230 command see whether you are getting the same message as when you entered just adb.Try omitting the -d from the command and try that also.

If this is not working try uninstalling the samsung mobile sdk from the eclipse and reinstall it.And try the steps in the Samsung guideline from the begining.

In my case  I followed tis steps.

uninstalling the samsung mobile sdk from the eclipse and reinstall it.

And then followed the steps in the guideline

adb  forward tcp:8230 tcp:8230 entered the command like this

then created a new virtual machine and when started the machine it showed connected.

 

Which phone are you using for the connection? You are using the latest version of Tizen right (Version : 1.0.0b2 )?.

Hope this will help you.

 

Lee Nguyen

Greate sunny!

I'm using Note 3.

As your suggestion, i uninstall all and start from beginning.

And now "Connected" and work fine.

 

 

sunil sunny

Good to hear that....... :)

FA

I follow the steps written in the guide. I start the Gear emulator and HostManagerForEnul  shows "Connected". I install HelloAccessory on the device and its corresponding widget on the Gear emulator. However, I don't know how to "select HelloAccessoryConsumer and launch it" at the next step. The Gear emulator dispalys a watch with a black screen. There is nothing on it. Is it supposed to be black or is it supposed to show the apps installed on Gear?

 

 

The HostManagerForEnul  does not push the widget to your emulator :)

You need to upload it from the SDK to the emulator ..

FA

Thank you Nour for replying! I upload the widget using "sdb install". When I go to "uninstall" section on the emulator's Control Panel I see the widget's name. It seems the widget is installed correctly. However, there is nothing displayed on the watch screen of the emulator. Is this the correct behaviour? Do you see anything on the watch screen of the emulator before installing widgets? 

To install the app on the device, I email the .apk to myself and open it on the device and install it (when I check the settings I see the name of the app on the list of "apps running"). Is this the correct way of installing the app when using HostManagerForEnul  and the Gear emulator? Thanks!

Use the sdk Run button to push the widget and start it in the Gear Emulator

If you use sdb install, the app will be installed but not active. You can open it from the emulator. When you see the clock..use the mouse button (move gesture to right).. the Apps window will appear. Then you click on it and you will see your app icon. Click on it to run it

 

You can upload the apk to device using android sdk I guess. I have done both ways.. sending apk to device and uploading it from android SDK... to be honest I don't know which way is better

 

 

 

FA

Thank you for the reply! I still get a black screen after the linux booting message (I am running it on a Window7 64-bit machine). However, I have been able to run the emulator and try some sample widgets on a Windows Vista 32-bit machine. Not sure why it doesn't work on the 64-bit machine.

You are welcome

I have no idea! You can report bug to tizen team "bugs.tizen.org"

I am on 32 bits windows 7
 

sunil sunny

Hi,

I followed the steps in the document for how to connect the gear emulator and a device but I am always getting a disconnected message in my device(Samsung s4).

I don't know what I am doing wrong, I was not able to install the samsung mobile sdk whenever I am trying to install it, I am  getting  an error message.I am getting the same error message in this forum http://developer.samsung.com/forum/board/thread/view.do?boardName=SDK&messageId=245214&frm=7&tagValue=SDKManager&curPage=1 .But here I am using the Tizen wearable IDE Version : 1.0.0b2 does any one else having the same issue.Or is it really neccessary to insatll the  samsung mobile sdk ,in the documents it's saying it's neccessary for the developmet of apps ,not saying anything about it's role in the connection procedure.Any help will be appreciated.

Regards,

sunil

sunil sunny

Hi,

Try turning the GPU off in the emulator , In some machines GPU is not supported.

FA

It did the trick. Thank you very much, Sunil!

sunil sunny

Good to hear :)

Barrington Henry

I am able to connect the gear 2 emulator to my Galaxy S4. The HostManagerForEmul says connected.  However, when testing the sample app HelloAccessoryConsumer on the gear emulator with the HelloAccessoryProvider, clicking on the "connect" button returns the error PEER_NOT_FOUND from calling the webapis.sa.requestSAAgent function. Anyone have any idea whats going on?

Gal Levinsky

Hi,

Have you managed to resolve the PEER_NOT_FOUND error?

 

Best.

sunil sunny

You have installed the apk file of the sample project you are running ,on the Host Device right?.Otherwise it's really strange bcoz the hostmanager is showing connected.

Damian Olczak

Hi all,

I was trying very long to configure a connection between a mobile device and an emulator running on Ubuntu 14.04. Unfortunatelly, no success. I switched to another OS and it worked at once. Though, I really need to configure the environment on the Ubuntu system. Do you have any advice?

abhishek Dabral

Hi all, 

I had followed this below link to test app in my Samsung Note GT5100 and Gear emulator

http://img-developer.samsung.com/contents/cmm/Guideline_on_Testing_Gear_applications_using_the_Emulator.pdf
I am succussful to connect both devices , but when i am launching HelloAccessoryConsumer app in the emulator

and clicking on connect, fetch or disconnect nothing happened??

and when i launched SAGalleryConsumer in my emulator then i got "BT Dissconnected. Connection Waiting...." message 

while my device is showing "connected".

Please help me to get rid off from this trouble

Thanks in advance

Gal Levinsky

Change BT connection to WIFI connection mode.

Eir Stefanovski

I cannot connect my Galaxy S3 with the Emulator on Win8 64bit PC. I've tried many times, both with and without the -d option. I'm using the Tizen IDE so there are no Mobile SDKs to uninstall from Eclipse. Any other advise?

Kevz zzz

Listen up guys for connecting Android Host Device with Samsung Gear Emulator, All u need to do is simply follow the official testing guide. Even I struggled a bit and bothered me a lot. But simply do as directed in the TESTING STEPS. I'm sure u'll figure it out and u'll succeed eventually. If u still gets problem I'll be der to help u all.

After Successful connection to run sample HelloAccessory App u need to modify the"Service Profile" in Producer and Consumer app. Simply change <transport type="TRANSPORT_BT" /> to <transport type="TRANSPORT_WIFI" />.

Voila work fine.

 

Eir Stefanovski

Don't underestimate the rest of the people on this forum. We all went through the instructions carefully. So if you don't have a solution to suggest, please restrain from commenting. Thanks.

Kevz zzz

Sir I didn't meant to underestimate anyone. I believe u all have been through  it carefully ( even I did a lot times ).

What I did is same as mentioned in testing document. All I know for sure is u need to close HostManagerForEmul.apk and re-open it to change it to see connected!!! 

follow below steps :-

1. Install the 3 apk files.

2. Open HostManagerForEmul.apk it shows DC. So close that app completely.

3. Now run the command "adb -d forward tcp:8230 tcp:8230"

4. Launch Emulator Manager.

5. Create/Open Gear Emulator.

6. When the Gear Emulator is completed loading, Start hte HostManagerForEmul.apk.

Hope this'll do the trick and work for u fine. If U r still facing the problem plz do it from start i.e Uninstalling Gear Manager.

 

 

sunil sunny

Hi ,

is your adb working fine?

Just type adb in CMD and check what is comming, Also there is an

order doing this.

1) connect you device type the CMD command.

2) Launch Gear manager and start the emulator.

3) it will be still disconnected .Type the CMD command again and it must do it.

 

Regards,

Eir Stefanovski

It must, but it does not. Yes, of course adb is working fine.

I've given up trying this configuration, I got myself a Gear device, and I'm not using the emulator any more.

 

I have developed and published native apps for: Android, iOS, BlackBerry OS, BlackBerry 10, Windows Phone, Nokia (and a bunch of other not-mobile platforms)... And I can tell that developing for Tizen wearable has been the worst experience of all.

sunil sunny

Ya for me too. I also struggled a lot to get it working.What about the real device ,is it working?.

Eir Stefanovski

Yes, works just fine.