Closed nicktramp closed 10 months ago
Since I'm seeing a similar (maybe even the exact same) problem as in #64 (though the fix there did not work), I'll close this in favor of that one. If I can find a fix, I'll update that thread and submit a PR for it.
When establishing implicit comms with a Brooks SLA5800-series MFC, IO packets are sent back and forth (per Wireshark), but the receiving data listener isn't called and the connection times out before a Forward_Close request is made. Examining the Wireshark trace, the O->T connection uses a randomly chosen source port and udp/2222 for destination port, but the device uses udp/2222 for both source and destination ports. Does this mean the library is listening for connections on the randomly chosen UDP port, rather than udp/2222? I realize there are 2 connections being made (O->T & T->O); how can I check which port the library is listening on?
Here's the code, only a slightly modified version of the implicit messaging example:
I don't see any Socket Address Info Items being sent to the device, so I expected spec-defined defaults to be used and a Forward Close request after seeing the received data logged from the listener/callback.
Logs [DEBUG] Opened TCP socket fd=3 [DEBUG] Connecting to 192.168.1.100:44818 [INFO] Registered session 1 [INFO] Send request: service=0x54 epath=[classId=6 objectId=1] [INFO] Open IO connection O2T_ID=7798808 T2O_ID=3790471169 SerialNumber 1 [DEBUG] Opened UDP socket fd=4 [INFO] Open UDP socket to send data to 192.168.1.100:2222 [DEBUG] Opened UDP socket fd=5 [WARNING] Connection SeriaNumber=1 is closed by timeout [INFO] Closed [DEBUG] Close UDP socket fd=4 [WARNING] Attempt to close an already closed connection [INFO] Unregistered session 1 [DEBUG] Close TCP socket fd=3 [DEBUG] Close UDP socket fd=5
Environment:
IO_notClosing.pcapng.txt