Class GollumDongle

  • All Implemented Interfaces:

    
    public class GollumDongle
    
                        

    GollumDongle class to route method calls to USB dongle (Sub1GHzRfUsbTransceiver) or BLE dongle (Sub1GHzRfBleTransceiver)

    • Constructor Detail

      • GollumDongle

        GollumDongle(Context context)
        Constructor for interfacing with a PandwaRF.
        Parameters:
        context - The calling context being used to instantiate the GollumDongle.
    • Method Detail

      • getHandleFirmwareCC1111

         HandleFirmwareCC1111 getHandleFirmwareCC1111()
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • getHandleFirmwareNordic

         HandleFirmwareNordic getHandleFirmwareNordic()
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • getShadowCc1111BootloaderVersion

         int getShadowCc1111BootloaderVersion()

        Returns the device CC1111 bootloader version as last seen by the lib

        Returns:

        device CC1111 bootloader version

      • getShadowModel

         String getShadowModel()

        Returns the device model as last seen by the lib

        Returns:

        device model

      • getShadowHwRevision

         String getShadowHwRevision()

        Returns the device HW revision as last seen by the lib

        Returns:

        device HW revision

      • getShadowCc1111BuildType

         String getShadowCc1111BuildType()

        Returns the device CC1111 build type as last seen by the lib

        Returns:

        device CC1111 build type

      • isPandwaRfRogueCc1111

         boolean isPandwaRfRogueCc1111()
        Returns:

        true if device (CC1111) is a Rogue (Pro or Gov)

      • isPandwaRfRoguePro

         boolean isPandwaRfRoguePro()
        Returns:

        true if device (Nordic) is a Rogue Pro

      • isPandwaRfRogueGov

         boolean isPandwaRfRogueGov()
        Returns:

        true if device (Nordic) is a Rogue Gov

      • getInstance

         static GollumDongle getInstance(Activity parentActivity)

        Returns a single instance of GollumDongle

        Parameters:
        parentActivity - parent activity
        Returns:

        a single instance of GollumDongle

      • getInstance

         static GollumDongle getInstance(Context context)

        Returns a single instance of GollumDongle

        Parameters:
        context - Associated context
        Returns:

        a single instance of GollumDongle

      • hasInstance

         static boolean hasInstance()
        Returns:

        true if an instance of GollumDongle exists

      • searchDevice

         void searchDevice(ScannerListener scannerListener, boolean scanWithoutLocationEnabled)

        Search for any Gollum device around. Return a list of available Gollum Device.

        Parameters:
        scannerListener - callbacks to be called when new device is found or scan ends
        scanWithoutLocationEnabled - true if scan without location is enabled
      • searchDevice

         void searchDevice(ScannerListener scannerListener, long scanDurationMs, boolean scanWithoutLocationEnabled)

        Search for any Gollum device around. Return a list of available Gollum Device.

        Parameters:
        scannerListener - callbacks to be called when new device is found or scan ends
        scanDurationMs - duration in ms, 0 for infinite scan (only recommended when debugging)
        scanWithoutLocationEnabled - true if scan without location is enabled
      • stopSearchDevice

         void stopSearchDevice()

        Stop BLE scanning for any PandwaRF device around.

      • setAlternativeDeviceNameScanList

         void setAlternativeDeviceNameScanList(ArrayList<String> list)

        Set the list of alternative device names that can advertize and must be scanned This will create a new scanner

        Only available in Rogue Gov variants

        Parameters:
        list - ArrayList of alternative device names to be scanned for
      • getAlternativeDeviceNameScanList

         ArrayList<String> getAlternativeDeviceNameScanList()

        Returns the list of alternative device names that can advertize and must be scanned

        Only available in Rogue Gov variants

        Returns:

        list of alternative device names

      • addAlternativeDeviceNameToScanList

         void addAlternativeDeviceNameToScanList(String name)

        Adds a device name to the list of alternative device names that can advertize and must be scanned

        Only available in Rogue Gov variants

        Parameters:
        name - BLE advertizing name to be added for scan
      • removeAlternativeDeviceNameFromScanList

         Boolean removeAlternativeDeviceNameFromScanList(String name)

        Removes a device name from the list of alternative device names that can advertize and must be scanned

        Only available in Rogue Gov variants

        Parameters:
        name - BLE advertizing name to be removed for scan
        Returns:

        true if at least one name was removed from the list, false if no name was removed

      • removeAllAlternativeDeviceNameFromScanList

         void removeAllAlternativeDeviceNameFromScanList()

        Removes all device names from the list of alternative device names that can advertize and must be scanned

        Only available in Rogue Gov variants

      • setBleManagerAppCallbacks

         void setBleManagerAppCallbacks(GollumBleManagerCallbacks bleManagerCallbacks)

        Register for BLE callbacks

        Parameters:
        bleManagerCallbacks - BLE Callback to receive information about bluetooth notification.
      • isDeviceBonded

         boolean isDeviceBonded(String deviceAddress)

        Check if the bond state of the remote device is bonded

        Parameters:
        deviceAddress - address to check for bonding status
        Returns:

        true if device (PandwaRF or any other name) is bonded

      • isDeviceBonded

         boolean isDeviceBonded()
        Returns:

        true if device (PandwaRF or else) is bonded

      • bondDevice

         boolean bondDevice(BluetoothDevice bluetoothDevice)

        Start the bonding (pairing) process with the remote device.

        Parameters:
        bluetoothDevice - device to bond
        Returns:

        false on immediate error, true if bonding will begin

      • bondDevice

         boolean bondDevice(String deviceAddress)

        Start the bonding (pairing) process with the remote device.

        Parameters:
        deviceAddress - device address to bond
        Returns:

        false on immediate error, true if bonding will begin

      • bondDevice

         boolean bondDevice()

        Start the bonding (pairing) process with the remote device.

        Returns:

        false on immediate error, true if bonding will begin

      • clearBondDevice

         boolean clearBondDevice(BluetoothDevice device)

        Clear the bonding (pairing) process with the remote device.

        Parameters:
        device - device to unbond
        Returns:

        true if clear successful

      • clearBondDevice

         boolean clearBondDevice(String deviceAddress)

        Clear the bonding (pairing) process with the remote device.

        Parameters:
        deviceAddress - address of device to unbond
        Returns:

        true if clear successful

      • clearBondDevice

         boolean clearBondDevice()

        Clear the bonding (pairing) process with the remote device.

        Returns:

        true if clear successful

      • getBondedPandwaRfCount

         int getBondedPandwaRfCount()

        Returns the number of bonded PandwaRF

        Returns:

        number of bonded PandwaRF

      • getBondedDeviceCount

         int getBondedDeviceCount(ArrayList<String> deviceList)

        Returns the number of bonded devices from the deviceList

        Parameters:
        deviceList - to be checked
        Returns:

        number of bonded devices

      • openGollumBleDevice

         void openGollumBleDevice(String deviceAddress, boolean autoConnect, boolean reconnectIfError, boolean refreshDeviceCacheBeforeConnect, boolean useTxFifoQueue, boolean hideBleAddress)

        Open a device from its address without setting the app callbacks.

        Parameters:
        deviceAddress - address of device to open.
        autoConnect - indicates whether to automatically connect to the BLE device as soon as it becomes available.
        reconnectIfError - If true, allow automatic BLE reconnection in case of BLE disconnection (GATT error, ...
        refreshDeviceCacheBeforeConnect - If true, clears the internal cache and forces a refresh of the services from the remote device.
        useTxFifoQueue - If true, enqueue all TX packets into a FIFO queue.
        hideBleAddress - If true, ble address displayed on the android notification will be hidden
      • openGollumBleDevice

         void openGollumBleDevice(ExtendedBluetoothDevice device, boolean autoConnect, boolean reconnectIfError, boolean refreshDeviceCacheBeforeConnect, boolean useTxFifoQueue, boolean hideBleAddress)

        Open a device without setting the app callbacks.

        Parameters:
        device - Bluetooth device to connect to.
        autoConnect - Whether to directly connect to the remote device (false).or to automatically connect as soon as the remote device becomes available (true).
        reconnectIfError - If true, allow automatic BLE reconnection in case of BLE disconnection (GATT error, ...).
        refreshDeviceCacheBeforeConnect - If true, clears the internal cache and forces a refresh of the services from the remote device.
        useTxFifoQueue - If true, enqueue all TX packets into a FIFO queue.
        hideBleAddress - If true, ble address displayed on the android notification will be hidden
      • closeDevice

         void closeDevice()

        Close PandwaRF connection

      • closeGollumBleDevice

         void closeGollumBleDevice()

        Close BLE device

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

      • refreshDeviceCache

         boolean refreshDeviceCache()

        Clears the internal cache and forces a refresh of the services from the remote device.

        Returns:

        true, if the internal cache refresh has been requested successfully

      • setShouldSignalRssi

         void setShouldSignalRssi(boolean signalRssi)

        Enable RSSI measurement of the connected device.

        Parameters:
        signalRssi - true to enable RSSI measurements.
      • setShouldSignalBattery

         void setShouldSignalBattery(boolean notifActive)

        Enable reception of the battery level notification.

        Parameters:
        notifActive - true to request PandwaRF device to send periodic battery level notification
      • hasFeatureUsbHost

         static boolean hasFeatureUsbHost()

        Indicates if device has USB Host feature

        Returns:

        true if device has USB Host feature

      • hasFeatureBluetoothSmart

         static boolean hasFeatureBluetoothSmart()

        Indicates if device has Bluetooth Smart feature

        Returns:

        true if device has Bluetooth Smart feature

      • isUsbDeviceGollumBootloader

         static boolean isUsbDeviceGollumBootloader(UsbDevice device)

        Indicates if device is connected in USB mode and Bootloader is running

        Parameters:
        device - UsbDevice to check.
        Returns:

        true if device is connected in USB mode and Bootloader is running

      • isUsbDeviceGollumFirmware

         static boolean isUsbDeviceGollumFirmware(UsbDevice device)

        Indicates if device is connected in USB mode and FW is running

        Parameters:
        device - UsbDevice to check.
        Returns:

        true if device is connected in USB mode and FW is running

      • getLastVersionFirmwareCC1111

         void getLastVersionFirmwareCC1111(String modelName, String hardwareRevision, GollumCallbackGetString cb)

        Query the server for last available CC1111 FW version number for specified model/HW revision

        Parameters:
        modelName - model name of the PandwaRF to check
        hardwareRevision - HW revision of the PandwaRF to check
        cb - Callback to call with result when the background task is terminated
      • getLastVersionFirmwareCC1111

         void getLastVersionFirmwareCC1111(String modelName, String hardwareRevision, String currentSwVersionNordic, GollumCallbackGetString cb)

        Query the server for last available CC1111 FW version for specified model/HW revision

        Parameters:
        modelName - Model name of the PandwaRF to check
        hardwareRevision - HW revision of the PandwaRF to check
        currentSwVersionNordic - Nordic FW version of the PandwaRF to check.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • getLastVersionFirmwareCC1111

         void getLastVersionFirmwareCC1111(String modelName, String hardwareRevision, String currentSwVersionNordic, GollumCallbackGetGeneric<FirmwareCC1111> cb)

        Query the server for last available CC1111 FW version for specified model/HW revision

        Parameters:
        modelName - Model name of the PandwaRF to check
        hardwareRevision - HW revision of the PandwaRF to check
        currentSwVersionNordic - Nordic FW version of the PandwaRF to check.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • updateFirmwareCC1111WithVersion

        @Deprecated() void updateFirmwareCC1111WithVersion(FirmwareCC1111 fwCC1111, GollumCallback cbOnFinish, GollumCallbackGetInteger cbOnProgress, GollumCallbackGetInteger cbOnPageTotalUpdate)

        Update CC1111 firmware with given version. This method starts a background task to execute FW update. All callbacks are called from background task. Care must be taken to not update UI directly from the callbacks.

        Parameters:
        fwCC1111 - Object representing a PandwaRF CC1111 firmware.
        cbOnFinish - Callback to call when the FW update is finished.
        cbOnProgress - Callback to call periodically with FW update progress status.
        cbOnPageTotalUpdate - Callback to call with total number of pages to be flashed.
      • updateFirmwareCC1111WithVersion

         void updateFirmwareCC1111WithVersion(FirmwareCC1111 fwCC1111, GollumCallback cbOnFinish, GollumCallbackGetInteger cbOnProgress, GollumCallbackGetProgressStatus cbOnFineProgress, GollumCallbackGetInteger cbOnPageTotalUpdate)

        Update CC1111 firmware with given version. This method starts a background task to execute FW update. All callbacks are called from background task. Care must be taken to not update UI directly from the callbacks.

        Parameters:
        fwCC1111 - Object representing a PandwaRF CC1111 firmware.
        cbOnFinish - Callback to call when the FW update is finished.
        cbOnProgress - Callback to call periodically with FW update progress status.
        cbOnFineProgress - Callback to call periodically with FW update progress status (one call per packet progress).
        cbOnPageTotalUpdate - Callback to call with total number of pages to be flashed.
      • getLastVersionFirmwareNordic

         void getLastVersionFirmwareNordic(String modelName, String hardwareRevision, GollumCallbackGetString cb)

        Query the server for last available Nordic FW version for specified model/HW revision

        Parameters:
        modelName - model name of the PandwaRF to check
        hardwareRevision - HW revision of the PandwaRF to check
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • getLastVersionFirmwareNordic

         void getLastVersionFirmwareNordic(String modelName, String hardwareRevision, GollumCallbackGetGeneric<FirmwareNordic> cbFirmwareNordic)

        Query the server for last available Nordic FW for specified model/HW revision

        Parameters:
        modelName - model name of the PandwaRF to check
        hardwareRevision - HW revision of the PandwaRF to check
        cbFirmwareNordic - Callback to call with FW object when the background task is terminated
      • updateFirmwareNordicWithLastVersion

         void updateFirmwareNordicWithLastVersion(boolean deviceInDfuMode, GollumCallback cbDownloadStarted, GollumCallback cbDownloadFinish, GollumCallback cbOnFinish, GollumCallbackGetProgress cbOnProgress)

        Update the Firmware Nordic with last version

        Parameters:
        deviceInDfuMode - Indicates if the targeted device will be already in DFU mode.
        cbDownloadStarted - callback to call when the firmware download has started
        cbDownloadFinish - Callback to call when the firmware download is terminated
        cbOnFinish - Callback to call when the FW update is finished.
        cbOnProgress - Callback to call when the FW update background task is in progress
      • updateFirmwareNordicWithVersion

         void updateFirmwareNordicWithVersion(FirmwareNordic fwNordic, boolean deviceInDfuMode, GollumCallback cbDownloadStarted, GollumCallback cbDownloadFinish, GollumCallback cbOnFinish, GollumCallbackGetProgress cbOnProgress)

        To update Nordic firmware with a given version

        Parameters:
        fwNordic - Object representing a PandwaRF Nordic firmware.
        deviceInDfuMode - Indicates if the targeted device will be already in DFU mode.
        cbDownloadStarted - callback to call when the firmware download has started
        cbDownloadFinish - Callback to call when the firmware download is terminated
        cbOnFinish - Callback to call when the FW update is finished.
        cbOnProgress - Callback to call when the FW update background task is in progress
      • updateFirmwareNordic

         void updateFirmwareNordic(String mFilePath, Uri mFileStreamUri, String mInitFilePath, Uri mInitFileStreamUri, boolean deviceInDfuMode, boolean keepBond, GollumCallback cbOnFinish, GollumCallbackGetProgress cbOnProgress)

        Start a Nordic FW update (DFU) procedure. If the URI and path are not null the URI will be used. Note: Always exit auto BLE reconnect mode to not interfere when switching to DFU. Use setAutoBleReconnectIfError

        Parameters:
        mFilePath - the path of the file (if null, mFileStreamUri must not be null)
        mFileStreamUri - the URI of the file (if null, mFilePath must not be null)
        mInitFilePath - the path of the init file - used only for DFU Bootloader version pre-0.5 (SDK 4.3, 6.0, 6.
        mInitFileStreamUri - the URI of the init file - used only for DFU Bootloader version pre-0.5 (SDK 4.3, 6.0, 6.
        deviceInDfuMode - Indicates if the targeted device will be already in DFU mode.
        keepBond - whether the bond information should be preserved in the new application.
        cbOnFinish - Callback to call when the FW update is finished.
        cbOnProgress - Callback to call when the FW update background task is in progress
      • isFirmwareUpdateAvailable

         void isFirmwareUpdateAvailable(String modelName, String hardwareRevision, GollumCallback cbOnFinish)

        Check if a FW update (Nordic or CC1111) is available

        Parameters:
        modelName - model name of the PandwaRF to check
        hardwareRevision - HW revision of the PandwaRF to check
        cbOnFinish - Callback to be called with the result of operation, when the background task is terminated.
      • saveRollingCodeConfigInFlash

         void saveRollingCodeConfigInFlash(int codeWordSize, int numSameACodeToTransmit, int numSameBCodeToTransmit, int numCodeToTransmit, int codeFileSize, int numCodeInCodeFile, int nextCodeIndex, Array<byte> buffer, GollumCallback cbOnFinish, GollumCallbackGetInteger cbOnProgress, GollumCallbackGetInteger cbOnPageTotalUpdate)
        Parameters:
        codeWordSize - Size of Code Word.
        numSameACodeToTransmit - Number of A codes to be transmitted.
        numSameBCodeToTransmit - Number of B codes to be transmitted.
        numCodeToTransmit - Number of A+B codes to be transmitted.
        codeFileSize - Size of file in bytes.
        numCodeInCodeFile - Number of codes in file.
        nextCodeIndex - Index of next rolling code to use.
        buffer - Data buffer containing the codes to write.
        cbOnFinish - Callback to call when the writing in flash is finished.
        cbOnProgress - Callback to call when the writing in flash is in progress.
        cbOnPageTotalUpdate - Callback to call when the number of pages to write in flash is known.
      • readRollingCodeConfigFromFlash

         void readRollingCodeConfigFromFlash(GollumCallbackGetGeneric<RollingCodeTxConfig> cbOnFinish)

        Reads a rolling code configuration from PandwaRF SPI Flash memory

        Parameters:
        cbOnFinish - Callback to call when the reading from flash is finished.
      • getLibVersion

         String getLibVersion()

        Returns the version of Gollum Android Lib

        Returns:

        version of Gollum Android Lib

      • getLibGitHash

         String getLibGitHash()

        Returns the commit Id of Gollum Android Lib

        Returns:

        commit Id of Gollum Android Lib

      • getNrfToolboxLibVersion

         String getNrfToolboxLibVersion()

        Returns the version of nRF toolbox Android Lib

        Returns:

        version of nRF toolbox Android Lib

      • getCurrentSoftwareVersion

         String getCurrentSoftwareVersion()

        Returns the the current Nordic software version

        Returns:

        the current Nordic software version

      • getCurrentFirmwareVersion

         String getCurrentFirmwareVersion()

        Returns the the current CC1111 firmware version

        Returns:

        the current CC1111 firmware version

      • getBatteryLevel

         void getBatteryLevel()

        Read the current battery level. Force a battery level request.

      • writeTXCharacteristic

         boolean writeTXCharacteristic(Array<byte> value, boolean useBleWriteWithAck)

        Write data on the Nordic UART Service (NUS) TX characteristic

        Parameters:
        value - data to write as a byte array.
        useBleWriteWithAck - True to perform a write with response (slower, but with ack), false to perform a write without response (faster, but no ack).
        Returns:

        True if write has been queued for transmission, false if something has gone wrong.

      • writeNotifRXCharacteristic

         boolean writeNotifRXCharacteristic(boolean enabled)

        Enables/Disable Nordic UART Service (NUS) RX notification

        Parameters:
        enabled - Set to true to enable notifications/indications
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeNotifBusConfig

         boolean writeNotifBusConfig(boolean enable)

        Enables/Disable Nordic BUS service notification

        Parameters:
        enable - Set to true to enable notifications
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeResetNordic

         boolean writeResetNordic()

        Reset Nordic nRF51 chipset

        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeForceSleepNordic

         boolean writeForceSleepNordic()

        Force Nordic nRF51 chipset to enter sleep mode

        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeResetCC1111

         boolean writeResetCC1111()

        Reset Texas Instruments CC1111 chipset

        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeRunSelfTest

        @Deprecated() boolean writeRunSelfTest()

        Force a PandwaRF self-test to be run (not implemented).

        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeGetLastSelfTestResult

        @Deprecated() boolean writeGetLastSelfTestResult()

        Read the last self-test verdict (not implemented: use a read on BUS Config Characteristic 0x1527).

        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • isBleConnected

         boolean isBleConnected()
        Returns:

        true if the Gollum is connected using BLE

      • isUsbConnected

         boolean isUsbConnected()
        Returns:

        true if the Gollum is connected using USB

      • isDeviceConnected

         boolean isDeviceConnected()
        Returns:

        true, if GollumRF is connected using BLE or USB

      • isDeviceConnected

         boolean isDeviceConnected(String deviceAddress)
        Parameters:
        deviceAddress - address to check for connected status
        Returns:

        true, if GollumRF is connected using BLE or USB

      • isPandwaRfRogue

         boolean isPandwaRfRogue()
        Returns:

        true if device (Nordic and CC1111) is a Rogue (Pro or Gov)

      • isPandwaRfRogueNordic

         boolean isPandwaRfRogueNordic()
        Returns:

        true if device (Nordic) is a Rogue (Pro or Gov)

      • isPandwaRfMarauder

         boolean isPandwaRfMarauder()
        Returns:

        true if device (Nordic + CC1111) is a Marauder

      • isRegisteredRogue

         void isRegisteredRogue(GollumCallbackGetBoolean cb)

        Ask the backend if the device is a registered Rogue and call the callback when information is available

        Parameters:
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • writeMarauderStartStopRx

         boolean writeMarauderStartStopRx(boolean start)

        Start/Stop Marauder RX. Marauder only.

        Parameters:
        start - 0 to stop RX, 1 to start RX
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeMarauderStartStopRx

         boolean writeMarauderStartStopRx(Array<byte> data)

        Start/Stop Marauder RX. Marauder only.

        Parameters:
        data - Raw data to write to the Marauder config for Start/Stop RX command.
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeMarauderStartTx

         boolean writeMarauderStartTx(short sector, byte repeat)

        Start Marauder TX for a given sector. Marauder only.

        Parameters:
        sector - Sector to transmit.
        repeat - Sector will be transmitted repeat times
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeMarauderSetFreq

         boolean writeMarauderSetFreq(int frequency)

        Set the frequency to scan (Marauder). Marauder only.

        Parameters:
        frequency - Frequency in Hz
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeMarauderSetSamplingRate

         boolean writeMarauderSetSamplingRate(int samplingRate)

        Set the sampling rate to use (Marauder). Marauder only.

        Parameters:
        samplingRate - Sampling rate in bits/s
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeMarauderSetModulationDeviation

         boolean writeMarauderSetModulationDeviation(int modulation, int deviation)

        Set the modulation &deviation to use (Marauder). Marauder only.

        Parameters:
        modulation - The modulation value to use.
        deviation - Channel deviation, in Hz.
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeMarauderSetChannelFilterBandwidth

         boolean writeMarauderSetChannelFilterBandwidth(int chanFilterBw)

        Set the Receiver Channel Filter Bandwidth (Marauder). Marauder only.

        Parameters:
        chanFilterBw - Receiver Channel Filter Bandwidth, in Hz.
      • writeMarauderSetRxCompressionMode

         boolean writeMarauderSetRxCompressionMode(boolean enable)

        Enable/disable RX RLE encoding Marauder only.

        Parameters:
        enable - RX compression mode
      • writeMarauderSetSectorCaptureTimeout

         boolean writeMarauderSetSectorCaptureTimeout(@IntRange(from = 0, to = 65000) int timeout)
        Parameters:
        timeout - Programmable timeout to store the next capture in a new sector, must be a multiple of 8.
      • writeMarauderSetBleAdvertising

         boolean writeMarauderSetBleAdvertising(boolean enable)

        Enable/disable BLE advertising (Stealth BLE advertizing) Marauder only.

        Parameters:
        enable - true to enable advertising (normal mode), false to disable advertising (Stealth mode on)
      • writeMarauderSetFreqFinderScanMode

         boolean writeMarauderSetFreqFinderScanMode(boolean scanMode)

        Determine the scanning mode used by FreqFinder before RX on Marauder Standard and Ultimate. Marauder Standard and Ultimate only.

        Parameters:
        scanMode - FreqFinder scanning mode.
      • writeMarauderSetFreqBands

         boolean writeMarauderSetFreqBands(int bandsToScanBitMap)

        Set the frequencies to scan (Marauder). Marauder only.

        Parameters:
        bandsToScanBitMap - a bitmap of the bands to scan.
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeMarauderEraseMemory

         boolean writeMarauderEraseMemory()

        Erase all sectors containing captured data. Marauder only.

        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeMarauderEraseSector

         boolean writeMarauderEraseSector(short sector)

        Erase specific sector containing captured data.

        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeMarauderPrepareReadSectorInfo

         boolean writeMarauderPrepareReadSectorInfo(short sector)

        Prepare next read with information for given sector. This info will read on next BLE read (Read request without authentification). Marauder only.

        Parameters:
        sector - Sector to read information from.
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeEnqueueDelay

         boolean writeEnqueueDelay(int delayMs)

        Enqueue a delay into the BLE Request queue

        Returns:

        True if delay has been queued for request, false if something has gone wrong.

      • writeMarauderPrepareReadSectorData

         boolean writeMarauderPrepareReadSectorData(short sector, byte page)

        Prepare next read with data for given sector. This info will read on next BLE read (Read request without authentification). Marauder only.

        Parameters:
        sector - Sector to read data from.
        page - Page to be prepared for read.
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeMarauderPrepareReadStatusInfo

         boolean writeMarauderPrepareReadStatusInfo()

        Prepare next read with summary of all captured info. This info will read on next BLE read (Read request without authentification). Marauder only.

        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeMarauderPrepareReadSectorBitmap

         boolean writeMarauderPrepareReadSectorBitmap()

        Prepare next read with information for all sectors status in a bitmap. This info will be read on next BLE read (Read request without authentification). Marauder only.

        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeMarauderSetCurrentTime

         boolean writeMarauderSetCurrentTime(Date currentDate)

        Set the current date used as an offset for capture timestamps. Marauder only.

        Parameters:
        currentDate - Current date (number of milliseconds since the January 1, 1970, 00:00:00 GMT)
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeMarauderNotification

         boolean writeMarauderNotification(boolean enable)

        Activate the reception of Marauder notifications.

        Parameters:
        enable - Set to true to enable notifications/indications
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • readMarauderConfigChar

         boolean readMarauderConfigChar()

        Sends a Marauder Config Read (read request without authentification) to retrieve the last command result. This will trigger onMarauderConfigReceived() to be broadcasted with results of the previous write command. Content of characteristic read depends on previous Write command.

        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • getMarauderStatusInfo

         boolean getMarauderStatusInfo()

        Write a marauderPrepareReadStatusInfo then launch a read

      • getMarauderSectorBitmap

         boolean getMarauderSectorBitmap()

        Write a marauderPrepareReadSectorBitmap then launch a read

      • getMarauderSectorInfo

         boolean getMarauderSectorInfo(short sector)

        Write a marauderPrepareReadStatusInfo then launch a read

      • getMarauderSectorData

         boolean getMarauderSectorData(short sector, byte page)

        Write a marauderPrepareReadSectorData then launch a read

      • getAllMarauderSectorData

         void getAllMarauderSectorData(short sector, byte startPage, byte endPage)

        Loop on sector data pages (Note : Page must be between [1, 15] )

      • getAllMarauderSectorData

         void getAllMarauderSectorData(short sector)

        Loop on sector data pages (Note : Page must be between [1, 15] )

      • startMarauderTx

         boolean startMarauderTx(short sector, byte repeat)

        Write a writeMarauderStartTx

        Parameters:
        sector - Sector to transmit.
        repeat - Sector will be transmitted repeat times
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • startMarauderTx

         boolean startMarauderTx(short sector)

        Write a writeMarauderStartTx

        Parameters:
        sector - Sector to transmit.
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • startMarauderRx

         boolean startMarauderRx()

        Write a writeMarauderStartStopRx(true)

      • stopMarauderRx

         boolean stopMarauderRx()

        Write a writeMarauderStartStopRx(false)

      • eraseMarauderSector

         boolean eraseMarauderSector(short sector)

        Write a writeMarauderEraseSector

      • writeLoopBackMode

         boolean writeLoopBackMode(boolean enable)

        Set the LoopBack mode

        Parameters:
        enable - Set to true to enable notifications/indications
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeLoopBackMode

         boolean writeLoopBackMode(Array<byte> data)

        Set the LoopBack mode.

        Parameters:
        data - Raw data to write to the BUS config for loopback mode command.
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeAsyncMode

         boolean writeAsyncMode(Array<byte> data)

        Set Async mode.

        Parameters:
        data - Raw data to write to the BUS config for async mode.
      • writeUsbMode

         boolean writeUsbMode(boolean mode)

        Enables/Disables the USB.

        Parameters:
        mode - True to enable USB, false to disable.
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeUsbMode

         boolean writeUsbMode(Array<byte> data)

        Enables/Disables the USB.

        Parameters:
        data - Raw data to write to the BUS config for USB mode.
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeTxRetryMode

         boolean writeTxRetryMode(boolean mode)

        Set the TX retry mode to retry a BLE transmission when no TX buffer is available.

        Parameters:
        mode - : false: no retransmission if TX failstrue: Retry TX when no TX buffer available
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeTxRetryMode

         boolean writeTxRetryMode(Array<byte> data)

        Set the TX retry mode to retry a BLE transmission when no TX buffer is available.

        Parameters:
        data - Raw data to write to the BUS config for TX retry mode.
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeHwRevision

         boolean writeHwRevision(String hw_rev_code)

        Set the HW revision of dongle.

        Parameters:
        hw_rev_code - HW Revision Code to be written in PandwaRF memory.
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeRxRssiThreshold

         int writeRxRssiThreshold(byte freqFinderRssiThreshold, byte rxRssiThreshold)
        Parameters:
        freqFinderRssiThreshold - signed 8 bits.
        rxRssiThreshold - signed 8 bits.
      • writeHwRevision

         boolean writeHwRevision(Array<byte> data)

        Set the HW revision of dongle.

        Parameters:
        data - Raw data to write to the BUS config for HW revision command.
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeBatteryCapacity

         boolean writeBatteryCapacity(int capacity)

        Set the battery capacity of dongle

        Parameters:
        capacity - in mAh, 0 if no battery connected
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeDelayBeforePowerOff

         boolean writeDelayBeforePowerOff(int delay)

        Set delay before powering off PandwaRF HW

        Parameters:
        delay - in mn, 0 to disable auto power off.
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeNotifButtonPushed

         boolean writeNotifButtonPushed(boolean enable)

        Activate the receipt of notifications when a button is pushed on the board.

        Parameters:
        enable - Set to true to enable notifications/indications
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • getLastVersionCC1111

         void getLastVersionCC1111(String modelName, String hardwareRevision, GollumCallbackGetString cb)

        Query the server for last available CC1111 FW version for specified model/HW revision

        Parameters:
        modelName - model name of the PandwaRF to check
        hardwareRevision - HW revision of the PandwaRF to check
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • getLastVersionNordic

         void getLastVersionNordic(String modelName, String hardwareRevision, GollumCallbackGetString cb)

        Query the server for last available Nordic FW version for specified model/HW revision

        Parameters:
        modelName - model name of the PandwaRF to check
        hardwareRevision - HW revision of the PandwaRF to check
        cb - Callback to call when the background task is terminated
      • writeStateLed

         boolean writeStateLed(int led, boolean state)

        Set the state of a led.

        Parameters:
        led - LED Id.
        state - True for LED on, false for LED off.
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeStateLed

         boolean writeStateLed(Array<byte> value)

        Set the state of a led.

        Parameters:
        value - Raw data to write to the BUS config for LED command.
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeButtonPush

         boolean writeButtonPush(int button)

        Simulate the push on a button on the board using the BLE BUS Service and BUS push button characteristic.

        Equivalent to execButton

        Parameters:
        button - Id of the button.
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeButtonPush

         boolean writeButtonPush(Array<byte> data)

        Simulate the push on a button on the board.

        Parameters:
        data - Raw data to write to the BUS config for button push command.
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • writeDeviceName

         boolean writeDeviceName(String deviceName)

        Write PandwaRF advertizing name and device name.

        Parameters:
        deviceName - New PandwaRF device advertizing name.
        Returns:

        True if write has been queued for request, false if something has gone wrong.

      • readNotifButtonPushed

         void readNotifButtonPushed()

        Ask to receive the status of Button Pushed notification.

      • readNotifBattery

         void readNotifBattery()

        Ask to receive the status of Battery notification.

      • readBusConfig

         void readBusConfig()

        Ask to receive the status of the last PandwaRF Power On Self Test. This will trigger BUS Config read and onBusConfigReceived() will be broadcasted with POST results.

      • readBleErrorsFirstErrorAndResetIndex

         void readBleErrorsFirstErrorAndResetIndex()

        Send a read request to read first BLE error from dongle memory This will trigger a read received and next read requests will then be sent

      • backendInitialize

         void backendInitialize(Context context, boolean offlineModeBackend, boolean offlineModeAnalytics, boolean offlineModeCrashReport)
        Parameters:
        offlineModeBackend - true to force the lib to enter specified network mode (offline/online) for backend managing FW versions, BLE errors, database, etc...
        offlineModeAnalytics - true to force the lib to enter specified network mode (offline/online) for logging and analytics backend, false to allow connection
        offlineModeCrashReport - true to force the lib to enter specified network mode (offline/online) for logging events and app crashes, false to allow connection
      • getCurrentTrxMode

         int getCurrentTrxMode()

        Returns the current trx mode (USB or BLE)

        Returns:

        current trx mode: {@value #GOLLUM_MODE_USB} or {@value #GOLLUM_MODE_BLE}

      • onDestroyCalled

         static void onDestroyCalled(Context context)

        Close all device connection. Shall be called in your activity onDestroyCalled() method. Remove the instance of GollumDongle.

      • reconnect

         void reconnect(String address)

        Reconnect to a given BLE address, or last BLE address used if address is null. Use after a pause(). Call this function if you want to resume BLE background connection

        Parameters:
        address - BLE device address to reconnect to.
      • reconnectUSB

         boolean reconnectUSB()

        Reconnect to a USB device. Use after a pause(). Call this function if you want to resume USB connection

        Returns:

        true if USB device found and connected, false if no USB device found

      • pause

         void pause()

        Pause PandwaRF connection. Shall be called in your activity onPause() method if you don't want to keep BLE background connection Warning: Do not call onPauseUSB() if connected in USB Warning: app onPause() is called in many occasions, sometime even if the app remains in foreground (event, dialog open, multi-window mode, ...) ! To avoid side effects leading to GollumDongle being paused/resumed/paused/etc... onPauseUSB() shall not be called if USB mode is used

      • signalRssi

        @Deprecated() void signalRssi(boolean enable)

        Activate or deactivate RSSI signal measurement.

        Parameters:
        enable - Set to true to enable RSSI signal measurement.
      • signalBattery

        @Deprecated() void signalBattery(boolean enable)

        Activate or deactivate battery level reception.

        Parameters:
        enable - Set to true to enable battery level reception.
      • notifButtonPushed

        @Deprecated() void notifButtonPushed(boolean active)

        Enable notification when a button is pressed on the device.

        Parameters:
        active - Set to true to enable notifications/indications
      • usbScan

         UsbDevice usbScan()

        Search for a supported USB device

        Returns:

        the UsbDevice if a device has been found, null if no USB device found.

      • usbScanAndOpen

         UsbDevice usbScanAndOpen(boolean connectWhenFound)

        Search for a supported USB device and connect to it if required by parameter. If connectWhenFound is false, scan for supported device and return teh UsbDevice found.

        Parameters:
        connectWhenFound - true to connect to UsbDevice when found, false to scan only
        Returns:

        the UsbDevice if a device has been found (and potentially connected to), null if no USB device found.

      • getUsbDevice

         UsbDevice getUsbDevice()

        Returns current UsbDevice of connected device (if any)

        Returns:

        UsbDevice

      • getUsbFileDesc

         int getUsbFileDesc()

        Returns current USB file descriptor of connected device (if any)

        Returns:

        USB file descriptor

      • getUsbDeviceName

         String getUsbDeviceName()

        Returns current USB device name of connected device (if any)

        Returns:

        USB device name

      • rfOpen

         void rfOpen(int fileDesc, GollumCallbackGetInteger cb)

        Open RF link

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rfClose

         void rfClose(int fileDesc, GollumCallbackGetInteger cb)

        Close RF link

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rfReconnect

         void rfReconnect(GollumCallbackGetBoolean cb)

        Close and re-open RF link and NPI packet interface. Aka Nuke and Rebuild For USB, uses the current file descriptor

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        cb - returns true if a NPI interface was closed, false if nothing was done
      • rfStopAll

         void rfStopAll()

        Stop all rf actions. WARNING: do not used it with Marauder.

      • flushMsgQueue

         void flushMsgQueue(int fileDesc, GollumCallbackGetInteger cb)

        Clear the incoming NPI message queue

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • hardResetChip

         void hardResetChip(int fileDesc, GollumCallbackGetInteger cb)

        Order the CC1111 chip to do a power off/power on sequence of the CC1111 using RESETn

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • setRfConfigPredefined

         void setRfConfigPredefined(int fileDesc, int config, GollumCallbackGetInteger cb)

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        config - Preddefined configuration Id
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • isBusy

         void isBusy(GollumCallbackGetBoolean cb)

        Ask MACSTATE register value

        Returns:

        positive value is the current state of the FW, negative value in case of error.

      • rfGetStatus

         void rfGetStatus(GollumCallbackGetInteger cb)

        Ask MACSTATE register value

        Returns:

        positive value is the current state of the FW, negative value in case of error.

      • setFrequency

         int setFrequency(int fileDesc, int frequency)

        Set the RX/TX operating frequency of PandwaRF. Warning: some API calls that require frequency as parameter can override this value. Must be called from background thread, as this method does NOT creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        frequency - The frequency to use in Hz
        Returns:

        0 if success, negative value if an error occured

      • setFrequency

         void setFrequency(int fileDesc, int frequency, GollumCallbackGetInteger cb)

        Set the RX/TX operating frequency of PandwaRF. Warning: some API calls that require frequency as parameter can override this value. Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        frequency - The frequency to use in Hz
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • computeFrequencyOffsetCorrection

         int computeFrequencyOffsetCorrection(int frequency)

        Correct the RX/TX operating frequency of PandwaRF. Used to correct the effect of the Synthesizer frequency tolerance (Typ. +/- 40 ppm). Synthesizer frequency tolerance is given by crystal used. Required accuracy (including temperature and aging) depends on frequency band and channel bandwidth / spacing.

        Parameters:
        frequency - The frequency to apply offset correstion in Hz
        Returns:

        corrected frequency in Hz

      • rfJammingStart

         void rfJammingStart(int fileDesc, int startFrequency, int stopFrequency, int dataRate, int modulation, GollumCallbackGetInteger cb)

        Start RF jamming

        Warning: calling this method causes the CC1111 to reset, in order to start Jamming with clean parameters. All RF parameters set prior to this method call will be lost.

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Only available in Rogue Gov and Meddler variants

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        startFrequency - The start Frequency to use in Hz
        stopFrequency - The stop Frequency to use in Hz
        dataRate - Target data rate, in bits/s.
        modulation - The modulation value to use.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rfJammingStop

         void rfJammingStop(int fileDesc, GollumCallbackGetInteger cb)

        Stop RF jamming

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Only available in Rogue Gov and Meddler variants

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rfBruteForceAttackSetup

         void rfBruteForceAttackSetup(int fileDesc, RfSetupParameters rfSetupParam, BruteForceSetupParameters bfSetupParam, GollumCallbackGetInteger cb)

        Setup the Brute Force. Requires a Brute Force Start SyncCodeTail to start the BF.

        Warning: calling this method causes the CC1111 to reset, in order to start BF with clean parameters. All RF parameters set prior to this method call will be lost.

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        rfSetupParam - Radio parameters to use.
        bfSetupParam - Brute Force parameters to use.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rfBruteForceAttackSetupLongSymbol

         void rfBruteForceAttackSetupLongSymbol(int fileDesc, RfSetupParameters rfSetupParam, BruteForceSetupLongSymbolParameters bfSetupParam, GollumCallbackGetInteger cb)

        Setup the Brute Force with long symbols Requires a Brute Force Start SyncCodeTail to start the BF

        Warning: calling this method causes the CC1111 to reset, in order to start BF with clean parameters. All RF parameters set prior to this method call will be lost.

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Only available in Rogue Gov variants

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        rfSetupParam - Radio parameters to use.
        bfSetupParam - Brute Force parameters to use.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rfBruteForceAttackSetupFunction

         void rfBruteForceAttackSetupFunction(int fileDesc, String functionMask, String functionValue, GollumCallbackGetInteger cb)

        Brute Force setup of the Function Mask and Value. Optional after a Brute Force Setup and before Brute Force Start SyncCodeTail to start the BF

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        functionMask - This is like a Mask IP Address.
        functionValue - This is the "contrary" of functionMask.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rfBruteForceAttackStart

         void rfBruteForceAttackStart(int fileDesc, RfSetupParameters rfSetupParam, BruteForceStartParameters bfStartParam, GollumCallbackGetInteger cb)

        All in one message to start a Brute Force Public version

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        rfSetupParam - Radio parameters to use.
        bfStartParam - Brute Force parameters to use.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rfBruteForceAttackStartSyncCodeTail

         void rfBruteForceAttackStartSyncCodeTail(int fileDesc, BruteForceStartSyncCodeTailParameters bfSctParam, GollumCallbackGetInteger cb)

        Start a Brute Force using previous parameters set in Setup Brute Force message Requires a call to rfBruteForceAttackSetup() before

        Only available in Rogue Gov variant

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Only available in Rogue Gov variants

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        bfSctParam - Brute Force parameters to use.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rfBruteForceAttackStop

         void rfBruteForceAttackStop(int fileDesc, GollumCallbackGetInteger cb)

        Stop the Brute Force attack

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rfSetTxRxPowerAmp

         int rfSetTxRxPowerAmp(int fileDesc, Common.RfPowerAmplifierMode powerMode)

        Set power Amplifiers mode, assuming we are already in a background task Must be called from background thread

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        powerMode - cf.
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • rfSetTxRxPowerAmp

         int rfSetTxRxPowerAmp(int fileDesc, int actionToPerform)

        Set power Amplifiers mode, assuming we are already in a background task Must be called from background thread

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        actionToPerform - Power amplifier mode
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • rfSetTxRxPowerAmp

         void rfSetTxRxPowerAmp(int fileDesc, int actionToPerform, GollumCallbackGetInteger cb)

        Set power Amplifiers mode Native call will be done inside background task. Callback is called once completed.

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        actionToPerform - Power amplifier mode
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rfGetTxRxPowerAmp

         int rfGetTxRxPowerAmp(int fileDesc)

        Get power Amplifiers mode, assuming we are already in a background task Must be called from background thread

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        Returns:

        Power amplifier mode on success, -1 in case of failure

      • rfGetTxRxPowerAmp

         void rfGetTxRxPowerAmp(int fileDesc, GollumCallbackGetInteger cb)

        Get power Amplifiers mode Native call will be done inside background task. Callback is called once completed.

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        cb - Callback to be called with the TX/RX power amplifier mode, when the background task is terminated.
      • rfBruteForceAttackGetStatusUpdate

         void rfBruteForceAttackGetStatusUpdate(int fileDesc, GollumCallbackGetGeneric<BruteForceAttackStatusUpdate> cb)

        Returns Brute Force status update value

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rfBruteForceAttackGetStatusUpdate

         BruteForceAttackStatusUpdate rfBruteForceAttackGetStatusUpdate(int fileDesc)

        Returns Brute Force status update value, assuming we are already in a background task Must be called from background thread

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        Returns:

        0 if no Brute force status update message found, bruteForceStatus (32 bits) if success, -1 if brute force is finished

      • setOutputPower

         void setOutputPower(int fileDesc, int power_dbm, GollumCallbackGetInteger cb)

        Sets 'standard' output power of CC1111

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        power_dbm - TX output power in dBm.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • setBitRate

         void setBitRate(int fileDesc, int dataRate, GollumCallbackGetInteger cb)

        Set the TX/RX data rate to use for PandwaRF transmission/reception. Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        dataRate - TX/RX data rate to use for PandwaRF transmission/reception.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • setModulation

         void setModulation(int fileDesc, int modulation, GollumCallbackGetInteger cb)

        Set the RX/TX operating modulation of PandwaRF. Warning: some API calls that require modulation as parameter can override this value. Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        modulation - The modulation value to use.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • setFilterBandwidth

         void setFilterBandwidth(int fileDesc, int filter_bandwidth, GollumCallbackGetInteger cb)

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        filter_bandwidth - Receiver Channel Filter Bandwidth, in Hz.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • sendJsFile

         void sendJsFile(int fileDesc, String jsScript, GollumCallbackGetInteger cb)

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        jsScript - Path of JS file to execute.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rxFlush

         void rxFlush(int fileDesc, GollumCallbackGetInteger cb)

        Removes all RX messages already in queue

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • txFlush

        @NonNull() int txFlush(int fileDesc)

        Removes all TX messages already in queue Must be called from background thread

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        Returns:

        number of TX messages destroyed, 0 if no message destroyed

      • txFlush

         void txFlush(int fileDesc, GollumCallbackGetInteger cb)

        Removes all TX messages already in queue

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        cb - Callback to call when the FW update is finished, with number of TX messages destroyed, 0 if no message destroyed
      • rxFlush

        @NonNull() int rxFlush(int fileDesc)

        Removes all RX messages already in queue Must be called from background thread

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        Returns:

        number of RX messages destroyed, 0 if no message destroyed

      • getTrxInfo

        @Deprecated() void getTrxInfo(int fileDesc, GollumCallbackGetInteger cb)

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • powerMeasStart

         void powerMeasStart(int fileDesc, int frequency, GollumCallbackGetInteger cb)

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        frequency - The frequency to use in Hz
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • powerMeasStop

         void powerMeasStop(int fileDesc, GollumCallbackGetInteger cb)

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rfScanInContext

         int rfScanInContext()

        Make a rfScan, but assuming we are already in a background task Must be called from background thread

        Returns:

        0 if operation successfully completed, -1 in case of error.

      • rfScan

         void rfScan(GollumCallbackGetInteger cb)

        Starts a rfScan in background task Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rfSpecanStart

         int rfSpecanStart(int fileDesc, int basefreq, int chanspc, int numchan, int pkt_delay_ms)

        Starts Spectrum Analyzer in current Thread. Assuming we are already in a background task Must be called from background thread

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        basefreq - Start frequency in Hz (ex: 433920000)
        chanspc - frequency increment in Hz (ex: 25000 Hz)
        numchan - number of channels (ex: 51 channels)
        pkt_delay_ms - delay in ms between packets
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • rfSpecanStart

         void rfSpecanStart(int fileDesc, int basefreq, int chanspc, int numchan, int pkt_delay_ms, GollumCallbackGetInteger cb)

        Starts Spectrum Analyzer in background task

        Warning: calling this method causes the CC1111 to reset, in order to start BF with clean parameters. All RF parameters set prior to this method call will be lost.

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        basefreq - Start frequency in Hz (ex: 433920000)
        chanspc - frequency increment in Hz (ex: 25000 Hz)
        numchan - number of channels (ex: 51 channels)
        pkt_delay_ms - delay in ms between packets
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rfSpecanGetRssi

         int rfSpecanGetRssi(Array<byte> rssi_buffer, int size)

        Same as rfSpecanGetRssi, but assuming we are already in a background task Must be called from background thread

        Parameters:
        rssi_buffer - Buffer to store the RSSI values received from PandwaRF.
        size - Buffer size.
        Returns:

        Number of channel for which the RSSI has been read if operation successfully completed, 0 or -1 in case of error.

      • rfSpecanGetRssi

         void rfSpecanGetRssi(Array<byte> rssi_buffer, int size, GollumCallbackGetInteger cb)

        Returns SpecAn RSSI measurements

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        rssi_buffer - Buffer to store the RSSI values received from PandwaRF.
        size - Buffer size.
        cb - Callback to be called with the result of operation, when the background task is terminated.Result of operation is number of channel for which the RSSI has been read if operation successfully completed, 0 or -1 in case of error.
      • rfSpecanSetPktDelay

         void rfSpecanSetPktDelay(int fileDesc, int pkt_delay_ms, GollumCallbackGetInteger cb)

        Configure the delay between 2 Spectrum Analyzer packets

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        pkt_delay_ms - delay in ms between packets (max 255 ms)
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rfSpecanStop

         void rfSpecanStop(int fileDesc, GollumCallbackGetInteger cb)

        Stop Spectrum Analyzer in background task

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rfSpecanStop

         int rfSpecanStop(int fileDesc)

        Stop Spectrum Analyzer in current Thread. Assuming we are already in a background task Must be called from background thread

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • rfFreqFinderStart

         int rfFreqFinderStart(int fileDesc, int hint)

        Starts frequency finder

        Only available in Meddler variants

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        hint - (not used)
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • rfFreqFinderStop

         int rfFreqFinderStop(int fileDesc)

        Stop frequency finder in current Thread. Assuming we are already in a background task Must be called from background thread

        Only available in Meddler variants

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • rfFreqFinderGetResult

         int rfFreqFinderGetResult(int fileDesc)

        Get An Array Describing the results of FreqFinder Session, assuming we are already in a background task Must be called from background thread

        Only available in Meddler variants

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        Returns:

        frequency found if operation successfully completed, 0 if operation completed without finding anything, -1 if no FreqFinder result is fetched

      • rfJammingDetectorStart

         int rfJammingDetectorStart(int fileDesc, int sensitivity)

        Start jamming detector

        Only available in Meddler variants

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        sensitivity - a value between 0 and 10, to denote Jamming Detector sensitivity to Jamming,the smallest this value is the more the signal has to be continuous to be considered as Jamming.
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • rfJammingDetectorGetResult

         int rfJammingDetectorGetResult(int fileDesc)

        Get the Status of Jamming Detector, assuming we are already in a background task Must be called from background thread

        Only available in Meddler variants

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        Returns:

        0: no jamming, 1: jamming detected

      • rfJammingDetectorStop

         int rfJammingDetectorStop(int fileDesc)

        Stop Jamming Detector in current Thread. Assuming we are already in a background task Must be called from background thread

        Only available in Meddler variants

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • rfJammingReactiveStart

         int rfJammingReactiveStart(int fileDesc, byte bandsToScanBitMap)

        Start reactive jamming

        Only available in Meddler variants

        Parameters:
        bandsToScanBitMap - a bitmap of the bands to scan.
        Returns:

        0 if success, negative value if an error occured

      • rfJammingReactiveStart

         int rfJammingReactiveStart(int fileDesc, Array<boolean> bandsToScan)

        Start reactive jamming

        Only available in Meddler variants

        Parameters:
        bandsToScan - an array of the bands to scan : 0=>315Mhz, 1=>433Mhz, 2=>868Mhz, 3=>915Mhztrue to scan, false to ignore
        Returns:

        0 if success, negative value if an error occured

      • rfJammingReactiveStart

         void rfJammingReactiveStart(int fileDesc, byte bandsToScanBitMap, GollumCallbackGetInteger cb)

        Start reactive jamming

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Only available in Meddler variants

        Parameters:
        bandsToScanBitMap - a bitmap of the bands to scan
        Returns:

        0 if success, negative value if an error occured

      • rfJammingReactiveStop

         int rfJammingReactiveStop(int fileDesc)

        Stop reactive jamming in current Thread. Assuming we are already in a background task Must be called from background thread

        Only available in Meddler variants

        Returns:

        0 if success, negative value if an error occured

      • rfDeBruijnStart

         int rfDeBruijnStart(int fileDesc, int deBruijnOrder, boolean encoding, byte symbol_0, byte symbol_1)

        Start De Bruijn Brute Force Session

        Only available in Rogue variants

        Parameters:
        deBruijnOrder - order of De Bruijn generation algorithm
        encoding - Whether or not each bit should be encoded into a byte
        symbol_0 - If encoding is true, the byte to encode a bit 0 (ex: 0x00)
        symbol_1 - If encoding is true, the byte to encode a bit 1 (ex: 0xFF)
        Returns:

        0 if success, negative value if an error occured

      • rfDeBruijnStop

         int rfDeBruijnStop(int fileDesc)

        Stop De Bruijn Brute Force in current Thread. Assuming we are already in a background task Must be called from background thread

        Only available in Rogue variants

        Returns:

        0 if success, negative value if an error occured

      • rfDeBruijnStop

         void rfDeBruijnStop(int fileDesc, GollumCallbackGetInteger cb)

        Stop De Bruijn Brute Force in current Thread. Assuming we are already in a background task

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Only available in Rogue variants

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rfDeBruijnGetStatusUpdate

         DeBruijnStatusUpdate rfDeBruijnGetStatusUpdate(int fileDesc)

        Returns Brute Force status update value, assuming we are already in a background task Must be called from background thread

        Only available in Rogue variants

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        Returns:

        status of the DeBruijn attack

      • setLed

        @Deprecated() void setLed(int led, boolean val, GollumCallbackGetInteger cb)

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        led - LED Id.
        val - True for LED on, false for LED off.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • setCC1111Sleep

         void setCC1111Sleep(int mode, GollumCallbackGetInteger cb)

        Put CC1111 into sleep mode. Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        mode - CC1111 power sleep mode.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • updateFirmwareCC1111

         void updateFirmwareCC1111(String hexFilePath, GollumCallback cbOnFinish, GollumCallbackGetInteger cbOnProgress, GollumCallbackGetProgressStatus cbOnFineProgress, GollumCallbackGetInteger cbOnPageTotalUpdate)

        Update CC1111 firmware with given HEX file. This method starts a background task to execute FW update. All callbacks are called from background task. Care must be taken to not update UI directly from the callbacks.

        See updateFirmwareCC1111 for details.

        Parameters:
        hexFilePath - Path of CC1111 FW file in hex format.
        cbOnFinish - Callback to call when the background task is terminated.
        cbOnProgress - Callback to call periodically with FW update progress status (one call per page progress.
        cbOnFineProgress - Callback to call periodically with FW update progress status (one call per packet progress.
        cbOnPageTotalUpdate - Callback to call with total number of pages to be flashed.
      • updateFirmwareCC1111

         void updateFirmwareCC1111(Array<byte> hexfile, GollumCallback cbOnFinish, GollumCallbackGetInteger cbOnProgress, GollumCallbackGetProgressStatus cbOnFineProgress, GollumCallbackGetInteger cbOnPageTotalUpdate)

        Update CC1111 firmware with given HEX file. This method starts a background task to execute FW update. All callbacks are called from background task. Care must be taken to not update UI directly from the callbacks.

        When called, the hex file is analyzed and callback cbOnPageTotalUpdate is called with total number of pages to be flashed (N). During FW update, cbOnProgress is called after each page is successfully written to CC1111. Pages generally range from 1 to N=30, but this may vary according to FW size.

        If cbOnFineProgress is not null, it is called once a BLE packet composing the page has been sent. The cbOnFineProgress is filled with total which is the total number of BLE packets needed to complete a frame (generally 55) and progress which is the number of the last transmitted packet.

        After the last page has been written, cbOnFinish is called.

        The complete sequence is the following:

        • cbOnPageTotalUpdate
        • cbOnProgress page: 1
        • cbOnFineProgress progress: 0, total: 55
        • cbOnFineProgress progress: 1, total: 55
        • cbOnFineProgress progress: 2, total: 55
        • cbOnFineProgress ...
        • cbOnFineProgress progress: 54, total: 55
        • cbOnProgress page: 2
        • cbOnFineProgress progress: 0, total: 55
        • cbOnFineProgress ...
        • cbOnFineProgress progress: 54, total: 55
        • ...
        • cbOnProgress page: N
        • cbOnFineProgress progress: 0, total: 55
        • cbOnFineProgress ...
        • cbOnFineProgress progress: 54, total: 55
        • cbOnFinish
        Parameters:
        hexfile - CC1111 FW file in hex format.
        cbOnFinish - Callback to call when the background task is terminated.
        cbOnProgress - Callback to call periodically with FW update progress status (one call per page progress.
        cbOnFineProgress - Callback to call periodically with FW update progress status (one call per packet progress.
        cbOnPageTotalUpdate - Callback to call with total number of pages to be flashed.
      • getCc1111FirmwareVersion

         void getCc1111FirmwareVersion(GollumCallbackGetString cb)

        Returns the CC1111 FW version

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • getCc1111BuildType

         String getCc1111BuildType()

        Get CC1111 FW build type Sync version (GollumRfBigRogueCCtl, GollumRfBigCCtl, ...)

        Returns:

        build_type

      • getCc1111BuildType

         void getCc1111BuildType(GollumCallbackGetString cb)

        Get CC1111 FW build type (GollumRfBigRogueCCtl, GollumRfBigCCtl, ...)

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • getCc1111SerialNumber

         void getCc1111SerialNumber(GollumCallbackGetString cb)

        Get CC1111 FW Serial Number (S0123, K4567, ...)

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • getCc1111BootloaderVersion

         void getCc1111BootloaderVersion(int fileDesc, GollumCallbackGetInteger cb)

        Get CC1111 CCTL bootloader version string

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • runFirmware

        @Deprecated() void runFirmware(int fileDesc, GollumCallbackGetInteger cb)

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • runBootloader

        @Deprecated() void runBootloader(int fileDesc, GollumCallbackGetInteger cb)

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • setNicEncodingMode

         int setNicEncodingMode(int fileDesc, boolean rxCompMode)

        Configure RX frame compression, assuming we are already in a background task Must be called from background thread

        Only available in Rogue variants

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        rxCompMode - If false, no compression.
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • setNicEncodingMode

         void setNicEncodingMode(int fileDesc, boolean rxCompMode, GollumCallbackGetInteger cb)

        Configure RX frame compression. Native call will be done inside background task. Callback is called once completed.

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Only available in Rogue variants

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        rxCompMode - If false, no compression.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • setTxInfiniteMode

         int setTxInfiniteMode(int fileDesc, boolean infiniteMode, int infModeLength)

        Configure RF TX infinite mode (for RF air gap-less transmission). Aka TX FIFO enqueue mode, assuming we are already in a background task Must be called from background thread

        Only available in Rogue variants

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        infiniteMode - TX FIFO enqueue mode (true: enabled, false: disabled)
        infModeLength - Expected block size when entering Infinite mode, in bytes
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • setTxInfiniteMode

         void setTxInfiniteMode(int fileDesc, boolean infiniteMode, int infModeLength, GollumCallbackGetInteger cb)

        Configure RF TX infinite mode (for RF air gap-less transmission). Aka TX FIFO enqueue mode. Native call will be done inside background task. Callback is called once completed.

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Only available in Rogue variants

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        infiniteMode - TX FIFO enqueue mode (true: enabled, false: disabled)
        infModeLength - Expected block size when entering Infinite mode, in bytes
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • setRxInfiniteMode

         int setRxInfiniteMode(int fileDesc, boolean infiniteMode)

        Configure RF RX infinite mode (for RF air gap-less reception). Must be called from background thread

        Only available in Rogue variants

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        infiniteMode - RX infinite mode (true: enabled, false: disabled)
      • setRxInfiniteMode

         void setRxInfiniteMode(int fileDesc, boolean infiniteMode, GollumCallbackGetInteger cb)

        Configure RF RX infinite mode (for RF air gap-less reception). Native call will be done inside background task. Callback is called once completed.

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Only available in Rogue variants

        Parameters:
        fileDesc - File descriptor of PandwaRF device.
        infiniteMode - RX infinite mode (true: enabled, false: disabled)
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • txSetup

         int txSetup(int frequency, int modulation, int dataRate, int deviation)

        Configure CC1111 radio before sending Tx message over radio interface Same as txSetup, but assuming we are already in a background task Must be called from background thread

        Parameters:
        frequency - The frequency to use, in Hz.
        modulation - The modulation value to use.
        dataRate - Transmission data rate, in bits/s.
        deviation - Channel deviation, in Hz.
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • txSetup

         void txSetup(int frequency, int modulation, int dataRate, int deviation, GollumCallbackGetInteger cb)

        Configure CC1111 radio before sending Tx message over radio interface

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        frequency - The frequency to use, in Hz.
        modulation - The modulation value to use.
        dataRate - Transmission data rate, in bits/s.
        deviation - Channel deviation, in Hz.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • txSend

        @Deprecated() int txSend(Array<byte> buffer, int tx_size, boolean async, int repeat)

        Send data as a byte array in the form [0x41, 0x42, 0x30, 0x46, ...]. Same as txSend, but assuming we are already in a background task Must be called from background thread Method will block until completion, whether async is true or false. If buffer contains too much data vs what is possible for the device variant (PandwaRF or Rogue), the data will truncated before sending.

        Parameters:
        buffer - as a byte array in the form [0x41, 0x42, 0x30, 0x46, ...].
        tx_size - Not used.
        async - true to send in async mode (doesn't wait for ack from PandwaRF), false to send in sync mode (wait for PandwaRF ack)
        repeat - number of SW or HW repeat times: 1 = single TX, 2 = 2 TX, etc.
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • txSend

         int txSend(String data, boolean async, int repeat, boolean compress)

        Send an hexadecimal String. Same as txSend, but assuming we are already in a background task Must be called from background thread. Method will block until completion, whether async is true or false. If buffer contains too much data vs what is possible for the device variant (PandwaRF or Rogue), the data will truncated before sending.

        Parameters:
        data - an hexadecimal String in the form "abcdef0123456789".
        async - true to send in async mode (doesn't wait for ack from PandwaRF), false to send in sync mode (wait for PandwaRF ack)
        repeat - number of SW or HW repeat times: 1 = single TX, 2 = 2 TX, etc.
        compress - If false, no compression requested.
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • txSendHex

         int txSendHex(Array<byte> buffer_hex, int tx_size, boolean async, int repeat, boolean compress)

        Send data as an hex byte array. Can be sent to PandwaRF in this form. Same as txSend, but assuming we are already in a background task Must be called from background thread Method will block until completion, whether async is true or false. If buffer contains too much data vs what is possible for the device variant (PandwaRF or Rogue), the data will truncated before sending.

        Parameters:
        buffer_hex - an hex byte array in the form [0xAB, 0x0F, 0x00, 0xFF, ...].
        tx_size - Not used.
        async - true to send in async mode (doesn't wait for ack from PandwaRF), false to send in sync mode (wait for PandwaRF ack)
        repeat - number of SW or HW repeat times: 1 = single TX, 2 = 2 TX, etc.
        compress - If false, no compression requested.
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • txSendHex

        @Deprecated() int txSendHex(Array<byte> buffer_hex, int tx_size, boolean async, int repeat)

        Send data as an hex byte array. Can be sent to PandwaRF in this form. Same as txSend, but assuming we are already in a background task Must be called from background thread Method will block until completion, whether async is true or false. If buffer contains too much data vs what is possible for the device variant (PandwaRF or Rogue), the data will truncated before sending.

        Parameters:
        buffer_hex - an hex byte array in the form [0xAB, 0x0F, 0x00, 0xFF, ...].
        tx_size - Not used.
        async - true to send in async mode (doesn't wait for ack from PandwaRF), false to send in sync mode (wait for PandwaRF ack)
        repeat - number of SW or HW repeat times: 1 = single TX, 2 = 2 TX, etc.
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • txSend

         void txSend(String data, boolean async, int repeat, boolean compress, GollumCallbackGetInteger cb)

        Send an hexadecimal String.

        Must NOT be called from background thread, as this method already creates its own AsyncTask. Method will return immediatly after background task is created. Use cb callback to be notified when background thread completes. If buffer contains too much data vs what is possible for the device variant (PandwaRF or Rogue), the data will truncated before sending.

        Parameters:
        data - an hexadecimal String in the form "abcdef0123456789".
        async - true to send in async mode (doesn't wait for ack from PandwaRF), false to send in sync mode (wait for PandwaRF ack)
        repeat - number of SW or HW repeat times: 1 = single TX, 2 = 2 TX, etc.
        compress - If false, no compression requested.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • txSend

        @Deprecated() void txSend(Array<byte> buffer, int tx_size, boolean async, int repeat, GollumCallbackGetInteger cb)

        Send data as a byte array in the form [0x41, 0x42, 0x30, 0x46, ...].

        Must NOT be called from background thread, as this method already creates its own AsyncTask. Method will return immediatly after background task is created. Use cb callback to be notified when background thread completes. If buffer contains too much data vs what is possible for the device variant (PandwaRF or Rogue), the data will truncated before sending.

        Parameters:
        buffer - as a byte array in the form [0x41, 0x42, 0x30, 0x46, ...].
        tx_size - Not used.
        async - true to send in async mode (doesn't wait for ack from PandwaRF), false to send in sync mode (wait for PandwaRF ack)
        repeat - number of SW or HW repeat times: 1 = single TX, 2 = 2 TX, etc.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • txSendHex

         void txSendHex(Array<byte> buffer_hex, int tx_size, boolean async, int repeat, boolean compress, GollumCallbackGetInteger cb)

        Send data as an hex byte array. Can be sent to PandwaRF in this form.

        Must NOT be called from background thread, as this method already creates its own AsyncTask. Method will return immediatly after background task is created. Use cb callback to be notified when background thread completes. If buffer contains too much data vs what is possible for the device variant (PandwaRF or Rogue), the data will truncated before sending.

        Parameters:
        buffer_hex - an hex byte array in the form [0xAB, 0x0F, 0x00, 0xFF, ...].
        tx_size - Not used.
        async - true to send in async mode (doesn't wait for ack from PandwaRF), false to send in sync mode (wait for PandwaRF ack)
        repeat - number of SW or HW repeat times: 1 = single TX, 2 = 2 TX, etc.
        compress - If false, no compression requested.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • txSendHex

        @Deprecated() void txSendHex(Array<byte> buffer_hex, int tx_size, boolean async, int repeat, GollumCallbackGetInteger cb)

        Send data as an hex byte array. Can be sent to PandwaRF in this form.

        Must NOT be called from background thread, as this method already creates its own AsyncTask. Method will return immediatly after background task is created. Use cb callback to be notified when background thread completes. If buffer contains too much data vs what is possible for the device variant (PandwaRF or Rogue), the data will truncated before sending.

        Parameters:
        buffer_hex - an hex byte array in the form [0xAB, 0x0F, 0x00, 0xFF, ...].
        tx_size - Not used.
        async - true to send in async mode (doesn't wait for ack from PandwaRF), false to send in sync mode (wait for PandwaRF ack)
        repeat - number of SW or HW repeat times: 1 = single TX, 2 = 2 TX, etc.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rxSetup

         int rxSetup(int frequency, int modulation, int dataRate, int frameLength, int chanbw, int deviation, boolean asyncMode)

        Same as rxSetup, but assuming we are already in a background task Must be called from background thread

        Parameters:
        frequency - The frequency to use, in Hz.
        modulation - The modulation value to use.
        dataRate - Sampling rate, in Hz
        frameLength - Size (in bytes) of the packet that the CC1111 transceiver needs to capture before sending it to Android
        chanbw - Receiver Channel Filter Bandwidth, in Hz.
        deviation - Channel deviation, in Hz.
        asyncMode - indicates if async mode (collected data as pulse width) is enabled.
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • rxSetup

         void rxSetup(int frequency, int modulation, int dataRate, int frameLength, int chanbw, int deviation, boolean asyncMode, GollumCallbackGetInteger cb)

        Configure Dongle for RX.

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        frequency - The frequency to use, in Hz.
        modulation - The modulation value to use.
        dataRate - Sampling rate, in Hz
        frameLength - Size (in bytes) of the packet that the CC1111 transceiver needs to capture before sending it to Android
        chanbw - Receiver Channel Filter Bandwidth in Hz
        deviation - Channel deviation, in Hz.
        asyncMode - indicates if async mode (collected data as pulse width) is enabled.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rxListen

         int rxListen(Array<byte> buffer, int rx_size)

        Start listening for RX data. Same as rxListen, but assuming we are already in a background task. Must be called from background thread

        Parameters:
        buffer - Empty RX data buffer where data will be stored.
        rx_size - Size of RX data buffer.
        Returns:

        Captured data size, 0 if operation successfully completed without data, -1 in case of error.

      • rxListen

         Array<byte> rxListen(Array<byte> buffer, boolean rxCompMode, boolean remainingData)

        Start listening for RX data. Same as rxListen, but assuming we are already in a background task. Must be called from background thread

        Parameters:
        buffer - Empty RX data buffer where data will be stored.
        rxCompMode - If true, search for RX frame with compression.
        remainingData - true to read the un-transmitted data (data not big enough to fill a RfCat frame), false to read normal frames
        Returns:

        Captured data array, empty array if operation successfully completed without data, null in case of error.if rxCompMode is set to true, setNicEncodingMode must have been called previously to enable RX frame compression.

      • rxListen

         Array<byte> rxListen(Array<byte> buffer, boolean rxCompMode)

        Start listening for RX data. Same as rxListen, but assuming we are already in a background task. Must be called from background thread

        Parameters:
        buffer - Empty RX data buffer where data will be stored.
        rxCompMode - If true, search for RX frame with compression.
        Returns:

        Captured data array, empty array if operation successfully completed without data, null in case of error.if rxCompMode is set to true, setNicEncodingMode must have been called previously to enable RX frame compression.

      • rxListen

         void rxListen(Array<byte> buffer, int rx_size, GollumCallbackGetInteger cb)

        Start listening for RX data. Must be called after rxSetup It creates a background task so do not call from background task.

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        buffer - Empty RX data buffer where data will be stored.
        rx_size - Size of RX data buffer.
        cb - Callback to be called with the result of operation, when the background task is terminated.Callback contains result with captured data size, 0 if operation successfully completed without data, -1 in case of error.
      • rxListen

         int rxListen(Array<byte> buffer, int rx_size, boolean rxCompMode, boolean remainingData)

        Start listening for RX data. Same as rxListen, but assuming we are already in a background task. Must be called from background thread

        Parameters:
        buffer - Empty RX data buffer where data will be stored.
        rx_size - Size of RX data buffer.
        rxCompMode - If true, search for RX frame with compression.
        remainingData - true to read the un-transmitted data (data not big enough to fill a RfCat frame), false to read normal frames
        Returns:

        Captured data size, 0 if operation successfully completed without data, -1 in case of error.if rxCompMode is set to true, setNicEncodingMode must have been called previously to enable RX frame compression.

      • rxListen

         int rxListen(Array<byte> buffer, int rx_size, boolean rxCompMode)

        Start listening for RX data. Same as rxListen, but assuming we are already in a background task. Must be called from background thread

        Parameters:
        buffer - Empty RX data buffer where data will be stored.
        rx_size - Size of RX data buffer.
        rxCompMode - If true, search for RX frame with compression.
        Returns:

        Captured data size, 0 if operation successfully completed without data, -1 in case of error.if rxCompMode is set to true, setNicEncodingMode must have been called previously to enable RX frame compression.

      • rxListen

         void rxListen(Array<byte> buffer, int rx_size, boolean rxCompMode, GollumCallbackGetInteger cb)

        Start listening for RX data. Must be called after rxSetup It creates a background task so do not call from background task.

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        buffer - Empty RX data buffer where data will be stored.
        rx_size - Size of RX data buffer.
        rxCompMode - If true, search for RX frame with compression.
        cb - Callback to be called with the result of operation, when the background task is terminated.Callback contains result with captured data size, 0 if operation successfully completed without data, -1 in case of error.
      • rxAsyncListen

         int rxAsyncListen(Array<byte> buffer)

        Listen rx data as pulse width. Given buffer will be filled by native library. Must be called after call of rxSetup. Must be called from background thread.

      • rxStop

         int rxStop()

        Stop RX data reception. Can be called from background task. Same as rxStop, but assuming we are already in a background task

        Returns:

        0 if operation successfully completed, -1 in case of error.

      • rxStop

         void rxStop(GollumCallbackGetInteger cb)

        Stop RX data reception. It creates a background task so do not call from background task.

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • rxDataRateMeasStart

         int rxDataRateMeasStart(int frequency, int modulation, int dataRate, int chanbw, int deviation, int threshold_occ_winner)

        Measure data rate, assuming we are already in a background task Must be called from background thread

        Parameters:
        frequency - The frequency to use, in Hz.
        modulation - The modulation value to use.
        dataRate - Sampling rate, in Hz.
        chanbw - Receiver Channel Filter Bandwidth, in Hz.
        deviation - Channel deviation, in Hz.
        threshold_occ_winner - Number of occurence needed for a duration to be elected as the winner.
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • rxDataRateMeasStop

         int rxDataRateMeasStop()

        Same as rxDataRateMeasStop, but assuming we are already in a background task Must be called from background thread

        Returns:

        0 if operation successfully completed, -1 in case of error.

      • rxDataRateMeasListen

         int rxDataRateMeasListen(boolean searchEndMsg)

        Periodicaly read for dara rate measurement results. Must be called from background thread.

        Parameters:
        searchEndMsg - true to search for SYS_CMD_NIC_DATARATE_DETECTED_ENDfalse to search for SYS_CMD_NIC_DATARATE_DETECTED
        Returns:

        vaue of measured data rate if operation successfully completed, 0 if no DRM result found, -1 if DRM measurement is finished.

      • keeloq_enc

        @Deprecated() int keeloq_enc(Array<byte> key, Array<byte> plaintext, GollumCallbackGetByteArray cb)

        Perform Keeloq encoding

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        key - Keeloq device key.
        plaintext - Data to encrypt.
        cb - Callback to be called with the result of operation, when the background task is terminated.
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • keeloq_dec

        @Deprecated() int keeloq_dec(Array<byte> key, Array<byte> ciphertext, GollumCallbackGetByteArray cb)

        Perform Keeloq decoding

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        key - Keeloq device key.
        ciphertext - Data to decrypt.
        cb - Callback to be called with the result of operation, when the background task is terminated.
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • saveButtonConfigInFlash

         void saveButtonConfigInFlash(int button, int frequency, int modulation, int deviation, int dataRate, int power_amp, Array<byte> buffer, GollumCallbackGetInteger cb)

        Save a RF configuration into a physical button of the device.

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        button - Id of the button.
        frequency - The frequency to use, in Hz.
        modulation - The modulation value to use.
        deviation - The deviation :)
        dataRate - Transmission data rate, in bits/s.
        buffer - Data to be transmitted when button is pushed.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • execButton

        @Deprecated() void execButton(int button, GollumCallbackGetInteger cb)

        Execute the same action as physically pressing a button on the device by sending a APP_FLASH_MEMORY/CMD_FM_EXEC_CONFIG message to nRF51.

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Equivalent to writeButtonPush

        Parameters:
        button - Id of the button.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • isDongleModeBootloader

         boolean isDongleModeBootloader()

        Indicates if dongle bootloader is running. Can be called from background task.

        Returns:

        true if device is in bootloader mode

      • isDongleModeFirmware

         boolean isDongleModeFirmware()

        Indicates if dongle firmware is running. Can be called from background task.

        Returns:

        true if device is in firmware mode

      • isDongleModeBootloader

         void isDongleModeBootloader(GollumCallbackGetBoolean cb)

        Indicates if dongle bootloader is running. It creates a background task so do not call from background task.

        Must NOT be called from background thread, as this method already creates its own AsyncTask. Use isDongleModeBootloader instead if calling from background task already

        Parameters:
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • isDongleModeFirmware

         void isDongleModeFirmware(GollumCallbackGetBoolean cb)

        Indicates if dongle firmware is running. It creates a background task so do not call from background task.

        Must NOT be called from background thread, as this method already creates its own AsyncTask. Use isDongleModeFirmware instead if calling from background task already

        Parameters:
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • getRfTestList

         void getRfTestList(Array<byte> rfTestList, GollumCallbackGetInteger cb)

        Return list of available RF self tests No need for dongle to be connected so we dont pre-check connection

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        rfTestList - Array to store the available RF test list.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • runRfTest

         void runRfTest(int test, GollumCallbackGetInteger cb)

        Run CC1111 RF test

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        test - Number of test to run
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • getNativeLibVersion

         void getNativeLibVersion(GollumCallbackGetString cb)

        Returns Gollum Native Lib version

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • getNativeLibusbVersion

         void getNativeLibusbVersion(GollumCallbackGetString cb)

        Returns version of libusb

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • setNativeNpiTimeout

         void setNativeNpiTimeout(int syncDhBleTimeOutMs, int syncDhUsbTimeOutMs, int rxThreadTimeoutMs, GollumCallbackGetInteger cb)

        Set values for different timeouts used in Gollum Native Lib.

        Parameters:
        syncDhBleTimeOutMs - Timeout value for Gollum Native Stack when connected in BLE.
        syncDhUsbTimeOutMs - Timeout value for Gollum Native Stack when connected in USB.
        rxThreadTimeoutMs - Timeout value for Gollum Native Stack when looking for an asynchronous message in NPI queue.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • setNativeNpiTimeout

         void setNativeNpiTimeout(NpiParameters npiParams, GollumCallbackGetInteger cb)

        Set values for different timeouts used in Gollum Native Lib.

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        npiParams - Set of timeout values for Gollum Native Stack.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • setNativeNpiTimeout

         void setNativeNpiTimeout(String timeoutStr, GollumCallbackGetInteger cb)

        Set values for different timeouts used in Gollum Native Lib

        Parameters:
        timeoutStr - NPI timeout policy value.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • getCc1111RfRegisters

         Array<String> getCc1111RfRegisters()

        Return the list of CC1111 registers in a String[] list. Sync version.

        Returns:

        CC1111 registers list

      • getCc1111RfRegisters

         boolean getCc1111RfRegisters(GollumCallbackGetMap<String, Byte> cb)

        Return the list of CC1111 registers in a hashmap<name, value>.

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • setCC1111RfRegisters

         void setCC1111RfRegisters(Array<byte> registerBuffer, GollumCallbackGetInteger cb)

        Write all CC1111 registers at once.

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        registerBuffer - Buffer where CC1111 registers values will be stored.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • pingAsyncInContext

         int pingAsyncInContext()

        Make an empty Asynchronous (doesn't wait for ack from PandwaRF) ping to device, but assuming we are already in a background task Must be called from background thread

        Returns:

        -1 if failure, 0 if success

      • pingAsyncInContext

         int pingAsyncInContext(Array<byte> buffer_hex)

        Make an Asynchronous (doesn't wait for ack from PandwaRF) ping with provided data to device, but assuming we are already in a background task Must be called from background thread

        Parameters:
        buffer_hex - an hex byte array in the form [0xAB, 0x0F, 0x00, 0xFF, ...].
        Returns:

        -1 if failure, 0 if success

      • pingAsync

         void pingAsync(GollumCallbackGetInteger cb)

        Make an empty Asynchronous (doesn't wait for ack from PandwaRF) ping to device

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        cb - Callback to be called with the result of operation (-1 if failure, 0 if success), when the background task is terminated.
      • pingAsync

         void pingAsync(Array<byte> buffer_hex, GollumCallbackGetInteger cb)

        Make an Asynchronous (doesn't wait for ack from PandwaRF) ping with provided data to device

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        buffer_hex - an hex byte array in the form [0xAB, 0x0F, 0x00, 0xFF, ...].
        cb - Callback to be called with the result of operation (-1 if failure, 0 if success), when the background task is terminated.
      • pingSyncInContext

         Array<byte> pingSyncInContext()

        Make an empty Synchronous (wait for PandwaRF ack) ping to device, but assuming we are already in a background task Must be called from background thread

        Returns:

        null if failure, array with bytes if success

      • pingSyncInContext

         Array<byte> pingSyncInContext(Array<byte> buffer_hex)

        Make a Synchronous (wait for PandwaRF ack) ping with provided data to device, but assuming we are already in a background task Must be called from background thread

        Parameters:
        buffer_hex - an hex byte array in the form [0xAB, 0x0F, 0x00, 0xFF, ...].
        Returns:

        null if failure, array with bytes if success

      • pingSync

         void pingSync(GollumCallbackGetByteArray cb)

        Make an empty Synchronous (wait for PandwaRF ack) ping to device

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        cb - Callback to be called with the result of operation (null if failure, array with bytes if success), when the background task is terminated.
      • pingSync

         void pingSync(Array<byte> buffer_hex, GollumCallbackGetByteArray cb)

        Make a Synchronous (wait for PandwaRF ack) ping with provided data to device

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        buffer_hex - an hex byte array in the form [0xAB, 0x0F, 0x00, 0xFF, ...].
        cb - Callback to be called with the result of operation (null if failure, array with bytes if success), when the background task is terminated.
      • getJavaScriptLibVersions

         void getJavaScriptLibVersions(GollumCallbackGetString cb)

        Get the JavaScript engine version

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • registerRead

         int registerRead(int address, Array<byte> buffer, int bufLen)

        Read a register from CC1111 RF Same as registerRead, but assuming we are already in a background task Must be called from background thread

        Parameters:
        address - Address of first CC1111 register to read.
        buffer - Buffer where CC1111 registers values will be stored.
        bufLen - Number of registers to read consecutively.
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • registerRead

         void registerRead(int address, Array<byte> buffer, int bufLen, GollumCallbackGetInteger cb)

        Read a register from CC1111 RF

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        address - Address of first CC1111 register to read.
        buffer - Buffer where CC1111 registers values will be stored.
        bufLen - Number of registers to read consecutively.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • registerWrite

         int registerWrite(int address, Array<byte> buffer, int bufLen)

        Write to a register in CC1111 RF Same as registerWrite, but assuming we are already in a background task Must be called from background thread

        Parameters:
        address - Address of first CC1111 register to write.
        buffer - Buffer of data to write to CC1111 registers.
        bufLen - Number of registers to write consecutively.
        Returns:

        0 if operation successfully completed, -1 in case of error.

      • registerWrite

         void registerWrite(int address, Array<byte> buffer, int bufLen, GollumCallbackGetInteger cb)

        Write to a register in CC1111 RF

        Must NOT be called from background thread, as this method already creates its own AsyncTask.

        Parameters:
        address - Address of first CC1111 register to write.
        buffer - Buffer of data to write to CC1111 registers.
        bufLen - Number of registers to write consecutively.
        cb - Callback to be called with the result of operation, when the background task is terminated.
      • consolePrint

         void consolePrint(String somethingToPrint)

        Post a new JavaScriptConsoleLogEvent to the bus. The object contains something to print on the screen

        Parameters:
        somethingToPrint - something to print on the screen
      • setDongleBusyState

         void setDongleBusyState(Boolean busy, Common.RfTask rfTask)

        Set dongle to "busy" or "busy no more" state for a task. This method posts an EventBus event, which will (must) normally be delivered to a thread in UI thread (MainThread). To avoid un-ordered event delivery, all calls to this method must be made from background thread, eg. the posting thread must be the background thread. If the posting thread is not the background thread but the main thread, event handler methods will be called directly, and events will be delivered un-ordered.

        MUST be called from a background thread.

        Parameters:
        busy - State to be forced into.
        rfTask - Task that should be broadcast notified as free/busy.
      • forceResetDongleBusyState

         void forceResetDongleBusyState(Boolean state)

        Force the current state of the device to busy/free Used for recovery when a task didn't end correctly, leaving a bad dongle busy state. Has no real effect on HW, only to recover from a status mismatch

        Parameters:
        state - State to be forced into.
      • isDongleBusy

         boolean isDongleBusy()

        Get the RF status of PandwaRF dongle

        Returns:

        true if RF is busy, false if free

      • isAutoBleReconnectIfError

         boolean isAutoBleReconnectIfError()
        Returns:

        true if device auto-reconnection when a BLE error occurs is enabled

      • logStatisticEvent

         void logStatisticEvent(String eventName, String param)

        Log event to Firebase with String param

        Parameters:
        eventName - Backend statistic event name.
        param - Associated parameters.
      • logStatisticEvent

         void logStatisticEvent(String eventName, int param)

        Log event to Firebase with int param

        Parameters:
        eventName - Backend statistic event name.
        param - Associated parameters.
      • setOfflineModeBackend

         static void setOfflineModeBackend(boolean mode)

        Force the lib to enter specified network mode (offline/online) for backend managing FW versions, BLE errors, database, etc...

        Parameters:
        mode - true to enter offline mode, false to allow backend connection.
      • setOfflineModeAnalytics

         static void setOfflineModeAnalytics(boolean mode)

        Force the lib to enter specified network mode (offline/online) for logging and analytics backend

        Parameters:
        mode - true to enter offline mode, false to allow backend connection.
      • setOfflineModeCrashReport

         static void setOfflineModeCrashReport(boolean mode)

        Force the lib to enter specified network mode (offline/online) for logging events and app crashes

        Parameters:
        mode - true to enter offline mode, false to allow backend connection.
      • setAutoBleReconnectIfError

         void setAutoBleReconnectIfError(boolean autoBleReconnectIfError)

        Allow automatic BLE reconnection in case of BLE disconnection (GATT error, ...)

        Parameters:
        autoBleReconnectIfError - If true, allow automatic BLE reconnection in case of BLE disconnection (GATT error, ...