0

last week I started to develop apps for a Samsung Smartwatch with the Tizen SDK 2.4.0. My sample web application connects to a remote Websocket server (a simple echo server) and sends some random requests and prints the received messages (Server is http://www.websocket.org/echo.html). This works fine on an emulated devices as well as on the real Gear S2 Smartwatch (Example was taken from https://developer.tizen.org/zh-hans/development/tutorials/web-application/w3chtml5supplementary-features/communication/websocket?langredirect=1)

But as soon as I start a Websocket server in my home LAN I run into problems. The server is launched via a simple Python example I found on Github (https://github.com/dpallot/simple-websocket-server). The emulator device from the SDK connects to this server without any problems using the local IPv4. But the real device, which is logged in to the same WiFi access point, doesn't.

Note that the connection between my PC and my watch device works fine, since the SDK flashes the developed apps via WiFi to the device.

In my config.xml all connections are allowed

<access origin="*" subdomains="true"></access>

and the privilege for "Internet" is available.

The logs show that the watch tries to open a connection, but is then stuck. No error message is printed - the watch just does not go beyond the initial creation of the websocket.

Do you have any hints or thoughts about how I could debug this issue? Thanks in advance!

japedo
  • 338
  • 2
  • 13

2 Answers2

2

I found the solution - my virus scanner has an integrated software firewall that blocked incoming connections...

japedo
  • 338
  • 2
  • 13
1

Try with higher ports maybe ? I got WS working fine on SamsungZ1 on Tizen:2.3:Mobile

https://twitter.com/RzrFreeFr/status/70135763074535014#tizen-gear2-websockets

Maybe I could try your code on Tizen:2.4:Mobile too ?

RzR
  • 2,889
  • 26
  • 25
  • Thanks for your suggestion! No, higher ports do not have any effect. This error seems very strange to me, since I guess that the Tizen SDK uses WebSockets internally to communicate (and to flash e.g.) with the watch. My source code is publicly available on the Samsung website, please refer to the link above. – japedo Mar 08 '16 at 11:04
  • 1
    have you enabled privileges ? try to make a minimal project on this base : https://notabug.org/tizen/tizen-example and I will compare on my setup : – RzR Mar 08 '16 at 13:08