CIQ Simulator issue: BLE device not connected after pairing

Hello,

I have massive problems testing my app code in the CIQ Simulator (4.1.5).

1. If I start the Simulator with a valid COM-Port configured in the "BLE Setting", only the "File" menu is active, and all other menu items are disabled.
To enable them, I have to "Reset Simulator" to unset the BLE settings and restart it.
After that, I can configure the COM-Port again and the app can scan for Bluetooth devices. If I need to restart the app, I have to reset the simulator over and over again.

2. Within the app "onScanResults()" is called, and the device I want to connect to is found.
But after calling "BluetoothLowEnergy.pairDevice(scanResult);" nothing happens, "onConnectedStateChange()" is never called and no other callback is called, and no error occurs, it's simply doing nothing.

3. If I try the same app on my Fenix 7 everything works fine and "onConnectedStateChange()" is called as it should be, so it's only a problem in the Simulator.

I'm using the Nordic NRF52840 USB dongle (with the connectivity_1.0.0_usb_with_s132_5.1.0.hex firmware provided by Garmin) on Windows 10.

Has anyone an idea, if there is a configuration missing or I need to use another version of the simulator or anything else to fix the connecting problem?

Many regards,
Jens

  • I've used every version of the sim with BluetoothLowEnergy since it was introduced, including 4.1.5 (just yesterday).  I'm on win11, and I do have an issue where in VS Code, no app, even just a watch face that doesn't use BLE runs if the dongle is connected so I'm using Eclipse with BLE. 

    When you say you are using "reset sim", have you tried closing the sim and starting it again instead?  Shutdown the sim, unplug the dongle, plug it back in, restart the sim?  What type of sensor are you trying to use?  Can you see what's happening on that end?    Have you tried connecting to something else?  Rebooted your pc?

  • Hello,

    > [...] I do have an issue where in VS Code [...]

    Indeed, I'm using VS Code. Now, I've tried starting the simulator directly, and running the "Build for device" version, as described in the documentation (using the simulator.exe and the mdd.bat) and atleast the Simulator startup issue, which requires to reset the simulator is gone work. Thanks for this hint!

    Unfortunately, no matter what I try, the problem that the simulator is not connecting after pairing still exists.

    > What type of sensor are you trying to use?

    I'm trying to read data (Speed, Distance etc.) from the WalkingPad treadmill to enrich the Activity with that information.
    Later, I could also imagine to control the speed using the Up/down keys on the watch, or to Start/Stop the treadmill.

    > Can you see what's happening on that end?

    Unfortunately not. All I know is, that it works on the real watch.

    > Have you tried connecting to something else?

    I've just tried a Heart Rate Sensor and this works, so it seems like it's not a general problem with my setup.

    > Rebooted your pc?

    Yes, multiple times.

    I wish I could try your wonderful BleScan app in the simulator, but if you don't do any magic, I assume it will also not connect.
    I've slightly adjusted this open source scanner: github.com/.../garmin-bt-scan to connect on pressing the Menu button, but it has the same problem with the WalkingPad as my code has in the simulator.

    What I've also discovered is, that the "nRF Connect for Desktop Bluetooth Low Energy Standalone v4.0.0" application immediately disconnects from the WalkingPad with the error BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED, if I try to connect to it with the default Connection interval of 7.5ms. If I change that to 75ms, everything works fine. Maybe the Simulator also uses a Connection interval which is too low?
    The application shows (in the "Peripheral Preferred Connection Parameters" of the "Generic Access" data) that the Preferred Connection Interval for the WalkingPad is 17.5ms. Unfortunately I don't see am option to configure such internals of the dongle.

    Many regards,
    Jens

  • I connect to a few things including HRMs and raspberry Pis.  If nRfConnect has issues with the default values, the fact you have issues in the sim really doesn't surprise me.  However, it it's working on a real device, you can use that for testing.

    One thing if you don't have this already, is to add timeout functionality.  If I try to pair and that doesn't happen after "X" seconds", I reset everything, scan again, and try to pair again.

  • Good news on this issue: It seems it's fixed with SDK 4.2.0 beta1.
    I can BLE connect with VS Code, Win11, Simulator 4.2.0 beta1 and the Nordic Dongle - the tool is finally working.

  • It started working for me in VS Code  with the 4.1.6 SDK and works with the 4.1.7 SDK too It worked with earlier SDKs and Eclipse.

  • I tried it with 4.1.7 right now. You're right, it's working with 4.1.7, too.