[SOLVED] DIS from VRForces ignored?


photo

Recommended Posts

Hello,

When our CGF (VRForces) sends Entity State PDUs, it looks like they are ignored by the IG. I attached a wireshark capture of the DIS messages as seen from the IG.

When using our own DIS packet sender (KDIS) sending the same PDU, the entity is correctly displayed by the IG (so the ig_config.xml seems correct).

I'm suspecting something sent by VRForces is not compatible with the IG. Could you please check on your side?

There is no error in the logs, and DISConnector is correctly initialized.

(Note we don't have a lot of options to configure VRForces...)

Here is the relevant ig_config.xml parts:

<group name="DISConnector">
      <item name="broadcast_address" type="string">10.18.135.127</item>
      <item name="site" type="int">1</item>
      <item name="exercise" type="int">1</item>
      <item name="app" type="int">-1</item>
      <item name="port" type="int">3000</item>
</group>

<entity id="1.2.78.21.7.3.0" name="HC145">
      <path>DefaultEntity.node</path>
</entity>

Thanks!

vrforces.pcapng

Link to post

After further investigation, it looks like Unigine discard DIS broadcasted packets, and only considers unicast DIS.

Can this be fixed for next release? (critical! VRForces can only work by sending broadcast packets and cannot send unicast DIS, ditto MAK support, due to the CGF being actually made of multiple app intercommunicating through broadcasted msg).

Can you make a quick patch before next release (so the CGF team can carry on with their devs)?

Thanks!

Link to post

Hello! 
I checked the work with broadcast - it looks like everything works fine.

we use KDIS library. recived socket listen broadcast message anyway. we do not modify the connection

I also checked your wireshark trace: I received the packages, and even the entity was created.


void callback(KDIS::PDU::Header *pdu){
	Log::message("DIS ENTITY STATE\n");
}

int AppSystemLogic::init()
{
	// update application even if focus was lost
	App::setBackgroundUpdate(true);

	// init IG
	init_ig();

	auto dis = Plugins::IG::DIS::Connector::get();
	if (dis)
		dis->setCallbackOnRecvPacket(1, MakeCallback(&callback));

	return 1;
}

2.png

1.png

I have no way to check vrforces compatibility. I reproduced your trace with Colasoft Packet Player

3.png

 

result: i can see new entity, and log messages 

 

4.png

Link to post

Hum, this is strange. I checked again with our own KDIS emitter, and when it's configured to send broadcast msg, then again its entity is not shown In Unigine. Could it be because I use a 2.12.0.2 with the IG and syncker patched? (I 'll try again with a stock 2.12.0.2)

Link to post

I have checked all the places where the packet could be lost.

please check app/exercise/site parameters in ig_config.xml. DISConnector do not process a packet from KIDS in the following cases:

  • packet.GetExerciseID != DISConnector::exercise_id (for all packet)
  • EntityIdentifier.GetApplicationID == DISConnector::app_id (for Entity State PDU)
  • EntityIdentifier.GetSiteID != DISConnector::site_id (for Entity State PDU)

in all other cases, we process all received packages.

 

also you can check on clean KIDS

#include <iostream>
#include "KDIS/Extras/PDU_Factory.h"
#include "KDIS/Network/Connection.h" 

using namespace std;
using namespace KDIS;
using namespace PDU;
using namespace NETWORK;

int exercise_id = 1;

int main()
{
	try
	{
		Connection conn( "10.18.135.127", 3000);
		while( true )
		{
			try
			{
				auto_ptr<Header> pHeader = conn.GetNextPDU();
				if( pHeader.get() )
				{
					if(pHeader->GetExerciseID() != exercise_id)
					{
						cout << pHeader->GetAsString() << endl;
					}
					else
					{
						cout<< "This message skiped by ig" << endl;
					}
				}
			}
			catch( exception & e )
			{
				cout << e.what() << endl;
			}
		}
	}
	catch( exception & e )
	{
		cout << e.what() << endl;
	}

	return 0;
}

 

Link to post

We found the issue, and it's thank to your screen captures!

I had incorrectly set the subnet mask to 255.255.255.0 instead of the correct one 255.255.255.128 for the destination address *.127  to be correctly interpreted!

Thanks!

Link to post
  • silent changed the title to [SOLVED] DIS from VRForces ignored?