BBox 8x8 Duo
- class tlkcore.tmydev.DevBBoxDuo.BBoxDuo(*parent)
Bases:
DeviceBBoxDuo class
- getSysStatus()
Get the system status.
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:
RetDataOKif successful.ERROR_UD_FREQif frequency is out of range.
- Return type:
Example
>>> service.setLoFreq(sn, lo_freq = 22000000)
- getLoFreq()
Get the local oscillator frequency in kHz.
Example
>>> lo_freq = service.getLoFreq(sn).RetData >>> print("LO freq: %s kHz" % lo_freq) >>> LO freq: 22000000 kHz
- getLoStatus()
Get the local oscillator status.
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:
RetDataOKif successful.ERROR_UD_FREQif frequency is out of range.
- Return type:
Example
>>> service.setRFFreq(sn, rf_freq = 28000000)
- getRFFreq()
Get the RF frequency.
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:
RetDataOKif successfulERROR_INVALID_PARAMETERif source value is invalid.
- Return type:
Example
>>> service.setRefSource(sn, source = 0)
- getRefSource()
Get the reference source.
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:
RetDataOKif successful.ERROR_INVALID_PARAMETERif RF mode value is invalid.
- Return type:
Example
>>> service.setRFMode(sn, CellRFMode.TX)
- getRFMode()
Get the RF mode.
- Returns:
RetDataOKif successful.ERROR_BF_STATEif RF mode value from device is invalid.
- Return type:
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:
RetDataOKif successful.ERROR_INVALID_PARAMETERif RF mode or gain value is invalid.
- Return type:
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:
- Return type:
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
AzElAngleorThetaPhiAnglegain_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:
RetDataOKif successful.
- Return type:
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
BFICConfigdataclass, a dict, or a JSON string.- Returns:
RetDataOKif successful.ERROR_INVALID_PARAMETERif config format is invalid.
- Return type:
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:
RetDataOKif successful.ERROR_INVALID_PARAMETERif polar or rf_mode value is invalid.
- Return type:
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.
- checkFWVersion(min_version: VER, msg: str = '') RetType
Check if the current firmware version is greater than or equal to the minimum required version.
- 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.
- getDFUSupport()
Check if the device supports Device Firmware Upgrade (DFU).
- 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.
OK: If the DFU process completes successfully.ERROR_METHOD_NOT_SUPPORT: If DFU is not supported on the device.ERROR_DFU: If the DFU process encounters an error.
- Return type:
- queryFWVer()
Query FW version of the device.
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:
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.
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.
- 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:
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.
- queryStaticIP()
Query the static IP address of the device.
- Parameters:
sn (str) – The serial number of the device.
- Returns:
RetDatastr: Static IP of the device.
- Return type:
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.
- 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:
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.