I’d like to use AutoDiscovery as others have indicated in other threads, to find where there are running copies of their apps, locally. But I seem to have the same issues as others have posted in previous threads: my Mac doesn’t see my Pi, and vice versa, and although my Mac Mini and my MacBook Air (the latter via WiFi) can see each other connect, the Air can’t send messages to the Mini while the Mini can send messages to the Air.
Has anyone used AutoDiscovery successfully? I must also say that if success is contingent upon an end user opening Terminal and doing some command line stuff, then that doesn’t constitute success. This has to work out of the box for someone who can use their computer in the ordinary way, not a geek.
AutoDiscovery uses the EasyUDPSocket class to automatically discover other Xojo applications on the network.
If AutoDiscovery is what I think it is, the above line is wrong (or I never knew how to do that).
But, I used it 10 years ago (or more) between mac / windows computers.
The same application (not recompited) still worked some years (2 or three ?) ago.
Essentially, I used it to talk (write messages) to the other computer and receive answers.
It only need a WiFi (no need to register; if my memory is correct). Setting a Mac as WiFi hot spot works fine too.
Now, will this works with the current Xojo ? I do not know.
The problem with AutoDiscovery is, that you must set the port for automatic discovery ( AutoDiscovery.Bind() ). Since I couldn’t think of a solution to automatically determine a free port, I set the port manually in my apps’ settings.
I’ve tried the AutoDiscovery class three times, always for the same project (updated from dust each time since its creation in 2005).
I hoped each time that it would work better than the previous time, but it didn’t. Never worked.
Rarely, I would see other devices listed, but even then, communicating would be unreliable (perhaps one direction would work, perhaps not).
I’ve always been told (in the mailing list, in the forum) that it’s the nature of UDP to be unreliable and I shouldn’t expect more, so I just kept it like that and assumed something was just wrong on my network.
Various things I’ve read seem to imply that two versions of IGMP don’t interwork. Whether that’s true or not not I don’t know.
Firstly, AutoDiscovery is highly dependent on the computer’s firewall status. That may help you figure out why one Mac works and the other does not, like if one of them has “block all incoming connections” enabled.
Second, discoverability also depends on the devices between the computers. For instance, if two computers are using WiFi but are on two different networks (let’s say 2.4GHz and 5GHz) the WiFi router must be configured to allow UDP datagrams to pass through (which they are on home networks normally). Make sure the number of hops is set correctly too. If it’s set too low, the datagrams may just be getting killed off.
As for UDP, the protocol isn’t unreliable per se. it’s used for all kinds of things in this world quite effectively. The issue is that delivery is not guaranteed by the protocol.
FWIW, the remote debugging setup dialog uses AutoDiscovery, so if your computers show up in there when the stubs are running, that’d be a good first step.
Thanks for that. I’ll try and do a specific test, using my Mini and my Pi. I’ve been able to do remote debugging on the Pi, from the Mini, without issues before.
Right but did the IDE auto-detect the client or did you just type in its address? That’d be the difference between working or not.
I would highly recommend to check our Bonjour related classes in MBS Xojo Plugins.
As Bonjour is used by macOS already, the firewall probably lets it through.
Generally speaking, the IDE auto-detects everything. I also have Mint 20.1 and Win7, Win10 VirtualBox VMs also on the Mini, which the IDE running in the Mini auto-detects and can debug with. Likewise it detects the Pi. I may have on occasion had to type in an address, but not as a rule.
That’s good. It means that what You are trying to do is at least possible.