Bug in firmware Garmin Edge Explore 2 - problem with registerProfile

When testing the ActiveLook component from the IQ store, I found incompatibility with the Garmin Edge Explore 2 device. It works without problems on another Garmin model. When testing with the source code (see github.com/.../Garmin-Datafield-sample-code) I found that the problem is in the registration of the BLE profile PROFILE_ACTIVE_LOOK (see github.com/.../ActiveLook.mc). Specifically, the issue is with the UUID TX ActiveLook (0783B03E-8535-B5A0-7140-A304D2495CB8), RX ActiveLook (0783B03E-8535-B5A0-7140-A304D2495CBA) and Gesture Event (0783B03E-8535-B5A0-7140-A304D2495CBB) - see github.com/.../ActiveLook_API.md. When trying to register this profile, the SDK function registerProfile returns an undocumented STATUS/Error 2 in OnProfileRegister. Other profiles can be registered without any problem.
This is probably a bug in the firmware of the Garmin Edge Explore 2 model. CIQ version is 3.1.0. Hopefully the developers will fix this in the next firmware update for the Explore 2 device.

  • Hey Martanek, I'm currently running into the same issue. Have you had any progress in regards to this issue with firmware updates or otherwise? I don't have an Edge Explore 2 but it sounds like even if I did there wouldn't be anything I could do to fix this issue for a couple of my customers... 

  • it seems like they released a new version of their datafield with some corrections on github. Maybe it's worth a try ?

  • Hey Syro, there's no changes to the registerProfile functions which is causing the failure for me and from the look of martanek's issue - his too.

    My issue is related to my data field not another one, but it is precisely the same, the registerProfile function from BluetoothLowEnergy never returns properly.

    martanek has tried to raise this as a firmware issue on the Edge Explore 2 boards and never got a response - I think it's unlikely to ever see a fix. 

  • I ran into a similar issue with my Edge Explore 2 while developing an App for a custom BLE Sensor. The onProfileRegister function would get a Status Code 2. I found another Post where it was mentioned that the Status 2 might actually be a STATUS_NOT_ENOUGH_RESOURCES and the value just doesn´t get translated properly:  https://forums.garmin.com/developer/connect-iq/f/discussion/250833/system-crash-investigation-vivoactive-4/1197769 

    I then checked the Video from the Developer Conference (specifically at 18:30) they mention that the UUIDs for the Services / Characteristics should ideally only differ in Byte 12 and 13 so that the System can handle them more efficiently. https://youtu.be/drZ_pzGwo7I?si=hokH-JCuFLORX-ke&t=1112

    Leaving this here since it took me the whole week to figure out. 

    P.S.: Before I got to the Status 2 I was wondering why device in the onConnectedStateChanged function never had any services i.e. getServices always returned null. So if someone is googling for that and finding this post try to implement the onProfileRegister function in the Ble Delegate and print out the status.

  • How many calls are being made to registerProfile in the apps?  There can be at most 3.

    API Doc: Registration can fail if too many profiles are registered, the current limit is 3.

    On a f5+, you see the correct exception (e=ProfileRegistrationException: Too Many Profiles) but maybe you see a different error on different devices

    That limit of 3 is by device - not by app.  So if you have 2 DFs you are trying to use at the same time and each tried to register 2 profiles, that can cause issues.

    If I recall an app can see where things stand with, getAvailableConnectionCount()

  • In my case I made sure that the registerProfile call was only made once. I also believe that different limits apply to different Devices since everything was working perfectly for me in the Simulator but not on the Edge Explore 2. Changing the UUIDs so that they only differ in the exact mentioned Spot solved it for me thankfully. (Even though I only tried to register a single Service with a single Characteristic.) -> The Thingy Example App shows how the UUIDs should be chosen.