Link Local Address Support

Hi Michael,

Setup: Windows 11 client, Raspberry Pi 4 server

Usually pi's are capable of connecting to a PC over a direct ethernet connection without a full IP setup. A link-local address is created for the pi, which connects the two devices without sharing the internet connection. Recently the direct ethernet connection repeatedly fails to connect (log snippet below). I've tried the following:

- restored default settings on the client

- ran different versions of the client

- specified a hub with 169.254.60.238:7575 (matches the ip address found in the pi's ifconfig)

- verified SSH connection over direct connection still works with internet sharing on and off (works both ways)

- verified that connecting to virtualHere via wifi or through a switch still works (normal 198 ip configuration is produced)

Log snippet:

2023-06-20 13:19:10 INFO  :Could not connect to 169.254.60.238:7575
2023-06-20 13:19:47 INFO  :Could not connect to 169.254.60.238:7575
2023-06-20 13:20:17 INFO  :Could not connect to 169.254.60.238:7575
2023-06-20 13:20:48 INFO  :Could not connect to 169.254.60.238:7575
2023-06-20 13:21:18 INFO  :Could not connect to 169.254.60.238:7575

Are there any settings for VirtualHere that may have made this connection mode not accessible, or do you think something is generically wrong on the networking side? Any clues would be helpful.

Regards

#2

This is a bug in virtualhere. I will fix the client/server so it can accept link local addresses in the next release. Due out in a week or two...

#3

Thank you, I'll keep an eye out for the next release.

In the mean time, would it make sense for me to dig up an older version of either client or server from my other devices? I have had the direct connection working in the past on pi3 and pi4 but I'm not sure which update of client/server/kernel/windows broke it.

#4

Old versions of virtualhere also didnt work with link local. The bug has been there forever. Its not a common usecase so I havent fixed it yet.

#5

Posting a bit of testing results in case it helps in any way. I successfully viewed a USB drive through virtualhere with the direct ethernet connection on an older windows 10 PC (still using the pi4 as server, 169.254.60.238:7575 specified in client). I think I might be mixing up terminology (link-local vs. Autoconfiguration Address).

Server properties (from client):

VERSION: 4.5.8 , STATE: Logged in , ADDRESS: 169.254.60.238:7575

 

Client system logs:

2023-06-20 21:11:15 INFO  :VirtualHere Client 5.5.3 starting (Compiled: Jun  7 2023 12:09:32)

2023-06-20 21:11:15 INFO  :Client OS is Windows 10 (build 19045), 64-bit edition

2023-06-20 21:11:15 INFO  :Using config at C:\Users\test\AppData\Roaming\vhui.ini

2023-06-20 21:11:15 INFO  :IPC available at \\.\pipe\vhclient

2023-06-20 21:12:20 INFO  :Drivers are up-to-date

2023-06-20 21:12:20 INFO  :Connected to the VirtualHere Client Driver (Version 2)

 

Excerpt from client ipconfig (ethernet):

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::70cd:ecd6:f089:5dcb%8
   Autoconfiguration IPv4 Address. . : 169.254.17.233
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :
 

Excerpt from server journalctl:

vhusbdarm[553]: >>> Starting VirtualHere USB Server v4.5.8 (Built: Apr 27 2023, 11:39:48)<<<

vhusbdarm[553]: Using configuration /usr/sbin/config.ini

vhusbdarm[553]: Server licensed to=unlicensed max_devices=1

vhusbdarm[553]: Using large URB's

vhusbdarm[553]: Listening on all network interfaces at TCP port 7575

avahi-daemon[364]: Loading service file /services/vhusbd.service.

vhusbdarm[553]: Found High speed device [ffff:5678] "USB, Disk 2.0" at address 115

vhusbdarm[553]: VirtualHere USB Server is running...press CTRL-C to stop

avahi-daemon[364]: Service "VirtualHere USB Sharing" (/services/vhusbd.service) successfully established.

vhusbdarm[553]: 169.254.17.233 connected as connection 1 (Standard TCP)

vhusbdarm[553]: Device 115 [ffff:5678] BOUND to connection 1

vhusbdarm[553]: Device 115 [ffff:5678] UNBOUND from connection 1

 

Excerpt from server ifconfig:

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 169.254.60.238  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::3baf:e45c:a0f2:93  prefixlen 64  scopeid 0x20<link>
        ether e4:5f:01:52:2f:39  txqueuelen 1000  (Ethernet)
        RX packets 6757  bytes 737596 (720.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6044  bytes 889297 (868.4 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0\
 

#6

Very Interesting, so its almost like a bug in win11 (but doubtful)

If the exact same virtualhere server/client versions work with 169 addresses on win10 , but not on win11 it might be some other configuration thing specific to win11.

The reason why i think it is/was a bug in virtualhere is because im using the flag AI_ADDRCONFIG to lookup ip addresses and that will skip link-local. Maybe that flag was not as strict in win10 and it just returned them anyway...

 

#7

Hi Michael, does the client release 5.5.4 include the have support for link-local?

#8

Sorry not yet, i got distracted with other features in virtualhere. It is on the todo list still...

#9

Ive had time to give this a test. I plugged the ethernet cable directly from the pi4 into my Win11 laptop, and it seems to work fine for me. Auto-Find works and the "Raspberry Hub" shows up in the virtualhere client without me specifying any address and i verified it shows a link local address in the properties.

If i turn off Auto-Find and restart the client, then Manually specify the IP address 169.254.45.103 it also connects no problem and the client shows the Raspberry Hub.

I think your win11 machine has a network setup problem.

The Pi 4 shows this:

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux
pi@raspberrypi:~ $ ifconfig
eth0: flags=4163  mtu 1500
        inet 169.254.45.103  netmask 255.255.0.0  broadcast 169.254.255.255
        inet6 fe80::b57c:f1b8:218b:e5a5  prefixlen 64  scopeid 0x20
        ether dc:a6:32:00:29:8f  txqueuelen 1000  (Ethernet)
        RX packets 84352579  bytes 9918408484 (9.2 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 75084661  bytes 10612092124 (9.8 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

And the win11 shows this

Ethernet adapter Ethernet 2:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::97ef:af3b:ed24:93f1%19
   Autoconfiguration IPv4 Address. . : 169.254.104.131
   Subnet Mask . . . . . . . . . . . : 255.255.0.0
   Default Gateway . . . . . . . . . :