BBox 8x8 Duo

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

Bases: Device

BBoxDuo class

getSysStatus()

Get the system status.

Returns:

RetData
  • OK if successful.

Return type:

RetType

Example

>>> sys_status = service.getSysStatus(sn)
>>> print("System status: %s" % sys_status.RetData)
{
    "status": "NORMAL"
}
setLoFreq(lo_freq: int = 21000000)

Set the lofrequency in kHz.

Parameters:

lo_freq (int) – Frequency value to set.

Returns:

RetData
  • OK if successful.

  • ERROR_UD_FREQ if frequency is out of range.

Return type:

RetType

Example

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

Get the local oscillator frequency in kHz.

Returns:

RetData
  • OK if 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:

RetData
  • OK if successful.

Return type:

RetType

Example

>>> lo_status = service.getLoStatus(sn)
>>> print("LO status: %s" % lo_status.RetData)
{
    "status": "LO_LOCKED"
}
setRFFreq(rf_freq: int = 28000000)

Set the RF frequency.

Parameters:

rf_freq – Frequency value to set.

Returns:

RetData
  • OK if successful.

  • ERROR_UD_FREQ if frequency is out of range.

Return type:

RetType

Example

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

Get the RF frequency.

Returns:

RetData
  • OK if 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 = _REF_SOURCE.INTERNAL)

Set the reference source.

Parameters:

source – Reference source to set. (0: INTERNAL, 1: EXTERNAL_10M, 2: EXTERNAL_100M)

Returns:

RetData
  • OK if successful

  • ERROR_INVALID_PARAMETER if source value is invalid.

Return type:

RetType

Example

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

Get the reference source.

Returns:

RetData
  • OK if successful.

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 – RF mode to set.

Returns:

RetData
  • OK if successful.

  • ERROR_INVALID_PARAMETER if RF mode value is invalid.

Return type:

RetType

Example

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

Get the RF mode.

Returns:

RetData
  • OK if successful.

  • ERROR_BF_STATE if RF mode value from device is invalid.

Return type:

RetType

Example

>>> rf_mode = service.getRFMode(sn)
>>> print("RF mode: %s" % rf_mode.RetData)
{
    "mode": "TX"
}
setUdGain(polar: POLARIZATION_TYPE | int, rf_mode: CellRFMode | int, gain_db: float)

Set the gain in dB for specified RF mode.

Parameters:
  • polar – Polarization state to set. (DEFAULT: POL.POL_1)

  • rf_mode – RF mode to set gain for. (CellRFMode.TX or CellRFMode.RX)

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

Returns:

RetData
  • OK if successful.

  • ERROR_INVALID_PARAMETER if RF mode or gain value is invalid.

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 – LO frequency in kHz.

  • if_freq – IF frequency in kHz.

  • bandwidth – Bandwidth in kHz.

Returns:

RetData

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 – Polarization state to set. Accepts POL_1, POL_2, POL_H, POL_V, POL_RC, POL_LC.

  • rf_mode – RF mode to set.

  • angle – Angle to set, can be either AzElAngle or ThetaPhiAngle

  • gain_db – 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.

Returns:

RetData
  • OK if successful.

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 – BFIC config to set. Can be a BFICConfig dataclass, a dict, or a JSON string.

Returns:

RetData
  • OK if successful.

  • ERROR_INVALID_PARAMETER if config format is invalid.

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 – Polarization to set. (0: POL_1, 1: POL_2)

  • rf_mode – RF mode to set. (0: TX, 1: RX)

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

Returns:

RetData
  • OK if successful.

  • ERROR_INVALID_PARAMETER if polar or rf_mode value is invalid.

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 – Polarization to estimate EIRP for.

Returns:

RetData Estimated EIRP in dBm if successful.
  • ERROR if estimation fails due to invalid parameters or retrieval errors.

Return type:

RetType

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.