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

New simulator TCP link do not work with Windows Cygwin Toolchain #11090

Closed
bys1123 opened this issue Dec 22, 2018 · 4 comments · Fixed by #11101
Closed

New simulator TCP link do not work with Windows Cygwin Toolchain #11090

bys1123 opened this issue Dec 22, 2018 · 4 comments · Fixed by #11101
Assignees
Labels
Development Environment: windows Microsoft Windows OS environment Sim: SITL software in the loop simulation

Comments

@bys1123
Copy link
Contributor

bys1123 commented Dec 22, 2018

I saw @julianoes updated the simulator_mavlink.cpp file yesterday. #10648 Thanks for your work.

And I tried in Cygwin toolchain, seems not work well.

error:

WARN  [simulator] Failed sending mavlink message: Address family not supported by protocol

image

@bys1123
Copy link
Contributor Author

bys1123 commented Dec 22, 2018

I guess this bug maybe is around here:

simulator_mavlink.cpp
start line 654:

	struct sockaddr_in _myaddr {};
	_myaddr.sin_family = AF_INET;
	_myaddr.sin_addr.s_addr = htonl(INADDR_ANY);
	_myaddr.sin_port = htons(port);

or 514:

ssize_t len = sendto(_fd, buf, bufLen, 0, (struct sockaddr *)&_srcaddr, sizeof(_srcaddr));

@MaEtUgR
Copy link
Member

MaEtUgR commented Dec 23, 2018

When I revert simulator and jMAVsim back to UDP it's even worse. I don't see the Address faily not supported error anymore but that's probably because the simulator is hanging after it connected successfully. At least when I try to use uorb top everything freezes completely.

@TSC21
Copy link
Member

TSC21 commented Dec 23, 2018

It can be related with the lockstep instead. @julianoes

@julianoes
Copy link
Contributor

I think I had fixed this and maybe stashed it away. It could be that we need to use send( instead of sendto on Win. Let me check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development Environment: windows Microsoft Windows OS environment Sim: SITL software in the loop simulation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants