Simulator can bind itself to wrong network adaptor (on windows) making registering the simulator always fail

So i was finally able to register my simulator on windows, and i also figured out the issue that prevented it from happening.

Playdate simulator binds itself to a network adaptor from your windows system but it was binding itself to the wrong network adaptor a network adaptor that did not have internet connection and could not reach my router. This was the reason why trying to register the simulator on my windows machine always made the simulator hang. In my case it binded itself to a vmware bridging adaptor

you can figure out which network adaptor the simulator binded it self to by going to wifi and explicitly connect to the test 1 wifi network and then goto settings->system->device info. It will mention an ip address cross reference this with the ip adresses mentioned in ipconfig /all command in a cmd prompt and you know where it binds itself to.

image

If it binds to the wrong adaptor disable them, restart the simulator, reconnecto to the test1 wifi network (on the simulator) again and verify ip adress again, until it is binded / showing the ip adress of your main network adaptor that you use on your pc to connect to internet. Once that is done you can reconnect to test 1 wifi network again and registering your simulator will work.

But if it binds itself to the wrong adaptor it will never be able to register / activate the simulator, depending if said adaptor can reach the internet

Imo in case of multiple adaptors on the system there should be a way to tell the simulator which adaptor it should bind to and not take some random adaptor that may or may not work because now i always have to disable my vmware adaptors as per 1st screenshot if i want it to be able to reach play date server (if i don't disable them it will take the vmware adaptor which had no internet connection even if the devices are enabled)

Boy, this is all handled by lib curl - we just tell it to connect to a URL. I'm not even sure there is an API to pick a specific NIC in lib curl.

So the ip's it mentions in device info after having connected to the fake test1 wifi network inside the simulator is also handled by curl ? As it seems to have An effect there depending which IP adres, Nic it binds to if registering Well activating the simulator Will work, i can easily create a video showing this effect.

No, they are unrelated. It's all "simulated". :slight_smile:

but the ip mentioned in settings -> device info is always an ip from the nic it seems to use / have binded to (it's how i traced down this problem of me not being able to register, well activate the simulator)

Is your eth0 (whatever the windows nomenclature is) changing? It seems odd CURL, and the about box, would both be picking a non-preferred value. Are you sure something on your system can't be tweaked to fix this?

no its not changing, it just binds itself to wrong nic. But if i check ipconfig /all i have 2 prefered nics (not sure if i can change that) the vmware one and my real nic. If it takes the vmware one registering the simulator won't work, nor will refreshing games list etc.

I created the video to show the problem first by letting the vmware nic enable, notice the ip addresses i show in settings -> device info it's the one from the vmware nic when it's enabled and it will fail on everything network related inside the simulator. However if i disable the vmware nic (as a workaround) it takes the correct NIC and show ip from my internet / connection to router and everything connection wise works fine inside the simulator.

I'm still checking to see if i can maybe somehow remove the prefered flag from the vmware nic but i'm not sure we can control that.

Also notice sometimes settings -> device info does not show ip adress immediatly only when explictly connecting to the fake wifi it will pick up the ip address there. If i don't do this the simulator will also hang and not show there has been a problem registering the simulator and i have to kill the simulator (not shown in video but can show example video as well if you like)

Here's the video:
Animotica_13_3_21_49_43.mp4.zip (9.2 MB)