Skip to content

Connect using Hostname #3053

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

Open
o-gent opened this issue Feb 4, 2023 · 13 comments
Open

Connect using Hostname #3053

o-gent opened this issue Feb 4, 2023 · 13 comments

Comments

@o-gent
Copy link

o-gent commented Feb 4, 2023

Issue details

Hostname connection not supported through UDPCI / TCP

I've checked previous issues for any mention, I've tried on MP and I've had a google - I could have missed a discussion or maybe the feature is already implemented in some way..

Currently need to specify IP - more convenient to specify hostname, especially where the IP of the device may be changing. For example the hostname would be "raspberrypi" by default for a pi.

Version

current

@robertlong13
Copy link
Collaborator

Connecting via hostname works fine for me. For instance, I usually type localhost into that box instead of say 127.0.0.1. Double check that the name you are trying actually resolves, e.g. open a command prompt and type ping raspberrypi. Usually it's raspberrypi.local, not just raspberrypi

@o-gent
Copy link
Author

o-gent commented Mar 3, 2023

Ah ".local" will be it then, I'm not used to needing that - thank you : )

@o-gent o-gent closed this as completed Mar 3, 2023
@o-gent
Copy link
Author

o-gent commented Mar 22, 2023

image

Seems to fail with an ipv6 address? Works when manually using an ipv4, fails when manually pasting ipv6 too..

Image from when using hostname.local

@o-gent o-gent reopened this Mar 22, 2023
@o-gent
Copy link
Author

o-gent commented Mar 22, 2023

from a look in UDPSerialConnect.cs, looks like it's setup only for ipv4 address - think the easiest way could be to filter to only ipv4 addresses from the Dns.GetHostEntry method in a similar way to here https://stackoverflow.com/questions/1059526/get-ipv4-addresses-from-dns-gethostentry ?

@o-gent
Copy link
Author

o-gent commented Mar 22, 2023

Confirmed that Dns.GetHostEntry(host).AddressList contains the ipv4 and ipv6 address for the machine i'm trying to connect to, so we need to filter to get the correct one rather than just picking the first address which is the current behaviour

@meee1
Copy link
Contributor

meee1 commented Mar 22, 2023

my quick google suggests your error is to do with your firewall/pc settings

https://thegeekpage.com/address-incompatible-with-the-requested-protocol-10047-error-fix/

@meee1
Copy link
Contributor

meee1 commented Mar 22, 2023

also what OS?

@o-gent
Copy link
Author

o-gent commented Mar 22, 2023

I think it's as a result of using an ipv6 address
image
I can try the other steps, but the connection works using the ipv4 address

@o-gent
Copy link
Author

o-gent commented Mar 22, 2023

also what OS?

Windows 11

@o-gent
Copy link
Author

o-gent commented Mar 22, 2023

thanks for your response! @meee1

@meee1
Copy link
Contributor

meee1 commented Mar 22, 2023

ok, i think i might have an answer, just needs testing, well release a new beta soon

@o-gent
Copy link
Author

o-gent commented Mar 22, 2023

ok so I've tried the latest beta build 1.3.8479.1107 and now it just stays on trying to connect. Normal behaviour on ipv4 address

@o-gent
Copy link
Author

o-gent commented Mar 23, 2023

tried the 1.3.8482.6581 build with the ipv6 fix in the changelog @meee1, not really sure how to interpret the error, had a google and seems pretty generic..

  • pinging the hostname in console responds with an ipv6 address
  • manually entering the ipv6 address stays on "trying to connect"
  • Using the ipv4 address works

image

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