BBoard (26/28/39GHz)

class tlkcore.tmydev.DevBBoard.BBoard(*parent)

Bases: BBox

BBoard, a simple beamforming device but only provide basic functionalities.

This class inherits from BBox but disables many advanced features to provide a simplified interface suitable for basic beamforming operations.

Disabled features include: - Calibration table management - Antenna array kit management - Advanced beam pattern operations - Complex channel gain/phase settings

Supported operations: - Basic channel phase/gain step control - Temperature compensation configuration - Common gain step control

classmethod get_disabled_methods() tuple

Get the list of methods that are disabled in this class.

Returns:

Tuple of disabled method names

classmethod is_method_disabled(method_name: str) bool

Check if a specific method is disabled in this class.

Parameters:

method_name – Name of the method to check

Returns:

True if method is disabled, False otherwise

setTCConfig(config: list, board: int = 1)

Set temperature compensation (TC) parameters if dynamic TC disabled, and the config list should be in the order of [TXC, TXQ, RXC, RXQ].

Note

The TXC and TXQ are the common/element gain attenuation for TX channels respectively. TX/RX C contributes about 1dB gain, and TX/RX Q contributes about 0.5 dB gain, step range is 0-31.

Parameters:
  • config (list) – The TC parameters include [TXC, TXQ, RXC, RXQ] with range from 0 to 31.

  • board (int, optional) – The board number. Defaults to 1.

Return type:

RetType

Examples

>>> service.setTCConfig(sn, [8, 6, 2, 9])
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

exportDevLog(export_folder='.')

Dump device log and export to file

Parameters:

export_folder (str, optional) – The folder to export the log file to. Defaults to current execute directory: “.”

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

getBoardCount()

Get total number of RF boards/ICs in device

Returns:

RetData
  • int: The number of RF boards/ICs in device

Return type:

RetType

Examples

  • Get from BBoxOne
    >>> count = service.getBoardCount(sn).RetData
    >>> print(count)
    4
    
  • Get from BBoxLite
    >>> count = service.getBoardCount(sn).RetData
    >>> print(count)
    1
    
getChannelCount(inBoard=False)

Get total number of channel in device (or in one RF board)

Parameters:

inBoard (bool, optional) – If True, get channel count in one board. Defaults to False.

Returns:

RetData
  • int: The channel count of device

Return type:

RetType

Examples

  • Get total number of channel
    >>> count = service.getChannelCount(sn).RetData
    >>> print(count)
    16
    
  • Get total number of channel in Board/IC
    >>> count = service.getChannelCount(sn, inBoard=True).RetData
    >>> print(count)
    4
    
getChannelSwitch(mode: RFMode | CellRFMode | int, polar: POLARIZATION | int = None, chain=1)

Retrieve all channel disable settings for the specific RF mode.

Note

0 is channel enabled, 1 is channel disabled

Parameters:
  • mode (Union[RFMode, CellRFMode, int]) – The operating mode, e.g., Tx, Rx.

  • polar (Union[POLARIZATION, int], optional) – Polarization configuration for CloverCell. Defaults to None.

Returns:

RetData
  • list: Disable settings for all channels in double list with 0 or 1.

Return type:

RetType

Examples

  • BBox series, BBoard gets switch status under TX mode
    >>> dis_list = service.getChannelSwitch(sn, RFMode.TX).RetData
    >>> print(dis_list)
    [[0, 0, 0, 0]]
    
  • CloverCell series (dual polarization) gets switch status under TX mode and H plane
    >>> dis_list = service.getChannelSwitch(sn, CellRFMode.TX, POLARIZATION.HORIZON).RetData
    >>> print(dis_list)
    [[0, 0, 0, 0]]
    
  • CloverCell series (dual polarization) gets switch status under RX mode and H/V plane
    >>> dis_list = service.getChannelSwitch(sn, CellRFMode.RX, POLARIZATION.DUAL).RetData
    >>> print(dis_list)
    [[0, 0, 0, 0], [1, 1, 1, 1]]
    
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'
getRFMode()

Get the current RF mode which stored in TLKCore.

Note

Must called setRFMode() before getting RF mode.

Todo

Directly fetch current RF mode from device.

Returns:

RetData

Return type:

RetType

Examples

  • Get the current RF mode of the device:
    >>> service.setRFMode(sn, RFMode.TX)  # Set the RF mode first
    >>> rf_mode = service.getRFMode(sn).RetData
    >>> print(rf_mode.name)
    TX
    
getTemperatureADC()

Retrieve all temperature ADC value from each Board/IC of device

Returns:

RetData
  • list: includes all temperature ADC integer values

Return type:

RetType

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
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
queryTCConfig()

Query dynamic temperature compensation (TC) configuration from device, and the config list should be in the order of [TXC, TXQ, RXC, RXQ].

Note

The TXC and TXQ are the common/element gain attenuation for TX channels respectively. TX/RX C contributes about 1dB gain, and TX/RX Q contributes about 0.5 dB gain, step range is 0-31.

Returns:

RetCode
  • list: TC config with trible list format, each board/IC includes [TXC,TXQ,RXC,RXQ]

Return type:

RetType

Examples

>>> service.queryTCConfig(sn)
[[[8, 6, 2, 11]]]
queryTCEnable()

Query dynamic temperature compensation (TC) enable status from device.

Returns:

RetData
  • int: 1 if dynamic TC is enabled, 0 if not enabled.

Return type:

RetType

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

setChannelGainStep(channel: int, gain_step: int, board: int = -1)

Set gain step for specific channel

Note

The step range is 0-15, and represent ~0.5 dB attenuation for each step increased.

Parameters:
  • channel (int) – The channel number of BBoard, the range is 1-4.

  • gain_step (int) – The gain step value, the range is 0-31.

  • board (int, optional) – The board number. Defaults to -1.

Return type:

RetType

Examples

>>> ch = 3
>>> gs = 32
>>> service.setChannelGainStep(sn, ch, gs, board)
setChannelPhaseStep(channel: int, phase_step: int, board: int = -1)

Set phase step for specific channel

Parameters:
  • channel (int) – The channel number of BBoard, the range is 1-4.

  • phase_step (int) – The phase step value, the range is 0-63.

  • board (int, optional) – The board number. Defaults to -1.

Return type:

RetType

Examples

>>> ch = 1
>>> ps = 32
>>> service.setChannelPhaseStep(sn, ch, ps, board)
setComGainStep(gain_step: int, board: int = -1)

Set common gain step to the BBoard

Note

The step range is 0-15, and represent ~1 dB attenuation for each step increased.

Parameters:
  • gain_step (int) – The common-arm gain step value within 4 channels.

  • board (int, optional) – The board number. Defaults to -1.

Return type:

RetType

Examples

>>> cgs = 14
>>> service.setComGainStep(sn, cgs, board)
setRFMode(mode: RFMode | CellRFMode | int, slots: list = None)

Set target RF mode to device

Parameters:

mode (Union[RFMode, CellRFMode, int]) – Target RF mode

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

Examples

>>> service.setRFMode(sn, RFMode.TX)
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.

switchChannel(channel, disable: bool, board=-1)

Disable/enable the specific channel power or not for the current RF mode (set from setRFMode()).

Note

Disable/enable ALL channels if channel field sets 0.

Parameters:
  • channel (int) – Channel number, range is starts from 1 to the result of getChannelCount().

  • disable (bool, optional) – disable or not

  • board (int, optional) – The board/IC number starts from 1 to the result of getBoardCount(). Defaults to -1, which means all board/ICs.

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

Examples

  • Disable a specific channel on a specific board/IC:
    >>> channel = 2  # Channel number starts from 1
    >>> board = 1  # Board/IC number starts from 1
    >>> service.switchChannel(sn, channel, True, board)