Supporting Wifi on a Fenix5x

Hi there,

First, I'd like to thank Garmin for providing developers with the Wifi Sync option.

However, has anyone tried supporting wifi sync on a fenix5x?  One of my users notified me that although his watch (fenix5x) has wifi, my app crashes when it tries to launch the wifi sync delegate.

I ran some analytics, and can verify that the fenix5x returns the following values for these code blocks:

has_startsync = (Communications has :startSync);
if(System.getDeviceSettings().monkeyVersion[0] >= 3) { 
	var info = System.getDeviceSettings().connectionInfo;
	if(info[:wifi] != null) {
		has_wifi = true;
	}
}

//has_startsync = false
//has_wifi = true

Please note, this ONLY occurs on physical devices, the sim returns False to both values

How in the world is this possible? Could this be a ConnectIQ bug?

Thanks for your help!

Lance

  • Fenix 5x and BT is off  when I have use wifi for transfering routes and poi files. 

  • Do you manually connect wifi first?

  • Yep... I disable BT and then use WIFI as it is faster etc... beng doing it this way for 4-6months

  • You'll see it's only supported on devices with onboard music (it's how music is synced),  so for example, it's supported on the 245m but not the 245.  The f5x doesn't have music.
    So how come I can sync/recieve data via wifi when using iqmapreciever?
    What device do you have?  Are you sure it's not using BT?
    Fenix 5x and BT is off  when I have use wifi for transfering routes and poi files. 

    So not to state the obvious, but:

    - music support implies wi-fi support, but not vice versa. (Some models in older generations have wi-fi but not music, although I think it is the case that for newer generations, every device which has wi-fi also has music)

    - The use of SyncDelegate requires music support (when the OP says Wi-Fi Sync, they're referring to using SyncDelegate and Communications.startSync)

    - iqmapreceiver obviously doesn't use SyncDelegate, at least not for Fenix 5X

    - if you (the end user) force wi-fi to connect, then in some cases, an app which doesn't use SyncDelegate can still communicate via wi-fi. As Jim and others have pointed out, Edge devices have been able to use Wi-Fi in Connect IQ apps (without using SyncDelegate). Looks like this is possible with Fenix 5X, too.

    https://forums.garmin.com/developer/connect-iq/f/discussion/251935/http-request-over-device-wi-fi-specification/1204841#1204841

    I can make a connection from a 1030+ to a website without GC mobile.

    The problem that I am having is that the 1030+ doesn't always have the WiFi connection.

    Having GC appears to make that more reliable.

    I think what happens is that the WiFi connection is turned off and has to be restarted (and having GC makes that faster).

    Here he's not talking about using SyncDelegate.

  • Thank you all for weighing in.  So, based off of your posts, it's not possible to force a watch like the Fenix5x to use wifi, even though it has the ability to do so?

  • Not with CIQ.  To be honest, you may not want to.  If you do a makeWebRequest() and BT isn't available but wifi is connected, it will use wifi.  But in most cases, wifi won't be connected, and it will use BT.

    Unless you are doing something like a bulk download of Music, connecting to Wifi and using that could take longer then just using the already connected BT.  Plus, with wifi you have to be within range of a known network, where with bt, just within range of your phone

  • I generally use it as is faster for transfering routes etc on my Fenix5x and I use the phones hotspot function for that when away from home in the hills etc.. and use noraml wifi at home..  

  • It really depends on the data you are getting.  If it's 1000 bytes of Jason data, you probably won't see a difference in speed, and when you take into account setting your phone as a hot sport and connecting to it, BT will likely take less time.

  • I think we will agree to disagree on this one as several times it took along time to send a route/poi file and longer than it should via BT. yet within a few clicks the files sent via wifi... It is a subjective thing thats all and we all have different points of view and experiences lol

  • Not really subjective, as it's based on the amount of data.  For a small amount, wifi adds overhead you don't have with BT (like doing the connection to wifi itself).  You are doing a large amount of data, so the speed difference would be noticeable.

    I know I wouldn't want to hassle with connecting to wifi if I was just getting the current weather for example.  And I wouldn't want wifi connected in the even't I want the weather, as the battery will take a hit if wifi is on too much.