I want to be able to perform a reset of the Oak-D Pro under software control.

I am not talking about a factory reset. I would like to imitate the camera being power cycled. Now, before any one says to power cycle… Some of us have cameras in devices that are complex pieces of machinery and we cannot just go and turn the power off whenever we feel like it.

Thank you for any help.

Mark

  • jakaskerl replied to this.
  • Resetting the bus seems to work. Here is my script for doing this.
    # Ensure this is run from an administrator shell

    # Find the Oak-D Device

    $oakDevice = Get-PnpDevice | Where-Object {$_.FriendlyName -match "Movidius MyriadX"}

    # Find the Instance ID for the Oak-D camera

    $devID = ($oakDevice -split ' +')[5]

    # Disable the camera

    Disable-PnpDevice -InstanceId $devID -Confirm:$false

    # Wait for a bit.

    Start-Sleep -Seconds 5

    # Restart the device

    Enable-PnpDevice -InstanceId $devID -Confirm:$false

    MightyMaestro
    You can try unbinding/rebinding the USB under /sys/bus/usb/drivers/usb this should cut power to the device. Similar can be done on Windows if you disable and reenable the device afaik.

    Thanks,
    Jaka

    Resetting the bus seems to work. Here is my script for doing this.
    # Ensure this is run from an administrator shell

    # Find the Oak-D Device

    $oakDevice = Get-PnpDevice | Where-Object {$_.FriendlyName -match "Movidius MyriadX"}

    # Find the Instance ID for the Oak-D camera

    $devID = ($oakDevice -split ' +')[5]

    # Disable the camera

    Disable-PnpDevice -InstanceId $devID -Confirm:$false

    # Wait for a bit.

    Start-Sleep -Seconds 5

    # Restart the device

    Enable-PnpDevice -InstanceId $devID -Confirm:$false