Nordic Power Profiler Kit 2 (nrf-PPK2) Enumerates 2 Ports For A Single Device On Raspberry Pi

Hello,

I am trying to control a PPK2 using my Raspberry Pi 3B+ running a 64-bit image of the Raspberry Pi OS (Debian Bookworm port) and I've been using python (v3.9) with the ppk2-api library (v0.9.2). Unfortunately, there are two serial ports that are enumerated but only one of them gives me full control over the device. I've queried all the serial port identifiers using pyserial, pyusb, and udev but every identifier is the same for the two ports besides the port location. I've also used a laptop running Windows 11 and verified that only a single port is enumerated which functions as expected.

from ppk2_api.ppk2_api import PPK2_API
ppk2s_connected = PPK2_API.list_devices()
print(ppk2s_connected)

The code block above returns ["COM4"] on the Windows laptop and ["/dev/ttyACM0", "/dev/ttyACM1"] on a Raspberry Pi 3B+ and Raspberry Pi 4 running the previously mentioned Debian Bookworm port OS. The user seems to be able to access all device functionalities on the first enumerated port (/dev/ttyACM0) but not on the second port (/dev/ttyACM1). For example:

import time

from ppk2_api.ppk2_api import PPK2_MP

def test_ppk_dut_power(port: str) -> None:
    device = PPK2_MP(port=port)
    device.toggle_DUT_power("ON")
    time.sleep(10)
    device.toggle_DUT_power("OFF")
    
def test_ppk_voltage_change(port: str, voltage: float) -> None:
    device = PPK2_MP(port=port)
    device.set_source_voltage(int(voltage*1000))
    device.toggle_DUT_power("ON")
    time.sleep(10)
    device.toggle_DUT_power("OFF")

If the user executes these two methods using "/dev/ttyACM0" as the port value then the expected events will occur (DUT will turn on/off, output voltage will change to desired value) but if using "dev/ttyACM1" as the port value then the user will not be able to change the output voltage value even though they will be able to toggle the DUT power. It is worth noting that no errors/exceptions are raised when the program attempts to change the voltage value with port value set to "dev/ttyACM1" so as far as the user knows, the operation executed successfully. I was able to catch this error by connecting a voltage meter to my DUT and monitoring the voltage when port value was set to "dev/ttyACM1" instead of "dev/ttyACM0".

Related