Unable to connect to "Connect IQ Device Simulator"

Former Member
Former Member
Dear All :)

I have just started with Connect IQ. I have followed the steps of "developer.garmin.com/.../" but when I try to run the program I only get:

Found Transport: tcp
Connecting...
Connecting to device...
Timeout waiting for device info
Transport Error 0
Connection Finished
Closing shell and port
Found Transport: tcp
Connecting...
Connecting to device...
Timeout waiting for device info
Transport Error 0
Connection Finished
Closing shell and port

I have looking for any information in internet, but I have found nothing :(

Any Advice?

Thanks and best regards,
Ruben.
  • is the simulator started? What are you using ? Command line or eclipse?

    if command line - try "connectiq" which would invoke the simulator

    the other thing is also is to check if there are spaces in your names / directory / folders.
  • Former Member
    Former Member over 10 years ago
    is the simulator started? What are you using ? Command line or eclipse?

    if command line - try "connectiq" which would invoke the simulator

    the other thing is also is to check if there are spaces in your names / directory / folders.


    Dear Nikeow,

    Thank you very much for your reply.

    Yes, the simulator is started. I'm using Eclipse and, as far as I know, there are no spaces in the path to the SDK or to eclipse. Let me add a screenshot to de post and some information, just in case it helps.



    I'm using "Eclipse IDE for Java Developers; Version: Luna Service Release 2 (4.4.2); Build id: 20150219-0600" 64bits version in a 64bits Windows 8.1 Pro system.

    The Connect IQ SDK is "connectiq-sdk-win-1.1.3" and the path to the SDK is "D:\Development\connectiq-sdk-win-1.1.3"

    The path to eclipse is "D:\Development\eclipse"

    Java version is:
    java version "1.8.0_45"
    Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
    Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)"

    I have also tried to launch the application form command line, but I have had the same result.

    Actually I have no clue about what could be the problem....

    Thanks and best regards,
    Ruben.
  • can you try using one of the samples in the SDK?

    eg:
    c> connectiq
    c> monkeydo c:/path/to/connect-iq-sdk/samples/layout/layout.prg square_watch

    does it work?

    I have a feeling that since you're using eclipse, you have not chosen your "run configuration" settings.

    it's the 9th icon on the bar. You see there are 2 "play" triangles. on the 1st play triangle there is a small black little inverted triangle. Click that, then click "run configurations" then go and select the project you would want to run.
  • Former Member
    Former Member over 10 years ago
    Hi Nekow,

    Thanks for your advices, but I'm already using the proper run configuration in eclipse. I have try to run an example from de command line, and I facing the same problem, please see the screenshot attached. I have also tried, just in case, to run it disabling the ZoneAlarm firewall and Panda antivirus... but It didn't work either...



    Best regards,
    Ruben.
  • Former Member
    Former Member over 10 years ago
    Dear Nikeow

    First of all, thanks a lot for your help.

    I finally managed to solve the problem by myself. I'm going to post the solution here just in case someone has the same issue.

    I have done a deep investigation in the connection needed between Device Simulator (simulator.exe in windows) and monkeydo (shell.exe in windows). I have found that simulator.exe tries to start an listening process in tcp port 1234 but in my computer there already was a process listening to that port! That was hard to find out, but the process belongs to ZoneAlarm firewall. The only work around I have found to solve my problem was to un-install ZoneAlarm. Without the other software hogging the 1234 port, the simulator can run properly and shell.exe can launch the application on the simulator.

    It seems that at last I'm going to be able to play around with monkey C. :)

    Thanks and best regards,
    Ruben.
  • I have done a deep investigation in the connection needed between Device Simulator (simulator.exe in windows) and monkeydo (shell.exe in windows). I have found that simulator.exe tries to start an listening process in tcp port 1234 but in my computer there already was a process listening to that port! That was hard to find out, but the process belongs to ZoneAlarm firewall. The only work around I have found to solve my problem was to un-install ZoneAlarm. Without the other software hogging the 1234 port, the simulator can run properly and shell.exe can launch the application on the simulator.


    Thanks for the report. If you want to try something that'll let you re-install Zone Alarm, you can replace your monkeydo.bat file with the code below. I haven't tested it and my batch file scripting is pretty bad, so it may not work. The idea is to try all the ports between 1234 and 1238 when connecting to the simulator. We'll get this put into the monkeydo.bat file in a future release.
    @echo off
    FOR %%P IN (1234 1235 1235 1236 1237 1238) DO "%~dp0shell.exe" --transport=tcp --transport_args=127.0.0.1:%%P push "%~dpnxs1" "0:/GARMIN/APPS/%~nxs1"
    set device_id=square_watch
    IF NOT [%2]==[] set device_id=%2
    FOR %%P IN (1234 1235 1236 1237 1238) DO "%~dp0shell.exe" --transport=tcp --transport_args=127.0.0.1:%%P tvm "0:/GARMIN/APPS/%~nxs1" %device_id%
  • Former Member
    Former Member over 10 years ago
    It is also possible that zone alarm was configured to block all port traffic not specifically allowed. If you add an allowance for the ConnectIQ sim to use that port, it might fix the issue.
  • Former Member
    Former Member over 10 years ago
    1735

    Thanks for the report. If you want to try something that'll let you re-install Zone Alarm, you can replace your monkeydo.bat file with the code below. I haven't tested it and my batch file scripting is pretty bad, so it may not work. The idea is to try all the ports between 1234 and 1238 when connecting to the simulator. We'll get this put into the monkeydo.bat file in a future release.
    @echo off
    FOR %%P IN (1234 1235 1235 1236 1237 1238) DO "%~dp0shell.exe" --transport=tcp --transport_args=127.0.0.1:%%P push "%~dpnxs1" "0:/GARMIN/APPS/%~nxs1"
    set device_id=square_watch
    IF NOT [%2]==[] set device_id=%2
    FOR %%P IN (1234 1235 1236 1237 1238) DO "%~dp0shell.exe" --transport=tcp --transport_args=127.0.0.1:%%P tvm "0:/GARMIN/APPS/%~nxs1" %device_id%


    Dear Kyle,

    That's a god Idea, I like it :). But connectiq.bat script should be modified also, shouldn't it? I mean, in order to launch simulator.exe listening in the proper port.

    I thing I could even use an environment variable to store the port I want to use and use the variable in the scripts....

    Thank you very much for your support.

    Best regards,
    Ruben.
  • Former Member
    Former Member over 10 years ago
    3097

    It is also possible that zone alarm was configured to block all port traffic not specifically allowed. If you add an allowance for the ConnectIQ sim to use that port, it might fix the issue.


    Dear Brian,

    Actually that was one of the things I tried. But the problem is not that the firewall is blocking traffic, but that the firewall is opening a process (Actually windows identify the process as System, with process ID 4) and that process is hogging port 1234. And, as there is a listening socket at that port, shell.exe identifies it as the device and tries to connect to it, but it gets an time out (because it's not the simulator but the firewall....)

    Best regards,
    Ruben.
  • Dear Kyle,

    That's a god Idea, I like it :). But connectiq.bat script should be modified also, shouldn't it? I mean, in order to launch simulator.exe listening in the proper port.

    I thing I could even use an environment variable to store the port I want to use and use the variable in the scripts....

    Thank you very much for your support.

    Best regards,
    Ruben.


    The simulator tries each of the ports in order from 1234 to 1238, until it finds an open one. Unfortunately at this time we're not able to switch which ports the simulator listens on via the command line.