Go through this 2 configuration, it’s almost the same as one configures the server for the publisher and the other one configures the client for the subscriber.
And for the configuration json.editor can be utilized.
cd tools/json.editor
python main.py
scons --app=CanSubEx --os=OSAL
scons --app=CanPubEx --os=OSAL
build\nt\GCC\CanPubEx\CanPubEx.exe
build\nt\GCC\CanSubEx\CanSubEx.exe
The CanSubEx will give output as below:
CANBUS :receive: session=10, canid = 0xa, dlc = 8, data = [0A, 0B, 0C, 0D,0E, 0F, 10, 11]
CANBUS :receive: session=11, canid = 0xb, dlc = 8, data = [0B, 0C, 0D, 0E,0F, 10, 11, 12]
CANBUS :receive: session=12, canid = 0xc, dlc = 8, data = [0C, 0D, 0E, 0F,10, 11, 12, 13]
And the CanSubEx can be start multiple times, and each can get the same message published by CanPubEx.
Using wireshark, open the Adapter for loopback trafic capture, we can see the published CAN message through UDP multicast.