Beamforming Series

BBoxOne (26/28/39GHz)

class tlkcore.tmydev.DevBBoxOne.BBoxOne(*parent)

Bases: BBox

exportDevLog(export_folder=PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/tmytek-tlkcore/checkouts/v2.3.0rc1'))

Dump device log and export to file

Parameters:

export_folder (str, optional) – The folder to export the log file to. Defaults to Utils.root.

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

getBeamGainList(polar=<POLARIZATION.DUAL: 3>)

Read all channel gain settings with current mode, returns float list

Parameters:

polar (_type_, optional) – Polarization. Defaults to POL.DUAL.

Returns:

RetData
  • list: list for attribute

Return type:

RetType

getBeamPhaseList(polar=<POLARIZATION.DUAL: 3>)

Read all channel phase settings with current mode, returns int list

Parameters:

polar (_type_, optional) – Polarization. Defaults to POL.DUAL.

Returns:

RetData
  • list: list for attribute

Return type:

RetType

getBoardCount()

Get board numbers in device

Parameters:

sn (str) – Device SN

Returns:

RetData
  • int: The total board count of device

Return type:

RetType

getChannelCount(inBoard=False)

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

Parameters:
  • sn (str) – Device SN

  • bool (Optional) – Get count in one board

Returns:

RetData
  • int: The channel count of device

Return type:

RetType

getChannelSwitch(mode: RFMode | CellRFMode | int, polar: POLARIZATION | int = None, chain=1)

Read all channel DISABLE settings by the specific mode. It’s also the same func with ReadChannelSwitchValues() in old API

Parameters:
  • sn (str) – Device SN

  • rf_mode (RFMode) – RF mode

Returns:

RetData

-int[][]: Disable settings for all channels.

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'
getFastParallelMode()

Get fast parallel mode and external SPI status.

Returns:

Fast parallel mode and external SPI enable/disable

Return type:

bool

getOperatingFreq()

Get current operating frequency

Returns:

RetData
  • float: The current operating frequency.

Return type:

RetType

getRFMode()

Only get RF mode from TLKCore after called setRFMode() before, not support fetch from device currently.

Returns:

RetData

Return type:

RetType

Examples

Get the current RF mode of the device:
>>> device = BBox("D2123E001-28", "192.168.100.121", 9)
>>> device.setRFMode(RFMode.TX)  # Set the RF mode first
>>> rf_mode = device.getRFMode().RetData
>>> print(f"Current RF Mode: {rf_mode.name}")
getTemperatureADC()

Get temperature adc value from device

Parameters:

sn (str) – Device SN

Returns:

RetData
  • int[]: Board ADC

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.

>>> device = BBox("D2123E001-28", "192.168.100.121", 9)
>>> hw_version = device.queryHWVer()
>>> print(f"Hardware Version: {hw_version.RetData}")
Returns:

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

Return type:

RetType

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

>>> device = BBox("D2123E001-28", "192.168.100.121", 9)
>>> mac_address = device.queryMAC()
>>> print(f"MAC Address: {mac_address.RetData}")
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()

getTemperatureParams() in old API

Parameters:

sn (str) – Device SN

Returns:

TC config with list format, each board includes [TXC,TXQ,RXC,RXQ]

Return type:

int[][][] as list

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

selectAAKit(kitName)

Set operating AAkit by AAKitName for device with AAKit name.

Parameters:

kitName (str) – The name of the AA kit to select.

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

setBeamAngle(gain_db, theta, phi, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, mode=None)

Set the specific beam angle with (gain_db, theta, phi) for the device. gain_db range is from DR(-xxx ~ +ooo), theta range is mapping to spacing of AAKit, phase_deg range is 0-359

Parameters:
  • sn (str) – Device SN

  • gain_db (float) – Gain settings.

  • theta (int) – Theta angle.

  • phi (int) – Phi angle.

  • rf_mode (RFMode) – RF mode.

  • polar (Union[POLARIZATION, int]) – Polarization. Defaults to DUAL.

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

Examples

Set a specific beam angle using the service:
>>> sn = "D2123E001-28"  # Serial number of the device
>>> gain_db = 10.0  # Gain setting
>>> theta = 30  # Theta angle
>>> phi = 45  # Phi angle
>>> polar = 1  # Polarization (1 for horizontal, 2 for vertical, or POL.DUAL for both)
>>> service.setBeamAngle(sn, gain_db=gain_db, theta=theta, phi=phi, polar=polar)
setChannelGainPhase(channel: int, gain_db: float | list, phase_deg: float | list, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, board: int = -1, applySetting=True)

Set Gain and Phase setting for the specific channel or ALL channels board/channel usually starts from 1 (0 means ALL channels), gain_db range is from DR, phase_deg range is 0-359

Parameters:
  • channel (int) – channel number starts from 1, it can also below with the board.

  • gain_db (Union[float, list]) – gain with db

  • phase_deg (Union[float, list]) – phase with degree

  • polar (Union[POLARIZATION, int], optional) – polarization. Defaults to POL.DUAL.

  • board (int) – The board number starts from 1. Defaults to -1

  • applySetting (bool, optional) – Batch apply for WEBTLK. Defaults to True.

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

Warning

If you only set the gain for a single channel and its difference from the other channels exceeds the allowable limit (element gain), an error might occur.

Changed in version v2.1.0: polar added for multi-polarization beamformer device

Warning

DO NOT set all channel iteratively

setFastParallelMode(toEnable: bool)

Set fast parallel mode and external SPI enable or not. It’s also the same func with Set_Fast_Parallel_Mode() in old API

Parameters:

toEnable (bool) – A flag to enable or disable fast parallel mode and external SPI.

Returns:

An object containing the result of the operation.
  • OK: If the operation is successful.

  • ERROR_FW_NOT_SUPPORT: If the firmware version does not support this feature.

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

Return type:

RetType

setIcChannelGain(board: int, ch_gain: list, common_gain=None, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, applySetting=True)

Set Gain settings for all channels in the specific board/IC.

Parameters:
  • board (int) – board number, starts from 1, and 0 means for all boards

  • ch_gain (list) – channel gain list, and there are 4 items

  • common_gain (float, optional) – common gain is a gain base within 4 channels in one board. Defaults to None.

  • polar (Union[POLARIZATION, int]) – polarization. Defaults to DUAL.

  • applySetting (bool, optional) – batch apply and it used by WEBTLK. Defaults to True.

Return type:

RetType

Changed in version v2.1.0: polar added for multi polarization beamform device

setOperatingFreq(freq: int | float)

Set freq and reload cali/beam tables

Parameters:
  • sn (str) – Device SN

  • freq (float) – Frequency point

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

setRFMode(mode: RFMode | CellRFMode | int, slots: list = None)

Set 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

setStaticIP(ip, reboot=False)

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 False.

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)
switchChannel(channel, disable: bool, board=-1)

Disable the specific channel power or not, the board/channel must start from 1. Or disable ALL channels if channel sets 0. It’s also the same func with switchChannelPower() in old API

Parameters:
  • sn (str) – Device SN

  • int – Channel number

  • bool (Optional) – disable or not

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:
>>> sn = "D2123E001-28"  # Serial number of the device
>>> channel = 2  # Channel number starts from 1
>>> board = 1  # Board number starts from 1
>>> service.switchChannel(sn, channel=channel, disable=True, board=board)

BBoxLite (26/28/39GHz)

class tlkcore.tmydev.DevBBoxLite.BBoxLite(*parent)

Bases: BBox

exportDevLog(export_folder=PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/tmytek-tlkcore/checkouts/v2.3.0rc1'))

Dump device log and export to file

Parameters:

export_folder (str, optional) – The folder to export the log file to. Defaults to Utils.root.

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

getBeamGainList(polar=<POLARIZATION.DUAL: 3>)

Read all channel gain settings with current mode, returns float list

Parameters:

polar (_type_, optional) – Polarization. Defaults to POL.DUAL.

Returns:

RetData
  • list: list for attribute

Return type:

RetType

getBeamPhaseList(polar=<POLARIZATION.DUAL: 3>)

Read all channel phase settings with current mode, returns int list

Parameters:

polar (_type_, optional) – Polarization. Defaults to POL.DUAL.

Returns:

RetData
  • list: list for attribute

Return type:

RetType

getBoardCount()

Get board numbers in device

Parameters:

sn (str) – Device SN

Returns:

RetData
  • int: The total board count of device

Return type:

RetType

getChannelCount(inBoard=False)

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

Parameters:
  • sn (str) – Device SN

  • bool (Optional) – Get count in one board

Returns:

RetData
  • int: The channel count of device

Return type:

RetType

getChannelSwitch(mode: RFMode | CellRFMode | int, polar: POLARIZATION | int = None, chain=1)

Read all channel DISABLE settings by the specific mode. It’s also the same func with ReadChannelSwitchValues() in old API

Parameters:
  • sn (str) – Device SN

  • rf_mode (RFMode) – RF mode

Returns:

RetData

-int[][]: Disable settings for all channels.

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'
getFastParallelMode()

Get fast parallel mode and external SPI status.

Returns:

Fast parallel mode and external SPI enable/disable

Return type:

bool

getOperatingFreq()

Get current operating frequency

Returns:

RetData
  • float: The current operating frequency.

Return type:

RetType

getRFMode()

Only get RF mode from TLKCore after called setRFMode() before, not support fetch from device currently.

Returns:

RetData

Return type:

RetType

Examples

Get the current RF mode of the device:
>>> device = BBox("D2123E001-28", "192.168.100.121", 9)
>>> device.setRFMode(RFMode.TX)  # Set the RF mode first
>>> rf_mode = device.getRFMode().RetData
>>> print(f"Current RF Mode: {rf_mode.name}")
getTemperatureADC()

Get temperature adc value from device

Parameters:

sn (str) – Device SN

Returns:

RetData
  • int[]: Board ADC

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.

>>> device = BBox("D2123E001-28", "192.168.100.121", 9)
>>> hw_version = device.queryHWVer()
>>> print(f"Hardware Version: {hw_version.RetData}")
Returns:

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

Return type:

RetType

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

>>> device = BBox("D2123E001-28", "192.168.100.121", 9)
>>> mac_address = device.queryMAC()
>>> print(f"MAC Address: {mac_address.RetData}")
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()

getTemperatureParams() in old API

Parameters:

sn (str) – Device SN

Returns:

TC config with list format, each board includes [TXC,TXQ,RXC,RXQ]

Return type:

int[][][] as list

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

selectAAKit(kitName)

Set operating AAkit by AAKitName for device with AAKit name.

Parameters:

kitName (str) – The name of the AA kit to select.

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

setBeamAngle(gain_db, theta, phi, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, mode=None)

Set the specific beam angle with (gain_db, theta, phi) for the device. gain_db range is from DR(-xxx ~ +ooo), theta range is mapping to spacing of AAKit, phase_deg range is 0-359

Parameters:
  • sn (str) – Device SN

  • gain_db (float) – Gain settings.

  • theta (int) – Theta angle.

  • phi (int) – Phi angle.

  • rf_mode (RFMode) – RF mode.

  • polar (Union[POLARIZATION, int]) – Polarization. Defaults to DUAL.

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

Examples

Set a specific beam angle using the service:
>>> sn = "D2123E001-28"  # Serial number of the device
>>> gain_db = 10.0  # Gain setting
>>> theta = 30  # Theta angle
>>> phi = 45  # Phi angle
>>> polar = 1  # Polarization (1 for horizontal, 2 for vertical, or POL.DUAL for both)
>>> service.setBeamAngle(sn, gain_db=gain_db, theta=theta, phi=phi, polar=polar)
setChannelGainPhase(channel: int, gain_db: float | list, phase_deg: float | list, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, board: int = -1, applySetting=True)

Set Gain and Phase setting for the specific channel or ALL channels board/channel usually starts from 1 (0 means ALL channels), gain_db range is from DR, phase_deg range is 0-359

Parameters:
  • channel (int) – channel number starts from 1, it can also below with the board.

  • gain_db (Union[float, list]) – gain with db

  • phase_deg (Union[float, list]) – phase with degree

  • polar (Union[POLARIZATION, int], optional) – polarization. Defaults to POL.DUAL.

  • board (int) – The board number starts from 1. Defaults to -1

  • applySetting (bool, optional) – Batch apply for WEBTLK. Defaults to True.

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

Warning

If you only set the gain for a single channel and its difference from the other channels exceeds the allowable limit (element gain), an error might occur.

Changed in version v2.1.0: polar added for multi-polarization beamformer device

Warning

DO NOT set all channel iteratively

setFastParallelMode(toEnable: bool)

Set fast parallel mode and external SPI enable or not. It’s also the same func with Set_Fast_Parallel_Mode() in old API

Parameters:

toEnable (bool) – A flag to enable or disable fast parallel mode and external SPI.

Returns:

An object containing the result of the operation.
  • OK: If the operation is successful.

  • ERROR_FW_NOT_SUPPORT: If the firmware version does not support this feature.

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

Return type:

RetType

setIcChannelGain(board: int, ch_gain: list, common_gain=None, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, applySetting=True)

Set Gain settings for all channels in the specific board/IC.

Parameters:
  • board (int) – board number, starts from 1, and 0 means for all boards

  • ch_gain (list) – channel gain list, and there are 4 items

  • common_gain (float, optional) – common gain is a gain base within 4 channels in one board. Defaults to None.

  • polar (Union[POLARIZATION, int]) – polarization. Defaults to DUAL.

  • applySetting (bool, optional) – batch apply and it used by WEBTLK. Defaults to True.

Return type:

RetType

Changed in version v2.1.0: polar added for multi polarization beamform device

setOperatingFreq(freq: int | float)

Set freq and reload cali/beam tables

Parameters:
  • sn (str) – Device SN

  • freq (float) – Frequency point

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

setRFMode(mode: RFMode | CellRFMode | int, slots: list = None)

Set 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

setStaticIP(ip, reboot=False)

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 False.

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)
switchChannel(channel, disable: bool, board=-1)

Disable the specific channel power or not, the board/channel must start from 1. Or disable ALL channels if channel sets 0. It’s also the same func with switchChannelPower() in old API

Parameters:
  • sn (str) – Device SN

  • int – Channel number

  • bool (Optional) – disable or not

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:
>>> sn = "D2123E001-28"  # Serial number of the device
>>> channel = 2  # Channel number starts from 1
>>> board = 1  # Board number starts from 1
>>> service.switchChannel(sn, channel=channel, disable=True, board=board)

BBoard (26/28/39GHz)

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

Bases: BBox

exportDevLog(export_folder=PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/tmytek-tlkcore/checkouts/v2.3.0rc1'))

Dump device log and export to file

Parameters:

export_folder (str, optional) – The folder to export the log file to. Defaults to Utils.root.

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

getBeamGainList(polar=<POLARIZATION.DUAL: 3>)

Read all channel gain settings with current mode, returns float list

Parameters:

polar (_type_, optional) – Polarization. Defaults to POL.DUAL.

Returns:

RetData
  • list: list for attribute

Return type:

RetType

getBeamPhaseList(polar=<POLARIZATION.DUAL: 3>)

Read all channel phase settings with current mode, returns int list

Parameters:

polar (_type_, optional) – Polarization. Defaults to POL.DUAL.

Returns:

RetData
  • list: list for attribute

Return type:

RetType

getBoardCount()

Get board numbers in device

Parameters:

sn (str) – Device SN

Returns:

RetData
  • int: The total board count of device

Return type:

RetType

getChannelCount(inBoard=False)

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

Parameters:
  • sn (str) – Device SN

  • bool (Optional) – Get count in one board

Returns:

RetData
  • int: The channel count of device

Return type:

RetType

getChannelSwitch(mode: RFMode | CellRFMode | int, polar: POLARIZATION | int = None, chain=1)

Read all channel DISABLE settings by the specific mode. It’s also the same func with ReadChannelSwitchValues() in old API

Parameters:
  • sn (str) – Device SN

  • rf_mode (RFMode) – RF mode

Returns:

RetData

-int[][]: Disable settings for all channels.

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'
getFastParallelMode()

Get fast parallel mode and external SPI status.

Returns:

Fast parallel mode and external SPI enable/disable

Return type:

bool

getOperatingFreq()

Get current operating frequency

Returns:

RetData
  • float: The current operating frequency.

Return type:

RetType

getRFMode()

Only get RF mode from TLKCore after called setRFMode() before, not support fetch from device currently.

Returns:

RetData

Return type:

RetType

Examples

Get the current RF mode of the device:
>>> device = BBox("D2123E001-28", "192.168.100.121", 9)
>>> device.setRFMode(RFMode.TX)  # Set the RF mode first
>>> rf_mode = device.getRFMode().RetData
>>> print(f"Current RF Mode: {rf_mode.name}")
getTemperatureADC()

Get temperature adc value from device

Parameters:

sn (str) – Device SN

Returns:

RetData
  • int[]: Board ADC

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.

>>> device = BBox("D2123E001-28", "192.168.100.121", 9)
>>> hw_version = device.queryHWVer()
>>> print(f"Hardware Version: {hw_version.RetData}")
Returns:

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

Return type:

RetType

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

>>> device = BBox("D2123E001-28", "192.168.100.121", 9)
>>> mac_address = device.queryMAC()
>>> print(f"MAC Address: {mac_address.RetData}")
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()

getTemperatureParams() in old API

Parameters:

sn (str) – Device SN

Returns:

TC config with list format, each board includes [TXC,TXQ,RXC,RXQ]

Return type:

int[][][] as list

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

selectAAKit(kitName)

Set operating AAkit by AAKitName for device with AAKit name.

Parameters:

kitName (str) – The name of the AA kit to select.

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

setBeamAngle(gain_db, theta, phi, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, mode=None)

Set the specific beam angle with (gain_db, theta, phi) for the device. gain_db range is from DR(-xxx ~ +ooo), theta range is mapping to spacing of AAKit, phase_deg range is 0-359

Parameters:
  • sn (str) – Device SN

  • gain_db (float) – Gain settings.

  • theta (int) – Theta angle.

  • phi (int) – Phi angle.

  • rf_mode (RFMode) – RF mode.

  • polar (Union[POLARIZATION, int]) – Polarization. Defaults to DUAL.

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

Examples

Set a specific beam angle using the service:
>>> sn = "D2123E001-28"  # Serial number of the device
>>> gain_db = 10.0  # Gain setting
>>> theta = 30  # Theta angle
>>> phi = 45  # Phi angle
>>> polar = 1  # Polarization (1 for horizontal, 2 for vertical, or POL.DUAL for both)
>>> service.setBeamAngle(sn, gain_db=gain_db, theta=theta, phi=phi, polar=polar)
setChannelGainPhase(channel: int, gain_db: float | list, phase_deg: float | list, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, board: int = -1, applySetting=True)

Set Gain and Phase setting for the specific channel or ALL channels board/channel usually starts from 1 (0 means ALL channels), gain_db range is from DR, phase_deg range is 0-359

Parameters:
  • channel (int) – channel number starts from 1, it can also below with the board.

  • gain_db (Union[float, list]) – gain with db

  • phase_deg (Union[float, list]) – phase with degree

  • polar (Union[POLARIZATION, int], optional) – polarization. Defaults to POL.DUAL.

  • board (int) – The board number starts from 1. Defaults to -1

  • applySetting (bool, optional) – Batch apply for WEBTLK. Defaults to True.

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

Warning

If you only set the gain for a single channel and its difference from the other channels exceeds the allowable limit (element gain), an error might occur.

Changed in version v2.1.0: polar added for multi-polarization beamformer device

Warning

DO NOT set all channel iteratively

setChannelGainStep(channel, gain_step, board=-1)

Set the specific channel gain step

Parameters:
  • channel (int) – The channel number.

  • gain_step (float) – The gain step value.

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

Returns:

An object containing the result of the operation.
  • OK: If the operation is successful.

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

Return type:

RetType

setChannelPhaseStep(channel, phase_step, board=-1)

Set the specific channel phase step

Parameters:
  • channel (int) – The channel number.

  • phase_step (float) – The phase step value.

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

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

setComGainStep(gain_step, board=-1)

Set the specific board common-arm gain with the common-arm gain step.

Parameters:
  • gain_step (float) – The common-arm gain step value.

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

Returns:

An object containing the result of the operation.
  • OK: If the operation is successful.

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

Return type:

RetType

setFastParallelMode(toEnable: bool)

Set fast parallel mode and external SPI enable or not. It’s also the same func with Set_Fast_Parallel_Mode() in old API

Parameters:

toEnable (bool) – A flag to enable or disable fast parallel mode and external SPI.

Returns:

An object containing the result of the operation.
  • OK: If the operation is successful.

  • ERROR_FW_NOT_SUPPORT: If the firmware version does not support this feature.

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

Return type:

RetType

setIcChannelGain(board: int, ch_gain: list, common_gain=None, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, applySetting=True)

Set Gain settings for all channels in the specific board/IC.

Parameters:
  • board (int) – board number, starts from 1, and 0 means for all boards

  • ch_gain (list) – channel gain list, and there are 4 items

  • common_gain (float, optional) – common gain is a gain base within 4 channels in one board. Defaults to None.

  • polar (Union[POLARIZATION, int]) – polarization. Defaults to DUAL.

  • applySetting (bool, optional) – batch apply and it used by WEBTLK. Defaults to True.

Return type:

RetType

Changed in version v2.1.0: polar added for multi polarization beamform device

setOperatingFreq(freq: int | float)

Set freq and reload cali/beam tables

Parameters:
  • sn (str) – Device SN

  • freq (float) – Frequency point

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

setRFMode(mode: RFMode | CellRFMode | int, slots: list = None)

Set 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

setStaticIP(ip, reboot=False)

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 False.

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)
setTCConfig(config: list, board=1)

Set temperature compensation parameters via _setTCChainConfig(). The config list should be in the order of [TXC, TXQ, RXC, RXQ]. The TXC and TXQ are the temperature compensation parameters for TX and RX channels respectively.

Parameters:
  • config (list) – The temperature compensation parameters.

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

Returns:

The result of the operation.

Return type:

RetType

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

Disable the specific channel power or not, the board/channel must start from 1. Or disable ALL channels if channel sets 0. It’s also the same func with switchChannelPower() in old API

Parameters:
  • sn (str) – Device SN

  • int – Channel number

  • bool (Optional) – disable or not

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:
>>> sn = "D2123E001-28"  # Serial number of the device
>>> channel = 2  # Channel number starts from 1
>>> board = 1  # Board number starts from 1
>>> service.switchChannel(sn, channel=channel, disable=True, board=board)

CloverCell (28GHz)

class tlkcore.tmydev.DevCloverCell.CloverCellEvb(*parent)

Bases: CloverCell

EVB: 2x2 28GHz

exportDevLog(export_folder=PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/tmytek-tlkcore/checkouts/v2.3.0rc1'))

Dump device log and export to file

Parameters:

export_folder (str, optional) – The folder to export the log file to. Defaults to Utils.root.

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

getBeamGainList(polar=<POLARIZATION.DUAL: 3>)

Read all channel gain settings with current mode, returns float list

Parameters:

polar (_type_, optional) – Polarization. Defaults to POL.DUAL.

Returns:

RetData
  • list: list for attribute

Return type:

RetType

getBeamPhaseList(polar=<POLARIZATION.DUAL: 3>)

Read all channel phase settings with current mode, returns int list

Parameters:

polar (_type_, optional) – Polarization. Defaults to POL.DUAL.

Returns:

RetData
  • list: list for attribute

Return type:

RetType

getBoardCount()

Get board numbers in device

Parameters:

sn (str) – Device SN

Returns:

RetData
  • int: The total board count of device

Return type:

RetType

getChannelCount(inBoard=False)

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

Parameters:
  • sn (str) – Device SN

  • bool (Optional) – Get count in one board

Returns:

RetData
  • int: The channel count of device

Return type:

RetType

getChannelSwitch(mode: RFMode | CellRFMode | int, polar: POLARIZATION | int = None, chain=1)

Read all channel DISABLE settings by the specific mode. It’s also the same func with ReadChannelSwitchValues() in old API

Parameters:
  • sn (str) – Device SN

  • rf_mode (RFMode) – RF mode

Returns:

RetData

-int[][]: Disable settings for all channels.

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'
getFastParallelMode()

Get fast parallel mode and external SPI status.

Returns:

Fast parallel mode and external SPI enable/disable

Return type:

bool

getOperatingConfig(mode: CellRFMode | int)
Get current operating register config, it returns current config of the whole module

maybe rename to getChainConfig()

Parameters:

mode (Union[CellRFMode, int]) – The RF mode to apply or query. It can be an instance of CellRFMode or an integer. - CellRFMode.TX: Transmit mode. - CellRFMode.RX: Receive mode. - CellRFMode.STANDBY: Standby mode.

Returns:

RetData
  • dict: all current operating register config, format will be {HORIZON: {DISABLE:[], GAIN:[], COM_STEP:int, PHASE:[]}}

Return type:

RetType

getOperatingFreq()

Get current operating frequency

Returns:

RetData
  • float: The current operating frequency.

Return type:

RetType

getOperatingStatus()

Get IC operating Status with H/V pdet, temperature and power consumption

Returns:

RetData
  • dict: IC operating Status with H/V pdet, temperature and power consumption

Return type:

RetType

getPolarSynthesis()

Retrieve the current delta phase for polarization synthesis.

Returns:

An object containing the delta phase data.

Return type:

RetType

getPolarSynthesisName()

Retrieve the name corresponding to the current delta phase for polarization synthesis.

Returns:

An object containing the name of the delta phase or “Unknown” if not found.

Return type:

RetType

getRFMode()

Only get RF mode from TLKCore after called setRFMode() before, not support fetch from device currently.

Returns:

RetData

Return type:

RetType

getTemperatureADC()

Get temperature adc value from device

Parameters:

sn (str) – Device SN

Returns:

RetData
  • int[]: Board ADC

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.

>>> device = BBox("D2123E001-28", "192.168.100.121", 9)
>>> hw_version = device.queryHWVer()
>>> print(f"Hardware Version: {hw_version.RetData}")
Returns:

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

Return type:

RetType

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

>>> device = BBox("D2123E001-28", "192.168.100.121", 9)
>>> mac_address = device.queryMAC()
>>> print(f"MAC Address: {mac_address.RetData}")
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()

getTemperatureParams() in old API

Parameters:

sn (str) – Device SN

Returns:

TC config with list format, each board includes [TXC,TXQ,RXC,RXQ]

Return type:

int[][][] as list

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

selectAAKit(kitName)

Set operating AAkit by AAKitName for device with AAKit name.

Parameters:

kitName (str) – The name of the AA kit to select.

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

setAllGainPhase(polar: POLARIZATION | int, common_gain=None, gain_db=None, phase_deg=None, applySetting=True)

Set ONE com/gain/phase to apply to all channels (for specific channel)

Parameters:
  • polar (Union[POL, int]) – The polarization type.

  • common_gain (float) – The common gain to apply to all channels.

  • gain_db (float) – The gain in dB to apply to all channels.

  • phase_deg (float) – The phase in degrees to apply to all channels.

  • applySetting (bool) – Whether to apply the settings immediately.

Return type:

RetType

setBeamAngle(gain_db, theta, phi, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, mode=None)

Set the specific beam angle with (gain_db, theta, phi) for the device. gain_db range is from DR(-xxx ~ +ooo), theta range is mapping to spacing of AAKit, phase_deg range is 0-359

Parameters:
  • sn (str) – Device SN

  • gain_db (float) – Gain settings.

  • theta (int) – Theta angle.

  • phi (int) – Phi angle.

  • rf_mode (RFMode) – RF mode.

  • polar (Union[POLARIZATION, int]) – Polarization. Defaults to DUAL.

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

Examples

Set a specific beam angle using the service:
>>> sn = "D2123E001-28"  # Serial number of the device
>>> gain_db = 10.0  # Gain setting
>>> theta = 30  # Theta angle
>>> phi = 45  # Phi angle
>>> polar = 1  # Polarization (1 for horizontal, 2 for vertical, or POL.DUAL for both)
>>> service.setBeamAngle(sn, gain_db=gain_db, theta=theta, phi=phi, polar=polar)
setChannelGainPhase(channel: int, gain_db: float | list, phase_deg: float | list, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, board: int = -1, applySetting=True)

Set Gain and Phase setting for the specific channel or ALL channels board/channel usually starts from 1 (0 means ALL channels), gain_db range is from DR, phase_deg range is 0-359

Parameters:
  • channel (int) – channel number starts from 1, it can also below with the board.

  • gain_db (Union[float, list]) – gain with db

  • phase_deg (Union[float, list]) – phase with degree

  • polar (Union[POLARIZATION, int], optional) – polarization. Defaults to POL.DUAL.

  • board (int) – The board number starts from 1. Defaults to -1

  • applySetting (bool, optional) – Batch apply for WEBTLK. Defaults to True.

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

Warning

If you only set the gain for a single channel and its difference from the other channels exceeds the allowable limit (element gain), an error might occur.

Changed in version v2.1.0: polar added for multi-polarization beamformer device

Warning

DO NOT set all channel iteratively

setFastParallelMode(toEnable: bool)

Set fast parallel mode and external SPI enable or not. It’s also the same func with Set_Fast_Parallel_Mode() in old API

Parameters:

toEnable (bool) – A flag to enable or disable fast parallel mode and external SPI.

Returns:

An object containing the result of the operation.
  • OK: If the operation is successful.

  • ERROR_FW_NOT_SUPPORT: If the firmware version does not support this feature.

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

Return type:

RetType

setIcChannelGain(board: int, ch_gain: list, common_gain=None, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>, applySetting=True)

Set Gain settings for all channels in the specific board/IC.

Parameters:
  • board (int) – board number, starts from 1, and 0 means for all boards

  • ch_gain (list) – channel gain list, and there are 4 items

  • common_gain (float, optional) – common gain is a gain base within 4 channels in one board. Defaults to None.

  • polar (Union[POLARIZATION, int]) – polarization. Defaults to DUAL.

  • applySetting (bool, optional) – batch apply and it used by WEBTLK. Defaults to True.

Return type:

RetType

Changed in version v2.1.0: polar added for multi polarization beamform device

setIcComGain(polar: POLARIZATION | int, board: int, common_gain: float)

Set common gain for specific polarization and board/IC

Parameters:
  • polar (Union[POL, int]) – polarization

  • board (int) – board number, starts from 1, and 0 means for all boards

  • common_gain (float) – common gain is a gain base within 4 channels in one board

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

setOperatingFreq(freq: int | float)

Set freq and reload cali/beam tables

Parameters:
  • sn (str) – Device SN

  • freq (float) – Frequency point

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType

setPolarSynthesis(delta_phase)

For polarization synthesis, set delta phase from V-H, only workable if dual polarization

Parameters:

delta_phase (float) – The phase difference between vertical and horizontal polarization.

Return type:

RetType

setRFMode(mode: RFMode | CellRFMode | int, slots: list = None)

Set 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

setStaticIP(ip, reboot=False)

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 False.

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)
switchChannel(channel=0, disable: bool = False, polar: ~tlkcore.TMYPublic.POLARIZATION | int = <POLARIZATION.DUAL: 3>)

Disable the specific channel power or not, the board/channel must start from 1. Or disable ALL channels if channel sets 0.

Parameters:
  • sn (str) – Device SN

  • channel (int) – Channel number

  • disable (bool, optional) – Whether to disable the channel. Defaults to False.

  • polar (Union[POL, int], optional) – The polarization type. Defaults to POL.DUAL.

Returns:

RetCode
  • OK: If the operation is successful.

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

Return type:

RetType