After testing with my device (Brooks SLA5800 series MFC), creating a bound socket () right away in the forwardOpen() call (rather than a ) allows EIPScanner to utilize the correct, default port (2222) for Implicit comms. Without this, two separate sockets were created, but only one would have connections handled by the library; this caused the device to eventually time-out the connection after receiving no O->T packets (from the correct port, verified with Wireshark). All existing GTests pass.
I haven't heard feedback, but I'm hopeful this would solve many implicit communications issues, including #64. Note the source port of IO packets in the attached "Working_IO-filtered" capture file. Log output:
Compare this with the source port of IO packets in the attached "Failing_IO-filtered" capture file. Log Output:
[INFO] Registered session 1
[INFO] Send request: service=0x54 epath=[classId=6 objectId=1]
[INFO] Open IO connection O2T_ID=9240596 T2O_ID=2604400641 SerialNumber 1
[INFO] Open UDP socket to send data to 192.168.1.100:2222
[WARNING] Connection SeriaNumber=1 is closed by timeout
[INFO] IO Closed
[WARNING] Attempt to close an already closed connection
[INFO] Unregistered session 1
After testing with my device (Brooks SLA5800 series MFC), creating a bound socket () right away in the forwardOpen() call (rather than a ) allows EIPScanner to utilize the correct, default port (2222) for Implicit comms. Without this, two separate sockets were created, but only one would have connections handled by the library; this caused the device to eventually time-out the connection after receiving no O->T packets (from the correct port, verified with Wireshark). All existing GTests pass.
I haven't heard feedback, but I'm hopeful this would solve many implicit communications issues, including #64. Note the source port of IO packets in the attached "Working_IO-filtered" capture file. Log output:
Working_IO-filtered.pcapng.txt
Compare this with the source port of IO packets in the attached "Failing_IO-filtered" capture file. Log Output:
Failure_IO-filtered.pcapng.txt