Profile Registration Unhandled Error

Hi guys, I am currently working to connect my Fenix 6 with a BLE product.

When I set the scan state to scanning, I'm getting the following error:

"Error: System Error
Details: Profile Registration Unhandled Error
Stack: "

I'm using the Thingy52 sample, my profile manager looks like this:

import Toybox.BluetoothLowEnergy;

class ProfileManager {
    public const STEP_SERVICE                               = BluetoothLowEnergy.stringToUuid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"); // Service UUID
    public const RAW_ACC_DATA_CHARACTERISTIC                = BluetoothLowEnergy.stringToUuid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"); // Notify
    public const PROCESSED_ACC_DATA_CHARACTERISTIC          = BluetoothLowEnergy.stringToUuid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"); // Notify
    public const START_STOP_STEP_DETECTION_CHARACTERISTIC   = BluetoothLowEnergy.stringToUuid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"); // Can only write 0x00 or 0x01 (boolean enabled/disabled)
    public const STEPS_CHARACTERISTIC                       = BluetoothLowEnergy.stringToUuid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"); // Only read, total steps detected

    public const DEVICE_UUID                                = BluetoothLowEnergy.stringToUuid("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"); // GFPS UUID

    private const _envProfileDef = {
        :uuid => STEP_SERVICE,
        :characteristics => [{
            :uuid => RAW_ACC_DATA_CHARACTERISTIC,
            :descriptors => [BluetoothLowEnergy.cccdUuid()]
        }, {
            :uuid => PROCESSED_ACC_DATA_CHARACTERISTIC,
            :descriptors => [BluetoothLowEnergy.cccdUuid()]
        }, {
            :uuid => START_STOP_STEP_DETECTION_CHARACTERISTIC
        }, {
            :uuid => STEPS_CHARACTERISTIC
        }]
    };

    //! Register the bluetooth profile
    public function registerProfiles() as Void {
        BluetoothLowEnergy.registerProfile(_envProfileDef);
    }
}

  • No, a data field can use BLE in the main app. See the NordicThingy52CoinColector sample in the SDK.

    The reason I was asking about if it was a DF is that in the sim it's not as easy to do a clean exit.

     Run a widget, and hit back before you run again for example. A clean exit.

  • If commenting the registerProfile out works, that kind of points to your BLE profile.  Try it with just the service and one characteristic at a time, and see if you always get the error or just some of the tests.  If always, try grabbing the service UUID from the thingy52 sample and use that in place of your service UUID.  Maybe then using the characteristics from the thiny52 to see if you still get the error. 

    In UUIDS, it's common that most of the UUIDs you'll use with be similar, with the difference being . in the 4,5,6,7th digits.

    For example, this is from the thingy52

     public const THINGY_ENVIRONMENTAL_SERVICE = BluetoothLowEnergy.longToUuid(0xEF6802009B354933L, 0x9B1052FFA9740042L);
        public const TEMPERATURE_CHARACTERISTIC   = BluetoothLowEnergy.longToUuid(0xEF6802019B354933L, 0x9B1052FFA9740042L);
    

    Notice how the only difference is 0200 in the first and 0201 in the second.  If I recall, this undering scheme is also discussed in the video from when CIQ BLE was announced.  https://forums.garmin.com/developer/connect-iq/b/news-announcements/posts/adding-bluetooth-connectivity-to-your-connect-iq-projects

    You can't just increment the UUID.