japedo
japedo

Reputation: 390

Tizen WebSockets: can access Internet WebSocket server but cannot acces LAN WebSocket server

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!

Upvotes: 1

Views: 1015

Answers (2)

japedo
japedo

Reputation: 390

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

Upvotes: 2

RzR
RzR

Reputation: 3176

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 ?

Upvotes: 1

Related Questions