I seem to have cracked it.
I checked through the code that decides whether to send an authorisationError response and noticed this line:
I checked through the code that decides whether to send an authorisationError response and noticed this line:
if (parameters.EngineId != Group.EngineId)
{
// not from this engine.
return false;
}
And then noticed that the Engine ID is hard coded within the library! // TODO: make engine ID configurable from outside and unique.
private readonly OctetString _engineId =
new OctetString(new byte[] { 128, 0, 31, 136, 128, 233, 99, 0, 0, 214, 31, 244 });
So after tweaking my Trap message by copying the OctetString construction from above to the engineId parameter, it all started to work! Hurrah!