Bluetooth paring PIN

Hi,

I would like to know if there is a possibility to pass a pairing PIN to a BLE device with the garmin BluetoothLowEnergy SDK?
If not, would it be possible to add this feature in one of the next releases of your SDK?
In my case I want to connect my garmin Fenix 6 with a device, but to write/read data from that device a pairing PIN is required (STATUS_WRITE_FAIL = 14  is always returned).

Best regards,
Patrick

  • What device are you trying to connect to the f6?

    The CIQ BLE is pretty much a minimal version, meant to connect sensors, without any type of security. If you are passing the pin to the sensor, is it just writing the characteristic properly?

  • Thank you for your quick response.

    It's a Specialized Levo E-MTB.

    How should I pass the PIN th the device? That's what I would like to know.
    I am able to connect to the device, I can also read "public" information like device name, etc.
    But when I want to write to the desired characteristic, the SDK is returning STATUS_WRITE_FAIL = 14. If I read the characteristic, the returned data array has always length of 0.

    I'm able to do the described procedure on my "BLE Scanner" testing app. With that app, I get a notification to enter a PIN as soon as I try to write to the characteristic.

    I can't find a way to do that with the Garmin SDK:

    requestWrite(value, options)

    Options:

    WRITE_TYPE_WITH_RESPONSE 0

    3.1.0

    Write with response

    WRITE_TYPE_DEFAULT 1

    3.1.0

    Write without response (Default write type)

  • By notification, you mean you would see it as a BLE notification for a specific characteristic?  Have you enabled notifications for that characteristic in CIQ BLE?

    something like this:

    var cccd = char.getDescriptor(Ble.cccdUuid());
    cccd.requestWrite([0x01,0x00]b);

  • No, I mean I get a "pop up menu" (notification) where I'm prompted to enter the PIN the be allowed to write/read the desired characteristic (this is on my Android testing app). After entering the PIN it works as expected. 

    As I said if I use the same function with CIQ it just returns error status 14 and a following read requests delivers an empty data array.