Hi,
I would like to know if there is a way to modify the USB pid value of an OAK-D device (in my case OAKD-W).
WHY:
In certain systems, the fact that the USB device profile changes when the device is started and closed generates some issues. Like WSL (Ref: https://discuss.luxonis.com/d/693-i-got-depthai-demo-to-run-in-wsl/4) or Android (even though it is not officially supported) with USB permissions.
WHAT I tried:
I have tried flashing a config with a new pid value to match the pid defined when the device starts (code below), but even though the config is flashed correctly, the device pid is not changed. Since the Device Manager example does not give the option to modify the pid, does it mean that it is not possible to modify it?
import depthai as dai
import json
# Create pipeline
pipeline = dai.Pipeline()
# Set board config
config = dai.DeviceBootloader.Config()
config.usb.pid = 0xf63b
(res, info) = dai.DeviceBootloader.getFirstAvailableDevice()
with dai.DeviceBootloader(info) as bootloader:
progress = lambda p : print(f'Flashing progress: {p*100:.1f}%')
(r, errmsg) = bootloader.flashConfig(config)
if r:
print("Flashed successfully")
else:
print(f"Error: {errmsg}")
(res, info) = dai.DeviceBootloader.getFirstAvailableDevice()
with dai.DeviceBootloader(info) as bootloader:
print('Current flashed configuration')
print(json.dumps(bootloader.readConfigData()))
On the other hand, is it possible to modify the pid value when the device starts? I have tried also something like this but with no luck either:
dai::BoardConfig boardConfig;
boardConfig.usb.pid = 0x03E7;
pipeline.setBoardConfig(boardConfig);
I have also looked checked about standalone app so that it will automatically boot and avoid having the pre-boot pid, but in my case, I want to get access to the data from the OAKD using the XLINKOut nodes, so I think it would be possible.
Do you have any suggestion to how I could solve the issue?
Thanks!