Some Bits: Nelson's log

8 posts in July 2021

WireGuard: very simple setup

Now that Starlink is working reliably I want to bridge the network between my two houses to make it easier to share stuff across. I have an elaborate setup of ssh tunnels and autossh for NAT busting and it’s awful. A VPN would be better. Some notes on getting there, this is very WireGuard 101 stuff.

The SF network is at 192.168.0.0/24 and is on fast fiber. I have a NAT router but I completely control it so with port forwarding it’s easy to set up a server. The GV network is at 192.168.3.0/24 and is behind double NAT; my own and also Starlink’s carrier grade NAT. The latter prevents listening on sockets pretty much entirely, so running a server behind it is awful and even elaborate NAT traversal seems dicey.

At first I thought I wanted a full bridging setup so the two houses appear in the same place. But in retrospect I think that is a mistake. It’d be bad for Sonos, for instance, it seems to use LAN broadcast to discover its own stuff and I’d much rather it found the local server for music files than tried to use the VPN. Same goes for Plex video too. OTOH I would like some discovery-based things to work; Windows filesharing for sure. I don’t really understand what I need.

To start simple I decided just to create a basic tunnel on a new subnet (192.168.7.0/24) between Linux boxes in the two houses. Doesn’t really solve my problem but those tunnels could later be gateways for house traffic. I am ignoring my Ubiquiti routers entirely. Folks have gotten various VPN solutions working on that, including Wireguard, but I’m concerned at the longevity of any hackery solutions for doing that. Maybe later.

Anyway setting up a simple tunnel between two Linux boxes is easy. I used WireGuard for this, apparently the modern VPN solution. It really is a breeze both to install and to understand. I mostly used this guide with some consulting of this other guide. Note WireGuard itself doesn’t really have good docs. For instance I cannot find anywhere a man page style reference for the conf files that wg-quick uses, never could find a definition of exactly what “Address” or “Endpoint” means. It’s sort of clear from context and examples but...

Anyway following the guides it all basically just worked. Very simple too. Wireguard’s model is peer to peer; peers are identified by a public/private key pair (and an internal ID). Tunnels between peers then get created as needed and each end of the tunnel is given an IP address. The guides are written in terms of a client/server setup so I’ll use that language from now on.

The main gotcha I had is when I first set up the server in 192.168.0.0/24 I gave the Wireguard tunnel itself an IP address in the same subnet, 192.168.0.0/24. That’s definitely a bad idea; my Linux box decided to use that new route instead of the ethernet and I had to reboot it. That’s why I put the Wireguard tunnel in a new subnet (192.168.7.0/24) instead. The other gotcha is I set SaveConfig=true. It’s a neat idea; you configure the thing on the fly with the command line and then the config file is updated. But at the same time I was editing the config file to fix things and restarting WireGuard and my changes kept getting clobbered. Pick one or the other style of creating a config, don’t do both.

Anyway, now I have a working tunnel so my two Linux boxes can talk to each other. The next step is using this tunnel to do “other things” like mount Windows fileshares, etc. Still not sure how I’ll go about that.

Updates below

I’m going to keep updating this post as I hack more. I don’t feel like having the discipline to mark every update, so just expect stuff to be added over time.

I realize I don’t really know what I want from this VPN setup. I don’t want full bridging; I want some things like media servers to not be discovered over the WAN link. I do want a lot of transparency though. I’m going to start now by making sure every device in SF (192.168.0.0/24) can talk to every device in GV (192.168.3.0/24). I’ll worry about broadcasts and discovery later, if at all.

Several folks have asked “why not Tailscale”? That is probably an excellent answer; Tailscale is a nice VPN product built on top of WireGuard. I was under the impression it was client oriented, not network oriented, so you had to install Tailscale on every device. But that’s not really true; they have a “subnet router” capability that works for other devices. At this point I’m mostly not using it because I got WireGuard itself running OK and I want to tinker more.

Starting to think I should run Wireguard on my Ubiquiti boxes afterall. One of my routers is a Ubiquit Dream Machine which is sort of different software: here’s a port of Wireguard to Dream Machine.

Netcat for testing

I want to be able to test if packets get through but without the full round trip ICMP ping requires. That’s what netcat is for. On the server side; nc -klu 3333. On the client side, testing sending a packet: echo foo | nc -u 192.168.3.75 3333. Note the client netcat doesn’t hang up after sending the packet, it keeps the socket open looking for input.

Routing the subnet

The basic wireguard setup gets a tunnel going. You can ping the tunnel endpoint IP address (192.168.7.3). But not the “real” IP address of the machine at the other end (192.168.3.75). To add that, we need a route. Doing this manually is a mistake (wg-quick does this...) but it was the first thing I tried and half works, so I mention it here:

route add -net 192.168.3.0/24 gw 192.168.7.3 wg0

Doing that is enough to let UDP packets through. nc -u 192.168.3.75 3333 works! However traceroute (and presumably ping) fails with the mysterious message send: Required key not available. Turns out that’s an error message from Wireguard and in my case is caused because 192.168.3.0/24 is not one of the “Allowed IPs” in the peer definition for the Wireguard tunnel. Wireguard is blocking the traffic.

The solution is to add the subnet to AllowedIPs. AllowedIPs = 192.168.7.0/24, 192.168.3.0/24. Add that and restart and pings get through and get replies. Moreover there’s no need to manually add the route because wg-quick does it for you. “It infers all routes from the list of peers’ allowed IPs, and automatically adds them to the system routing table”. Nice! Long story short, to get a single machine on two different subnets talking to each other via Wireguard it’s sufficient to add each’s subnets to the other’s AllowedIPs.

Next step: get the rest of the LAN on each side to know to route traffic for the other subnet through Wireguard. I know this means adding a static route (probably in my router). I’m less clear what, if anything, I have to do to configure the Linux box to act as a router that forwards the packets for that destination. When searching for info on this I found a lot of advice about using IPTables masquerading for a NAT setup. Yuck, no!

Update: turns out basic routing just works already with no extra config. It may help that my Linux box which is the Wireguard endpoint already has IP Forwarding turned on. Anyway on my Windows box I just did route add 192.168.3.0 mask 255.255.255.0 192.168.0.65 and now my Windows machine can talk to the other end of the Wireguard endpoint on its “real” address 192.168.3.75. Can’t talk to anything else on the remote network though, but that’s because they don’t know a route back yet.

Of course I don’t want to manually have to add this route to everything! A better solution is not to set the route on my Windows desktop but instead add a static route to my Ubiquiti Dream Machine. It’s hidden under Settings / Advanced Features / Advanced Gateway Settings / Static Route. The Destination Network is 192.168.3.0/24, the next hop is 192.168.0.65, where the WireGuard endpoint is.

C:\Users\Nelson>tracert -d 192.168.3.75

Tracing route to 192.168.3.75 over a maximum of 30 hops

  1    <1 ms    <1 ms    <1 ms  192.168.0.1
  2    <1 ms    <1 ms    <1 ms  192.168.0.65
  3    60 ms    59 ms    59 ms  192.168.3.75

That’s it! Now everything on my 192.186.0.0/24 LAN can initiate connections to 192.168.3.75. Nothing else in 192.168.3.0/24 though because I haven’t added the route on that side yet. The big thing is my Windows box can now access the remote fileshare at \\192.168.3.75\. I doubt it will show up as discoverable but a direct connection works.

This is all working well enough now I’m close to needing to document the final setup and making it persistent. It may actually be persistent; I just did the systemctl enable command that gets wireguard to run at startup.

Typesetting multiline text in SVG

Having worked on rendering text on my AxiDraw, the next question is how to typeset text. The challenge is SVG 1.1 text elements are explicitly single line, no automatic wrapping. There’s no text flow in an SVG renderer, you have to do it yourself. (SVG 2.0 promises to add this, and I guess there was an ill fated effort in SVG 1.2).

There is a nice way to express multiline text in SVG using the <tspan> element.

    <text class="verse">                                   
        <tspan dy="1.2em" x="10"
               >How doth the little crocodile</tspan>      
        <tspan dy="1.2em" x="10" dx="1em"
               >Improve his shining tail,</tspan>          
        <tspan dy="1.2em" x="10"
               >And pour the waters of the Nile</tspan>
        <tspan dy="1.2em" x="10" dx="1em"
               >On every golden scale!</tspan>
    </text>

Note the use of dy to do the line spacing; that’s nearly automatic. (the dx parts are for some fancy indentation. Not sure why x is being set explicitly every time.) All you have to do is decide where to break the lines! Ha.

There’s also some support for automated kerning with the textLength attribute.

I can’t find a Python library that will break lines for you or do more fancy automated typesetting. It is possible in Javascript, or at least you can write code to do it, using the getBBox() function to inspect the pixel size of some text and use that to break lines.

One approach in Python would be to calculate metrics for a font and then use that to estimate the width of a word. That won’t work if the kerning isn’t predictable. Also it’s a lot of work to do right for arbitrary fonts.

A second approach is to use something to render SVG in Python and use that to measure widths. Something like the pyrsvg wrapper for librsvg. That’s a lot of code to bring in though and I’m not confident it would perform very well. py3rsvg looks promising as a lighter / standalone option. See also this discussion.

A third option is to skip SVG text entirely and work directly with HersheyFonts generated paths in Python. The library has support for inspecting the width of glyphs; bounding box, etc. But this library is a separate work from the Evil Mad Scientist / AxiDraw code for Hershey text, the one that’s an Inkscape extension. They’ve done some nice work on fonts, etc so I’m not sure how much you’re giving up going with this other code instead. SVG Fonts, for one; I think the HersheyFonts library is using the actual Hershey format. That means no Unicode. I’m not sure the ESM HersheyText Inkscape code can be repurposed though, it seems to be written in a very Inkscape-specific way and relying on their renderer. I could be wrong about that though.

I think that last option may be best; it’s closer to the actual SVG I want to send to the plotter.

AxiDraw and italic pens

On the back of my text experiments I decided to give italic calligraphy a try. Unlike other calligraphy which requires managing pen pressure, italic calligraphy is done with a simple stub nib (or italic nib) of fixed width. The drawing end is a short line, not a circle. It’s usually held at a 45 degree angle so that both vertical and horizontal lines are wide but a 45 degree line is very thin. It looks beautiful when you draw curves.

Italic calligraphy is a whole art, one of which I am mostly ignorant. But this website has a good introduction to the basics and there’s lots more resources on line. For a pen I am using the Sakura Pigma Calligrapher; their Pigma Microns are my favorite ordinary pens (needle point).

Italic pen nibs need to be held at a specific 45 degree angle to work well, this adapter from AxiDraw makes it possible. Easy to install, although note it’s not compatible with their other pen-holding addon, the one that lets you adjust angles. It took me awhile to understand why they mounted it in the direction shown in the photos. That keeps the pen tip out from under the robot arm, a good thing. However it means you need to place the AxiDraw on the right edge of the page; if you’re used to the AxiDraw being above your design (“on top”) then you need to rotate your images 90 degrees. (This orientation is natural for the AxiDraw; it’s designed for A4 pages in landscape orientation, wider than tall.)

The hardest thing is getting the rotation of the pen correct. You want it positioned so the entire flat line of the nib is in full contact with the page. That’s very fiddly. What I found worked best for me was to set the pen drop height fairly high, like 50%, and position the pen manually and screw it down tight. Then go back and adjust the pen drop to lower, say 40%. That way it won’t ever drop the pen just barely above the paper, particularly if the paper is not entirely flat.

The other thing I learned on my first experience is it works better drawing very slowly, like at 10%. I don’t know if that’s a limitation of the pen I’m using or just a reality. I also suspect it would work better with more pressure, ie a weight attached to the pen itself.

Anyway, after about 15 minutes off fiddling I got some plausible looking things. Here’s a test pattern, also some simple test text. The text is a 10mm high font (with a 2mm wide nib) converted to a stroke font via Hershey Text, using the EMS Readability font. Those simple stroke fonts are a virtue if you’re getting interesting design thanks to the pen nib! The test circles show some ink flow problems I still need to work on. Also I think the font size is a bit too small for the nib.

Update

Made some nice progress.

I figured out how to align the pen more easily. Gently! Let the pen just drop to the page and find its own level. Then don’t overtighten the grip on it, since that will move the pen. It’s still really fiddly though! I also got some mileage from a simple pen-aligment test print.

The 2mm Pigma Calligrapher definitely needs to write slowly. Even 20% speed is too fast; 10% seems OK but very occasionally skips ink. I wonder if that’s a deliberate decision, calligraphy artists tend to draw slowly. Or maybe it’s a requirement of the very wide ink aperture. Anyway it’d be nice if it were faster!

Below, on the left, I made a nice font sample using 10mm sans-serif as my input to Hershey Text and a variety of fonts. All of these look decent, although not are all equally readable. The italic / slanted fonts look better (duh! italic calligraphy is usually written with a slant). The hand script fonts with curves look nicer too. 10mm with a 2mm nib is still too small. On the right is the same image shrunk down 75% (so, 7.5mm?) with a 1mm nib. Looks way, way better.

Anyway this all looks pretty plausible as a basis for fancy looking robot handwriting. I think my next interest is getting some nicer stroke paths for the pen to follow, something more like a real calligrapher would do. I feel this stuff is very well codified by instruction. I should try programming that myself from videos! Or look into digitizing an actual expert’s motions.

In the sample images above, the font for “10mm sans-serif” is EMS Pancake. I included that as a joke but actually it looks pretty good.

GoodReads for games

I love GoodReads. It’s terrific having a giant list of books I’ve read and my thoughts about them. Also it’s got a nice community, a low key social network. There’s a lot of reasons to complain post-Amazon-acquisition, particularly about how little development the site gets, but it’s still good.

I’ve never managed to get into Letterboxd, the equivalent popular site for movies. I’ve started using it again recently and am doing a little better but I sure wish I had notes on the 500+ movies I’ve watched in my life, particularly back when I was watching 3 movies a week.

So what about video games? I went looking and found various options. See also this list. “Reviews” refers to folks who at least entered a rating for the game. I’m using three games to compare user populations: Ratchet & Clank Rift Apart (2021), No Man’s Sky (2016), and Majora’s Mask (2000).

Grouvee

No Man’s Sky: 3005 users, 1026 reviews
Rift Apart: 274 users, 116 reviews.
Majora’s Mask: 5404 users, 2754 reviews

Steam import implemented
Export implemented

GG

No Man’s Sky: 350 users, 44 reviews.
Rift Apart: 337 users, 129 reviews
Majora’s Mask: 60 users, 51 reviews

Steam import on roadmap
Export not mentioned?

Backloggd (numbers approximate)

No Man’s Sky: 1500 users, 900 reviews.
Rift Apart: 446 users, 380 reviews
Majora’s Mask: 4200 users, 2500 reviews

Steam import on roadmap
Export on roadmap

HowLongToBeat (backlogs + beat)

No Man’s Sky: 2700 users, 256 reviews
Rift Apart: 1000 users, 285 reviews
Majora’s Mask: 2500 users, 516 reviews

Steam import implemented
Export implemented

Main conclusion from that is GG is a much smaller userbase. Anecdotally, Backloggd shows up in recent discussions on ResetEra, etc. Grouvee and HowLongToBeat have been around longer. I also think it looks like Backloggd is as popular as Grouvee now but missed out a few years ago when No Man’s Sky came out. I like how many folks on these platforms rate Majora’s Mask, that’s a classic and sophisticated game for folks to know.

I like that Grouvee and HowLongToBeat already has the import and export features I want.

Sleep position tracking and OSCAR

Update: Torena now exports Somnopose-style CSV data right in the app. Yay!

I’m interested in tracking the position my body is in when I sleep: on my side or back. mostly. I’ve found a good solution for that for Android, the app Torena. You strap your phone to your chest with a runner’s belt, run the tracking app all night (30% of battery), and it produces nice little reports. It’s a good app, well designed, and worth the $10 if you need this kind of tracking. Somnopose is a similar app for iOS.

http://www.apneaboard.com/forums/attachment.php?aid=33968

Pretty straightforward. But to make this really useful I want to pull the data in to OSCAR, the CPAP / sleep apnea tracking app that’s also recording all sorts of information about my breathing patterns, my blood oxygen, etc. I want to answer questions like “does sleeping on my back cause breathing problems?” and “do apnea events cause me to turn over, or does turning over cause apnea events?”. I succeeded! Code is in this gist.

oscar-screenshot.png

I made the import via OSCAR’s Somnopose CSV support. The code linked above converts Torena’s JSON export to a format enough like Somnopose data that OSCAR would import it. It’s a bit of an impedence mismatch. Somnopose basically just records the phone’s rotational position in two axes, so it’s a data stream like “-89 -93 -92 -73 -23 4 2 1” with timestamps (that’d be rolling over from one side to stomach). Torena classifies the raw numeric data and exports categorized data, like “Left... Back... Right” with timestamps. So I just converted that back to numbers, albeit coarse ones. One extra trick is I had to add some extra CSV rows to mark the end of old positions so that OSCAR would draw square waves, not sawtooths.

Next steps

I did this convertor as a one-off just to see if it’d work. It does! To make this useful there’s three options:

  1. Turn my convertor into a nice reusable program
  2. Ask the Torena devs to export an OSCAR-compatible Somnopose CSV in the app
  3. Design a new input format for OSCAR along with the Torena dev

Option 2 is probably easiest, if the Torena dev is amenable. Option 3 would probably be better but requires some product design effort with the OSCAR team.

FWIW I think having the raw numeric data is probably more useful. You can measure partial positions that way. Also maybe infer movement activity from the magnitude of changes. But really the data display needs to be rethought: coding position as an angle from -180 to 180 is not intuitive. The classifying Torena does in-app makes sense here, but maybe it could be done in OSCAR instead.

Another specific problem to solve is time synchronization; Torena has its own clock independent of the CPAP machine and O2 sensor that OSCAR is getting data from. OSCAR doesn’t seem to have a good solution for that although you can at least input a manual offset for some things. It’s important to get it at least to the right minute, if not second.

See also the discussion on Apnea Board.

ez Share hacking notes (WiFi SD cards)

tl;dr: I found a way to download arbitrary files off an ez Share, but no way to list the files. Also ez Share only runs as an access point with a DHCP server which makes it super awkward.

I’m trying to get a working WiFi SD card. This is a thing that acts like a normal SD card, typically for a camera, but also has an embedded system so you can download files from it over WiFi with the card sitting in your camera. I want to use this to get data off a device that writes to an SD card and has no network interface.

Eye-Fi pioneered this tech way back in 2005. They’re gone now. Transcend made a line of WiFi SD cards for awhile. So did Toshiba with their FlashAir. They’re all off the market or only buyable for ridiculous prices. The only thing left on the market is a Chinese product called ez Share.

Long story short, ez Share is not suitable for general file usage. It’s got a very restricted design that makes it only good for photos and only in an awkward WiFi way. I’ve got some detailed notes below on my hacking attempts. Meanwhile I fond a FlashAir I could get from Germany (via eBay) for $50 so I’ve ordered that, it should be more amenable.

ez Share limitations

The WiFi only runs as an access point. You can’t make the card act like a client on your existing WiFi network. That means you have to swap your WiFi adapter to its network to download from it.

The other big problem is the card only presents a Web UI. And that web server seems hellbent on making sure you only download images from specific directories. It only wants to serve files in directories named DCIM/100CANON or DCIM/EOSMISC. And those files need to have image or video extensions. See below for a partial workaround to download arbitrary files. But I can’t get a file listing.

I couldn’t find any sign of a firmware update capability. Too bad, that might be a way to hack the thing to be more useful. Update: Biorn says there’s a way to update firmware via USB and some details here.

ez Share resources

These ez Share cards have been around for 8 years or so, but surprisingly there’s precious little information in English from folks trying to hack them. Either because they weren’t sold in to the US/Europe or because they’re so inflexible. Here’s some links I did find:

  • A download script in bash. Seems to be written for a different firmware than I have, the methods don’t work.
  • GitHub repo for that download script.
  • A clever hack to use the card with a microscope that writes to another directory. He corrupts a FAT32 filesystem to create the equivalent of a hardlinked directory.
  • Hardware notes on using the card without a camera. Doesn’t address software problems.
  • Game console hackers at GBA Temp have tried using it to run games without much success I could find.
  • An official manual.
  • The default root password is “admin”.
  • The ez Share creates a WiFi access point with SSID “ez Share”, password “88888888”.
  • My card is version 4.4.0. In detail:
    LZ1001EDPG:4.4.0:2014-07-28:62 LZ1001EDRS:4.4.0:2014-07-28:62 SPEED:-H:SPEED

Download files

I poked around at the web server trying to coerce it to give out more info than it wanted to. The big success is I was able to download arbitrary files with URLs like this:

http://ezshare.card/download?fname=2071A5~1.EDF&fdir=..\DATALOG\20210719

Note the ..\ in the path name, to get out of DCIM. The filename has to be the 8 character version; it’s a FAT32 filesystem but the firmware doesn’t seem to know it. Also there’s no ftype specified; that’s needed to avoid the “file extension must be a .jpg or other image/movie format” code.

Unfortunately trying similar tricks to get a listing of files via the web interface at /photo did not work. Neither did trying to download a whole folder; you can do that with images in the DCIM directory but apparently not with arbitrary files.

Below are some very detailed notes on exactly what I tried / learned

ez Share file and directory URLs

List photos
http://ezshare.card/photo?
http://ezshare.card/photo?vtype=0&fdir=100CANON&ftype=0&devw=320&devh=356&folderFlag=0

List videos
http://ezshare.card/photo?vtype=0&fdir=100CANON&ftype=1&devw=320&devh=356&folderFlag=0

Alternate file list? From another firmware:
http://192.168.4.1/dir?dir=A:

Download an image
http://ezshare.card/download?fname=MESQUA~1.JPG&fdir=EOSMISC&ftype=0&time=1391742389

Hack to download any file:
http://ezshare.card/download?fname=2071A5~1.EDF&fdir=..\DATALOG\20210719

Download selected photos:
http://ezshare.card/download?num=2&fdir=EOSMISC&folderFlag=0&fn1=MESQUA%7E1.JPG&fn2=202107%7E1.JPG

Download folder:
http://ezshare.card/download?fdir=EOSMISC&ftype=0&num=2&folderFlag=0

Doesn’t work but looks like it should: hack to download any folder
http://ezshare.card/download?fdir=..\DATALOG&ftype=0&num=2&folderFlag=0
http://ezshare.card/download?fdir=..\DATALOG\20210719&ftype=0&num=2&folderFlag=0

other ez Share URLs

First page:
http://ezshare.card/publicdir/welcome.htm?

Redirects to /publicdir/sendir
Redirects to
http://ezshare.card/photo

Change config screen (password)
http://ezshare.card/publicdir/index.htm

Admin page:
http://ezshare.card/config?vtype=0

Cloud Lab advertisement
http://ezshare.card/i-share/res/clab_en.htm

Version request (reported)
http://192.168.4.1/client?command=version
LZ1001EDPG:4.4.0:2014-07-28:62 LZ1001EDRS:4.4.0:2014-07-28:62 SPEED:-H:SPEED

Starlink improvements

I’ve been running the TIG stack monitoring my Starlink connection for about 3 months now. I made a couple of posts to Reddit recently about the results of that. Bottom line: both latency and packet loss have improved significantly. Latency to 8.8.8.8 dropped from 44ms to 37ms average around July 15. And in the last month or so packet loss dropped from 2.1% to 0.6%.

Here’s a copy of the two reddit posts.

Latency improvement around July 15: 44ms to 37ms.

Noticed something interesting in my automated monitoring; my latency has improved. I’m measuring with pings to 8.8.8.8 every few seconds using Telegraf. The average has been about 44ms for a long time, dropped to about 42ms starting July 9, and starting July 15 dropped to 37ms.

It’s hard to accurately measure performance with a connection as variable as Starlink, but I have enough consistent data I think this is a real trend. Graph is here: https://i.imgur.com/fwuG2Yc.png

https://i.imgur.com/fwuG2Yc.png

I don’t know where latency improved. The changes in the graph don’t seem correlated to firmware updates. There’s no obvious change in bandwidth, although measuring that accurately is really hard. The latency improvement could well be in the terrestrial links between Starlink ground stations and Google DNS; that’s not very interesting. Or maybe it’s in the satellite network itself. No way of really figuring it out from here I think. But FWIW I’ll append a current MTR.

 Host                   Loss%   Snt   Last   Avg  Best  Wrst StDev 
 1. 192.168.3.233        0.0%   189    0.5   0.4   0.2   0.6   0.1 
 2. 136.22.110.161       0.0%   188   35.9  31.1  21.2  55.4   6.6 
 3. 142.250.163.162      0.5%   188   33.2  30.8  19.5 141.2  10.5 
 4. 108.170.242.225      0.0%   188   33.5  30.3  19.8  50.4   6.2 
 5. 108.170.236.61       0.0%   188   34.5  31.4  21.5  59.8   7.7 
 6. 8.8.8.8              0.0%   188   35.1  30.6  19.2  56.8   7.4

Packet loss improvement: 2.1% to 0.6% over three months

My packet loss has improved over the last three months: from about 2% to 0.6% by my measurement. Don’t get hung up on the absolute number but I think the improvement trend is real. See below for more numbers and the graph here: https://i.imgur.com/RCqI6mp.png

https://i.imgur.com/RCqI6mp.png

Nothing significant has changed at my site. What I’m seeing is consistent with what Starlink has been telling us: reliability should be improving as they fill out the constellation. My antenna is mounted on a roof in Grass Valley, CA with some minor tree obstructions. I’ve been hoping with more satellites that Starlink could work around the obstructions; there was a promise a few months ago of a firmware update to do that.

https://i.imgur.com/ju86o54.png

Anecdotally I’ve been using Starlink exclusively on my desktop computer for about 8 weeks now. It used to be annoying about 10 times a day to have to wait for 5-10 seconds for the network to respond again. Now it feels like 2 times a day. But that’s just perception, the numbers in my report say more.

Unfortunately I’m having a hard time getting a great graph of the trend but it should be visible in the graph linked above. I’m also seeing a similar trend in Dishy’s own reported drop rate. Here’s the average packet loss percentage from my pings along with Dishy’s average drop rate over 7 day periods starting at various times:

  • Week starting 5/1: 2.1% / 0.024
  • Week starting 6/1: 2.0% / 0.027
  • Week starting 7/1: 1.0% / 0.008
  • Week starting 7/13: 0.6% / 0.006

FWIW the same ping tests with my old fixed wireless WISP was about 1% packet loss. But those were just one-off lost packets. Starlink’s multi-second outages have been annoying. They’re getting better!

Appendix: my ping data comes from Telegraf’s ping plugin. I’ve got it configured to send 5 pings at a time, every second. As always, when measuring with ICMP ping all sorts of other things could explain changes in behavior. But in this case the ping data confirms my general perception and also Dishy’s own reported drop rate.

Obstruction improvement: 0.7% to 0.07% in the last month

The recent info email update got me looking closely at my obstruction reporting stats. Historically I’ve had about an 0.74% obstruction rate thanks to a few trees. In the last 7 days it’s been 0.070%, or 1/10th the rate. You can see the graph of Percent Obstructed here: https://i.imgur.com/tJmK04q.png. A second related graph is Seconds Obstructed: https://i.imgur.com/LjcQWvE.png

Note these are Dishy’s own reported numbers, similar to the graph you get in the app. This trend is entirely consistent with my own monitoring with pings. I think in the last month the planed “Connecting to the Best Satellite” has finally come to full usage.

(One in a series; I’ve recently posted other posts here on packet loss and latency improvements. I’d like to do one more post measuring lengths of outages, those 10 second failures we used to get. I think that’s also improved significantly but they haven’t gone away entirely.)

https://i.imgur.com/ygfFagX.png

A false bandwidth result

I noticed the following graph (that is false) of Speedtest by Ookla results showing bandwidth decreased around August 1.

I wrote a whole long ass exploration of why my Starlink bandwidth might have decreased. It’s all wrong! Turns out somehow Speedify got re-enabled on my server August 1, I don’t know how. And Speedify’s VPN servers typically cap out about 120 Mbps for me. That’s it, that’s why my bandwidth went down.

Unfortunately this invalidates all my network monitoring data from August 1 to August 6. Doesn’t invalidate any of the data posted above, that was all in July before this change. But I will need to remember going forward to ignore all the weird changes I started seeing August 1.

I’ve removed Speedify entirely from the Linux box.

Nicer text with an AxiDraw pen plotter

(Expert readers; skip down to “The Good Stuff”).

I’m looking for some tools / inspiration for creating text with my pen plotter. The issue here is that most of desktop typography doesn’t apply to plotters because it all relies on filled fonts, effectively bitmaps. Pen plotters draw single lines. You can try drawing and filling the outline of a traditional TrueType font but that seldom looks good. OTOH there’s a whole art form of handwriting text with pens, so maybe some ideas from artists that can be borrowed?

Unfortunately traditional calligraphy is out because most calligraphy requires varying pen pressure to change line width and that’s something an AxiDraw and most other plotters simply can’t do. You can get somewhere using an italic nib (basically a pen tip that’s a wide line, not a point) but it’s pretty tricky. And it still relies on you having a font to draw the shapes.

The other quick solution is what’s called “Hershey Fonts” (after a Dr. Hershey!). AxiDraw has support for them as does this third party product but the actual classic Hershey fonts are, let’s just say, unaesthetic. The image below was plotted poorly with a bleeding pen on cheap paper, so ignore the dots and bleed, but nothing’s gonna fix these tragic shapes.

Update: when writing this up I neglected to talk about the EMS fonts, a series of free SVG fonts included for use with the HersheyText 3.0 plugin and SVG font format

The Good Stuff

So I asked on the drawingbots Discord for inspiration and got a couple of good suggestions.

A simple option is to just use better fonts. Single Line Fonts sells a handful of nice looking fonts for very modest prices, $20 or less. (And try the coupon TAKE25OFF). A bit heavy towards cursive scripts (but not true cursive, since the letters don’t actually connect.) There’s a very limited set of SVG fonts but a larger number of TTF fonts. I think those can be used with an AxiDraw OK, they mention that each line is drawn twice because of technical requirements.

A more sophisticated (and expensive) option is Quantum Enterprise’s single line fonts. There’s 59 fonts in a variety of styles. At $130 a font these aren’t cheap! But they’re nicely designed and have a lot of technical details on how to best use them with AxiDraw. Also these aren’t simple fonts; they have variant characters so that you can draw text without every single instance of a letter looking identical. They have a software tool (“Scriptalizer”) that will render variable text for you, demo it here. They also offer a service that will generate a custom font from a handwriting sample for $350.

Inspirations

One interesting point someone made is that a lot of what’s driving handwriting with plotters is marketing. Folks trying to mass-print mailers that look like they were hand written so you don’t just throw their junk mail immediately in the trash. I wonder if that’s part of AxiDraw’s business; you’d want a faster machine for mailing thousands of pages but it’s suitable for small runs of envelopes, etc. Anyway, sleaziness aside I’m glad to lift any approached they’ve developed. One interesting merchant in this area is Handwrytten, they sell robot-hand-written cards as a service ($3.25 a card!).

But what I really want to see is experimental / artistic plotter typography. Something like the explosion of interesting art folks were doing in the early 90s as desktop publishing technology made it so easy for artists to manipulate text. Stuff like this or this, only plotter-focussed. Someone must be doing this kind of work out there but I haven’t found it yet.

I’m also wondering what the state of the art is for true cursive script being generated in software. Something similar is essential for Arabic typesetting and is more-or-less a solved problem, so it seems likely that English cursive script could be doable?

Updates

There’s some good resources on the EMS Wiki also here. And some other stuff.

I tried taking a TTF font from vLetter (Hobbs), converting it to SVG font format with Convertio, and then using it with Axidraw Hershey Text (in Inkscape). Unsurprisingly this generates an outline font, not a stroke/engraving font, so each character is overdrawn twice (slightly off shifted). Probably no point converting the TTF to an SVG Font; the text to path tool in Inkscape can do the same thing. Anyway, my sample of 10pt text looked OK with a very tiny 0.05mm Staedtler pigment liner but it’s obviously not as good as a real stroke font. (Note the tiny hollow letters; that’s a fine nib on that pen, anything normal width would work better.) It’s not a bad option though if you want a quick handwriting look; vLetter has a lot of free handwriting fonts.

Playing with this made me wonder how hard converting a TTF outline font to a stroke font for SVG would really be. Taking the centerline of the font would be one possibility, although you would have to identify that with some heuristics (maybe following the TTF outline?) Also generating a path that’s inset a bit from the outside of the bitmap would work more nicely than centering the path on the edge; that would account for the width of the pen ink. For research, a program called SFEdit can do it but it looks like all it does is do centerlines for paths (not fonts).

BTW I’m a total novice at Inkscape, but the way it handles flowed text is confusing to me. I had reasonable luck flowing text to a circle and then converting it with Axidraw’s Hershey Font extension. First I had to do Text / Convert to Text to change the type from “text flow-in-shape”. Also it only worked if the text was left justified. Center justified ended up being positioned entirely wrong.

Mike Migurski reminds me his Skeletron project solved a similar centerline problem, for maps. Code is here. He says he designed it using ideas from this paper. Hand-waving a lot, the technique is to calculate Thiessen polygons (related to Voronoi diagrams) for the roads, then calculate the center of the edges of those polygons. The flowline for the center of the road goes through those polygon centers.

Some links on automating centerline creation in Inkscape: