Simulator questions

I am new to Garmin Development but not new to coding and am familiar with Eclipse.
My development machine is a Linux Fedora 27 host. I had to find some older libraries that aren't available from the Fedora repositories and am now able to get the simulator to run. I am up to date with the ConenctIQ, the SDK Manager says I have ConnectIQ SDK 2.4.5 release April 19 2018.

I don't yet have a USB to ANT adaptor for the simulator, though I am not sure I am doing anything that requires it.

I am running into some problems and hoping for some pointers.

1. From the ConnectIQ tab on the top line of Eclipse if I pick any of "Programmer's Guide", "API Documentation", "Samples" Eclipse hangs and I need to kill it and restart it. Any suggestions on what may be the problem ?

I installed the connectIQ in /usr/local/garminsdk and I think I can see the information needed there:

$ ls
bin ProgrammersGuide.html resources share
doc README.html samples UXGuide.html

If I look directly at the html files in a browser they come up fine, it just seems that Eclipse can't find these files. Is there something I need to set in Eclipse to point to these locations ?

I am following the eBook "Wearable Programming for the Active Lifestyle, Using Garmin ConnectIQ", thank you Brian Jepsen..

2. The eBook talks about a square watch and round watch option, but I don't see those device options. Is this expected in the newer releases of ConnectIQ since the book was released?

3. I select the Fenix 5 option ,since I have that watch, and am able to bring up the simulator for the Test App from the eBook and I see the monkey and the message to click a button. But, when I click any button but the back button nothing happens. If I click on the back button, lower right on the fenix 5 the monkey picture goes away and I get a blue triangle. Should something happen when I click the other buttons ?

4. I went ahead to the next example in the book the "Record Sample" and using fenix 5 in the simulator I get the initial message to click the menu button, but again when I do, nothing happens. Again if I click the back button, lower right on fenix 5, I get the blue triangle. Should something happen when I click the other buttons ?

Any suggestions would be appreciated.

Thanks
Chris K
  • Did you install the Eclipse plugin?

    https://developer.garmin.com/connect-iq/sdk/

    I assume you did because the menu option is showing but the plugin version matches the SDK you are using?
  • Yes, the Eclipse plugin is installed. From Eclipse I can select a "ConnectIQ Project" and was able to successully compile and run two samples all done from within Eclipse.

    Thanks
    Chris K
  • chriskot


    1. From the ConnectIQ tab on the top line of Eclipse if I pick any of "Programmer's Guide", "API Documentation", "Samples" Eclipse hangs and I need to kill it and restart it. Any suggestions on what may be the problem ?


    It seems like a bug in the eclipse plugin, I will open a ticket to investigate this issue. Make sure you have up to date plugin.

    2. The eBook talks about a square watch and round watch option, but I don't see those device options. Is this expected in the newer releases of ConnectIQ since the book was released?


    There has been a lot of changes and new features added to ConnectIQ since the book has published. The generic watch devices like square, round etc are not available in the ConnectIQ any more. It is recommended to use the actual device for you application in the simulator that you are targeting your app for.

    3. I select the Fenix 5 option ,since I have that watch, and am able to bring up the simulator for the Test App from the eBook and I see the monkey and the message to click a button. But, when I click any button but the back button nothing happens. If I click on the back button, lower right on the fenix 5 the monkey picture goes away and I get a blue triangle. Should something happen when I click the other buttons ?

    4. I went ahead to the next example in the book the "Record Sample" and using fenix 5 in the simulator I get the initial message to click the menu button, but again when I do, nothing happens. Again if I click the back button, lower right on fenix 5, I get the blue triangle. Should something happen when I click the other buttons ?


    There are a lot of samples available in the ConnectIQ sdk, Can you able to try them and see if they are working ?
  • 1). Also check in the "doc" subdirectory in the SDK. (index.html). That's the API documentation. I'm not sure why you can't get to them with eclipse.

    2) Square Watch and Round Watch are an old thing that no longer exist. They were generics for thing like the 920, the original va, and the fenix3. Now, just pick a real watch (like the fenix 5) as a target.

    3) It's a matter of how keys are used on the specific device. the back button (lower right), is the common way to exit an app (that's what the garmin triangle shows - your app has ended) On an f5, the menu button is a long press of the Up button. Try that

    4) Again, the back button exits the app. For the recording sample, you need to feed it data, which you do in the sim from Simulation>Simulate Data. (or playback a .fit of your own).Again, "menu" is used to get things running as far as recording (long press of up)

    Like Anshul (I thing we submitted posts at about the same time) said, the ebook is kind of outdated, but the programmer's guide in the SDK has some of the "how to get started" things and is current. Also, check the UX Guilde in the SDK for more stuff. The Readme file now also has descriptions of all the samples, as well as how to use them in the sim.
  • I'll checkout the doc directory and other docs you mention.

    Well the buttons were pilot error. I needed to hold down to get the long press of the menu button and then indeed the Test App changed from the Monkey page to a list of item 1 and item 2.

    I was worried that the simulator wasn't supported in Fedora 27 but it looks like it's working just fine. So, I should be able to move forward.

    Thanks for the info.

    Here are my notes on getting the simulator working in fedora 27. Might be nice if ConnectIQ SDK included these older libraries since they are kind of hard to get these days:
    =========================================
    1. Garmin SDK
    The simulator wants an older version libraries.

    One of them was available via dnfdragora. Unfortunately, I didn't
    write it down. It was the first one that shows up so it won't be hard
    to find it.

    The other ones were not available via standard repositores and here is
    how I got those.

    connectiq wants libwebkitgtk.so which Fedora 27 doesn't support. Found
    this page that has a libwebkitgtk-1.0 in it:

    https://community.pulsesecure.net/t5/Pulse-Desktop-Clients/Fedora-27-webkitgtk-no-longer-supported/m-p/37592#M396

    Basically, get a copy of the gnucash and unpack it and then I copied the
    libwebkitgtk-1.0 and it's links to /usr/local/lib64. I then had to
    create a file in /etc/ls.so.conf.d called usrlocallibs.conf that has:

    /usr/local/lib
    /usr/local/lib64

    Then run ldconfig to get the new info into ld.so.cache which can be seen via:

    # strings /etc/ld.so.cache | grep /usr/local
    /usr/local/lib64/libwebkitgtk-1.0.so.0
    /usr/local/lib64/libwebkitgtk-1.0.so

    I also needed to add these packages found in these locations:


    libjavascriptcoregtk-1.0
    This was in the same gnucash download above so just copied it and links to
    /usr/local/lib64 and ran ldconfig

    libjpeg8.so
    https://fedora.pkgs.org/27/russian-fedora-free-updates-x86_64/compat-libjpeg8-1.5.3-3.fc27.x86_64.rpm.html

    Copied down the rpm and ran:

    rpm2cpio compat-libjpeg8-1.5.3-3.fc27.x86_64.rpm | cpio -idmv

    Then copied the libjpeg.so.8.1.2 /usr/local/lib64 and made the libjpeg.so.8 link and ran ldconfig.

    Running connectiq brough up the simulator and I could start it from Eclipse.
    =================================

    Thanks
    Chris K


  • chriskot

    This is really good information on getting Connect IQ simulator to run on fedora. Thank you for posting steps in detail.

    Connect IQ is only supported on LTS versions of Ubuntu, although there is likely chance that it might run on other linux distros given the run time dependency has been resolved on the system.

    Anshul