K
kazuya

  • Apr 15, 2024
  • Joined Feb 21, 2024
  • 0 best answers
  • SpudTheBot I got it to work with script below. Note that you need to run it in terminal that was run as Admin

    #!/usr/bin/python3.8 -u
    
    import time
    import os
    
    while True:
        output = os.popen('usbipd wsl list').read()
        rows = output.split('\n')
        for row in rows:
            if ('Movidius MyriadX' in row or 'Luxonis Device' in row) and 'Not attached' in row:
                busid = row.split(' ')[0]
                out = os.popen(f'usbipd wsl attach --busid {busid}').read()
                print(out)
                print(f'Usbipd attached Myriad X on bus {busid}')
        time.sleep(.5)