Client Windows 10 Wifi ReConnection problems

Hi, first time poster here! I'm ready to do some damage.

Here is my issue;
I've downloaded the latest version of vhgui.exe (3.7.5).
I'm running on Windows 10. Pre 1066.
I've created some scripts to help use it as a service. I'm interested in writing some automated stuff for vh. Here are my scripts

Please note that these commands are running in a folder where vhgui.exe has been renamed to "vh.exe". I'm lazy.
stop.bat is
vh -u

go.bat is
vh -l="C:\proj\usb-magic\lib\log.txt" -c="C:\proj\usb-magic\lib\conf.ini" -i

and list.bat is
vh -t list

I have a network called Breakfast with 2 virtualhere servers running, each hosting a connected usb device. When I first start everything up, I can launch the client as a server from my win10 machine, and list out the devices. All is dandy. Hoozah!
But, terror strikes when I disconnect from the Breakfast network, and then reconnect. After I do this, I cannot get the virtualHere client to show the servers on the network. The only way to get things back to hundy-dory-state is to disable and re-enable the wifi adapter. Then things come back, and I can use the client to list out the connected servers again.

I've made sure that the drivers are installed, both by running the vhgui.exe with -i, -b, -3, -d, and -x&-d.
I've manually made sure Bonjour is working to the best of my ability. I've reinstalled it a few times, and I've given it admin-rights, and compatibility mode with win7. I've also made sure port 5353 (the udp port Bonjour uses) is open in my firewall.

I've made this youtube video to show the exact process of how things can go from great to bad. I didn't realize it was going to get a crappy water mark all over it, so I am super sorry for that. https://youtu.be/vJgqIxGNq0k

I would really really appreciate some help here. It is very important for me that I am able to disconnect and re-connect to networks and still have virtualHere function properly.

Thanks
-channa

#2

I've also tried ipconfig /release and /renew, to no effect.

Thanks
-channa

#3

Wow, thanks for the demo video. I think the issue is that bonjour not closely tracking the network state. Bonjour generally is not that useful if your network goes up/down regularly or you need quick failover as it will generally not detect this for some time.

Triggering the wifi driver to drop the network entirely would be picked up as a network down event in bonjour immediately.

I would suggest turning off auto-find entirely and just putting the ip address of the required servers into the client via the MANUAL HUB ADD API or just adding it via the GUI by right clicking USB Hubs->Specify Hubs

#4

Thanks for the speedy response!
I did consider manually specifying hubs, but I have 2 points of consideration;
1. auto discovery is vastly preferable to having to manually specify hubs in my use case. I am really looking for a totally automated system, and having to manually configure hubs defeats that goal.
2. I did try manually specifying hub, just to see if it could do it. I used a command in the form of
"vhgui.exe -t manual hub add,orangepilite:7575"
and the response on stdout was "OK". When I listed the devices, orangepilite:7575 would show up briefly, but
a - no devices were shown under it, and there should have been at least one, and
b - the log kept on saying "failed to connect to orangepilite:7575". (or maybe it was "couldn't connect", I don't remember).

How would you recommend I trigger a wifi driver drop notification? Do you reckon that I'll need to use the bonjour sdk ?

Thanks again for the speed, I do really appreciate it.

Thanks
-channa

#5

When the network is down then put up again and you cannot connect to orangepilite what happens when you do ping orangepilite Does it lookup the name ok? Virtualhere just queries the resolver to figure out the address like ping would.

Regarding item 2, the VirtualHere client would list the server when its trying to connect but no devices would be shown underneath until the connection is established. VirtualHere returns OK if the "manual hub add" was successfully issued. It does not wait for the connection to actually be made as it may take an indeterminate amount of time. You would need to poll the list command if you wanted to know.

I did some more testing and i works ok for me, network is disconnected wait a minute then reconnect and client finds all the servers again.

The techical details are: the virtualhere client pings the servers every 3 seconds, when it doesnt hear back after a while it drops the connection, hence the servers disappear from the list. Virtualhere finds new servers on the network by querying bonjour every 30 seconds. It gives bonjour 3 seconds to say whats on the network at that time. After the network is down and brought back up on average 15 seconds later it will ask bonjour for the servers on the network. Bonjour is meant to cache these values and listen when the network comes back up for changes. This seems its not doing it on your network, im not sure why however.

#6

I will do some more testing tonight. Yesterday I tried to recreate the problems on another win10 laptop, and it had no trouble. That makes me think that the machine I am using to develop on has some odd network configuration somewhere. I'll try pining orangepilite this evening.

As always, thanks for the response
-channa