Can I obtain Camera Serial Numbers using the SDK?

I would like to see the Serial Number for each piece of Hardware currently on my server. I can see the Serial Number using the Management Software however I cannot find a way to do this using code.

Cheers,

Chris

Hi Chris, you shall be able to read it via ConfigAPI. I suggest that you take a look at the Config API Client sample.

Thanks for the reply @Chuan Xiang Gu (Milestone Systems)​, I have taken a look at the example and don’t see a Serial Number field. I have also ran the application in debug and had a look at the properties, to see if there was a Serial Number field. (Which I couldn’t spot).

The R3 SDK Documentation didn’t have anything either.

Cheers,

Chris

SDK 2017 R3 has released strongly typed Configuration API, you can follow the sample and via debugging to see what’s available under the hardware device. In the Config API Client sample, navigate to your hardware, select the Setting tab, you will see the Serial number field.

Funny coincidence, I had for something else just been looking at this piece of code.

private string getMac(FQID cameraFQID)
{
    VideoOS.Platform.ConfigurationItems.Camera camera = new VideoOS.Platform.ConfigurationItems.Camera(cameraFQID);
    VideoOS.Platform.ConfigurationItems.Hardware hardware = new VideoOS.Platform.ConfigurationItems.Hardware(cameraFQID.ServerId, camera.ParentItemPath);
 
    string mac = hardware.HardwareDriverSettingsFolder.HardwareDriverSettings.FirstOrDefault().HardwareDriverSettingsChildItems.FirstOrDefault().Properties.GetValue("MacAddress");
    return mac;
}

@Bo Ellegård Andersen (Milestone Systems)​ Hey Bo,

In the above code snippet, what is hardware defined as??

Have you got a full example of using this.

EDIT - Scratch that.. just seen your edited post.

Sorry, about the double posting before I got it right..

That worked fine @Bo Ellegård Andersen (Milestone Systems)​ .. Thank you!