Wanted to give a shout-out for a great tool for working with SVG files and plotters: vpype. It’s a multifunctional tool for taking an SVG file you’re about ready to plot and then making it “better” for the plotter. Here’s an example of how I use it:
That’s a pipeline that does the following (in order)
Read my input SVG
Crop the SVG to the given rectangle.
Merge lines if points are within 0.05mm of each other. This “cleans up” the SVG and makes for faster plots with fewer, more complex paths.
Re-order loop lines so that each loop starts at a random point. This breaks up artifacts from the pen at rest blotting ink into the paper.
Sort the lines to minimize pen up travel distance. Axidraw does this too but supposedly vpype works better.
Write out the output SVG
It’s a pretty powerful tool and what it can do is confusing at first. But the docs are good. The feature overview is the best list of commands it understands grouped by theme. Beyond that check out the cookbook and the CLI reference. There’s also a handful of plugins; the one that caught my attention is occult which will emulate the masking you get if you put a filled polygon on top of other stuff in an SVG file.
vpype works by default as a command line tool. It also has a Python API and the ability to write your own plugins in Python.
Under the hood what vpype is doing is interpreting the SVG to build up geometries in memory. It’s sort of like rasterizing things on a grid, although not quite. It then uses that model to allow it to combine lines, simplify geometry, etc. Along the way it squashes all curves into collections of little short lines. (The plotter would do this anyway, so no great loss).
Bonus image: it has a fun “squiggles” filter which makes the lines not straight.
I’m downloading a big PS5 game right now (Returnal) which seems like a reasonable practical bandwidth test for Starlink. Here’s the router’s graph of throughput
Average: 123 Mbit/sec
So there you have it. An average of 120 Mbit/sec over 3 minutes, The graph shows throughput every 3 seconds so you can see the extreme variability; moment to moment the bandwidth swings between 20 Mbit/sec to 300 MBit/sec. Honestly I’m surprised TCP can cope with this kind of variance and converge to a reasonable speed! Other tests suggest there’s not a lot of buffering in Starlink’s infrastructure, so I don’t think that’s smoothing anything out.
Note the gap where bandwidth fell to zero at the start; that’s a legit failure and occurred several minutes after the download started.
And here’s a graph of the whole 56GB download period; average 160 Mbit/sec, took just about an hour. On my old 12 Mbit/sec WISP this would take about 13 hours (and possible cost me $1/GB in data overage fees).
Finally captured a rumored bug as it was happening. After Starlink Dishy resets itself, the home router can’t get a working Internet connection. (Note: this is not using Starlink’s router). Folks report various ways to fix it, often by plugging in Starlink’s router temporarily. I think resetting your home router alone is sufficient. Or even less intrusive; resetting the WAN port. Some folks on Reddit call this the “DHCP loop” behavior.
In summary; Dishy hands out a temporary IP address 192.168.100.100 with a very short DHCP lease. This seems to confuse routers which keep renewing the temporary address rather than getting a permanent 100.64.*.*/10 address.
Dishy behavior
Dishy is itself a DHCP server; it acts more or less similar to a cable modem. The reported behavior of Dishy is that right after it reboots and before its acquired satellites, the DHCP server hands out an address of 192.168.100.100 to any router that asks as a temporary address. Crucially, the DHCP lease on this is a tiny 5 seconds. It also has a gateway of 192.168.100.1 (Dishy itself) but this gateway doesn’t really work.
Once Dishy configures itself with Starlink it changes and instead gives out a semi-permanent CgNAT address like 100.71.6.46. It expects the router to switch to this new address, the published final gateway is something like 100.127.255.3. This DHCP lease is for 5 minutes.
Everything about what Dishy is doing makes sense to me and seems reasonable. The only slightly odd thing is the 5 second DHCP lease on the temporary, but presumably that’s set because Dishy knows it wants to swap the temporary address out quickly.
OpenWRT behavior
Unfortunately OpenWRT doesn’t react well to Dishy’s DHCP hijinx. In practice what happens is OpenWRT stays stuck at the old 192.168.100.100 address and never switches over. here’s a screenshot of the bad state in OpenWRT’s status panel:
I tried prying in to OpenWRT a little more closely to see what was going on. I’m fairly ignorant of how it works though, so didn’t get far.
The router is running a persistent process to maintain this DHCP lease:
That all looks normal enough. Unfortunately I wasn’t able to capture the DHCP traffic or otherwise debug the request/responses that were going on. However, syslogging was helpful:
Logs for normal operation, once every 2.5 minutes: Apr 7 18:05:16 OpenWrt netifd: wan (1527): udhcpc: lease of 100.71.0.14 obtained, lease time 300 Apr 7 18:07:46 OpenWrt netifd: wan (1527): udhcpc: sending renew to 100.127.255.3
First DHCP success after router reboots: Apr 7 18:15:15 OpenWrt netifd: wan (1527): udhcpc: sending select for 192.168.100.100 Apr 7 18:15:15 OpenWrt netifd: wan (1527): udhcpc: lease of 192.168.100.100 obtained, lease time 122 Apr 7 18:15:15 OpenWrt netifd: Interface ‘wan’ is now up
Afterwards, once a minute: Apr 7 18:35:37 OpenWrt netifd: wan (1527): udhcpc: lease of 192.168.100.100 obtained, lease time 122 Apr 7 18:36:38 OpenWrt netifd: wan (1527): udhcpc: sending renew to 192.168.100.1
So here’s the weird thing. The router was given a lease of only 5 seconds. But it seems to be ignoring that and just blindly renewing the lease every minute, pretending it’s a 122 second lease. Worse it’s asking to renew the existing address and Dishy is gamely letting it. What we want is for the router to get a new address, not perpetually renew the old one.
I suspect all this buggy behavior is triggered by Dishy’s slightly odd short DHCP lease. But without digging in to OpenWRT’s code I don’t really know.
/* paranoia: must not be too small and not prone to overflows */
/* timeout > 60 - ensures at least one unicast renew attempt */
if (lease_seconds < 2 * 61)
lease_seconds = 2 * 61;
I first tried to fix this by sending SIGUSR2 to udhcpc; that signals it to release the address. The release went through but OpenWRT wasn’t smart enough to then decide to get a new address. (Reading the udhcpc docs, I should not be surprised this did not work). I finally just clicked the “reset” button next to the WAN port in the OpenWRT UI; that caused it to fully reset the link and get a new working address via DHCP. And all is well.
Bottom line: something needs to convince OpenWRT to get a new IP address after Dishy is fully configured. That should be automatic but it’s not working. Manually forcing a new IP address fixes it.
Updates
Currently running busybox 1.30.1-6 (for udhcpc) and netifd 2021-01-09-753c351b-1.