One driver, lots of cameras

Hi,

we had created a own driver for handle some trick on our cameras. But when we adding the second camera with this driver only one camera going live. We hsd creted an flow to assign different macaddress to any single camera, but still don’t work. Any idea?

Yes, different MAC addresses is a requirement, good that you have that covered.

First step; try to check the licenses, and try to activate licenses from the Management Client License Information view.

If that is not it.

Try to look into the Recording Server logs at [C:\ProgramData\Milestone\XProtect](file:C:/ProgramData/Milestone/XProtect) Recording Server\Logs

There will be some logs starting with “DriverFramework*” but general logs could also hold a clue.

You might need to use this to do deep debugging..

https://developer.milestonesys.com/s/article/debugging-a-MIP-Driver-Framework-driver-how-to

Hi,

I’ve 2 Hardware

Camera A) Hardware GUID: 42DC4EAA-208B-4B90-85F4-404017DDF749 MAC ADDRESS: B6:C0:24:12:9D:35

Camera B) Hardware GUID: EA1328D6-E1C5-48D8-9547-B9F29F7DA7AB MAC ADDRESS: 82:10:B7:3E:10:87

If I enable one hardware at a time everything works correctly.

When I enable a second hardware the first stop working and the Management client shows “Invalid License” error.

I found some errors in RecorderEngine.log

If I have Hardware A enabled and I enable Hardware B I get this error.

(CheckHardwareLicenseCommand) Found new mac address for hardware. HardwareId: 42dc4eaa-208b-4b90-85f4-404017ddf749; Previous MAC: B6:C0:24:12:9D:35; New MAC: 82:10:B7:3E:10:87
Calling Driver.Stop(). HardwareId: 42dc4eaa-208b-4b90-85f4-404017ddf749
Sending UpdateHardwareReadOnlySettings to server. HardwareId: 42dc4eaa-208b-4b90-85f4-404017ddf749; Mac address: 82:10:B7:3E:10:87
Failed to send UpdateHardwareReadOnlySettings to server. HardwareId: 42dc4eaa-208b-4b90-85f4-404017ddf749; Error: The mac address returned by GetInfo() is not the same as the mac address returned by GetXml(). ProductId: 'f7b0084b-497d-4b0e-9b14-3b0d443cf95d', GetInfo: 82:10:B7:3E:10:87; GetXml: B6:C0:24:12:9D:35. 

On the contrary,

If I have Hardware B enabled and I enable Hardware A I get this error.

(CheckHardwareLicenseCommand) Found new mac address for hardware. HardwareId: ea1328d6-e1c5-48d8-9547-b9f29f7da7ab; Previous MAC: 82:10:B7:3E:10:87; New MAC: B6:C0:24:12:9D:35
Calling Driver.Stop(). HardwareId: ea1328d6-e1c5-48d8-9547-b9f29f7da7ab
Sending UpdateHardwareReadOnlySettings to server. HardwareId: ea1328d6-e1c5-48d8-9547-b9f29f7da7ab; Mac address: B6:C0:24:12:9D:35
Failed to send UpdateHardwareReadOnlySettings to server. HardwareId: ea1328d6-e1c5-48d8-9547-b9f29f7da7ab; Error: The mac address returned by GetInfo() is not the same as the mac address returned by GetXml(). ProductId: 'f7b0084b-497d-4b0e-9b14-3b0d443cf95d', GetInfo: B6:C0:24:12:9D:35; GetXml: 82:10:B7:3E:10:87. 

It seems as if the driver reverses the mac addresses.

what happens?

I tested with our Demo driver sample, there I can start two instances of the DemoDriverDevice simulator and add and have two simulators streaming. This test makes me conclude it is not a general issue but perhaps something pertaining to your implementation.

What version is the XProtect VMS? What version of the NuGets are you using to build the driver?

We use

Corporate 2022 R3 (Recording server 22.3c build 58)

MilestoneSystems.VideoOS.Platform.DriverFramework version 23.3.1

In which class do I find the GetXml() method?

Would GetInfo() be the CreateDriverInfo() method of DriverDefinition?

What tests can I do to understand where the problem is?

Thanks

I believe ConfigurationManager.FetchProductInformation() is called on your driver, and you then return data including a MAC address. What do you return?

I will try to ask around here at Milestone on the observations of RecorderEngine.log.

When you have two hardware I would normally assume they are each on a different address and port. If that is what you have I must assume that there is some mix-up going on where one device returns the others mac or similar.

If you have two hardware on the same address and port you need to add some kind of ID as a hidden property on the hardware so that it is clear which of the devices the driver must communicate with.

Hi,

thanks for your support.

Each Hardware has different ip and port and MAC address is calucated on hash of ip, so I’m sure that mac address o f the hardware never change.

I will try to rebuild driver from zero a will see the behavior.