0.96.0 - Network over the target's USB cable, and Esc goes to the target

Network over the target's USB cable
ESP-KVM can now take its network over the USB cable to the target, so the device needs no network cable of its own. The change is from @rvben (#111) and works on every board.
Turn on Settings > Network > USB network and restart. The target gets a USB network card called "ESP-KVM Network". Share the target's connection on it, and the device takes an address from it:
- macOS: System Settings > General > Sharing > Internet Sharing, to "ESP-KVM Network".
- Linux: a NetworkManager connection on that port, set to "Shared to other computers".
- Windows: Internet Connection Sharing on the main connection, to that port.
The console, mDNS and Tailscale work over it, and the network status shows the link with its address. When Ethernet or Wi-Fi is up, they carry the traffic and the cable stands by. A Tailscale client on the same computer can reach the device straight over the cable instead of through a relay (microlink#2). On a Mac, Tailscale keeps to its main interface, so this works from Linux for now.
Before you rely on it:
- The link is there only while the target's system runs and shares its connection. In the BIOS, during a restart or after a crash, the device is not reachable this way. Keep another way in for those.
- The target is on a network with the console. So the USB network needs the console's login on, and the device ignores an address in the tailnet's or the hotspot's range, since the target hands out the addresses here.
- It also ignores an address in a subnet its Ethernet or Wi-Fi is on already, or the two networks would mix. NetworkManager's shared mode hands out 10.42.0.x, so if your LAN uses that range, give the shared connection another one:
nmcli connection modify <name> ipv4.addresses 10.43.0.1/24.
It takes the same USB endpoints as the serial port, so with virtual media on, the two do not fit together. The old BIOS keyboard and a pad-only gamepad take the whole port. A profile with one of them, such as the one for a Nintendo Switch, leaves the network out while it is active, and the network comes back with the next profile.
Esc goes to the target
Until now a single Esc gave control back, which got in the way in vim, a shell or a BIOS.
Now a tap of Esc goes to the target, and holding it for a moment gives control back. A note at the bottom of the picture says so on every press, with a bar that fills while you hold. In relative mouse mode a tap still gives control back, because the browser ends its mouse capture on Esc. There, full screen with the keyboard lock on in Chrome or Edge sends it to the target.
Fixes
- Tailscale-only and Tailscale sign-in. "Console only over Tailscale", and signing in tailnet users without a password, went by the address a connection came from. They now check that it came in over the tailnet itself. Tailscale-only covers VNC too, which it did not before.
- A network change on trial was kept too early when one save held both a change that applies at once and one that needs a restart, such as a new address with Tailscale turned on. Now it is kept only once the device is back on the network after that restart.
Release: v.0.96.0.
Comments