Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The communication problem between "linux" and "windows" #1976

Closed
gongqinpeng opened this issue Apr 12, 2024 · 5 comments
Closed

The communication problem between "linux" and "windows" #1976

gongqinpeng opened this issue Apr 12, 2024 · 5 comments

Comments

@gongqinpeng
Copy link

Hello , I want to configure "cyclonedds" under the "linux" and " windows" systems of two computers, but I find it's normal in one of these, I cannot communicate with the window system via the linux system. Thank you very much!

@t0ny-peng
Copy link
Contributor

You may need to post more detail about how you compile, what version you compiled, the network setup, firewall if any, and the error message, if any?

Ubuntu <-> Windows communication worked for me before. You can enable detailed log tracing in the configuration XML file to find some clues.

@gongqinpeng
Copy link
Author

gongqinpeng commented Apr 12, 2024 via email

@t0ny-peng
Copy link
Contributor

Not an CycloneDDS expert here. What I usually did to debug the application is to dump the trace log to a file and examine each line, compare the difference (in your case, trace log from Ubuntu and from Windows) and look for any inconsistency. Also, compile the application in debug mode and add breakpoints to where the log differs. It's been a looong time since I developed on Windows so sorry for not being able to offer further help.

@eboasson
Copy link
Contributor

I can only confirm what @t0ny-peng writes, it almost always is the networking setup. I always first check:

  1. firewall
  2. selected network interface
  3. if it really uses multicast — cdds.log should already tell you this with the configuration you use. On my macbook using loopback it says:
    1710844146.228084 [0]    4969711: udp initialized
    1710844146.228384 [0]    4969711: interfaces: lo0 udp/127.0.0.1(q1) en0 wireless udp/192.168.1.6(q9)
    1710844146.228399 [0]    4969711: lo0: presumed robust multicast support, use for everything
    1710844146.228410 [0]    4969711: selected interfaces: lo0 (index 1 priority 2 mc {spdp,asm,ssm})
    1710844146.228418 [0]    4969711: all interfaces allow spdp multicast, no peers defined: defaulting participant index to "none"
    1710844146.228432 [0]    4969711: ownip: udp/127.0.0.1
    1710844146.228440 [0]    4969711: extmask: invalid/0 (not applicable)
    1710844146.228446 [0]    4969711: SPDP MC: udp/239.255.0.1
    1710844146.228453 [0]    4969711: default MC: udp/239.255.0.1
    
    if it isn't using multicast, you'll see other messages.

If 1, 2 and 3 check out, you might want to verify that each machine at least receives "something" from the other. In the detailed trace (<Category>trace</Category>) that shows up like:

1710844146.232429 [0]       recv: HDR(110a7bc:12cabbf8:929c611e vendor 1.16) len 476 from udp/127.0.0.1:51911 to udp/127.0.0.1:57550@1

(obviously with different addresses). If there is no communication in at least one direction, go back to step 1 because then it really is something in the operating system or the network. Wireshark can be really useful in that case.

If one machine does discover the other, there'll be a line like:

1710844146.232513 [0] dq.builtin: SPDP ST0 110a7bc:12cabbf8:929c611e:1c1 bes fc3f NEW (0x00000000-0x0000002c-0x00000000-0x00000000-0x00000000 phantasie.local/0.11.0/Darwin/Darwin) (data udp/239.255.0.1:7401@1 udp/127.0.0.1:64670@1 meta udp/239.255.0.1:7400@1 udp/127.0.0.1:64670@1) QOS={user_data=31<"DDSPerf:0:48947:phantasie.local">,liveliness=0:10000000000,property_list={1:"__ProcessName":"ddsperf",1:"__Pid":"48947",1:"__Hostname":"phantasie.local"}:{}}

again, obviously details like GUIDs, addresses, names, etc. will be different. You could try grep 'SEDP.*NEW' cdds.log 🙂 (and/or have a look at https://cyclonedds.io/content/guides/tracefile.html).

If it does receive packets but doesn't have this "SPDP" line, then there is a small chance that it has something to do with #1943, which I merged recently. In you suspect that may be the case, rolling back to a commit just before that PR got merged would be something to try.

@gongqinpeng
Copy link
Author

gongqinpeng commented Apr 15, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants