class GattSerialTransportProfile extends BaseProfile {

    @Override
    public void onCharacteristicChanged(GattClient client, BluetoothGattCharacteristic characteristic) {
        if (characteristic == mSerialCharacteristic) {
            byte[] data = mMessageAssembler.assemble(new GattSerialPacket(characteristic.getValue()));
            if (data != null) {
                if (BuildConfig.DEBUG) {
                    Log.d(TAG, "Received data");
                }
                if (mListener != null) {
                    mListener.onMessageReceived(data);
                } else {
                    client.disconnect();
                }
            }
        } else {
            // scratch
            int index = BEAN_SCRATCH_UUIDS.indexOf(characteristic.getUuid());
            if (index > -1) {
                index += 1;
                if (BuildConfig.DEBUG) {
                    Log.d(TAG, "Received scratch bank update (" + index + ")");
                }
                if (mListener != null) {
                    try {
                        ScratchBank bank = EnumParse.enumWithRawValue(ScratchBank.class, index);
                        mListener.onScratchValueChanged(bank, characteristic.getValue());
                    } catch (NoEnumFoundException e) {
                        Log.e(TAG, "Couldn't parse bank enum from scratch bank with index " +
                                index);
                        e.printStackTrace();
                    }
                } else {
                    client.disconnect();
                }
            }
        }
    }

    public  GattSerialTransportProfile(GattClient client, Handler handler);

}