qoitech/otii-tcp-client-python

Only Arcs' UART can be recorded via automation toolbox

Opened this issue · 2 comments

if device["type"] == "Arc":

When using automation toolbox, the returned devices using "get_devices" returns only arcs that are connected, not allowing to record other UARTs that are connected.
From the documentation, UART (external to the Arc) devices should be supported as well
https://www.qoitech.com/help/tcpserver/#otii_get_devices

image

Reproduction steps:

  • Connect a USB to UART device
  • Verify in the Otii project settings it can be enabled
  • Run something that searches for devices such as :
    def initialize_arc(self): self.connection = otii_connection.OtiiConnection(self.ip, self.port) self.connect_response = self.connection.connect_to_server() if self.connect_response["type"] == "error": print("Exit! Error code: " + self.connect_response["errorcode"] + ", Description: " + self.connect_response["data"][ "message"]) sys.exit() try: self.otii_object = otii.Otii(self.connection) self.devices = self.otii_object.get_devices() if len(self.devices) == 0: print("No Arc connected!") sys.exit() self.my_arc = self.devices[0] self.proj = self.check_create_project() print("Calibrating Arc") self.my_arc.calibrate() self.initialzied = True except otii_exception.Otii_Exception as e: print("Error message: " + e.message)

#7 should fix this bug

xnk commented

We had to solve the get_devices issue in a slightly different way due to the new Otii 3 software handling more device types, so there's now an optional device_filter that can be passed to get_devices, see 591838c