<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.2.2">Jekyll</generator><link href="https://pingle.org//feed.xml" rel="self" type="application/atom+xml" /><link href="https://pingle.org//" rel="alternate" type="text/html" /><updated>2026-05-28T17:07:37-04:00</updated><id>https://pingle.org//feed.xml</id><title type="html">pingle.org</title><subtitle>Everything you never wanted to know.</subtitle><author><name>Jim</name></author><entry><title type="html">Linux Pi OTG Gadget Storage Script</title><link href="https://pingle.org//2026/05/02/linux-pi-otg-gadget-storage-script" rel="alternate" type="text/html" title="Linux Pi OTG Gadget Storage Script" /><published>2026-05-02T23:30:00-04:00</published><updated>2026-05-02T23:30:00-04:00</updated><id>https://pingle.org//2026/05/02/linux-pi-otg-gadget-storage-script</id><content type="html" xml:base="https://pingle.org//2026/05/02/linux-pi-otg-gadget-storage-script"><![CDATA[<p>For a few years now I’ve been using Pi and Pi-like devices with USB OTG ports
to emulate USB mass storage as a simple way to have one device with a bunch of
disk images I can choose from and boot as needed. I cobbled together a script
to automate setting up this process since it is not at all straightforward.</p>

<p>I finally got around to cleaning up the script and writing a README for it,
which I put into a repository over at Codeberg:</p>

<p><a href="https://codeberg.org/jim-p/otgimagemgr">https://codeberg.org/jim-p/otgimagemgr</a></p>

<p>I have used this script with success on Raspberry Pi Zero 2W devices, along with
an Orange Pi One and an Orange Pi Lite.</p>

<figure class=""><a href="/assets/images/rpizero2w.jpg" class="image-popup" title="Raspberry Pi Zero 2W with USB cables and an HDMI adapter
"><img src="/assets/images/rpizero2w.jpg" alt="" /></a><figcaption>
      Raspberry Pi Zero 2W with USB cables and an HDMI adapter

    </figcaption></figure>

<p>I know there are other ways to do similar things, like <a href="https://www.plop.at/en/bootmanager/intro.html">Plop Boot Manager</a>,
but I prefer this way as it works more closely to using the hardware directly,
which makes a difference for some of my use cases.</p>

<p>Additionally, this functionality can be turned on/off remotely without
physically unplugging it, making it superior in cases where you cannot (or do
not want to) leave the boot media in place. If the target device has a serial
console, it can all be handled remotely without hands on the hardware.</p>

<p>Another bonus is that you can keep an image in place to act like a writable
thumb drive. While the script doesn’t facilitate this, you can also mount that
image locally on the Pi itself as a way to transfer files to/from a host without
using network connectivity.</p>

<p>Hopefully someone else finds this useful!</p>

<p>I also have a couple devices running FreeBSD that also can serve disk images
over OTG, but they operate very differently, and this script cannot work.
However, it’s not nearly as complicated to setup as Linux so I have not bothered
to automate the process there. That’s a post for another day, however.</p>]]></content><author><name>Jim Pingle</name></author><category term="Computers" /><category term="Linux" /><category term="Raspberry Pi" /><category term="Orange Pi" /><category term="OTG" /><summary type="html"><![CDATA[A script to emulate USB mass storage using certain Pi devices running Linux]]></summary></entry><entry><title type="html">GNU Screen 5.x Status Bar Color Changes</title><link href="https://pingle.org//2026/04/26/screen-5-status-color-changes" rel="alternate" type="text/html" title="GNU Screen 5.x Status Bar Color Changes" /><published>2026-04-26T20:00:00-04:00</published><updated>2026-04-26T20:00:00-04:00</updated><id>https://pingle.org//2026/04/26/screen-5-status-color-changes</id><content type="html" xml:base="https://pingle.org//2026/04/26/screen-5-status-color-changes"><![CDATA[<p>Some of my hosts, namely those running FreeBSD, have had GNU Screen 5.x for a
about a year now, while most of the others running various flavors of Linux
still have version 4.x. One major change that happened in GNU Screen 5.0 is
that they migrated to a new <code class="language-plaintext highlighter-rouge">hardstatus</code> color syntax and deprecated the old
style. This means that if you have a nice color status bar at the bottom of
your <code class="language-plaintext highlighter-rouge">screen</code> windows, it almost certainly will need manually changed to the
new syntax. I don’t rely on the status bar as much on the FreeBSD hosts so it
had escaped my attention that my customized version had been broken on the hosts
with screen 5.</p>

<p class="notice--info">Why don’t I use <code class="language-plaintext highlighter-rouge">tmux</code>? Well, I’ve been using GNU Screen for 30 years, I like it,
I’m used to it, and it can talk directly to serial ports without involving any
extra software.</p>

<h1 id="old-syntax-example">Old Syntax Example</h1>

<p>In my <a href="/2022/04/02/raspberry-pi-serial-console-server">previous post</a>
about using GNU screen as a part of a Raspberry Pi serial console server, I
included a status bar example which is actually the default FreeBSD status bar
they include in <code class="language-plaintext highlighter-rouge">/usr/local/etc/screenrc</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>hardstatus alwayslastline
hardstatus string '%{gk}[%{G}%H%{g}][%= %{wk}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%= %{g}]%{=b C}[%m/%d/%y %C %A]%{W}'
</code></pre></div></div>

<p class="notice--info">This example is the older Screen 4.x color syntax, which specifies colors using
letters, and is now deprecated in Screen 5.x.</p>

<h1 id="color-code-changes">Color Code Changes</h1>

<p>In the new style, colors are coded as 0-15 for basic ANSI, 0-255 for 256 color
mode, and for truecolor terminals it can either use a hexadecimal code starting
with <code class="language-plaintext highlighter-rouge">x</code>, or HTML notation as hexadecimal digits following a <code class="language-plaintext highlighter-rouge">#</code>. Foreground
and background are specified by separating them with a semicolon.</p>

<p class="notice--info">The <a href="https://man.freebsd.org/cgi/man.cgi?query=screen&amp;apropos=0&amp;sektion=0&amp;manpath=FreeBSD+15.0-RELEASE+and+Ports&amp;format=html">screen(1)</a>
man page says that 3-character HTML style notation should also work, but in my
brief testing it did not produce the expected results.</p>

<table>
  <thead>
    <tr>
      <th>Color Name</th>
      <th>Old Color</th>
      <th>New Color</th>
      <th>Truecolor</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>Black</td>
      <td><code class="language-plaintext highlighter-rouge">k</code></td>
      <td><code class="language-plaintext highlighter-rouge">0</code></td>
      <td><code class="language-plaintext highlighter-rouge">#000000</code></td>
    </tr>
    <tr>
      <td>Maroon</td>
      <td><code class="language-plaintext highlighter-rouge">r</code></td>
      <td><code class="language-plaintext highlighter-rouge">1</code></td>
      <td><code class="language-plaintext highlighter-rouge">#800000</code></td>
    </tr>
    <tr>
      <td>Green</td>
      <td><code class="language-plaintext highlighter-rouge">g</code></td>
      <td><code class="language-plaintext highlighter-rouge">2</code></td>
      <td><code class="language-plaintext highlighter-rouge">#008000</code></td>
    </tr>
    <tr>
      <td>Yellow</td>
      <td><code class="language-plaintext highlighter-rouge">y</code></td>
      <td><code class="language-plaintext highlighter-rouge">3</code></td>
      <td><code class="language-plaintext highlighter-rouge">#808000</code></td>
    </tr>
    <tr>
      <td>Blue</td>
      <td><code class="language-plaintext highlighter-rouge">b</code></td>
      <td><code class="language-plaintext highlighter-rouge">4</code></td>
      <td><code class="language-plaintext highlighter-rouge">#000080</code></td>
    </tr>
    <tr>
      <td>Magenta</td>
      <td><code class="language-plaintext highlighter-rouge">m</code></td>
      <td><code class="language-plaintext highlighter-rouge">5</code></td>
      <td><code class="language-plaintext highlighter-rouge">#800080</code></td>
    </tr>
    <tr>
      <td>Cyan</td>
      <td><code class="language-plaintext highlighter-rouge">c</code></td>
      <td><code class="language-plaintext highlighter-rouge">6</code></td>
      <td><code class="language-plaintext highlighter-rouge">#008080</code></td>
    </tr>
    <tr>
      <td>Light Gray</td>
      <td><code class="language-plaintext highlighter-rouge">w</code></td>
      <td><code class="language-plaintext highlighter-rouge">7</code></td>
      <td><code class="language-plaintext highlighter-rouge">#C0C0C0</code></td>
    </tr>
    <tr>
      <td>Dark Gray</td>
      <td><code class="language-plaintext highlighter-rouge">K</code></td>
      <td><code class="language-plaintext highlighter-rouge">8</code></td>
      <td><code class="language-plaintext highlighter-rouge">#808080</code></td>
    </tr>
    <tr>
      <td>Bright Red</td>
      <td><code class="language-plaintext highlighter-rouge">R</code></td>
      <td><code class="language-plaintext highlighter-rouge">9</code></td>
      <td><code class="language-plaintext highlighter-rouge">#FF0000</code></td>
    </tr>
    <tr>
      <td>Bright Green</td>
      <td><code class="language-plaintext highlighter-rouge">G</code></td>
      <td><code class="language-plaintext highlighter-rouge">10</code></td>
      <td><code class="language-plaintext highlighter-rouge">#00FF00</code></td>
    </tr>
    <tr>
      <td>Bright Yellow</td>
      <td><code class="language-plaintext highlighter-rouge">Y</code></td>
      <td><code class="language-plaintext highlighter-rouge">11</code></td>
      <td><code class="language-plaintext highlighter-rouge">#FFFF00</code></td>
    </tr>
    <tr>
      <td>Bright Blue</td>
      <td><code class="language-plaintext highlighter-rouge">B</code></td>
      <td><code class="language-plaintext highlighter-rouge">12</code></td>
      <td><code class="language-plaintext highlighter-rouge">#0000FF</code></td>
    </tr>
    <tr>
      <td>Bright Magenta</td>
      <td><code class="language-plaintext highlighter-rouge">M</code></td>
      <td><code class="language-plaintext highlighter-rouge">13</code></td>
      <td><code class="language-plaintext highlighter-rouge">#FF00FF</code></td>
    </tr>
    <tr>
      <td>Bright Cyan</td>
      <td><code class="language-plaintext highlighter-rouge">C</code></td>
      <td><code class="language-plaintext highlighter-rouge">14</code></td>
      <td><code class="language-plaintext highlighter-rouge">#00FFFF</code></td>
    </tr>
    <tr>
      <td>White</td>
      <td><code class="language-plaintext highlighter-rouge">W</code></td>
      <td><code class="language-plaintext highlighter-rouge">15</code></td>
      <td><code class="language-plaintext highlighter-rouge">#FFFFFF</code></td>
    </tr>
  </tbody>
</table>

<h1 id="color-order-changes">Color Order Changes</h1>

<p>In addition to the change in color format, the order also changed. In the old
style the background color was first, then foreground. In the new style it is
foreground then background. While that is a much better choice logically, it
adds to the confusion when updating.</p>

<table>
  <thead>
    <tr>
      <th>Colors</th>
      <th>Old Style</th>
      <th>New Style</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>White Text on Black</td>
      <td><code class="language-plaintext highlighter-rouge">%{kW}</code></td>
      <td><code class="language-plaintext highlighter-rouge">%{15;0}</code></td>
    </tr>
    <tr>
      <td>Black Text on Yellow</td>
      <td><code class="language-plaintext highlighter-rouge">%{yk}</code></td>
      <td><code class="language-plaintext highlighter-rouge">%{0;3}</code></td>
    </tr>
  </tbody>
</table>

<h1 id="new-syntax-example">New Syntax Example</h1>

<p>Fortunately, the fine folks at FreeBSD have updated their default <code class="language-plaintext highlighter-rouge">screenrc</code> to
have the new syntax, so we can use that as the new example:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>hardstatus alwayslastline
hardstatus string '%{2;0}[%{+b10;0}%H%{-}][%= %{7;0}%?%-Lw%?%{+9;0}(%{+15;0}%n%f %t%?(%u)%?%{-})%{-} ^H%?%+Lw%?%= %{-}]%{+b14;0}[%m/%d/%y %c]%{-}%{-}'
</code></pre></div></div>

<p>I tried converting my slightly modified version to the new syntax and ended up
with nearly the same line, but theirs works better. See my note at the end of
this post about the bug I hit, which the FreeBSD example works around.</p>

<p>If your terminal supports truecolor, you can enable support for that in screen
and use the HTML style color syntax instead:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>truecolor on
hardstatus alwayslastline
hardstatus string '%{#008000;#000000}[%{+b#00FF00;#000000}%H%{-}][%= %{#C0C0C0;#000000}%?%-Lw%?%{+#FF0000;#000000}(%{+b#FFFFFF;#000000}%n%f %t%?(%u)%?%{-})%{-} ^H%?%+Lw%?%= %{-}]%{+b#00FFFF;#000000}[%m/%d/%y %C %A]%{-}%{-}'
</code></pre></div></div>

<p>Unfortunately, the new syntax and old syntax are incompatible both ways, so you
can’t form a status line that works on both GNU Screen 4.x and 5.x. You also
don’t appear to be able to form a status line that falls back to 16 or 256
colors if the terminal doesn’t support truecolor. So you might want to keep
several variations on hand to use in appropriate circumstances.</p>

<h1 id="padding-bug">Padding Bug</h1>

<p>When converting my status line I hit a bug where if you have padding on both the
left and right sides, the color of the last window entry in the list didn’t have
color applied properly.</p>

<p>Using a smaller example, the background color was being applied way to the left.</p>

<p>Small example that demonstrates the bug:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>hardstatus alwayslastline 'Left%=%-Lw%{7;4}%n%f %t%{-}%+Lw%=Right'
</code></pre></div></div>

<p>Using the FreeBSD default line as an example, I noticed they had a space and
a backspace after the active window, which appears to work around the problem:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>hardstatus alwayslastline 'Left%= %-Lw%{7;4}%n%f %t%{-} ^H%+Lw%= Right'
</code></pre></div></div>

<p>I submitted <a href="https://savannah.gnu.org/bugs/?68263">a bug report</a> upstream, but
since there is a workaround it’s fairly low priority.</p>]]></content><author><name>Jim Pingle</name></author><category term="Computers" /><summary type="html"><![CDATA[Updating GNU Screen 5.x configuration for hardstatus color syntax changes]]></summary></entry><entry><title type="html">Fountain Pen Friendly Paper for UV Inks</title><link href="https://pingle.org//2025/12/09/uv-reactive-paper" rel="alternate" type="text/html" title="Fountain Pen Friendly Paper for UV Inks" /><published>2025-12-09T00:00:00-05:00</published><updated>2025-12-09T00:00:00-05:00</updated><id>https://pingle.org//2025/12/09/uv-reactive-paper</id><content type="html" xml:base="https://pingle.org//2025/12/09/uv-reactive-paper"><![CDATA[<h1 id="uv-reactive-paper">UV Reactive Paper</h1>

<p>In a <a href="/2024/11/30/uv-reactive-ink">previous post I discussed fluorescent inks that react to ultraviolet (UV) light</a>.
Part of getting the best results out of those inks is using them on paper that
<strong>does not</strong> react to UV light sources itself. This gives fluorescent inks the
best chance of standing out and their glow being visible under UV light.</p>

<p>Paper can be UV reactive for various reasons, such as from the processes
manufacturers use to make the paper bright white, like <a href="https://en.wikipedia.org/wiki/Bleaching_of_wood_pulp">bleaching</a>.
As a consequence, a good general guideline is to look for “ivory” or “cream”
papers and avoid bright white paper.</p>

<p>There is a surprising amount of variation between brands and even different
types of paper from the same brand. This post covers many of the different types
of paper I have been able to try, along with photos of each under UV light. It’s
more of a relative comparison and not exactly rigorously tested or scientific.</p>

<h1 id="safety">Safety</h1>

<p>Before going any further, UV light has safety concerns that merit caution.</p>

<p>In this post, unless otherwise specified, “UV” refers to the UV-A portion of the
ultraviolet spectrum around 315-400nm, specifically closer to 365nm as that is
where most of the lights being discussed peak.</p>

<p class="notice--danger">Though this “long wave” UV isn’t as harmful as other portions of the UV
spectrum, it can still be harmful with prolonged skin exposure and any amount of
eye exposure. Wear eye protection when using UV lights, and limit exposure where
possible.</p>

<p>Many polycarbonate (PC) glasses block UV-A light. This includes safety glasses,
and some others such as reading glasses or even eyeglasses, depending on how the
lenses were made. Since these are very common, chances are high that many people
already have some form of viable eye protection nearby. Try shining a UV light
through glasses at a UV reactive object, if the object doesn’t react to the
light through the glasses, but does when the glasses are not in front of the
light, then the glasses can block UV light.</p>

<figure class=""><a href="/assets/images/uv-safety-glasses.png" class="image-popup" title="Polycarbonate Safety Glasses Blocking UV Light
"><img src="/assets/images/uv-safety-glasses.png" alt="" /></a><figcaption>
      Polycarbonate Safety Glasses Blocking UV Light

    </figcaption></figure>

<p class="notice--danger">Any use of UV lights is at your own risk. Protect your eyes!</p>

<h1 id="light-sources">Light Sources</h1>

<p>To get the best effect with UV reactive materials, a UV light should <strong>only</strong>
emit light in the UV-A range. This can be quite difficult in practice as many
lights labeled as “UV” put out a much wider range and appear to give things a
purple hue in addition to whichever portion of the UV spectrum they are supposed
to emit.</p>

<p>I’ll have a separate post about a selection of lights I have used and tested.
Generally speaking, try to find a UV light source with a ZWB2 filter. A ZWB2
filter blocks the visible portion of the color spectrum, so only UV-A light near
365nm can pass. This allows UV reactive materials to fluoresce and shine while
minimizing discoloration by non-UV wavelengths emitted by the light.</p>

<p>Most lights I use have ZWB2 filters, including an <a href="https://jlhawaii808.com/products/emisar-d4v2-8-x-mule-365nm-uv-led-flashlight?_pos=7&amp;_sid=37915bd72&amp;_ss=r">Emisar D4v2 UV
Mule</a>,
<a href="https://jlhawaii808.com/products/emisar-d2-14500-tint-ramping-channel-switching-led-flashlight?variant=455776508971294">Emisar D2 with a UV channel</a>,
and <a href="https://www.amazon.com/gp/product/B08ZY67T5Y/">Lumintop Tool AA UV</a>.</p>

<figure class=""><a href="/assets/images/emisar-d4v2-d3aa.png" class="image-popup" title="Emisar D3AA (left) and D4v2 (right) UV mule flashlights with ZWB2 filters
"><img src="/assets/images/emisar-d4v2-d3aa.png" alt="" /></a><figcaption>
      Emisar D3AA (left) and D4v2 (right) UV mule flashlights with ZWB2 filters

    </figcaption></figure>

<h1 id="methodology">Methodology</h1>

<p>I used the same pens and fluorescent inks on each paper with some different nib
types and widths:</p>

<ul>
  <li>Tono &amp; Lims Antares in a TWSBI ECO 1.1 Stub</li>
  <li>Tono &amp; Lims Regulus in a Platinum Preppy F03</li>
  <li>Tono &amp; Lims E=mc² in a Platinum Preppy F03</li>
  <li>Pennonia Napnyugta/Sunset in a Jinhao 20 EF</li>
  <li>Tramol Turritopsis Nutricula invisible ink in a TWSBI ECO 1.1 Stub</li>
</ul>

<figure class=""><a href="/assets/images/uv-paper/02-life-noble-note-phone-uv+visible.jpg" class="image-popup" title="All mentioned inks in a mix of visible and UV light on Life Noble Note Paper
"><img src="/assets/images/uv-paper/02-life-noble-note-phone-uv+visible.jpg" alt="" /></a><figcaption>
      All mentioned inks in a mix of visible and UV light on Life Noble Note Paper

    </figcaption></figure>

<p>To keep things on a level playing field, I took consistent photographs of each
paper. I setup a camera on a tripod and put a UV light in a clamp arm. The
camera photos were all taken on a Canon EOS Rebel SL2, set to manual focus,
f/5.6, 1/200 sec exposure, ISO 6400. As the settings are identical for all of
the camera photos, these photos allow for direct comparison. The photos can be
used to determine the result between each paper type with respect to how bright
the inks and paper are, even if they don’t look the best.</p>

<p>I also took photos of each paper on a phone camera. While these are not as
useful for direct comparison, they give a better impression of how the paper and
ink combinations appear to the eye.</p>

<p>Each paper type listed in this post will include both the camera photo and the
phone photo.</p>

<h1 id="paper-types">Paper Types</h1>

<p>I have ranked the papers I was able to test from most reactive (worst) to least
reactive (best).</p>

<h2 id="12---notsu-notepad">12 - Notsu Notepad</h2>

<p>I have a few of these Notsu tear-off notepads around because they are a
convenient size, dot grid, thick paper, and reasonable friendly for fountain
pens. They’re also not terribly expensive so I don’t mind leaving them around
the house for general non-fountain-pen use.</p>

<figure class=""><a href="/assets/images/uv-paper/12-notsu-pad-camera-uv.jpg" class="image-popup" title="Camera photo of Notsu Notepad paper under UV light
"><img src="/assets/images/uv-paper/12-notsu-pad-camera-uv.jpg" alt="" /></a><figcaption>
      Camera photo of Notsu Notepad paper under UV light

    </figcaption></figure>

<p>Unfortunately, the paper reacts to UV light more than any other paper I have.
It’s extraordinarily bright under UV and drowns out the ink. It’s still good
paper for other uses, but not with UV ink.</p>

<figure class=""><a href="/assets/images/uv-paper/12-notsu-pad-phone-uv.jpg" class="image-popup" title="Phone photo of Notsu Notepad paper under UV light
"><img src="/assets/images/uv-paper/12-notsu-pad-phone-uv.jpg" alt="" /></a><figcaption>
      Phone photo of Notsu Notepad paper under UV light

    </figcaption></figure>

<p>Antares and Sunset are easily readable, and Antares is visibly glowing, but the
rest are barely visible. The invisible ink is somewhat readable, but not easy to
see against the glowing background.</p>

<h2 id="11---clairefontaine-triomphe---vellum">11 - Clairefontaine Triomphe - Vellum</h2>

<p>This Clairefontaine Triomphe notepad has lined tear-off sheets of vellum paper.
Clairefontaine has other types of paper as well, one of which is in another
entry later in this post.</p>

<figure class=""><a href="/assets/images/uv-paper/11-clairefontaine-triomphe-vellum-camera-uv.jpg" class="image-popup" title="Camera photo of Clairefontaine Triomphe Vellum paper under UV light
"><img src="/assets/images/uv-paper/11-clairefontaine-triomphe-vellum-camera-uv.jpg" alt="" /></a><figcaption>
      Camera photo of Clairefontaine Triomphe Vellum paper under UV light

    </figcaption></figure>

<p>However, while it’s good for general usage, it’s not good for UV inks as it is
extraordinarily reactive to UV light.</p>

<figure class=""><a href="/assets/images/uv-paper/11-clairefontaine-triomphe-vellum-phone-uv.jpg" class="image-popup" title="Phone photo of Clairefontaine Triomphe Vellum paper under UV light
"><img src="/assets/images/uv-paper/11-clairefontaine-triomphe-vellum-phone-uv.jpg" alt="" /></a><figcaption>
      Phone photo of Clairefontaine Triomphe Vellum paper under UV light

    </figcaption></figure>

<p>Like the previous paper, Antares and Sunset are easily readable, and Antares is
visibly glowing, but the rest are barely visible. The invisible ink is slightly
more legible than on the Notsu.</p>

<h2 id="10---endless-recorder-notebook-regalia-paper">10 - Endless Recorder Notebook (Regalia paper)</h2>

<p>This Endless Recorder Notebook has “Regalia” paper and is grid lined.</p>

<figure class=""><a href="/assets/images/uv-paper/10-endless-recorder-notebook-regalia-camera-uv.jpg" class="image-popup" title="Camera photo of Endless Recorder Notebook Regalia paper under UV light
"><img src="/assets/images/uv-paper/10-endless-recorder-notebook-regalia-camera-uv.jpg" alt="" /></a><figcaption>
      Camera photo of Endless Recorder Notebook Regalia paper under UV light

    </figcaption></figure>

<p>While it is fairly reactive, it is not nearly as bad as the two previous papers.
The paper glows, but most inks are still quite visible.</p>

<figure class=""><a href="/assets/images/uv-paper/10-endless-recorder-notebook-regalia-phone-uv.jpg" class="image-popup" title="Phone photo of Endless Recorder Notebook Regalia paper under UV light
"><img src="/assets/images/uv-paper/10-endless-recorder-notebook-regalia-phone-uv.jpg" alt="" /></a><figcaption>
      Phone photo of Endless Recorder Notebook Regalia paper under UV light

    </figcaption></figure>

<p>In particular, sunset is readable but doesn’t appear to be glowing. It’s not
unusable, but I would not recommend it for usage with UV inks.</p>

<h2 id="9---maruman-mnemosyne-spiral-notebook">9 - Maruman Mnemosyne Spiral Notebook</h2>

<p>This paper is from a Maruman Mnemosyne spiral-bound notebook. I have A5 and A6
versions of this notebook and they both perform similarly.</p>

<figure class=""><a href="/assets/images/uv-paper/09-maruman-mnemosyne-notebook-camera-uv.jpg" class="image-popup" title="Camera photo of Maruman Mnemosyne paper under UV light
"><img src="/assets/images/uv-paper/09-maruman-mnemosyne-notebook-camera-uv.jpg" alt="" /></a><figcaption>
      Camera photo of Maruman Mnemosyne paper under UV light

    </figcaption></figure>

<p>The glow of the paper is similar to the Endless Recorder Notebook, but the dot
grid doesn’t get in the way as much.</p>

<figure class=""><a href="/assets/images/uv-paper/09-maruman-mnemosyne-notebook-phone-uv.jpg" class="image-popup" title="Phone photo of Maruman Mnemosyne paper under UV light
"><img src="/assets/images/uv-paper/09-maruman-mnemosyne-notebook-phone-uv.jpg" alt="" /></a><figcaption>
      Phone photo of Maruman Mnemosyne paper under UV light

    </figcaption></figure>

<p>Most of the inks still were sufficiently visible. Sunset still doesn’t appear to
be glowing, though.</p>

<h2 id="8---sakae-tp-iroful-notebook-dot-grid">8 - Sakae TP Iroful notebook (dot grid)</h2>

<p>This sheet is from a Sakae TP Iroful A5 notebook with dot grid printing.</p>

<p>Iroful paper is remarkable in various ways, it seems to do things with ink that
other papers don’t or can’t. I like using it for pretty much anything fountain
pen related.</p>

<figure class=""><a href="/assets/images/uv-paper/08-iroful-notebook-camera-uv.jpg" class="image-popup" title="Camera photo of Sakae TP Iroful notebook paper under UV light
"><img src="/assets/images/uv-paper/08-iroful-notebook-camera-uv.jpg" alt="" /></a><figcaption>
      Camera photo of Sakae TP Iroful notebook paper under UV light

    </figcaption></figure>

<p>That said, it is still somewhat reactive to UV. It has slightly less glow than
the papers already mentioned, though, so it’s still an improvement.</p>

<figure class=""><a href="/assets/images/uv-paper/08-iroful-notebook-phone-uv.jpg" class="image-popup" title="Phone photo of Sakae TP Iroful notebook paper under UV light
"><img src="/assets/images/uv-paper/08-iroful-notebook-phone-uv.jpg" alt="" /></a><figcaption>
      Phone photo of Sakae TP Iroful notebook paper under UV light

    </figcaption></figure>

<p>All of the inks are readable and all but Sunset are glowing. Note that Regulus
is glowing more green on this paper, while it was more blue on the others.</p>

<h2 id="7---sakae-tp-iroful-loose-sheets-blank">7 - Sakae TP Iroful loose sheets (blank)</h2>

<p>The base paper of blank Iroful loose sheets is the same as the dot grid
notebook, and I almost didn’t test it, but it turned out to be another slight
improvement.</p>

<figure class=""><a href="/assets/images/uv-paper/07-iroful-loose-sheets-camera-uv.jpg" class="image-popup" title="Camera photo of Sakae TP Iroful loose sheet paper under UV light
"><img src="/assets/images/uv-paper/07-iroful-loose-sheets-camera-uv.jpg" alt="" /></a><figcaption>
      Camera photo of Sakae TP Iroful loose sheet paper under UV light

    </figcaption></figure>

<p>Without the dot grid (or whatever process they use to print the dot grid), it
reacts a tiny bit less.</p>

<figure class=""><a href="/assets/images/uv-paper/07-iroful-loose-sheets-phone-uv.jpg" class="image-popup" title="Phone photo of Sakae TP Iroful loose sheet paper under UV light
"><img src="/assets/images/uv-paper/07-iroful-loose-sheets-phone-uv.jpg" alt="" /></a><figcaption>
      Phone photo of Sakae TP Iroful loose sheet paper under UV light

    </figcaption></figure>

<p>The background being smooth and empty also helps it interfere less with the ink.</p>

<h2 id="6---clairefontaine-triomphe---velvety-ivory">6 - Clairefontaine Triomphe - Velvety Ivory</h2>

<p>This sheet of paper is from a Clairefontaine Triomphe notebook with their
“velvety ivory” paper.</p>

<figure class=""><a href="/assets/images/uv-paper/06-clairefontaine-triomphe-velvety-ivory-camera-uv.jpg" class="image-popup" title="Camera photo of Clairefontaine Triomphe Velvety Ivory paper under UV light
"><img src="/assets/images/uv-paper/06-clairefontaine-triomphe-velvety-ivory-camera-uv.jpg" alt="" /></a><figcaption>
      Camera photo of Clairefontaine Triomphe Velvety Ivory paper under UV light

    </figcaption></figure>

<p>This variation isn’t as white as the vellum, is much better in terms of UV
reaction, and has significant overall reduction in paper glow from the previous
paper.</p>

<p>The paper has a scattered amount of highly reactive fibers, however, which looks
neat but does make it less effective than it would be otherwise. Still, with the
right ink that effect can be desirable.</p>

<figure class=""><a href="/assets/images/uv-paper/06-clairefontaine-triomphe-velvety-ivory-phone-uv.jpg" class="image-popup" title="Phone photo of Clairefontaine Triomphe Velvety Ivory paper under UV light
"><img src="/assets/images/uv-paper/06-clairefontaine-triomphe-velvety-ivory-phone-uv.jpg" alt="" /></a><figcaption>
      Phone photo of Clairefontaine Triomphe Velvety Ivory paper under UV light

    </figcaption></figure>

<p>All of the inks are readable and Sunset finally appears to be glowing, albeit
faintly. Regulus is back to Blue again.</p>

<h2 id="5---midori-md-cotton-tear-off-pad">5 - Midori MD Cotton tear-off pad</h2>

<p>This sheet is from a Midori MD <strong>Cotton</strong> tear-off pad, which is a bit different
from typical Midori MD paper.</p>

<figure class=""><a href="/assets/images/uv-paper/05-midori-md-cotton-pad-camera-uv.jpg" class="image-popup" title="Camera photo of Midori MD Cotton paper under UV light
"><img src="/assets/images/uv-paper/05-midori-md-cotton-pad-camera-uv.jpg" alt="" /></a><figcaption>
      Camera photo of Midori MD Cotton paper under UV light

    </figcaption></figure>

<p>This paper offers another significant reduction in UV reaction, though there is
still a faint glow. There are also some reactive fibers in the mix, but they are
sparse.</p>

<figure class=""><a href="/assets/images/uv-paper/05-midori-md-cotton-pad-phone-uv.jpg" class="image-popup" title="Phone photo of Midori MD Cotton paper under UV light
"><img src="/assets/images/uv-paper/05-midori-md-cotton-pad-phone-uv.jpg" alt="" /></a><figcaption>
      Phone photo of Midori MD Cotton paper under UV light

    </figcaption></figure>

<p>The inks are all readable and glowing, and stand out much better than the papers
mentioned so far.</p>

<p>This is the first paper of the bunch I’d consider recommending, though there are
even better options to come.</p>

<h2 id="4---paperage-journal-notebook">4 - Paperage Journal Notebook</h2>

<p>This sheet is from a Paperage Journal Notebook. It’s fairly inexpensive compared
to some of the other options (especially the ones below this point), has a nice
hardcover, comes in a variety of colors, and so on. Not bad all around for the
price.</p>

<figure class=""><a href="/assets/images/uv-paper/04-paperage-journal-notebook-camera-uv.jpg" class="image-popup" title="Camera photo of Paperage Journal Notebook paper under UV light
"><img src="/assets/images/uv-paper/04-paperage-journal-notebook-camera-uv.jpg" alt="" /></a><figcaption>
      Camera photo of Paperage Journal Notebook paper under UV light

    </figcaption></figure>

<p>The paper has a very low reaction to UV and only a faint glow.</p>

<figure class=""><a href="/assets/images/uv-paper/04-paperage-journal-notebook-phone-uv.jpg" class="image-popup" title="Phone photo of Paperage Journal Notebook paper under UV light
"><img src="/assets/images/uv-paper/04-paperage-journal-notebook-phone-uv.jpg" alt="" /></a><figcaption>
      Phone photo of Paperage Journal Notebook paper under UV light

    </figcaption></figure>

<p>Despite the faint glow, all the inks glow much brighter than the paper. So, even
if the conditions are not ideal, it hits a good price/performance balance.</p>

<h2 id="3---midori-md-notebook">3 - Midori MD Notebook</h2>

<p>This sheet is from a Midori MD notebook, and this paper is one of my favorites
for regular use. They also make a tear-off note block with the same paper, which
is ideal for quick tests, making swatch cards, and so on.</p>

<figure class=""><a href="/assets/images/uv-paper/03-midori-md-notebook-camera-uv.jpg" class="image-popup" title="Camera photo of Midori MD paper under UV light
"><img src="/assets/images/uv-paper/03-midori-md-notebook-camera-uv.jpg" alt="" /></a><figcaption>
      Camera photo of Midori MD paper under UV light

    </figcaption></figure>

<p>The paper has almost no perceptible reaction to UV, it has barely any glow at
all.</p>

<figure class=""><a href="/assets/images/uv-paper/03-midori-md-notebook-phone-uv.jpg" class="image-popup" title="Phone photo of Midori MD paper under UV light
"><img src="/assets/images/uv-paper/03-midori-md-notebook-phone-uv.jpg" alt="" /></a><figcaption>
      Phone photo of Midori MD paper under UV light

    </figcaption></figure>

<p>The very low reaction and minimal glow really lets fluorescent inks shine!</p>

<h2 id="2---life-noble-note">2 - Life Noble Note</h2>

<p>This sheet is from a Life Noble Note notebook, which can be somewhat hard to
find.</p>

<figure class=""><a href="/assets/images/uv-paper/02-life-noble-note-camera-uv.jpg" class="image-popup" title="Camera photo of Life Noble Note paper under UV light
"><img src="/assets/images/uv-paper/02-life-noble-note-camera-uv.jpg" alt="" /></a><figcaption>
      Camera photo of Life Noble Note paper under UV light

    </figcaption></figure>

<p>The paper itself is is darker, but ever so slightly reactive, and there are some
very sparse reactive fibers. It balances out to make a fine option, though not
one I prefer personally.</p>

<figure class=""><a href="/assets/images/uv-paper/02-life-noble-note-phone-uv.jpg" class="image-popup" title="Phone photo of Life Noble Note paper under UV light
"><img src="/assets/images/uv-paper/02-life-noble-note-phone-uv.jpg" alt="" /></a><figcaption>
      Phone photo of Life Noble Note paper under UV light

    </figcaption></figure>

<p>All of the inks are glowing brightly, however, and look great.</p>

<h2 id="1---tomoe-river-s-kanso-notebook">1 - Tomoe River S Kanso Notebook</h2>

<p>This sheet is from a notebook made with Tomoe River S Kanso paper sold by
JetPens under their own name. There is some concern about differences in Tomoe
River paper between batches when repackaged by different places (e.g.
Habonachi), so consider that when purchasing.</p>

<figure class=""><a href="/assets/images/uv-paper/01-tomoe-river-s-kanso-camera-uv.jpg" class="image-popup" title="Camera photo of Tomoe River S Kanso paper under UV light
"><img src="/assets/images/uv-paper/01-tomoe-river-s-kanso-camera-uv.jpg" alt="" /></a><figcaption>
      Camera photo of Tomoe River S Kanso paper under UV light

    </figcaption></figure>

<p>The paper has no visible reaction to UV and in my opinion it is the best choice
to let fluorescent inks show off. However, it’s also a bit more expensive than
the other options and each notebook would need to be checked to ensure it
behaves as expected.</p>

<figure class=""><a href="/assets/images/uv-paper/01-tomoe-river-s-kanso-phone-uv.jpg" class="image-popup" title="Phone photo of Tomoe River S Kanso paper under UV light
"><img src="/assets/images/uv-paper/01-tomoe-river-s-kanso-phone-uv.jpg" alt="" /></a><figcaption>
      Phone photo of Tomoe River S Kanso paper under UV light

    </figcaption></figure>

<p>As you can probably guess, with no visible glow from the paper, the ink glows
brightly and looks fantastic.</p>

<h1 id="conclusion">Conclusion</h1>

<figure class=""><a href="/assets/images/uv-paper/00-all-phone-mix.jpg" class="image-popup" title="All Tested Paper
"><img src="/assets/images/uv-paper/00-all-phone-mix.jpg" alt="" /></a><figcaption>
      All Tested Paper

    </figcaption></figure>

<p>The differences are quite stark in the above photo, which has all of the papers
I tested from least to most reactive in the numbered order of this post. There
is a pretty steep increase in reactivity beyond the top row.</p>

<p>Any of the top three papers are excellent for use with fluorescent inks: Midori
MD, Life Noble Note, or Tomoe River S Kanso. Honorable mention to Paperage and
Midori MD Cotton.</p>

<p>Personally, I use Midori MD most often because of its consistency, cost, and
availability.</p>]]></content><author><name>Jim Pingle</name></author><category term="Fountain Pens" /><category term="Flashlights" /><category term="UV" /><summary type="html"><![CDATA[The best types of fountain pen friendly paper to use with UV reactive ink.]]></summary></entry><entry><title type="html">UV Reactive Ink</title><link href="https://pingle.org//2024/11/30/uv-reactive-ink" rel="alternate" type="text/html" title="UV Reactive Ink" /><published>2024-11-30T12:00:00-05:00</published><updated>2024-11-30T12:00:00-05:00</updated><id>https://pingle.org//2024/11/30/uv-reactive-ink</id><content type="html" xml:base="https://pingle.org//2024/11/30/uv-reactive-ink"><![CDATA[<h1 id="uv-reactive-ink">UV Reactive Ink</h1>

<p>I’ve had an interest in ultraviolet (UV) “blacklight” reactive items for many
years. They come in many forms, like glow in the dark toys and decorations (LEGO
ghosts!), clothing, or even certain rocks. If I can hit something with a UV
light and it fluoresces or glows, I get a kick out of it. My current wedding
ring even glows! Since I started using fountain pens more in the past year, I
was eager to try out UV reactive fountain pen ink, but finding a suitable ink
was a challenge. Not only were there not many choices, but some were not viable
and others were difficult to obtain.</p>

<h2 id="safety">Safety</h2>

<p>Before going any further, UV light has safety concerns that merit caution.</p>

<p>In this post, unless otherwise specified, “UV” refers to the UV-A portion of the
ultraviolet spectrum around 315-400nm, specifically closer to 365nm as that is
where most of the lights being discussed peak.</p>

<p class="notice--danger">Though this “long wave” UV isn’t as harmful as other portions of the UV
spectrum, it can still be harmful with prolonged skin exposure and any amount of
eye exposure. Wear eye protection when using UV lights, and limit exposure where
possible.</p>

<p>Many polycarbonate (PC) glasses block UV-A light. This includes safety glasses,
and some others such as reading glasses or even eyeglasses, depending on how the
lenses were made. Since these are very common, chances are high that many people
already have some form of viable eye protection nearby. Try shining a UV light
through glasses at a UV reactive object, if the object doesn’t react to the
light through the glasses, but does when the glasses are not in front of the
light, then the glasses can block UV light.</p>

<figure class="align-center">
	<a href="/assets/images/uv-safety-glasses.png">
		<img src="/assets/images/uv-safety-glasses.png" />
	</a>
	<figcaption class="align-center">
		Polycarbonate Safety Glasses Blocking UV Light
	</figcaption>
</figure>

<p class="notice--danger">Any use of UV lights is at your own risk. Protect your eyes!</p>

<h2 id="turritopsis-nutricula">Turritopsis Nutricula</h2>

<p>I found a couple UV reactive inks, but after reading several reviews and related
material around the Internet, I ultimately decided that <strong>Turritopsis
Nutricula</strong> by <strong>Tramol</strong> was the ink I wanted to try. I bought <a href="https://www.aliexpress.us/item/3256803327690071.html">two 18ml
bottles on AliExpress for about $5
each</a>, which is a decent
price for specialty ink. Even before getting to the ink, I liked the Jellyfish
on the label. Shining a UV light on the bottle made it glow pretty brightly,
which made me eager to get the ink in a pen to try it out.</p>

<figure class="align-center">
	<a href="/assets/images/uv-ink-bottle.png">
		<img src="/assets/images/uv-ink-bottle-768.png" />
	</a>
	<figcaption class="align-center">
		Tramol Turritopsis Nutricula UV ink bottle without UV light (left) and with UV light (right)
	</figcaption>
</figure>

<p class="notice--info">Though I am aware of other alternative invisible UV fountain pen inks, I opted
not to buy them for various reasons.</p>

<p>Initially I put the ink into a pen I purchased specifically for this purpose, a
<a href="https://www.amazon.com/gp/product/B091CJNX4Q/">Penbbs 494 with an EF nib</a>. I
used that pen as it was relatively inexpensive and if the ink didn’t behave
well, it wouldn’t be a significant loss. Eventually after using the ink for a
while and seeing how well it worked, I also put the ink in a <a href="https://www.jetpens.com/TWSBI-ECO-Glow-Green-Fountain-Pen-1.1-mm-Stub-Limited-Edition/pd/35693">TWSBI ECO Glow
Green</a>
pen with a stub nib.</p>

<figure class="align-center">
	<a href="/assets/images/uv-penbbs-494.png">
		<img src="/assets/images/uv-penbbs-494-768.png" />
	</a>
	<figcaption class="align-center">
		Penbbs 494 fountain pen inked with Tramol Turritopsis Nutricula under UV light
	</figcaption>
</figure>

<h3 id="rhymes-with-blinvisible">Rhymes with Blinvisible</h3>

<p><strong>Turritopsis Nutricula</strong> is UV reactive “invisible” ink. Without UV light, the
ink is not visible at all on paper. In certain cases you might see a dent in the
paper from the nib of the pen, or a hint of clear wet liquid before it dries,
but otherwise it looks as if nothing is on the paper. Shine a UV light on the
paper and it’s a different story entirely: the ink glows a light blue color so
bright it almost looks white!</p>

<p>The results are nothing short of amazing, writing with this ink under UV <a href="https://i.imgur.com/Djm40Yq.mp4">looks
like you’re writing with light</a>! I’ve been
extremely impressed by it, especially for the relatively low cost. The results
are improved significantly when using it in combination with certain UV lights
and specific paper types, but I’ll have more on that later.</p>

<figure class="align-center">
	<a href="/assets/images/uv-writing-instructions.png">
		<img src="/assets/images/uv-writing-instructions.png" />
	</a>
	<figcaption class="align-center">
		Writing sample with and without UV light
	</figcaption>
</figure>

<h3 id="why-ask-why">Why ask why?</h3>

<p>As to the ink’s purpose, there are numerous fun things to do with it: hidden
messages, secret additions to notes, sensitive information, drawings that glow
or look different under UV and non-UV light, or just for general amusement. It
also fits right in around Halloween.</p>

<figure class="align-center">
	<a href="/assets/images/uv-ink-under-microscope.png">
		<img src="/assets/images/uv-ink-under-microscope-768.png" />
	</a>
	<figcaption class="align-center">
		UV ink glowing under high magnification
	</figcaption>
</figure>

<h3 id="hurry-up-and-wait">Hurry up and wait</h3>

<p>Getting the ink may present a minor challenge, however. I found it on AliExpress
under the ink name (<code class="language-plaintext highlighter-rouge">Turritopsis Nutricula</code>) but the listing didn’t include the
brand name. Search for terms such as <code class="language-plaintext highlighter-rouge">uv invisible fountain pen ink</code> and find
the bottle matching the picture earlier in this post – it should have an image
of a Jellyfish. The ink can sometimes be found on Amazon, but rarely under its
actual name, and at a much higher price. Search using the same terms I suggested
for AliExpress and you’ll probably find it. The last time I saw on Amazon, it
was about $10 for the same bottle.</p>

<p>When ordering from AliExpress, the ink ships from China so it takes a while to
arrive. Time isn’t the only factor, however, ink in a glass bottle taking a trip
that long has an increased chance of damage in transit. Even buying from Amazon,
however, it may still ship from China, so carefully check the listing and
confirm how it ships.</p>

<figure class="align-center">
	<a href="/assets/images/uv-shipping-box.png">
		<img src="/assets/images/uv-shipping-box.png" />
	</a>
	<figcaption class="align-center">
		Damaged shipping box containing UV ink, which was undamaged inside.
	</figcaption>
</figure>

<p>Mine arrived after two weeks in transit and the box was crumpled significantly,
but the contents were safe and intact.</p>

<h2 id="other-uv-ink-options">Other UV Ink Options</h2>

<p>There are other UV reactive inks out there, too. There are options that are not
invisible ink, and also options that aren’t fountain pens.</p>

<h3 id="highlighter-inks">Highlighter Inks</h3>

<p>While I was searching for the invisible ink I also found <a href="https://www.aliexpress.us/item/3256807085515106.html">several UV reactive
highlighter style inks from Banmi on
AliExpress</a> for about $4
per 18ml bottle. While these are not invisible, they still glow brightly under
UV.</p>

<figure class="align-center">
	<a href="/assets/images/uv-banmi-inks.png">
		<img src="/assets/images/uv-banmi-inks-768.png" />
	</a>
	<figcaption class="align-center">
		Banmi UV Highlighter Ink Bottles
	</figcaption>
</figure>

<p>These highlighter style UV inks can be used with thinner nibs for
drawing/sketching or in wider nibs as a highlighter in combination with
water-resistant inks. I don’t see myself using these as often as the invisible
ink but the effect is still decent overall.</p>

<figure class="align-center">
	<a href="/assets/images/uv-banmi-ink-writing.png">
		<img src="/assets/images/uv-banmi-ink-writing-768.png" />
	</a>
	<figcaption class="align-center">
		Banmi UV Highlighter Ink writing sample in regular light (left) and under UV light (right)
	</figcaption>
</figure>

<p>I didn’t have a good way to test these as actual highlighters, but some of the
more visible colors like red and pink could be good for outline/underline even
if not used as typical highlighters.</p>

<h3 id="rollerball-invisible-inks">Rollerball Invisible Inks</h3>

<p>There are also non-fountain pen options out there, such as these <a href="https://www.jetpens.com/Sakura-Gelly-Roll-UV-Gel-Pen-1.0-mm-Blue-Green-Red-3-Color-Set-Keychain/pd/41036">Sakura Gelly
Roll UV Gel Pens</a>
– They have a similar invisible ink effect, but in different colors. However,
since these are pre-packaged disposables, you are locked into using just those
pens. Also, since rollerball pens require more pressure than fountain pens, they
are more likely to leave behind a visible trace on paper even if the ink itself
is not visible.</p>

<figure class="align-center">
	<a href="/assets/images/uv-gelly-roll.png">
		<img src="/assets/images/uv-gelly-roll-768.png" />
	</a>
	<figcaption class="align-center">
		Sakura Gelly Roll UV Gel Pen writing sample in regular light (left) and under UV light (right)
	</figcaption>
</figure>

<h2 id="getting-the-best-results">Getting the Best Results</h2>

<p>For UV reactive ink to work well, there are two major factors that come into
play: The paper and the UV light source.</p>

<h3 id="picking-paper">Picking Paper</h3>

<p>The ideal paper for UV reactive ink is paper that does not react to UV light.
When the paper does not react to UV light, it allows the ink to get the most
contrast with the paper and shine brightly. If the paper reacts to UV light and
glows, it can diminish or even drown out the glow of the ink.</p>

<p>I have <a href="/2025/12/09/uv-reactive-paper">a separate post about all the different paper types I have tested</a>,
but among the best ones to use that I have found thus far are <a href="https://www.jetpens.com/Midori-MD-Paper-Pad-Cotton-A5-Blank/pd/31126">Midori MD</a>
and <a href="https://www.jetpens.com/JetPens-Tomoe-River-S-Kanso-Noto-Notebook-A5-Dot-Grid-Charcoal-Gray/pd/39707">Tomoe River S Kanso</a>
paper.</p>

<figure class="align-center">
	<a href="/assets/images/uv-paper-tomoe-river.png">
		<img src="/assets/images/uv-paper-tomoe-river-768.png" />
	</a>
	<figcaption class="align-center">
		UV invisible ink writing sample on Tomoe River S Kanso paper
	</figcaption>
</figure>

<h3 id="isolating-illumination">Isolating Illumination</h3>

<p>To get the best effect with UV reactive materials, a UV light should <strong>only</strong>
emit light in the UV-A range. This can be quite difficult in practice as many
lights labeled as “UV” put out a much wider range and appear to give things a
purple hue in addition to whichever portion of the UV spectrum they are supposed
to emit.</p>

<p>As with the paper, I’ll have a separate post about a selection of lights I have
used and tested. Generally speaking, try to find a light source with a ZWB2
filter. A ZWB2 filter blocks the visible portion of the color spectrum, so only
UV-A light near 365nm can pass. This allows UV reactive materials to fluoresce
and shine while minimizing discoloration by non-UV light.</p>

<p>Most lights I use have ZWB2 filters, including an <a href="https://jlhawaii808.com/products/emisar-d4v2-8-x-mule-365nm-uv-led-flashlight?_pos=7&amp;_sid=37915bd72&amp;_ss=r">Emisar D4v2 UV
Mule</a>,
<a href="https://jlhawaii808.com/products/emisar-d2-14500-tint-ramping-channel-switching-led-flashlight?variant=455776508971294">Emisar D2 with a UV channel</a>,
and <a href="https://www.amazon.com/gp/product/B08ZY67T5Y/">Lumintop Tool AA UV</a>.</p>

<figure class="align-center">
	<a href="/assets/images/emisar-d4v2-d3aa.png">
		<img src="/assets/images/emisar-d4v2-d3aa-768.png" />
	</a>
	<figcaption class="align-center">
		Emisar D3AA (left) and D4v2 (right) UV mule flashlights with ZWB2 filters
	</figcaption>
</figure>

<h2 id="conclusion">Conclusion</h2>

<p>Overall, these inks are fun to work with and are well worth the low cost and
moderate effort to obtain. Whatever your purpose for it may be, I highly
recommend trying the ink at least once. The paper and UV lights that work best
with this ink also have many uses other than UV ink, so they are good to have
even for general use.</p>]]></content><author><name>Jim Pingle</name></author><category term="Fountain Pens" /><category term="Flashlights" /><category term="UV" /><summary type="html"><![CDATA[UV reactive fountain pen ink, including invisible ink, and how to get the best results.]]></summary></entry><entry><title type="html">Anduril Update Documentation</title><link href="https://pingle.org//2022/11/24/anduril-update-docs" rel="alternate" type="text/html" title="Anduril Update Documentation" /><published>2022-11-24T19:57:00-05:00</published><updated>2022-11-24T19:57:00-05:00</updated><id>https://pingle.org//2022/11/24/anduril-update-docs</id><content type="html" xml:base="https://pingle.org//2022/11/24/anduril-update-docs"><![CDATA[<p>I’ve spent the last couple months collecting notes from past blog posts I’ve
made about updating the firmware on flashlights running the Open Source Anduril
UI and expanding the info greatly, turning it into a whole set of documentation
with Sphinx – Hopefully it is finally in a state suitable for public
consumption!</p>

<p><a href="https://anduril.click/">https://anduril.click/</a></p>]]></content><author><name>Jim Pingle</name></author><category term="Flashlights" /><summary type="html"><![CDATA[New site for docs about updating Anduril Flashlight Firmware.]]></summary></entry><entry><title type="html">Flashing a 3-pin ATtiny1616 Flashlight with New Firmware</title><link href="https://pingle.org//2022/08/07/flashing-a-3-pin-t1616-flashlight-with-new-firmware" rel="alternate" type="text/html" title="Flashing a 3-pin ATtiny1616 Flashlight with New Firmware" /><published>2022-08-07T20:20:00-04:00</published><updated>2022-08-07T20:20:00-04:00</updated><id>https://pingle.org//2022/08/07/flashing-a-3-pin-t1616-flashlight-with-new-firmware</id><content type="html" xml:base="https://pingle.org//2022/08/07/flashing-a-3-pin-t1616-flashlight-with-new-firmware"><![CDATA[<p class="notice--info">This post may still be helpful, but I compiled a much more comprehensive
reference site for updating Anduril lights at
<a href="https://anduril.click/">https://anduril.click/</a>.</p>

<p>Recently some lights have started using ATtiny1616 chips with a 3-pin flashing
pad interface for firmware updates. Notably, this includes the Wurkkos TS10 and
Sofirn SP10 Pro, but possibly covers new revisions of others lights such as the
Sofirn LT1, LT1 Mini, SC31 Pro, SP36, and Q8.</p>

<p>This interface is, in some ways, much easier to work with than the previous ones
I’ve dealt with. Less pins to worry about lining up, easier to adapt parts on
hand, and so on. That said, it does have its drawbacks, such as possibly
requiring different software to update and also a new serial interface board
since it doesn’t work with USBASP like the other lights.</p>

<h1 id="supplies">Supplies</h1>

<ul>
  <li>
    <p><a href="https://www.amazon.com/dp/B00LZV1G6K">Serial USB to TTL CH340 Module device</a></p>

    <p>The one linked specifically works great as-is, so I suggest using that one.
There are others out there that may require soldering in a resister or certain
diode, but these modules do not need it.</p>
  </li>
  <li>
    <p><a href="https://www.amazon.com/gp/product/B072L1XMJR">Jumper wires with Dupont connectors</a></p>

    <p>The CH340 linked above comes with some wires that have M-F connectors which
can help with some parts of this but for most probes you will likely need F-F.</p>
  </li>
  <li>
    <p><a href="https://intl-outdoor.com/components/reflashing-kits.html">Flashing kit from Hank</a>
(<a href="https://jlhawaii808.com/products/emisar-noctigon-d4v2-d4sv2-kr4-reflashing-kit">US Source</a>)
or another probe with at least three pogo pins in line, such as an <a href="https://oshpark.com/shared_projects/orhYWEK3">HQ ProgKey</a>.</p>
  </li>
</ul>

<p>I have used both my HQ ProgKey and Hank’s probe. Both work fine, but the HQ
ProgKey can be used on a wide variety of lights thanks to its 4-over-4 layout.
I ordered a couple batches of the <a href="https://oshpark.com/shared_projects/orhYWEK3">HQ ProgKey</a>
from OshPark and used <a href="https://www.amazon.com/gp/product/B0186IM0P0/">soldering paste</a>
and a <a href="https://www.amazon.com/gp/product/B07W1ZZH8T/">reflow plate</a> to attach
<a href="https://www.amazon.com/dp/B01913L0UK">pogo pins</a> to the ProgKey.
For many people that’s probably overkill, but it does work well for updating my
non-Hank lights.</p>

<h1 id="why-update">Why Update?</h1>

<p>Why update? It depends.</p>

<p>Sometimes there are important software bug fixes. For example, the stock TS10
firmware had a couple problems. The aux lights stayed on while the main emitters
were on, and it lacked low voltage protection for its single color aux LEDs, so
the aux LEDs (especially on high) could drain a battery to dangerously low
levels.</p>

<p>There are other reasons to update, such as:</p>

<ul>
  <li>For new quality of life changes, like the recent changes in lockout behavior
(3C from lockout to unlock off instead of just 4C to unlock and turn on). The
new TS10 firmware also lowers the moonlight from about <code class="language-plaintext highlighter-rouge">0.1</code> lumens to <code class="language-plaintext highlighter-rouge">0.01</code>
lumens which is a significant decrease.</li>
  <li>If you have multiple Anduril lights, it’s convenient to have all the lights
using the same UI and you don’t have to remember which ones work which way
because they had slightly different Anduril versions on them from the OEM.</li>
  <li>Maybe you are like me and geek out on this kind of stuff and like doing it</li>
</ul>

<h1 id="wiring-up-the-probe">Wiring up the Probe</h1>

<p>If using Hank’s kit, with the four pin side up, use the first three pins left to
right:</p>

<ul>
  <li>Pogo Pin 1: Top row, far right: <code class="language-plaintext highlighter-rouge">R</code> / <code class="language-plaintext highlighter-rouge">RX+TX</code></li>
  <li>Pogo Pin 2: Top row, far left: <code class="language-plaintext highlighter-rouge">-</code> / <code class="language-plaintext highlighter-rouge">GND</code></li>
  <li>Pogo Pin 3: Top row, second from left: <code class="language-plaintext highlighter-rouge">+</code> / <code class="language-plaintext highlighter-rouge">3V3</code></li>
</ul>

<figure class="align-center">
    <a href="/assets/images/updi_probe_hank.png">
        <img src="/assets/images/updi_probe_hank.png" />
    </a>
    <figcaption class="align-center">
        Wiring Diagram for adapting Hank's probe
    </figcaption>
</figure>

<p>If using a custom adapter, wire the pins up similarly:</p>

<ul>
  <li>1: <code class="language-plaintext highlighter-rouge">R</code> / <code class="language-plaintext highlighter-rouge">RX+TX</code></li>
  <li>2: <code class="language-plaintext highlighter-rouge">-</code> / <code class="language-plaintext highlighter-rouge">GND</code></li>
  <li>3: <code class="language-plaintext highlighter-rouge">+</code> / <code class="language-plaintext highlighter-rouge">3V3</code></li>
</ul>

<figure class="align-center">
    <a href="/assets/images/updi_probe_hq.png">
        <img src="/assets/images/updi_probe_hq.png" />
    </a>
    <figcaption class="align-center">
        Wiring Diagram for adapting the HQ ProgKey and similar probes
    </figcaption>
</figure>

<p>On the CH340 device linked above, the <code class="language-plaintext highlighter-rouge">RX</code> and <code class="language-plaintext highlighter-rouge">TX</code> pins are separate but they
come with a jumper. The <code class="language-plaintext highlighter-rouge">RX/TX</code> wire needs to connect to <strong>both</strong> pins, which
can be done in a variety of ways. Some people prefer to solder a pin on the
jumper, or solder a wire across both, or connect two wires and splice them into
a single line midway. Personally, I pushed a pogo pin into a Dupont connector
and simply wedged it the opening at the top of the jumper. Pressure from the
neighboring wires keeps it in place and it makes a good enough connection for
this purpose. A similar trick would likely work with a male Dupont connector
end. Soldering is a more reliable and permanent solution, but thus far my
workaround has not
failed.</p>

<figure class="align-center">
	<a href="/assets/images/ch340_updi_adapter.jpg">
		<img src="/assets/images/ch340_updi_adapter-768.jpg" />
	</a>
	<figcaption class="align-center">
		HQ ProgKey connected to CH340. Note the pin through the jumper.
	</figcaption>
</figure>

<h1 id="connecting-the-probe-to-the-light">Connecting the Probe to the Light</h1>

<p>Unscrew the head from the light and look inside. These lights will have three
pads and they are hopefully labeled properly as either: <code class="language-plaintext highlighter-rouge">R - +</code> / <code class="language-plaintext highlighter-rouge">+ - R</code>.
Align the probe so the pins match the pads.</p>

<h2 id="install-drivers-and-locate-the-serial-port">Install Drivers and Locate the Serial Port</h2>

<p>Unfortunately at the moment there isn’t a way to program with these chips from
Android, so use a computer with the right drivers.</p>

<p>This could be Linux, Windows, or macOS. Requirements vary by platform.</p>

<p>Plug the USB device in and let the OS detect it and install drivers.</p>

<h3 id="windows">Windows</h3>

<p>On Windows:</p>

<ul>
  <li>Right click the Start/Windows button</li>
  <li>Click <strong>Device Manager</strong></li>
  <li>Expand <strong>Ports (COM &amp; LPT)</strong></li>
  <li>
    <p>Locate the port labeled “USB-SERIAL CH340” and note the port listed after</p>

    <p>For example <code class="language-plaintext highlighter-rouge">COM7</code>.</p>
  </li>
</ul>

<p>If there is a <code class="language-plaintext highlighter-rouge">!</code> and the same port is in the list twice:</p>

<ul>
  <li>Double click the “USB-SERIAL CH340” device</li>
  <li>Click the <strong>Port Settings</strong> tab</li>
  <li>Click <strong>Advanced</strong></li>
  <li>Change the device to a different (unused) COM port number</li>
</ul>

<h3 id="linux">Linux</h3>

<p>On Linux, the device will be <code class="language-plaintext highlighter-rouge">/dev/ttyUSB&lt;id&gt;</code> for example, <code class="language-plaintext highlighter-rouge">/dev/ttyUSB0</code> . If
there are multiple devices, the correct device is likely the highest one or one
with the newest timestamp.</p>

<h3 id="macos">macOS</h3>

<p>On macOS, the device will be <code class="language-plaintext highlighter-rouge">/dev/cu.usbserial-&lt;id&gt;</code> , the ID will vary by
hardware. If there are multiple devices, the correct device is likely the one
with the newest timestamp.</p>

<h1 id="firmware-file">Firmware File</h1>

<p>Get the correct firmware file, or compile one.</p>

<p>Do a firmware check on the light (15+ clicks, note each digit it flashes) and
compare the date and IDs returned. Last four digits should be the Anduril model
ID. This is mostly for reference in case there is a discrepancy between what the
light was running before and what is loaded after.</p>

<p>For the Wurkkos TS10 or Sofirn SP10 Pro, check at <a href="https://www.ghart.com/blf/firmware/hex_files/sofirn_anduril2/">https://www.ghart.com/blf/firmware/hex_files/sofirn_anduril2/</a>
for the latest revision for the light in question. As of this writing, the
newest files for the Wurkkos TS10 is <a href="https://www.ghart.com/blf/firmware/hex_files/sofirn_anduril2/anduril.2022-07-19.wurkkos-ts10.hex">anduril.2022-07-19.wurkkos-ts10.hex</a>,
Sofirn SP10 Pro is <a href="https://www.ghart.com/blf/firmware/hex_files/sofirn_anduril2/anduril.2022-07-23.sofirn-sp10-pro.hex">anduril.2022-07-23.sofirn-sp10-pro.hex</a>
– Those are likely to change over time.</p>

<p>For other lights, check <a href="http://toykeeper.net/torches/fsm/anduril2/">http://toykeeper.net/torches/fsm/anduril2/</a></p>

<h1 id="running-the-update">Running the Update</h1>

<p>There are two ways to update currently, with either avrdude or pymcuprog.</p>

<h2 id="avrdude">avrdude</h2>

<p>The <a href="https://github.com/avrdudes/avrdude/releases/tag/v7.0">recently released avrdude 7.0</a>
now supports updating through these interfaces and avrdude may already be
familiar for those updating firmware since it is a common way to update other
lights that use USBASP boards.</p>

<ul>
  <li>Download the latest release</li>
  <li>Extract it using whatever tool is handy (e.g. Windows Explorer, 7-Zip, or
other file manager or built-in OS utility</li>
  <li>Copy the firmware file(s) to the same directory as avrdude to make it easier</li>
  <li>Open a command prompt and change to the directory where the contents were
extracted</li>
</ul>

<h3 id="ping-the-device-to-ensure-connectivity">Ping the Device to Ensure Connectivity</h3>

<p>The first thing to try is to ping the device to ensure that avrdude can talk to
both the CH340 device and the target chip. Replace the serial port in the
following command with the port used by the CH340 device:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>.\avrdude.exe -p attiny1616 -c serialupdi -P com7 -n
</code></pre></div></div>

<p>The output should look like this:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>avrdude.exe: UPDI link initialization OK
avrdude.exe: Device is in SLEEP mode
avrdude.exe: NVM type 0: 16-bit, page oriented write
avrdude.exe: Entering NVM programming mode
avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude.exe: Device signature = 0x1e9421 (probably t1616)
avrdude.exe: Leaving NVM programming mode

avrdude.exe done.  Thank you.
</code></pre></div></div>

<p>If there is an error, most likely the probe was not correctly contacting all of
the correct pins. Check and correct the probe placement and try again.</p>

<h3 id="read-the-old-firmware">Read the Old Firmware</h3>

<p>A good practice is to read the old firmware in case the new firmware has an
undesirable behavior. That way it’s possible to reload the previous firmware to
get back to the prior state.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>.\avrdude.exe -p attiny1616 -c serialupdi -P com7 -Uflash:r:old-firmware.hex
</code></pre></div></div>

<p>The output should look like this:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>avrdude.exe: UPDI link initialization OK
avrdude.exe: Device is in SLEEP mode
avrdude.exe: NVM type 0: 16-bit, page oriented write
avrdude.exe: Entering NVM programming mode
avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude.exe: Device signature = 0x1e9421 (probably t1616)
avrdude.exe: reading flash memory:

Reading | ################################################## | 100% 4.02s

avrdude.exe: writing output file "old-firmware.hex"
avrdude.exe: Leaving NVM programming mode

avrdude.exe done.  Thank you.
</code></pre></div></div>

<h3 id="write-the-new-firmware">Write the New Firmware</h3>

<p>Now it is time to write the new firmware. Replace the filename in the following
command with the correct firmware filename.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>.\avrdude.exe -p attiny1616 -c serialupdi -P com7 -Uflash:w:anduril.2022-07-19.wurkkos-ts10.hex
</code></pre></div></div>

<p>The output should look like the following:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>avrdude.exe: UPDI link initialization OK
avrdude.exe: Device is in SLEEP mode
avrdude.exe: NVM type 0: 16-bit, page oriented write
avrdude.exe: Entering NVM programming mode
avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude.exe: Device signature = 0x1e9421 (probably t1616)
avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
             To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: reading input file "anduril.2022-07-19.wurkkos-ts10.hex"
avrdude.exe: input file anduril.2022-07-19.wurkkos-ts10.hex auto detected as Intel Hex
avrdude.exe: writing flash (9562 bytes):

Writing | ################################################## | 100% 3.87s

avrdude.exe: 9562 bytes of flash written
avrdude.exe: verifying flash memory against anduril.2022-07-19.wurkkos-ts10.hex:
avrdude.exe: input file anduril.2022-07-19.wurkkos-ts10.hex auto detected as Intel Hex

Reading | ################################################## | 100% 1.85s

avrdude.exe: 9562 bytes of flash verified
avrdude.exe: Leaving NVM programming mode

avrdude.exe done.  Thank you.
</code></pre></div></div>

<p>Now that the firmware is written to the light, skip ahead to the section on
<a href="#factory-reset">performing a factory reset</a>.</p>

<h2 id="python-and-pymcuprog">Python and pymcuprog</h2>

<p>If avrdude is not a viable choice, install Python and <code class="language-plaintext highlighter-rouge">pymcuprog</code>.</p>

<p>On Windows, there are two main ways to get Python:</p>

<ol>
  <li>Use the <a href="https://www.python.org/downloads/windows/">installer from Python</a></li>
  <li>Install from the Microsoft Store</li>
</ol>

<p>After installing python, open a command prompt and install <code class="language-plaintext highlighter-rouge">pymcuprog</code> by
running <code class="language-plaintext highlighter-rouge">pip install pymcuprog</code></p>

<h3 id="fix-python-path">Fix Python Path</h3>

<p>There may be some quirks getting the paths right for <code class="language-plaintext highlighter-rouge">pymcuprog</code> if Python was
installed from the Microsoft Store, since the location for the packages is not
in the path by default.</p>

<p>Try running <code class="language-plaintext highlighter-rouge">pymcuprog</code> from a terminal, PowerShell, or command prompt, if it
prints its usage output, then it’s OK to proceed. Otherwise, check and correct
the path or python issues.</p>

<p>In Explorer, first locate the correct folder. It will be something similar to
<code class="language-plaintext highlighter-rouge">C:\Users\&lt;name&gt;\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_&lt;id&gt;\LocalCache\local-packages\Python39\Scripts</code>
– Copy that full path.</p>

<p>The correct path will also be found in the output of
<code class="language-plaintext highlighter-rouge">python -c "import sys; print('\n'.join(sys.path))"</code>
it will be the entry similar to the path mentioned previously.</p>

<ul>
  <li>Right click on the Start/Windows button</li>
  <li>Click <strong>System</strong></li>
  <li>Click <strong>Advanced System Settings</strong></li>
  <li>Click <strong>Environment Variables</strong></li>
  <li>Find the entry for <strong>Path</strong> in the <strong>User variables</strong> section and select it</li>
  <li>Click <strong>Edit</strong></li>
  <li>Add the path to the list (paste it in or type it out)</li>
  <li>Click <strong>OK</strong>, then <strong>OK</strong> again to close the <strong>Environment Variables</strong> window</li>
  <li>Click <strong>OK</strong> one more time to close <strong>System Properties</strong></li>
</ul>

<h3 id="ping-the-device-to-ensure-connectivity-1">Ping the Device to Ensure Connectivity</h3>

<p>The first thing to try is to ping the device to ensure that <code class="language-plaintext highlighter-rouge">pymcuprog</code> can talk
to both the CH340 device and the target chip. Replace the serial port in the
following command with the port used by the CH340 device:</p>

<p>First, try a ping to see if the device responds to a probe:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pymcuprog ping -d attiny1616 -t uart -u com7
</code></pre></div></div>

<p>The output should look like the following if it’s successful:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Connecting to SerialUPDI
Pinging device...
Ping response: 1E9421
Done.
</code></pre></div></div>

<p>If there is an error, most likely the probe was not correctly contacting all of
the correct pins. Check and correct the probe placement and try again.</p>

<h3 id="erase-the-firmware">Erase the Firmware</h3>

<p>Unlike avrdude, pymcuprog does not automatically erase before writing, so do a
manual erase:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pymcuprog erase -d attiny1616 -t uart -u com7
</code></pre></div></div>

<p>The output should look like the following:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Connecting to SerialUPDI
Pinging device...
Ping response: 1E9421
Chip/Bulk erase:
- Memory type eeprom is conditionally erased (depending upon EESAVE fuse setting)
- Memory type flash is always erased
- Memory type lockbits is always erased
Erased.
Done.
</code></pre></div></div>

<h3 id="write-the-firmware">Write the Firmware</h3>

<p>Change to the directory where the firmware file was downloaded, for example:
<code class="language-plaintext highlighter-rouge">cd ~\Downloads</code></p>

<p>Now write the firmware file. Replace the filename with the correct firmware
filename that matches the light.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>pymcuprog write -d attiny1616 -t uart -u com7 --verify -f anduril.2022-07-19.wurkkos-ts10.hex
</code></pre></div></div>

<p>The output should look like the following:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>Connecting to SerialUPDI
Pinging device...
Ping response: 1E9421
Writing from hex file...
Writing flash...
Verifying flash...
OK
Done.
</code></pre></div></div>

<h1 id="factory-reset">Factory Reset</h1>

<p>After writing the firmware, it’s a good idea to do a factory reset. Hold in the
power button while reassembling the light and let go of the button when the
light goes out.</p>

<p class="notice--info">On some tail switch lights it helps to fully tighten the tube first, then back
it off enough that the aux lights (or main emitter) goes out, then hold the
button while twisting it back fully closed.</p>

<h1 id="see-also">See Also</h1>

<p>This post was based in part on information from the following threads:</p>

<ul>
  <li><a href="https://www.reddit.com/r/flashlight/comments/u8t6x2/how_to_flash_firmware_on_the_sp10_pro_photos_at/">https://www.reddit.com/r/flashlight/comments/u8t6x2/how_to_flash_firmware_on_the_sp10_pro_photos_at/</a></li>
  <li><a href="https://budgetlightforum.com/comment/1873274#comment-1873274">https://budgetlightforum.com/comment/1873274#comment-1873274</a></li>
</ul>]]></content><author><name>Jim Pingle</name></author><category term="Flashlights" /><summary type="html"><![CDATA[Updating to the latest version of Anduril 2.]]></summary></entry><entry><title type="html">Using a Raspberry Pi as a Serial Console Server</title><link href="https://pingle.org//2022/04/02/raspberry-pi-serial-console-server" rel="alternate" type="text/html" title="Using a Raspberry Pi as a Serial Console Server" /><published>2022-04-02T12:02:41-04:00</published><updated>2022-04-02T12:02:41-04:00</updated><id>https://pingle.org//2022/04/02/raspberry-pi-serial-console-server</id><content type="html" xml:base="https://pingle.org//2022/04/02/raspberry-pi-serial-console-server"><![CDATA[<p>I have a lot of devices which use serial consoles for my job, most of them with
USB connectors but some with traditional 9-pin serial ports as well. Juggling
connections for all of these can be a chore, but there are ways to simplify the
process.</p>

<p>I have tried several different tactics over the years but the best solution I’ve
found so far is to use a Raspberry Pi as a dedicated serial console multiplexer
(MUX). The title seemed fitting as it takes multiple inputs (serial consoles)
and manages a single output (screen) though the user controls the active input
in this case.</p>

<h1 id="supplies">Supplies</h1>

<ul>
  <li>
    <p>Raspberry Pi (or equivalent)</p>

    <p>Though this post is geared toward using a Raspberry Pi with Raspbian as a
serial console server, many of the techniques used are general and could be
adapted to a variety of platforms.</p>
  </li>
  <li>
    <p>USB serial hub with lots of ports</p>

    <p>Like this <a href="https://www.amazon.com/gp/product/B00HL7Z46K/">13-port USB 2.0 hub</a>.
Linux doesn’t seem to get along with lots of USB 3.0 ports and there isn’t any
compelling reason to use USB 3.0 for serial consoles anyhow.</p>
  </li>
  <li>
    <p>USB serial devices</p>

    <p>Varies by device, some have USB consoles, some have serial ports with 9-pin or
RJ45 connectors. Some may require null modem adapters. This is mostly beyond
the scope of what I’m trying to cover here. I’m going to assume you can
already talk to the devices with USB serial in some way.</p>

    <p>Speaking of USB serial, I like <a href="https://www.amazon.com/gp/product/B00AHYJWWG/">these USB serial adapters</a>
for devices with regular non-USB serial ports.</p>
  </li>
  <li>
    <p>GNU screen</p>

    <p>GNU screen is capable of talking to serial ports directly, so there is no need
to use a separate terminal emulator program such as <code class="language-plaintext highlighter-rouge">minicom</code>. Though if you
prefer to use a different terminal program in each screen or maybe using
<code class="language-plaintext highlighter-rouge">tmux</code>, similar tactics should work there, too.</p>
  </li>
</ul>

<h1 id="setup-the-hardware">Setup the hardware</h1>

<p>Setting up the Pi is out of scope here, I’m going to assume you have a working
pi connected to your network.</p>

<p class="notice--info">Using a wired connection is best for real-time interactive work in SSH, but
depending on your AP and wireless setup it may still work OK that way.</p>

<p>Connect all of the USB serial devices to the hub and connect the hub to the Pi.
To ensure things are probed in the correct and expected order, rebooting the Pi
is a useful measure at this point.</p>

<figure class="align-center">
	<a href="/assets/images/pi-mux-hub.jpg">
		<img src="/assets/images/pi-mux-hub-768.jpg" />
	</a>
	<figcaption class="align-center">
		Lots of USB serial connections in one hub
	</figcaption>
</figure>

<p>From here on, everything is done over SSH connected to the Pi. Use the SSH
program of your choice (e.g. OpenSSH, SecureCRT, PuTTY).</p>

<h1 id="map-the-serial-ports-to-consistent-names">Map the serial ports to consistent names</h1>

<p>Before setting up the consoles let’s take the time to map each port to a
consistent and useful name. Rather than having them numbered, we can set it up
so that each port is labeled after the device. This makes keeping the screen
names and purposes easier to manage over time. If you are lucky and each one has
a unique set of properties, then it won’t even matter which order or ports they
plug into or what order they probe in.</p>

<h2 id="gather-device-attributes">Gather device attributes</h2>

<p>Look at the connected USB ports:</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">ls</span> <span class="nt">-l</span> /dev/ttyUSB<span class="k">*</span>
crw-rw---- 1 root dialout 188,  0 Mar 29 11:36 /dev/ttyUSB0
crw-rw---- 1 root dialout 188,  1 Mar 29 11:42 /dev/ttyUSB1
crw-rw---- 1 root dialout 188,  2 Mar 29 11:53 /dev/ttyUSB2
crw-rw---- 1 root dialout 188,  3 Mar 14 16:08 /dev/ttyUSB3
crw-rw---- 1 root dialout 188,  4 Mar 11 14:04 /dev/ttyUSB4
</code></pre></div></div>

<p>For each of these, go through the device information and find useful and unique
properties which identify a given device. This will give us enough information
to craft <code class="language-plaintext highlighter-rouge">udev</code> rules to setup the port names. The command probes the entire
stack to reach the device, but the one you are interested in is usually a few
entries into the output and will look similar to what is shown below.</p>

<p class="notice--info">Replace <code class="language-plaintext highlighter-rouge">x</code> in the command with the device number, and repeat the command for
each <code class="language-plaintext highlighter-rouge">ttyUSB</code> device.</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">sudo </span>udevadm info <span class="nt">--name</span><span class="o">=</span>/dev/ttyUSBx <span class="nt">--attribute-walk</span>
<span class="o">[</span>...]
  looking at parent device <span class="s1">'/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3.2'</span>:
<span class="o">[</span>...]
    <span class="nv">KERNELS</span><span class="o">==</span><span class="s2">"1-1.1.3.2"</span>
    ATTRS<span class="o">{</span>manufacturer<span class="o">}==</span><span class="s2">"Silicon Labs"</span>
    ATTRS<span class="o">{</span>idProduct<span class="o">}==</span><span class="s2">"ea60"</span>
    ATTRS<span class="o">{</span>devpath<span class="o">}==</span><span class="s2">"1.1.3.2"</span>
<span class="o">[</span>...]
    ATTRS<span class="o">{</span>serial<span class="o">}==</span><span class="s2">"xxxxxx01"</span>
<span class="o">[</span>...]
    ATTRS<span class="o">{</span>idVendor<span class="o">}==</span><span class="s2">"10c4"</span>
</code></pre></div></div>

<p>This is an ideal case. The device has a unique vendor ID (<code class="language-plaintext highlighter-rouge">idVendor</code>), product
ID (<code class="language-plaintext highlighter-rouge">idProduct</code>), and serial number (<code class="language-plaintext highlighter-rouge">serial</code>). Not every device will have a
serial number and multiple devices may even have the same serial number, which
complicates matters.</p>

<p>The trickier cases may have to rely on the device path (<code class="language-plaintext highlighter-rouge">devpath</code>) which means
they have to remain plugged into the same USB port.</p>

<h2 id="setup-udev-rules">Setup udev rules</h2>

<p>Create or edit <code class="language-plaintext highlighter-rouge">/etc/udev/rules.d/99-usb-serial.rules</code> and add rules based on
the attributes for each device along with its name.</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">sudo </span>vi /etc/udev/rules.d/99-usb-serial.rules
</code></pre></div></div>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># These two devices are similar but have unique serial numbers.
SUBSYSTEM=="tty", \
	ATTRS{idVendor}=="10c4", \
	ATTRS{idProduct}=="ea60", \
	ATTRS{serial}=="xxxxxx01", \
	SYMLINK+="serial_edge"
SUBSYSTEM=="tty", \
	ATTRS{idVendor}=="10c4", \
	ATTRS{idProduct}=="ea60", \
	ATTRS{serial}=="xxxxxx02", \
	SYMLINK+="serial_server"

# These two devices don't have a serial number,
# so we have to use the device path
SUBSYSTEM=="tty", \
	ATTRS{idVendor}=="067b", \
	ATTRS{idProduct}=="2303", \
	ATTRS{devpath}=="1.1.3.7.4", \
	SYMLINK+="serial_switch1"
SUBSYSTEM=="tty", \
	ATTRS{idVendor}=="067b", \
	ATTRS{idProduct}=="2303", \
	ATTRS{devpath}=="1.1.3.7.6", \
	SYMLINK+="serial_switch2"

# This device has a unique vendor and product ID, but use the serial
# number anyhow in case a similar device is added in the future.
SUBSYSTEM=="tty", \
	ATTRS{idVendor}=="0403", \
	ATTRS{idProduct}=="6001", \
	ATTRS{serial}=="xxxxxx03", \
	SYMLINK+="serial_adapter"
</code></pre></div></div>

<h2 id="reload-and-test">Reload and test</h2>

<p>Now reload the rules and re-trigger the device detection:</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">sudo </span>udevadm control <span class="nt">--reload-rules</span>
<span class="nv">$ </span><span class="nb">sudo </span>udevadm trigger <span class="nt">--attr-match</span><span class="o">=</span><span class="nv">subsystem</span><span class="o">=</span><span class="nb">tty</span>
</code></pre></div></div>

<p>Now look at the mapped devices with our nice names:</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">ls</span> <span class="nt">-ld</span> /dev/serial<span class="k">*</span>
drwxr-xr-x 4 root root 80 Oct 24 15:09 /dev/serial
lrwxrwxrwx 1 root root  7 Oct 24 15:09 /dev/serial1 -&gt; ttyAMA0
lrwxrwxrwx 1 root root  7 Oct 24 15:09 /dev/serial_edge -&gt; ttyUSB2
lrwxrwxrwx 1 root root  7 Oct 24 15:09 /dev/serial_server -&gt; ttyUSB1
lrwxrwxrwx 1 root root  7 Oct 24 15:09 /dev/serial_switch1 -&gt; ttyUSB4
lrwxrwxrwx 1 root root  7 Oct 24 15:09 /dev/serial_switch2 -&gt; ttyUSB3
lrwxrwxrwx 1 root root  7 Oct 24 15:09 /dev/serial_adapter -&gt; ttyUSB0
</code></pre></div></div>

<p>These will come back on reboot and when devices are unplugged and replugged.</p>

<p class="notice--info">It’s a good idea to reboot at this point to ensure the custom names return as
expected.</p>

<h2 id="check-privileges">Check privileges</h2>

<p>Ensure that your user can access the serial ports. By default in Raspbian the
user is <code class="language-plaintext highlighter-rouge">pi</code> and it is a member of the <code class="language-plaintext highlighter-rouge">dialout</code> group, and the <code class="language-plaintext highlighter-rouge">dialout</code> group
has permission to access the <code class="language-plaintext highlighter-rouge">ttyUSB*</code> devices. If you use another user, add it
to the <code class="language-plaintext highlighter-rouge">dialout</code> group.</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span><span class="nb">sudo </span>usermod <span class="nt">-a</span> <span class="nt">-G</span> dialout myuser
</code></pre></div></div>

<p>Alternately, you can run <code class="language-plaintext highlighter-rouge">screen</code> through <code class="language-plaintext highlighter-rouge">sudo</code>, but that is typically
unnecessary with proper permissions and group memberships.</p>

<h1 id="gnu-screen">GNU screen</h1>

<p><a href="https://www.gnu.org/software/screen/">GNU screen</a> allows a user to run multiple
concurrent terminal sessions from a single login session. This is much easier to
manage than multiple SSH connections to the same server, with the added benefit
that screen can “detach” and leave the terminals connected in the background
while the user does other things or even logs out. Later, the user can resume
the screen session and it is as if they never left.</p>

<p>Many devices will output critical messages to the serial console and if the user
isn’t watching the console when they happen, they can be easily missed. Using
screen with a large scrollback buffer means the user can monitor these devices
and look back at recent output, search it for specific strings, or even write it
out to a file.</p>

<h2 id="setup-screen-configuration">Setup screen configuration</h2>

<p>Create a configuration file for this dedicated instance of <code class="language-plaintext highlighter-rouge">screen</code>:</p>
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>$ vi .consoles.screenrc 
</code></pre></div></div>

<p>Add in some useful configuration options along with definitions for each of the
serial terminals.</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code># Handy terminal defaults
termcapinfo xterm ti@:te@
termcapinfo xterm-color ti@:te@
termcap xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
terminfo xterm 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l'
vbell off

# Status line -- careful the second line is quite long!
hardstatus alwayslastline
hardstatus string '%{gk}[%{G}%H%{g}][%= %{wk}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%= %{g}]%{=b C}[%m/%d/%y %C %A]%{W}'

# Misc other defaults
shell -$SHELL
logtstamp on
logtstamp after 1

# No need for the intro screen
startup_message off

# 50000 lines of scrollback per window
defscrollback 50000

# Custom session name
sessionname consoles

# Definitions for each separate screen
screen -t 'Edge'     /dev/serial_edge    115200
screen -t 'Server'   /dev/serial_server  115200
screen -t 'Switch-1' /dev/serial_switch1 115200
screen -t 'Switch-2' /dev/serial_switch2 115200
screen -t 'Adapter'  /dev/serial_adapter 115200
</code></pre></div></div>

<p>Replace the names, serial devices, and serial port speeds as needed to match
your own setup.</p>

<p>The example above works on GNU Screen 4.x, but GNU Screen 5.x changed the syntax
for colors. I have a <a href="/2026/04/26/screen-5-status-color-changes">separate post about that</a>,
but to keep it short here, use the following status line instead if the host has
version 5:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>hardstatus alwayslastline
hardstatus string '%{2;0}[%{+b10;0}%H%{-}][%= %{7;0}%?%-Lw%?%{+9;0}(%{+15;0}%n%f %t%?(%u)%?%{-})%{-} ^H%?%+Lw%?%= %{-}]%{+b14;0}[%m/%d/%y %c]%{-}%{-}'
</code></pre></div></div>

<h2 id="using-gnu-screen">Using GNU screen</h2>

<h3 id="overview">Overview</h3>

<p>When screen is running it will display a nice status bar with screen numbers and
the short names we set above with <code class="language-plaintext highlighter-rouge">-t &lt;name&gt;</code>.</p>

<figure class="align-center">
	<a href="/assets/images/pi-mux-screen.png">
		<img src="/assets/images/pi-mux-screen-768.png" />
	</a>
	<figcaption class="align-center">
		Screen session with multiple windows as configured for this example.
	</figcaption>
</figure>

<h3 id="start-screen">Start screen</h3>

<p>This command starts screen using our custom configuration file:</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>screen <span class="nt">-c</span> ~/.consoles.screenrc
</code></pre></div></div>

<h3 id="resume-a-screen-session-that-is-already-running">Resume a screen session that is already running</h3>

<p>This command resumes our specially named session (<code class="language-plaintext highlighter-rouge">consoles</code>) in multi-display
mode.</p>

<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$ </span>screen <span class="nt">-S</span> consoles <span class="nt">-x</span>
</code></pre></div></div>

<p>In multi-display mode the user can remain connected to the screen from
multiple separate SSH login sessions simultaneously.</p>

<h3 id="screen-commands">Screen commands</h3>

<p>The following commands are entered in screen by pressing <code class="language-plaintext highlighter-rouge">Ctrl-A</code> (Hold the
<code class="language-plaintext highlighter-rouge">Ctrl</code> key and tap the <code class="language-plaintext highlighter-rouge">a</code> key), then release both and press the next key. For
brevity, this will be abbreviated like <code class="language-plaintext highlighter-rouge">^A-d</code> for pressing <code class="language-plaintext highlighter-rouge">Ctrl-A</code> then <code class="language-plaintext highlighter-rouge">d</code>.</p>

<dl>
  <dt><code class="language-plaintext highlighter-rouge">^A-d</code> - Detach</dt>
  <dd>Leaves the session running in the background and returns the user to the
shell.</dd>
  <dt><code class="language-plaintext highlighter-rouge">^A-DD</code> (<code class="language-plaintext highlighter-rouge">Shift+D</code> twice) - Power detach</dt>
  <dd>Detach and logout in a single step.</dd>
  <dt><code class="language-plaintext highlighter-rouge">^A-a</code> - Toggle next/last screen</dt>
  <dd>Changes between the current screen and the last used screen. If on the first
screen, it switches to the next one. Press again to swap back and forth.</dd>
  <dt><code class="language-plaintext highlighter-rouge">^A-&lt;num&gt;</code> - Switch to a specific screen number</dt>
  <dd>Changes to a specific numbered screen <code class="language-plaintext highlighter-rouge">0</code>-<code class="language-plaintext highlighter-rouge">9</code></dd>
  <dt><code class="language-plaintext highlighter-rouge">^A-n</code> - Next screen</dt>
  <dd>Changes to the next screen in order</dd>
  <dt><code class="language-plaintext highlighter-rouge">^A-p</code> - Previous screen</dt>
  <dd>Changes to the previous screen in order</dd>
  <dt><code class="language-plaintext highlighter-rouge">^A-&lt;esc&gt;</code> - Scrollback buffer mode</dt>
  <dd>Enters scrollback history mode. Moving through the buffer depends on the
terminal program and settings. It may move with arrow keys, <code class="language-plaintext highlighter-rouge">hjkl</code>, or even
the mouse scroll wheel. Type <code class="language-plaintext highlighter-rouge">?&lt;string&gt;</code> to search backward, <code class="language-plaintext highlighter-rouge">/&lt;string&gt;</code> to
search forward. Press <code class="language-plaintext highlighter-rouge">Esc</code> again to exit.</dd>
  <dt><code class="language-plaintext highlighter-rouge">^A-\</code> - Quit</dt>
  <dd>Terminates screen.</dd>
  <dt><code class="language-plaintext highlighter-rouge">^A-:</code> - Screen command prompt</dt>
  <dd>Accepts a text command from the user. For example, to write the contents of
the entire scrollback buffer to a file, use <code class="language-plaintext highlighter-rouge">:hardcopy -h outfile.txt</code>.</dd>
  <dt><code class="language-plaintext highlighter-rouge">^A-?</code> - Help</dt>
  <dd>Displays a help page with a list of commands and other information.</dd>
</dl>

<h1 id="finish-up">Finish up</h1>

<p>With this in place, you can detach from the screen session and leave it running
indefinitely and reattach as needed. This is great for monitoring consoles in
case something goes wrong and prints logs or console messages for debugging.</p>]]></content><author><name>Jim Pingle</name></author><category term="Computers" /><summary type="html"><![CDATA[Monitoring serial consoles on multiple devices from a Raspberry Pi]]></summary></entry><entry><title type="html">Flashing a 2020 Sofirn SP36 Pro with new firmware</title><link href="https://pingle.org//2022/03/27/flashing-a-2020-sofirn-sp36-pro-with-new-firmware" rel="alternate" type="text/html" title="Flashing a 2020 Sofirn SP36 Pro with new firmware" /><published>2022-03-27T18:08:41-04:00</published><updated>2022-03-27T18:08:41-04:00</updated><id>https://pingle.org//2022/03/27/flashing-a-2020-sofirn-sp36-pro-with-new-firmware</id><content type="html" xml:base="https://pingle.org//2022/03/27/flashing-a-2020-sofirn-sp36-pro-with-new-firmware"><![CDATA[<p class="notice--info">This post may still be helpful, but I compiled a much more comprehensive
reference site for updating Anduril lights at
<a href="https://anduril.click/">https://anduril.click/</a>.</p>

<p>I have an older SP36 BLF from 2020 that was stuck on Anduril 1 while all my
other Anduril lights are on Anduril 2, so I finally decided to rectify that. The
SP36 was the last Anduril light I had left on Anduril 1 as it was also the most
difficult to update.</p>

<p>Hat tip to <a href="https://www.reddit.com/user/Wily_Wapiti">/u/Wily_Wapiti</a> for <a href="https://www.reddit.com/r/flashlight/comments/t9y6de/another_sp36_blf_with_anduril_2_and_red_switch/">their
post about updating their own SP36</a>
which gave me some extra guidance and encouraging information.</p>

<figure class="align-center">
	<a href="/assets/images/flash-sp36-overview.jpg">
		<img src="/assets/images/flash-sp36-overview-768.jpg" />
	</a>
	<figcaption class="align-center">
		An overview of my setup
	</figcaption>
</figure>

<p>Since I compulsively write documentation as I go, here are my notes in case
anyone else needs them.</p>

<h1 id="check-the-version">Check the version</h1>

<p>There are at least three versions of the board around:</p>

<ul>
  <li>No flashing pads with ATtiny85, which is what I had and what this guide covers</li>
  <li>Flashing pads with ATtiny85</li>
  <li>Flashing pads with ATtiny1616</li>
</ul>

<p>The models with flashing pads do not need disassembled the way this guide
describes and the update procedure would be different, closer to the procedure
<a href="https://www.reddit.com/r/flashlight/comments/msiiqb/a_brief_guide_for_flashing_your_lt1_with_new/">for updating the LT1</a>.</p>

<p>Before starting, try to do a version check which is 15+ clicks from off. Write
down the result. The last four digits will be a model number which can be looked
up in the list in <a href="http://toykeeper.net/torches/fsm/anduril2/MODELS">the MODELS file</a>
and will definitely tell you what it’s running. If the light is running a
version of Anduril before the version check was added, it’s likely the older
variant similar to this guide or at least likely has an ATtiny85 and not
ATtiny1616. If it outputs a date but no 4-digit model code, it’s almost
certainly an older model running Anduril 1.</p>

<p>No matter which model the light is, do a test and a read to save the existing
firmware to confirm the correct settings before attempting to write.</p>

<h1 id="supplies">Supplies</h1>

<p>Here are the items I used:</p>

<ul>
  <li><a href="https://intl-outdoor.com/components/reflashing-kits.html">Flashing kit from Hank</a>
or another usbasp board.</li>
  <li><a href="https://www.amazon.com/gp/product/B091Y7QSJJ">SOIC8 Clip</a></li>
  <li><a href="https://www.amazon.com/gp/product/B072L1XMJR">Jumper wires with Dupont connectors</a></li>
  <li>5mm Allen wrench/hex key</li>
  <li>Duct tape</li>
</ul>

<h1 id="getting-to-the-chip">Getting to the chip</h1>

<p>Follow the disassembly procedure at
<a href="https://budgetlightforum.com/comment/1556068#comment-1556068">https://budgetlightforum.com/comment/1556068#comment-1556068</a></p>

<p>That post has pictures and directions, but to save a click, here is the general
idea:</p>

<ul>
  <li>Unscrew the head from the battery tube</li>
  <li>Use needle nose pliers to unscrew the ring retaining the switch</li>
  <li>Remove the ring and rubber switch cover</li>
  <li>Loosen the switch PCB. If it’s glued you may have to use a tool such as a
dental pick to pry it free. Mine was loose/unglued (lucky me!)</li>
  <li>Carefully move the switch PCB out of the way but don’t pull too much on the
wires.</li>
  <li>Use an Allen wrench, S hook, bent nail, or similar to put downward pressure on
the PCB through the switch hole</li>
  <li>You can see through the switch hole and find a bare spot on the board to
press. Careful not to dislodge the the wiring and careful not to press the
switch wires into the edge of the switch hole as it can damage them.</li>
  <li>Carefully pry, the glue will eventually come free, but watch where the tool
will apply pressure.</li>
  <li>With the PCB loose, check to make sure nothing was damaged when removing the
board.</li>
</ul>

<p>I used a 5mm Allen wrench with duct tape covering the end going inside the
light. The advantage of the Allen wrench is you can lift up on the handle and
use the “elbow” of the wrench against the switch hole as a fulcrum rather than
relying on pushing down or hammering. I used a T handle and some socket adapters
to get extra leverage and it popped out after some work.</p>

<p>Something softer than tape on the end might have been better, I scraped the PCB
a little but it was on an empty spot so not critical.</p>

<h1 id="wire-up-the-adapter">Wire up the adapter</h1>

<ul>
  <li>Connect a SOIC8 clip to a usbasp board with jumper wires in the right places
    <ul>
      <li>
        <p>Use the pin guide below, adapted <a href="https://budgetlightforum.com/comment/1558234#comment-1558234">from a BLF post</a></p>

        <figure class="align-center">
    <a href="/assets/images/sp36_wiring_diagram.png">
        <img src="/assets/images/sp36_wiring_diagram.png" />
    </a>
    <figcaption class="align-center">
        Wiring Diagram for SOIC8 chip, clip, and usbasp board (note location of notches)
    </figcaption>
</figure>
      </li>
      <li>
        <p>Here are pictures of how I wired up the connection between the usbasp board
and the SOIC8 clip:</p>

        <figure class="align-center">
    <a href="/assets/images/flash-sp36-soic8-1.jpg">
        <img src="/assets/images/flash-sp36-soic8-1-768.jpg" />
    </a>
    <figcaption class="align-center">
        Connection from usbasp to SOIC8 clip (front view)
    </figcaption>
</figure>

        <figure class="align-center">
    <a href="/assets/images/flash-sp36-soic8-2.jpg">
        <img src="/assets/images/flash-sp36-soic8-2-768.jpg" />
    </a>
    <figcaption class="align-center">
        Connection from usbasp to SOIC8 clip (rear view)
    </figcaption>
</figure>
      </li>
      <li>
        <p>I used jumper wires with M-F Dupont connectors so I could leave the original
leads on my SOIC8 clip and plug into its ribbon cable connector.</p>
      </li>
    </ul>
  </li>
  <li>Connect the SOIC8 clip to the correct chip on the PCB, which is the one
adjacent to the USB port. There is a divot on the chip marking pin 1, see the
pictures and the pinout guide linked above.</li>
</ul>

<p class="notice--info">As most of these lights can be updated with a SOIC8 clip, after doing this I
crafted a more permanent solution using dupont connector blocks. I used a pick
to release the single dupont connectors from the wire ends and inserted them
into a 2x4 block for the SOIC8 side and a 2x5 block for the usbasp side. This
way I can connect what is now effectively a proper ribbon cable in the future
without having to remember or look up the pinouts.</p>

<h1 id="flash-the-firmware">Flash the firmware</h1>

<ul>
  <li>
    <p>Download the firmware hex file for the SP36 from
<a href="http://toykeeper.net/torches/fsm/anduril2/">http://toykeeper.net/torches/fsm/anduril2/</a>
or compile a new one.</p>

    <ul>
      <li>For older SP36 models this will be <code class="language-plaintext highlighter-rouge">sofirn-sp36.hex</code> and for newer models it
may be <code class="language-plaintext highlighter-rouge">sofirn-sp36-t1616.hex</code></li>
    </ul>
  </li>
  <li>Copy the <code class="language-plaintext highlighter-rouge">sofirn-sp36.hex</code> hex file to the device which will be doing the
flashing.</li>
  <li>Connect the usbasp board to whatever you are using the flash the device. In my
case this was connected to a phone with a USB OTG adapter.</li>
  <li>I used <a href="https://play.google.com/store/apps/details?id=ru.zdevs.zflasheravr">zflasher AVR</a><br />
on Android to perform the update, but there are other ways such as <code class="language-plaintext highlighter-rouge">avrdude</code>
or similar programs.</li>
  <li>The settings I use for zflasher are:
    <ul>
      <li><strong>MCU</strong>: ATtiny85 (For newer SP36 models this may be ATtiny1616)</li>
      <li><strong>Memory</strong>: Flash</li>
    </ul>
  </li>
  <li>Read the existing firmware as a separate file (e.g. <code class="language-plaintext highlighter-rouge">sp36-old.hex</code>) and save
it somewhere safe (optional, but a good idea)</li>
  <li>Write the new firmware to the chip</li>
  <li>Disconnect the SOIC8 clip</li>
</ul>

<h1 id="reassemble-and-finish-up">Reassemble and finish up</h1>

<ul>
  <li>(Optional) clean up some of the glue residue to make getting the board back in
and out easier</li>
  <li>Align the board back up using the USB port and side notches as a guide and
gently push it back into place. Odds are it won’t go completely back into
place yet.</li>
  <li>Take the batteries out of the tube and screw it back into the head as far as
it can go, which should re-seat the board back in place.</li>
  <li>Take the tube back off</li>
  <li>Carefully replace the switch, tucking the wires back inside</li>
  <li>Replace the rubber switch cover and ring</li>
  <li>Tighten the ring back with the needle nose pliers</li>
  <li>Put the batteries back in the tube and factory reset
    <ul>
      <li>Hold the power button down while tightening the battery tube and keep
holding it for ~4 seconds after it gets power. Repeat if necessary.</li>
    </ul>
  </li>
  <li>Enjoy!</li>
</ul>

<h1 id="similar-lights">Similar Lights</h1>

<p>Slight update, I also have a Sofirn Q8 Pro and BLF LT1. The Q8 Pro does not have
flashing pads, the LT1 had pads but they didn’t line up with any adapter I have
or could make. But in both cases they only had two phillips head screws holding
in the driver board. Remove the screws, the board is loose and it was simple to
gently turn it over and use the same SOIC8 clip method on them that worked on
the SP36.</p>

<p>Line up the USB port and put the screws back in and reassemble, almost easier
than trying to hold an adapter up to the pogo pins while running the update.</p>

<p class="notice--info">Adapted from my <a href="https://www.reddit.com/r/flashlight/comments/tcrurs/finally_updated_my_sofirn_sp36_blf_to_anduril_2/">post on Reddit</a>.</p>]]></content><author><name>Jim Pingle</name></author><category term="Flashlights" /><summary type="html"><![CDATA[Updating to the latest version of Anduril 2.]]></summary></entry><entry><title type="html">Flashing a Fireflies PL47G2 with new firmware</title><link href="https://pingle.org//2022/03/27/flashing-a-fireflies-pl47g2-with-new-firmware" rel="alternate" type="text/html" title="Flashing a Fireflies PL47G2 with new firmware" /><published>2022-03-27T17:07:41-04:00</published><updated>2022-03-27T17:07:41-04:00</updated><id>https://pingle.org//2022/03/27/flashing-a-fireflies-pl47g2-with-new-firmware</id><content type="html" xml:base="https://pingle.org//2022/03/27/flashing-a-fireflies-pl47g2-with-new-firmware"><![CDATA[<p class="notice--info">This post may still be helpful, but I compiled a much more comprehensive
reference site for updating Anduril lights at
<a href="https://anduril.click/">https://anduril.click/</a>.</p>

<p>I recently picked up a Fireflies PL47G2 and didn’t see a flashing how-to out
there for it, so I figured I’d write something up. This may work on other
Fireflies lights but the PL47G2 is the only one of theirs I have so far.</p>

<h1 id="required-reading">Required Reading</h1>

<p>Before starting, read over <a href="https://www.reddit.com/r/flashlight/comments/msiiqb/a_brief_guide_for_flashing_your_lt1_with_new/">the guide for flashing the Sofirn
LT1</a>
as the procedure and pin layout is essentially the same. The pin layout on the
LT1 is 3 over 3, the PL47G2 is 3 over 4 but one of the pins on the bottom row
isn’t used.</p>

<h1 id="adapt-the-hank-flashing-kit">Adapt the Hank Flashing Kit</h1>

<p>I used the <a href="https://intl-outdoor.com/components/reflashing-kits.html">flashing kit from
Hank</a> (4 over 2
pinout) so as with the LT1 method it requires adapting the connection to the
different pin layout plus some method of connecting an extra pin. I used a
multimeter lead with a thin probe on one end and alligator clips on the other,
clipped to a similar jumper wire to the ones mentioned in the LT1 thread.</p>

<figure class="align-center">
    <a href="/assets/images/3o3_wiring_hank.png">
        <img src="/assets/images/3o3_wiring_hank.png" />
    </a>
    <figcaption class="align-center">
        Wiring Diagram for adapting Hank's probe and usbasp board (note the lead that uses a separate wire)
    </figcaption>
</figure>

<p class="notice--info">Since writing this originally, I ordered some pogo pins and figured out that
they can push fit into a dupont connector, so when I updated the light again,
I used that instead of a multimeter probe.</p>

<p>Here are the connectors on my flashing kit with the jumper wires in place. The
red wire on the right is going to the multimeter lead.</p>

<figure class="align-center">
	<a href="/assets/images/flash-ff-pl47g2-jumperwires.jpg">
		<img src="/assets/images/flash-ff-pl47g2-jumperwires-768.jpg" />
	</a>
	<figcaption class="align-center">
		Jumper wires with female to female dupont connectors between usbasp and probe.
	</figcaption>
</figure>

<h1 id="firmware-file">Firmware File</h1>

<p>Grab the latest Anduril build from
<a href="http://toykeeper.net/torches/fsm/anduril2/">http://toykeeper.net/torches/fsm/anduril2/</a></p>

<ul>
  <li>
    <p>If the PL47G2 uses emitters <strong>other</strong> than Nichia 219, download
<code class="language-plaintext highlighter-rouge">ff-pl47g2.hex</code></p>
  </li>
  <li>
    <p>If the PL47G2 uses Nichia 219 emitters, use either the <code class="language-plaintext highlighter-rouge">pl47-219</code> variant or
compile a variation of the pl47g2 firmware with the lower FET PWM levels safe
for use with the Nichia emitters.</p>

    <p class="notice--info">The <code class="language-plaintext highlighter-rouge">pl47-219</code> firmware disables low aux levels so it’s not ideal for use on
the PL47G2.</p>

    <p>See <a href="https://github.com/jim-p/anduril2/commit/90b885253b3d2d37c99e313eb5444ee9d485f067">this commit on my fork of Anduril 2</a>
for an example of the necessary changes to make a custom <code class="language-plaintext highlighter-rouge">pl47g2-219</code> variant.
I have also posted <a href="https://raw.githubusercontent.com/jim-p/anduril2/ff-pl47g2-219/ToyKeeper/spaghetti-monster/anduril/anduril.ff-pl47g2-219.hex">a pre-compiled version of the hex file for this
variant</a>.</p>
  </li>
</ul>

<h1 id="flashing-software">Flashing Software</h1>

<p>I used <a href="https://play.google.com/store/apps/details?id=ru.zdevs.zflasheravr">zflasher AVR</a>
on Android to perform the update, but there are other ways (like avrdude or
similar). I’ll stick to zflasher, though.</p>

<p>Copy the <code class="language-plaintext highlighter-rouge">.hex</code> file somewhere on the phone/tablet accessible to the app (e.g.
<code class="language-plaintext highlighter-rouge">Downloads</code> directory).</p>

<p>Connect the phone/tablet to the flash kit (e.g. using USB C to A Female adapter
or OTG cable)</p>

<p>Open the app and set it up as follows:</p>

<ul>
  <li><strong>MCU</strong>: ATtiny85</li>
  <li><strong>Memory</strong>: Flash</li>
  <li><strong>Action</strong>: Write</li>
  <li>Load the hex file with the firmware</li>
</ul>

<figure class="align-center">
	<a href="/assets/images/flash-ff-pl47g2-zflasher.jpg">
		<img src="/assets/images/flash-ff-pl47g2-zflasher-768.jpg" />
	</a>
	<figcaption class="align-center">
		Screenshot of zflasher with the correct settings.
	</figcaption>
</figure>

<h1 id="connect-the-pins">Connect the Pins</h1>

<p>Line up pogo pins on the flashing kit such that one pin on the row of 4 is
<strong>NOT</strong> touching anything. Should be like so:</p>

<figure class="align-center">
    <a href="/assets/images/ff_flashing_pads_hank.png">
        <img src="/assets/images/ff_flashing_pads_hank.png" />
    </a>
    <figcaption class="align-center">
        Pin layout inside the light head with notations for adapted probe
    </figcaption>
</figure>

<ul>
  <li><code class="language-plaintext highlighter-rouge">X</code> is an open pad that is not used</li>
  <li><code class="language-plaintext highlighter-rouge">P</code> is a pad touched by a pogo pin</li>
  <li><code class="language-plaintext highlighter-rouge">N</code> is a pogo pin not touching a pad</li>
  <li><code class="language-plaintext highlighter-rouge">O</code> is an open pad which is where the extra lead goes (multimeter for me)</li>
</ul>

<figure class="align-center">
	<a href="/assets/images/flash-ff-pl47g2-pins-1.jpg">
		<img src="/assets/images/flash-ff-pl47g2-pins-1-768.jpg" />
	</a>
	<figcaption class="align-center">
		Flashing kit pins making contact in the correct place.
	</figcaption>
</figure>

<figure class="align-center">
	<a href="/assets/images/flash-ff-pl47g2-pins-2.jpg">
		<img src="/assets/images/flash-ff-pl47g2-pins-2-768.jpg" />
	</a>
	<figcaption class="align-center">
		Flashing kit with the extra multimeter lead connected.
	</figcaption>
</figure>

<h1 id="test-and-update-firmware">Test and Update Firmware</h1>

<p>In the app, run a test first. If it fails, fix the error and try again. Most
likely it wasn’t making contact with all the pins.</p>

<p>If the test succeeds, then write and wait for it to write and verify.</p>

<h1 id="final-thoughts">Final Thoughts</h1>

<p>Bonus shot of the cobbled together setup to make it happen, with a guest
appearance from a D4Sv2 and SC31 Pro working together as a little task light:</p>

<figure class="align-center">
	<a href="/assets/images/flash-ff-pl47g2-overview.jpg">
		<img src="/assets/images/flash-ff-pl47g2-overview-768.jpg" />
	</a>
	<figcaption class="align-center">
		Overview of the setup used to update the firmware.
	</figcaption>
</figure>

<h1 id="hq-progkey--other-usb-asp-boards">HQ ProgKey / Other USB ASP Boards</h1>

<p>I ordered a couple batches of these <a href="https://oshpark.com/shared_projects/orhYWEK3">HQ ProgKey</a>
PCBs from OshPark to make an adapter I could use for these Fireflies lights.</p>

<p>I used some solder paste to reflow <a href="https://www.amazon.com/dp/B01913L0UK">pogo pins</a>
and connecting pins onto the adapter and then wired it up to match the pin
layout.</p>

<figure class="align-center">
    <a href="/assets/images/3o3_wiring_pk.png">
        <img src="/assets/images/3o3_wiring_pk.png" />
    </a>
    <figcaption class="align-center">
        Wiring Diagram for HQ ProgKey and usbasp board
    </figcaption>
</figure>

<figure class="align-center">
    <a href="/assets/images/ff_flashing_pads.png">
        <img src="/assets/images/ff_flashing_pads.png" />
    </a>
    <figcaption class="align-center">
        Pin layout inside the light head
    </figcaption>
</figure>

<p>I had some trouble initially getting it to work, but as it turns out the problem
was the usbasp boards I had purchased from Amazon. The adapter works fine with
the board from Hank’s flashing kit, so I’ll keep using that for now.</p>

<p class="notice--info">Adapted from my <a href="https://www.reddit.com/r/flashlight/comments/t6xr4o/flashing_a_fireflies_pl47g2_with_new_firmware/">post on Reddit</a>.</p>]]></content><author><name>Jim Pingle</name></author><category term="Flashlights" /><summary type="html"><![CDATA[Updating to the latest version of Anduril 2.]]></summary></entry><entry><title type="html">Rewiring the Heated Bed on a Monoprice Select Mini v2 3D Printer</title><link href="https://pingle.org//2017/10/08/rewiring-the-heated-bed-on-a-monoprice-select-mini-v2-3d-printer" rel="alternate" type="text/html" title="Rewiring the Heated Bed on a Monoprice Select Mini v2 3D Printer" /><published>2017-10-08T23:07:41-04:00</published><updated>2017-10-08T23:07:41-04:00</updated><id>https://pingle.org//2017/10/08/rewiring-the-heated-bed-on-a-monoprice-select-mini-v2-3d-printer</id><content type="html" xml:base="https://pingle.org//2017/10/08/rewiring-the-heated-bed-on-a-monoprice-select-mini-v2-3d-printer"><![CDATA[<p>Recently I acquired a Monoprice Select Mini v2 3D Printer and I’ve been having a
great time learning and experimenting with 3D Printing on it. It’s a wonderful
little printer that is inexpensive (At around $220), puts out great quality
prints, it’s easy to work with and to work on. That said, it has a fatal flaw in
its design: The wiring for the bed heater and thermistor is routed along a
horrible path that lets the wires rub against the gears moving the bed, and
these two pairs of wires are zip tied in a place that makes them kink as the bed
moves. Between these two problems, the wiring is prone to short, fray, or break
entirely. Unsurprisingly, I had to repair mine, read on to find how how.</p>

<p>A visit to the Monoprice Select Mini <a href="https://www.facebook.com/groups/710952782398723/">Facebook
group</a> or the
<a href="https://www.reddit.com/r/MPSelectMiniOwners/">subreddit</a> shows a surprising (to
me, at least) number of people with related problems.A common chorus when
discussing the printer is “rewire the bed before you do anything else”. It can
manifest as the bed heater not working or the bed temperature readout being
incorrect, typically reading <code class="language-plaintext highlighter-rouge">999</code> or <code class="language-plaintext highlighter-rouge">0</code>.</p>

<figure class="align-center">
	<a href="/assets/images/mpsm2_bed_wire_badziptie.jpg">
		<img src="/assets/images/mpsm2_bed_wire_badziptie-768x449.jpg" />
	</a>
	<figcaption class="align-center">
		Wires get pinched by this zip tie and bend at that point as the bed moves
	</figcaption>
</figure>

<p>Since mine had been OK, and I’d owned it less than a month, I figured I had
time. I was wrong. After a couple weeks and a non-trivial number of printing
hours, the bed wouldn’t preheat. The temperature readout was OK, but it read
about room temperature and didn’t move. I canceled the print, went into the
printer’s monitor screen and had it preheat the bed. Still nothing. I knew the
wires could be the problem so I moved the bed back and forth to see if it would
kick in, and it did when I moved it all the way forward. Move the bed back and
it stopped. Classic short behavior, so I knew what I was in for. Now I had two
choices: One: Send the printer back and get it fixed or repaired, or two: Fix it
myself. Option one meant I’d be without the printer for probably a week or two
and when it came back it would still have a bad wiring job. Option two means I
could have it up and running in a couple days at most, and I could use a better
wiring path that wouldn’t be prone to breaking. I opted to fix it myself, but I
didn’t have all the parts on hand which is why it took a couple days to fix.
While waiting for the parts to arrive I watched some <a href="https://www.youtube.com/watch?v=W1MqNMbGtDY">videos on
youtube</a> by others who made similar
repairs, but I did not want to drill through the case, so I also researched some
other options. Once it all arrived it was actually a very straightforward fix,
so I documented it all and here it is!</p>

<h1 id="requirements">Requirements</h1>

<p>I chose to do a no-drill method using a printed side panel to reroute the wires.
I do not want to have to deal with the mess of metal shavings that drilling
would cause. The directions below assume this method, plus also rewiring the
heater connection. Here are the parts I printed to replace the side panel and
help run the wires:</p>

<ul>
  <li>Back panel: <a href="https://www.thingiverse.com/thing:2451362">https://www.thingiverse.com/thing:2451362</a></li>
  <li>Front panel: <a href="https://www.thingiverse.com/thing:2370329">https://www.thingiverse.com/thing:2370329</a></li>
  <li>Cable brace: <a href="https://www.thingiverse.com/thing:1937513">https://www.thingiverse.com/thing:1937513</a>
– I used the second version, and mirrored it in Cura so the hole was on the
correct side for the side mount cable path</li>
</ul>

<h2 id="tools">Tools</h2>

<p>You’ll need these tools to either reroute the wiring or to repair the bed wires</p>

<ul>
  <li><a href="https://www.amazon.com/gp/product/B00FZPDG1K/">Cutters</a> for wire and zip ties</li>
  <li>Philips head screwdriver</li>
  <li>Pliers</li>
</ul>

<p>If you need to repair the bed wires, you will also need these:</p>

<ul>
  <li><a href="https://www.amazon.com/gp/product/B000OQ21CA/">Wire stripper</a></li>
  <li><a href="https://www.amazon.com/gp/product/B000RB38X8/">Helping Hand</a> or similar
clamp/stand to hold parts in place while soldering</li>
  <li><a href="https://www.amazon.com/gp/product/B01N9QW620">Multimeter</a></li>
  <li><a href="https://www.amazon.com/gp/product/B017H69UN2/">Soldering iron</a></li>
  <li><a href="https://www.amazon.com/gp/product/B005C789EU/">Soldering tip cleaning sponge</a>
(brass or other)</li>
  <li>OR: Instead of all that, you can <a href="https://gigdigit.com/heat-bed-mp-select-mini-v1-v2/">buy a new
bed+wires</a></li>
</ul>

<h2 id="supplies">Supplies</h2>

<p>If you are only rerouting the wires, you’ll want to grab…</p>

<ul>
  <li><a href="https://www.amazon.com/gp/product/B01N1TXKTM/">Braided cable sleeve</a>, spiral
tube wrap, or similar</li>
  <li>Small zip ties</li>
</ul>

<p>If you are repairing the bed wires, you’ll also need…</p>

<ul>
  <li>Solder - Preferably rosin core tin/lead blend for wire/electronics</li>
  <li><a href="https://www.amazon.com/gp/product/B01LH1FYR4/">18AWG flexible silicone wire</a>
- For the heater wires, if you have to replace the thermistor wires you can
use some smaller gauge wire like speaker wire</li>
  <li><a href="https://www.amazon.com/gp/product/B072Z92QZ2/">Kapton tape</a> - The old tape
may be resuable but it’s not worth the hassle</li>
  <li><a href="https://www.amazon.com/gp/product/B008WWC6FU/">Heat shrink tubing</a> - 3.5mm
diameter should be OK</li>
</ul>

<h1 id="rewire-part-1">Rewire Part 1</h1>

<h2 id="getting-the-wires-out">Getting the wires out</h2>

<ul>
  <li>Use the Move menu to raise the Z axis a few inches up to have clearance to
remove the bed</li>
  <li>Remove side panel where SD socket and USB connector are, the wires plug in
just behind here.</li>
  <li>Cut the zip ties along the bed wires inside and outside the unit, you might
have to remove the bottom panel for easier access, if so, lay the printer down
on its side with the removed side panel end facing up.</li>
  <li><a href="/assets/images/mpsm2_bed_connectors.jpg" class="align-right"><img src="/assets/images/mpsm2_bed_connectors-227x300.jpg" alt="" /></a>
Identify the bed wires: there are two pairs of wires, a thicker pair for the
bed heater, and a thinner pair for the bed thermistor. Follow them and locate
where they run and where they are plugged into the controller board. The
heater wires have a larger white connector on the board, the thermistor is a
smaller white connector near the open side panel.</li>
  <li>Mark and/or snap a photo of the connectors so you know which side is red and
which is black, and where they plug in</li>
  <li>Disconnect the bed wires from inside the unit</li>
  <li><a href="/assets/images/mpsm2_heater_wire_connector.jpg" class="align-right"><img src="/assets/images/mpsm2_heater_wire_connector-300x250.jpg" alt="" /></a>
Carefully remove the connector from the end of the heater wires (thicker
wires, larger connector) so the wires can be backed out through the grommets.
You may not need to do this depending on whether or not you can wiggle the
connector through. It is much easier to move the wire without the lump of a
connector on it, and it’s not hard to remove the connector, only need
something with a fine point to push in the little catch on each wire, like a
pin, paperclip, or sharp tweezers.</li>
  <li>Move the wiring back through the grommets so it comes right off the back of
the heated bed and not through the body of the printer or the carriage</li>
</ul>

<p class="notice--info">If you do not need to repair the wires, skip ahead to Rewire part 2.</p>

<h2 id="repair-the-wires">Repair the wires</h2>

<ul>
  <li>Carefully back out all of the bed leveling screws and set the screws, caps,
and springs aside. Don’t lose any pieces!</li>
  <li>At this point the bed is completely separated from the printer so it can be
moved it to a better work area, I reattached the connector to the heater wires
to keep them together but it will need to be off later to go through the cable
sleeve, so it’s up to you.</li>
  <li>Using a multimeter I confirmed my red heater wire had a nasty short. The black
wire was fine, but I replaced them both anyhow.</li>
  <li>Mark which connection is positive and which is negative on the bed, and/or
take a picture for reference</li>
  <li>Remove the Kapton tape covering the solder connections on the bed</li>
  <li>Carefully desolder the thick heater wires from the bed (outer wires): Hold the
soldering iron tip on the solder bead until it reflows and then they come
right off</li>
  <li>Cut the connector end of the wires off, keeping a few inches of old wire to
splice into later so you can reuse the connector</li>
  <li>Cut two lengths of new 18AWG silicone flexible wire: One red, one black,
really the color isn’t important, but it’s good to match.</li>
  <li>Strip a bit off both ends of the new wire and the salvaged connector wires</li>
  <li>Solder one end of each new wire to the bed in the appropriate spot</li>
  <li><a href="/assets/images/mpsm2_bed_kaptontape.jpg" class="align-right"><img src="/assets/images/mpsm2_bed_kaptontape-300x195.jpg" alt="" /></a>
Put some 1” Kapton tape back over the solder connections. Preferably use new
Kapton tape, not old, but the old may be tacky enough to reuse.</li>
  <li>Put some heat shrink tubing around the wire to be used after splicing</li>
  <li>Mesh or twist the new and salvaged wire ends together</li>
  <li>Solder each pair of wires together to form a strong bond</li>
  <li>Move the heat shrink tubing so it completely covers the solder on each wire
with room to spare</li>
  <li><a href="/assets/images/mpsm2_rewire_splice_heatshrink.jpg" class="align-right"><img src="/assets/images/mpsm2_rewire_splice_heatshrink-300x70.jpg" alt="" /></a>
Melt the heat shrink tubing using a high heat source. I used a heat gun, but a
lighter or torch works</li>
  <li>If you need to replace the thermistor wires, repeat this procedure again for
those, but with appropriate AWG replacement wire</li>
  <li>Replace the bed, using the screws, springs, and caps to reattach it</li>
  <li>You will definitely need to relevel the bed after, but don’t do that yet</li>
</ul>

<h1 id="rewire-part-2">Rewire Part 2</h1>

<h2 id="better-than-new">Better than new</h2>

<ul>
  <li>Run the bed wires through the hole in the cable brace</li>
  <li>Attach the cable brace on the back of the bed carriage. It needs screws, I
used some old PC case screws that fit.</li>
  <li>Slide the wire through some sort of conduit – braided cable sleeve, spiral
tube wrap, cable chain, etc. The connector on the heater wires will probably
need to be off for it to fit, unless you use spiral wrap which can fit around
anything.</li>
  <li>Put a zip tie at either end of the conduit, for example I used braided cable
sleeve so I put a zip tie between the bed and the cable brace, and another
just before the connectors</li>
  <li>Put the heater wire connector back on if it was removed, and reconnect the
heater and thermistor to the main controller board</li>
  <li>Put on the new side panels – If you couldn’t print new side panels because
you need the heated bed, just leave the side panel off while you print
replacements!</li>
  <li>Relevel the bed and try preheating it</li>
</ul>

<p>For me, the bed heated right up to 60C where I wanted it, and my prints are back
to sticking like I’m used to!</p>

<figure class="align-center">
	<a href="/assets/images/mpsm2_rewire_done.jpg">
		<img src="/assets/images/mpsm2_rewire_done-768x333.jpg" />
	</a>
	<figcaption class="align-center">
		All done!
	</figcaption>
</figure>

<p>If you choose to do a method involving drilling or if you choose a different
side panel configuration, the last few steps may need to change to route the
cables through whatever new path is available.</p>]]></content><author><name>Jim Pingle</name></author><category term="3D Printing" /><summary type="html"><![CDATA[A design flaw led to wires getting pinched and developing a short.]]></summary></entry></feed>