BBox 8x8 Duo

class tlkcore.tmydev.DevBBoxDuo.BBoxDuo(*parent)

Bases: Device

BBox 8x8 Duo class

getSysStatus()

Get the system status.

Returns:

RetData
  • DUT_SYSTEM_STATE: The system status, which can be one of the following:
    • NORMAL: If the system is operating normally.

    • SYS_ERROR: If the system is in an error state.

Return type:

RetType

Example

>>> sys_status = service.getSysStatus(sn)

Changed in version v2.5.0rc1: Change function return type to DUT_SYSTEM_STATE enum for better clarity.

setLoFreq(lo_freq: int = 21000000)

Set the lofrequency in kHz.

Parameters:

lo_freq (int) – Frequency value to set. (range: 18 GHz to 24 GHz, i.e. 18000000 to 24000000 kHz)

Returns:

RetCode

Return type:

RetType

Example

>>> service.setLoFreq(sn, lo_freq = 22000000)
getLoFreq()

Get the local oscillator frequency in kHz.

Returns:

RetCode
  • OK: If successful.

  • ERROR: If there is an error during the operation.

RetData
  • int: The local oscillator frequency in kHz if the operation is successful.

Return type:

RetType

Example

>>> lo_freq = service.getLoFreq(sn).RetData
>>> print("LO freq: %s kHz" % lo_freq)
>>> LO freq: 22000000 kHz
getLoStatus()

Get the local oscillator status.

Returns:

RetCode
  • OK: If successful.

  • ERROR: If there is an error during the operation or if the response format is unexpected.

RetData
  • UD_PLO: The local oscillator status, which can be one of the following:
    • LOCK: If the local oscillator is locked.

    • UNLOCK: If the local oscillator is unlocked.

Return type:

RetType

Example

>>> lo_status = service.getLoStatus(sn)

Changed in version v2.5.0rc1: Change function return type to UD_PLO enum for better clarity.

setRFFreq(rf_freq: int = 28000000)

Set the RF frequency.

Parameters:

rf_freq (int) – Frequency value to set. (range: 26 GHz to 29 GHz, i.e. 26000000 to 29000000 kHz, default: 28000000 kHz)

Returns:

RetCode
  • OK: If successful.

  • ERROR_UD_FREQ: If frequency is out of range.

  • ERROR: If there is an error during the operation.

Return type:

RetType

Example

>>> service.setRFFreq(sn, rf_freq = 28000000)
getRFFreq()

Get the RF frequency.

Returns:

RetCode
  • OK: If successful.

  • ERROR: If there is an error during the operation.

RetData
  • int: The RF frequency in kHz if the operation is successful.

Return type:

RetType

Example

>>> rf_freq = service.getRFFreq(sn).RetData
>>> print("RF freq: %s kHz" % rf_freq)
>>> RF freq: 28000000 kHz
setRefSource(source: int = 0)

Set the reference source.

Parameters:

source (int) – Reference source to set. (0: INTERNAL, 1: EXTERNAL_10M, default: INTERNAL)

Returns:

RetCode

Return type:

RetType

Example

>>> service.setRefSource(sn, source = 0)
getRefSource()

Get the reference source.

Returns:

RetCode
  • OK: If successful.

  • ERROR: If there is an error during the operation.

RetData
  • dict: The reference source information if the operation is successful, with following keys:
    • ”source”: Reference source, either “INTERNAL” or “EXTERNAL_10M”.

    • ”status”: Reference lock status, either “REF_LOCKED” or “REF_UNLOCKED”.

Return type:

RetType

Example

>>> ref_source = service.getRefSource(sn)
>>> print("Reference source: %s" % ref_source.RetData)
{
    "source": "INTERNAL",
    "status": "REF_LOCKED"
}
setRFMode(rf_mode: int)

Set the RF mode.

Parameters:

rf_mode (int) – RF mode to set. (-1: Standby mode, 0: TX mode, 1: RX mode)

Returns:

RetCode

Return type:

RetType

Example

>>> service.setRFMode(sn, CellRFMode.TX)
getRFMode()

Get the RF mode.

Returns:

RetCode
  • OK: If successful.

  • ERROR_BF_STATE: If RF mode value from device is invalid.

  • ERROR: If there is an error in retrieving the RF mode.

RetData
  • CellRFMode: The current RF mode, which can be one of the following:
    • TX: If the device is in TX mode.

    • RX: If the device is in RX mode.

    • STANDBY: If the device is in Standby mode.

Return type:

RetType

Example

>>> rf_mode = service.getRFMode(sn)

Changed in version v2.5.0rc1: Change function return type to CellRFMode enum for better clarity.

setUdGain(polar: POLARIZATION_TYPE | int, rf_mode: CellRFMode | int, gain_db: float)

Set the gain in dB for specified RF mode.

Parameters:
  • polar (Union[POL, int]) – Polarization state to set. (Accept: 0 or 1, where 0: POL.POL_1 and 1: POL.POL_2)

  • rf_mode (Union[CellRFMode, int]) – RF mode to set gain for. (Accept: 0 or 1, where 0: CellRFMode.TX and 1: CellRFMode.RX)

  • gain_db (float) – Gain value to set in dB. (Range: 0-30 dB)

Returns:

RetCode

Return type:

RetType

Example

>>> service.setUdGain(sn, polar = POL.POL_1, rf_mode = CellRFMode.TX, gain_db = 20)
>>> service.setUdGain(sn, polar = POL.POL_1, rf_mode = CellRFMode.RX, gain_db = 20)
checkHarmonic(lo_freq: int, if_freq: int, bandwidth: int)

Check the harmonic.

Parameters:
  • lo_freq (int) – LO frequency in kHz.

  • if_freq (int) – IF frequency in kHz.

  • bandwidth (int) – Bandwidth in kHz.

Returns:

RetCode
  • OK: If successful.

  • WARNING: If there is a harmonic warning.

  • ERROR: If there is an error in checking the harmonic.

RetData
  • bool: True if harmonic warning, False if no harmonic issue.

Return type:

RetType

Example

>>> harmonic = service.checkHarmonic(sn, lo_freq = 22000000, if_freq = 6000000, bandwidth = 2000000)
>>> print("Harmonic: %s" % harmonic.RetData)
>>> Harmonic: True
setBeamAngle(polar: POLARIZATION_TYPE | int, rf_mode: CellRFMode | int, angle: AzElAngle | ThetaPhiAngle, gain_db: float = 0.0)

Set the beam using angle.

For single-polarization types (POL_1, POL_2), sends one SETBEAM command. For synthesis polarization types (POL_H, POL_V, POL_RC, POL_LC), sends two SETBEAM commands — one for POL_1 (offset=0) and one for POL_2 (offset=0/180 for H/V, offset=90/270 for RC/LC).

Parameters:
  • polar (Union[POL, int]) – Polarization state to set. (Range: 0: POL_1, 1: POL_2, 2: POL_H, 3: POL_V, 4: POL_RC, 5: POL_LC)

  • rf_mode (Union[CellRFMode, int]) – RF mode to set. (Accept: 0 or 1, where 0: CellRFMode.TX and 1: CellRFMode.RX)

  • angle (Union[AzElAngle, ThetaPhiAngle]) – Angle to set, can be either AzElAngle or ThetaPhiAngle

  • gain_db (float) – Gain = UD gain + BF total gain (com + ele) in dB. The service will automatically split the gain between UD and BF based on the maximum gain capability of UD. (range: 0-40 dB with spec allowance)

Returns:

RetCode
  • OK: If successful.

  • ERROR_INVALID_PARAMETER: If any of the input parameters is invalid (e.g. invalid angle type, invalid polarization or RF mode value, gain_db out of range).

  • ERROR: If there is an error in setting the beam angle.

Return type:

RetType

Example

>>> service.setBeamAngle(sn, polar=POL.POL_1, rf_mode=CellRFMode.TX, angle=AzElAngle(azimuth=45.0, elevation=30.0), gain_db=10)
>>> service.setBeamAngle(sn, polar=POL.POL_H,  rf_mode=CellRFMode.TX, angle=ThetaPhiAngle(theta=30, phi=60), gain_db=10)
setBficConfig(config: BFICConfig | dict)

Set the BFIC config.

Parameters:

config (Union[BFICConfig, dict]) – BFIC config to set. Can be a BFICConfig dataclass, a dict.

Returns:

RetCode

Return type:

RetType

Example

>>> bfic_config = {
        "tx": {
            "pol_1": {
                "1": {
                    "enable": [1, 1, 1, 1],
                    "com_gain_db": 5,
                    "ele_gain_db": [1, 2, 3, 4],
                    "phase_deg": [1, 10, 40, 63]
                },
                "2": {
                    "enable": [1, 1, 1, 1],
                    "com_gain_db": 5,
                    "ele_gain_db": [1, 2, 3, 4],
                    "phase_deg": [1, 10, 40, 63]
                }
            },
            "pol_2": {
                "3": {
                    "enable": [1, 1, 1, 1],
                    "com_gain_db": 5,
                    "ele_gain_db": [1, 2, 3, 4],
                    "phase_deg": [1, 10, 40, 63]
                },
                "4": {
                    "enable": [1, 1, 1, 1],
                    "com_gain_db": 5,
                    "ele_gain_db": [1, 2, 3, 4],
                    "phase_deg": [1, 10, 40, 63]
                }
            }
        }
    }
>>> service.setBficConfig(sn, config = bfic_config)
setAllBficEnable(polar: POLARIZATION_TYPE | int, rf_mode: CellRFMode | int, enable: bool)

Set all BFIC beams enable or disable.

Parameters:
  • polar (Union[POL, int]) – Polarization to set. (0: POL_1, 1: POL_2)

  • rf_mode (Union[CellRFMode, int]) – RF mode to set. (0: TX, 1: RX)

  • enable (bool) – True to enable all BFIC beams, False to disable all BFIC beams.

Returns:

RetCode

Return type:

RetType

Example

>>> service.setAllBficEnable(sn, polar = POL.POL_1, rf_mode = CellRFMode.TX, enable = True)
estimateEIRP(polar: POLARIZATION_TYPE | int)

Estimate the EIRP based on gain and bandwidth.

Parameters:

polar (Union[POL, int]) – Polarization to estimate EIRP for. (0: POL_1, 1: POL_2)

Returns:

RetCode
RetData
  • float: The estimated EIRP value in dBm if the operation is successful.

Return type:

RetType

Example

>>> eirp_estimation = service.estimateEIRP(sn, polar = POL.POL_1)
>>> print("Estimated EIRP: %s dBm" % eirp_estimation.RetData)
>>> Estimated EIRP: 45.0 dBm

Added in version v2.4.9: Adding function to estimate EIRP based on gain and bandwidth.

checkFWVersion(min_version: VER, msg: str = '') RetType

Check if the current firmware version is greater than or equal to the minimum required version.

Parameters:

min_version (VER) – The minimum required firmware version.

Returns:

RetData
  • bool: True if the current firmware version is sufficient, False otherwise.

Return type:

RetType

checkHWVersion(versions: List[VER], msg: str = '', check_version: VER = None) RetType

Check if the current hardware version is greater than or equal to the minimum required version.

Parameters:

version (VER) – The minimum required hardware version.

Returns:

RetData
  • bool: True if the current hardware version is sufficient, False otherwise.

Return type:

RetType

getDFUSupport()

Check if the device supports Device Firmware Upgrade (DFU).

Returns:

RetData
  • bool: True if DFU is supported, False otherwise.

Return type:

RetType

getDevTypeName()

Retrieve current name of device.

Returns:

Name of device

Examples

>>> service.getDevTypeName(sn)
'RIS'
processDFU(file_path: str, dfu_dev_info: dict)

Process the Device Firmware Upgrade (DFU) at the local side.

Parameters:
  • file_path (str) – The file path to the firmware file to be uploaded.

  • dfu_dev_info (dict) –

    Information about the DFU device.

    • sn (str): Serial number of the device.

    • address (str): Address of the device.

    • devtype (int): Device type as defined in TMYDevType.

    • in_dfu (bool): Indicates if the device is already in DFU mode.

    • fw_ver (str): Firmware version of the device.

    • hw_ver (str): Hardware version of the device.

Returns:

An object containing the result of the DFU process.

Return type:

RetType

queryFWVer()

Query FW version of the device.

Returns:

RetData
  • str: FW version.

Return type:

RetType

Examples

>>> fw_version = service.queryFWVer(sn).RetData
>>> print(f"FW Version: {fw_version}")
v1.0.0
queryFpgaVer()

Query the FPGA version of the device.

Returns:

An object containing the FPGA version of the device.
  • str: The FPGA version as a string.

Return type:

RetType

Examples

Query the FPGA version of the device
>>> fpga_version = service.queryFpgaVer(sn).RetData
>>> print(f"FPGA Version: {fpga_version}")
FPGA Version: v1.0.0

Note

Only support for BBox 8x8 Duo.

queryHWVer()

Query the hardware version of the device.

Returns:

RetData
  • str: The hardware version as a string.

Return type:

RetType

Examples

  • Query the hardware version of the device
    >>> hw_version = service.queryHWVer(sn).RetData
    >>> print(f"Hardware Version: {hw_version}")
    
queryLoaderVer()

Query the bootloader version of the device.

Returns:

RetData
  • str: The bootloader version as a string.

Return type:

RetType

queryMAC()

Query the MAC address of the device.

Returns:

An object containing the MAC address of the device.
  • str: The MAC address as a string.

Return type:

RetType

Examples

Query the MAC address of the device
>>> mac_address = service.queryMAC(sn).RetData
>>> print(f"MAC Address: {mac_address}")
MAC Address: 00:0C:FE:AA:BB:01
querySN()

Query the serial number of the device.

Returns:

RetData
  • str: The serial number of the device.

Return type:

RetType

queryStaticIP()

Query the static IP address of the device.

Parameters:

sn (str) – The serial number of the device.

Returns:

RetData
  • str: Static IP of the device.

Return type:

RetType

Note

Some FW versions of device not support this feature

Examples

Query the static IP address of a device:
>>> static_ip = service.queryStaticIP(sn).RetData
>>> print(f"Static IP Address: {static_ip}")
Static IP Address: 192.168.100.111
reboot()

Reboot of the device.

Returns:

An object containing the result of the reboot process.
  • OK: If the reboot process completes successfully.

Return type:

RetType

setStaticIP(ip, reboot=True)

Set the static IP address of the device, and reboot or not.

Note

Support LAN device only,

Parameters:
  • ip (str) – IP with x.x.x.x format

  • reboot (bool, optional) – reboot device after setting static IP. Defaults to True.

Note

Some FW versions of device not support this reboot feature.

Return type:

RetType

Examples

Set the static IP address of a device:
>>> service.setStaticIP(sn, "192.168.100.150", True)

Changed in version v2.4.7: for UD Box 0630, UD Box 5G, and BBox 8x8 Duo devices. Rebooting after an IP address change is now enabled by default.