How to pass multiple driver ids to HardwareScan() parameter HardwareDriverIds?

Hello,

private string DetectHardwareDriverPath(RecordingServer rs, string url, string user, string pass, string driver)
        {
            var driverIds = String.Empty;
            if (!String.IsNullOrWhiteSpace(driver) && driver != "auto")
            {
                driver = driver.ToLower();
                var drivers = rs.HardwareDriverFolder.HardwareDrivers.Where(d => d.Name.ToLower().Contains(driver)).Select(d => d.Number.ToString());
                driverIds = String.Join(",", drivers);
            }
            ServerTask task = rs.HardwareScan(url, driverIds, user, pass, false);
            XProtect.WaitForTaskCompletion(task);
 
            string path = task.GetProperty("HardwareDriverPath");
            if (path == null)
                throw new VideoOS.Platform.MIPException("Could not find hardware driver.");
            return path;
        }

I tried “;”, “/”, “,” or " " and nothing works.

I suspect the parameter is misnamed https://doc.developer.milestonesys.com/html/MIPhelp/class_video_o_s_1_1_platform_1_1_configuration_items_1_1_recording_server.html#a6649f5eb71f0e5247503d626131834ad and it’s supposed to be “String hardwareDriverId” instead of “String hardwareDriverIds”, and I’m supposed to loop (trying them all sequentially).

Did I get this right?

Nevermind, it’s actually “;”, I thought I tested but didn’t.

The documentation could be much improved tho:

  • HardwareDriverIds are actually hardware driver “number”
  • Separator is “;”