Comments

1 comment

  • Official comment
    Avatar
    VSN Mobil Support

    Once the long press (2-9 sec press) is detected, the phone/app needs to acknowledge and clear the detection.  If not the V.ALRT will notify the phone/app again each time it re-connects to the phone.

    Characteristic 0xFFFFFFF3-00F7-4000-B000-000000000000 is used to acknowledge and then clear the long press event.

    1. Acknowledge the urgent alert by writing 0x01 to characteristic 0xFFFFFFF3-00F7-4000-B000-000000000000.   V.ALRT will then flash Red-Green (if it’s not in silent mode).

    You could indicate to the user (via app UI) that the app has received the long button press.  See below Android code snippet to send the acknowledgement.

     

    publicstatic final UUID ACK_DETECT= UUID.fromString("fffffff3-00f7-4000-b000-000000000000");// 0xFFF3

    publicstatic final UUID VSN_GATT_SERVICE = UUID.fromString("fffffff0-00f7-4000-b000-000000000000");// 0xFFF0

    publicstatic  finalbyte[] RECEIVED_ACK = newbyte[]{(byte) 0x01};

    publicstatic  finalbyte[] CANCEL_ACK = newbyte[]{(byte) 0x00};

     

    // Get VSN GATT Service

    BluetoothGattService gattService = gatt.getService(VSN_GATT_SERVICE);

     

    // Get alert confirmation characteristic

    BluetoothGattCharacteristic alertConfirmChar = gattService.getCharacteristic(ACK_DETECT);

     

    // Ack/confirm the alert

    alertConfirmChar.setValue(RECEIVED_ACK);

    gatt.writeCharacteristic(alertConfirmChar); 

    2. After acknowledging the alert, app can cancel/clear the alternating blinking Red/Green LED by writing 0x00 to characteristic 0xFFFFFFF3-00F7-4000-B000-000000000000.  Again, your app can provide a UI for user to clear the alert.

    // Cancel/reset the alert mode

    alertConfirmChar.setValue(CANCEL_ACK);

    gatt.writeCharacteristic(alertConfirmChar); 

    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk