Baofeng Bike Helmet Headset Wiring Repair

The audio output wire from the Baofeng UV-5R to my bike helmet headset adapter broke after a year and a half, far longer than I expected:

Baofeng - broken spkr wire
Baofeng – broken spkr wire

It’s the green one, over on the left, pulled out of the heatstink tubing that should have provided some strain relief, having broken at the solder joint to the resistor.

A quick & easy fix, after which I reapplied even more tape to hold everything in place.

Maybe it’ll last two years this time around …

Leave a comment

Photo Lamp Mount: Moah Plastic!

One of the cold shoe mounts I made for the photo lamps cracked:

Photo Lamp Mount - fractured
Photo Lamp Mount – fractured

It’s done in PETG with my more-or-less standard two perimeter threads and 15% 3D honeycomb infill, which is Good Enough™ for most of my parts. In this case, there’s obviously not nearly enough plastic in there!

Redoing it with three perimeters and 50% infill should improve the situation, even though it looks identical on the outside:

Photo Lamp Mount - reinstalled
Photo Lamp Mount – reinstalled

I didn’t replace the other mount. If it breaks, it’ll get the same 50% infill as this one. If this one breaks, I’ll try 75%.

An easy fix!

, ,

10 Comments

Eyelet Punch Reshaping

The hollow punch included with the 5.5 mm eyelet / grommet set had a rather blunt cutting edge:

Eyelet punch - OEM taper
Eyelet punch – OEM taper

The rainbow colors along the tapered cut suggested at least token hardening of the edge, so I mounted it in the lathe chuck, deployed a rag over the bed ways to collect the dust, and spun it at a few hundred RPM while freehanding the edge with a Dremel heavy-duty slitting wheel resting on the compound:

Eyelet punch - reshaped
Eyelet punch – reshaped

It’s not what you’d call “hollow ground”, but at least the edge doesn’t force the outside of the cut surface quite so far outward.

The Tek Circuit Computer decks get their pivot holes cut with a drag knife on the MPCNC, but I won’t be too embarrassed the next time I deploy this thing.

Leave a comment

HP 7475A Plotter Data Sniffing: socat Serial Port Tee

Some hints and examples provided the socat incantation required to sniff serial data between my Superformula demo program (on the Raspberry Pi) and my HP 7475A plotter:

socat /dev/ttyUSB0,raw,echo=0 SYSTEM:'tee /tmp/in.txt | socat - "PTY,link=/tmp/ttyv0,raw,echo=0,wait-slave" | tee /tmp/out.txt'

The out.txt file collects data from the program to the plotter, the in.txt file holds data from the plotter to the program, and both files contain exactly and only the serial data, so some interpretation will be required.

With that in hand, tweak the .chiplotle/config.py file to aim Chiplotle at the virtual serial port:

serial_port_to_plotter_map = {'/tmp/ttyv0' : 'HP7475A'}

This is dramatically easier than wiring a pair of additional hardware serial ports onto the RS-232 connection between the two:

HP 7475A - serial port adapters - hardcore
HP 7475A – serial port adapters – hardcore

The adapter stack instantly become a custom cable, although I miss Der Blinkenlights.

The HPGL output to the plotter (out.txt) comes from the Chiplotle driver with no embedded linefeed / carriage return characters, as HPGL uses semicolon command terminators, making it one humongous line impervious to the usual text utilities. In addition, several plotter configuration commands have prefix ESC (0x1b) characters without semicolon separators. Each LB (label) command within the stream ends with a 0x03 ETX character.

While one could fix all those gotchas with a sufficiently complex sed script, I manually separated the few lines I needed after each semicolon, then converted the raw ASCII control characters to displayable Unicode glyphs (␛ and ␃), making it legible for a presentation:

head -c 1000 out.txt
␛.B
␛.(;
IN;
OW;OW;OW;OW;
␛.H200:;
SC;
OW;OW;OW;OW;
IP0,0,16640,10365;
OW;OW;
SC-8320,8320,-5182,5182;
SI0.13,0.17;
VS8;
PA5320,-4282;
SP1;
PA5320,-4282;
LBStarted 2020-01-09 18:03:57.494617␃;
SP1;
PA5320,-4382;
LBPen 1: ␃;
SP1;
LBm=1.9 n1=0.71 n2=n3=0.26␃;
SP1;
PU;
PA8320.00,0.00;
PD;
PA8320.00,0.00,
6283.71,24.59,
5980.63,46.81,
5789.79,67.98,
5648.37,88.44,
5535.22,108.34,
5440.50,127.81,
5358.77,146.89,
<<< snippage >>>

The corresponding responses from the plotter to the program (in.txt) are separated by carriage return characters (␍) with no linefeeds (␊), so the entire file piles up at the terminal’s left margin when displayed with the usual text tools. Again, manually splitting the output at the end of each line produces something useful:

1024
0,0,16640,10365
0,0,16640,10365
0,0,16640,10365
0,0,16640,10365
0,0,16640,10365
0,0,16640,10365
0,0,16640,10365
0,0,16640,10365
0,0,16640,10365
0,0,16640,10365
26
18
18
<<< snippage >>>

The first number gives the size of the serial FIFO buffer. An inexplicable ten OW; commands from deep in the Chiplotle driver code return the Output Window size in plotter units. No other commands produce any output until the plot finishes, whereupon my code waits for a digitized point from the plotter, with the (decimal) 18 indicating a point isn’t ready.

All that at 9600 bits per second …

Leave a comment

Schwab / Symantec VIP Access vs. Yubikey

A Yubikey 5 NFC turns out to be perfectly compatible with any website using Symantec’s (no longer available) hardware key and VIP Access (definitely a misnomer) app to generate TOTP access codes, because the sites use bog-standard TOTP. The only difficulty comes from Symantec’s proprietary protocol creating the token linking an ID with a secret value to generate the TOTP codes, which is how they monetize an open standard.

Fortunately, Cyrozap reverse-engineered the Symantec protocol, dlenski mechanized it with a Python script, and it works perfectly:

python3 -m venv symkey-env
source symkey-env/bin/activate
pip3 install https://github.com/dlenski/python-vipaccess/archive/HEAD.zip
vipaccess provision -t SYMC
deactivate

That spits out a file containing the ID and secret, from which you create a QR code for the Yubikey Authenticator app:

qrencode -t UTF8 'otpauth://totp/VIP%20Access:SYMCidnumbers?secret=longsecretgibberish&issuer=Symantec&algorithm=SHA1&digits=6'

Fire up the app, wave the Yubikey behind the phone, scan the QR code, wave the Yubikey again to store it, sign in to the Schwab site, turn on 2FA, enter the ID & current TOTP value from the Yubikey Authenticator, and It Just Works™.

Of course, you can kiss Schwab’s tech support goodbye, because you’re on your own. If you ever lose the Yubikey, make sure you know the answers to your allegedly secret questions.

Equally of course, you’re downloading and running random shit from the Intertubes, but …

Now, if only all my financial institutions would get with the program.

, ,

Leave a comment

Monthly Image: Digital Machinist 14.4 Cover

I ain’t getting richer, but I did get mah pitcher onna cover of th’ Digital Machinist:

Digital Machinist Cover DM14.4 - Winter 2019
Digital Machinist Cover DM14.4 – Winter 2019

I just caught George Bulliss in a weak moment. [grin]

It’s the diamond drag holder on the CNC 3018-Pro, before the XL axis extension hackage., with the probe camera stuck to the left side.

You can say you knew me before …

,

2 Comments

Huion H610Pro (V2) Tablet vs. xsetwacom

For unknown reasons, likely having to do with ordinary system updates, both the Huion H610Pro (V2) tablet’s device name and the display output’s name have changed. This came to light when I discovered the tablet’s stylus was no longer constrained to the landscape display, which worked fine when I set it up barely a month ago.

Running the setup command manually:

xsetwacom --verbose set "HUION Huion Tablet Pen stylus" MapToOutput "DP-1"
... Display is '(null)'.
... 'set' requested for 'HUION Huion Tablet Pen stylus'.
 <<< snippage >>>
... Checking device 'HUION Huion Tablet stylus' (11).
... Checking device 'HUION Huion Tablet eraser' (19).
Cannot find device 'HUION Huion Tablet Pen stylus'.

Apparently, the device formerly known as HUION Huion Tablet Pen stylus is now called HUION Huion Tablet stylus.

Fine, I can live with that. Try again:

xsetwacom --verbose set "HUION Huion Tablet stylus" MapToOutput "DP-1"
... Display is '(null)'.
... 'set' requested for 'HUION Huion Tablet stylus'.
 <<< snippage >>>
... Checking device 'HUION Huion Tablet stylus' (11).
... Checking device 'HUION Huion Tablet eraser' (19).
... Device 'HUION Huion Tablet stylus' (11) found.
... Found output 'VGA-1' (disconnnected)
... Found output 'DP-1' (disconnnected)
... Found output 'HDMI-1' (disconnnected)
... Found output 'DP-2' (connected)
... CRTC (2560x0) 1440x2560
... Found output 'HDMI-2' (disconnnected)
... Found output 'DP-1-8' (connected)
... CRTC (0x0) 2560x1440
... Found output 'DP-1-1' (disconnnected)
Unable to find output 'DP-1'. Output may not be connected.

Apparently, the video output formerly known as DP-1 has fissioned into DP-1-1 and DP-1-8, with only the latter connected. Weirdly, nothing happened to DP-2.

Once more, into the bleach:

xsetwacom --verbose set "HUION Huion Tablet stylus" MapToOutput "DP-1-8"
... Display is '(null)'.
... 'set' requested for 'HUION Huion Tablet stylus'.
 <<< snippage >>>
... Checking device 'HUION Huion Tablet stylus' (11).
... Checking device 'HUION Huion Tablet eraser' (19).
... Device 'HUION Huion Tablet stylus' (11) found.
... Found output 'VGA-1' (disconnnected)
... Found output 'DP-1' (disconnnected)
... Found output 'HDMI-1' (disconnnected)
... Found output 'DP-2' (connected)
... CRTC (2560x0) 1440x2560
... Found output 'HDMI-2' (disconnnected)
... Found output 'DP-1-8' (connected)
... CRTC (0x0) 2560x1440
... Setting CRTC DP-1-8
... Remapping to output area 2560x1440 @ 0,0.
... Transformation matrix:
... 	[ 0.640000 0.000000 0.000000 ]
... 	[ 0.000000 0.562500 0.000000 ]
... 	[ 0.000000 0.000000 1.000000 ]

Well, that worked.

Actually, I had to constrain the stylus to DP-2, then jam it back on DP-1-8, to spread the tablet’s horizontal extent over the entire monitor. Updating the startup script started the tablet properly the next morning.

The new device name certainly makes more sense and, perhaps, the X output connection now recognizes the landscape monitor’s ability to pass its DisplayPort video stream along to a second monitor.

,

Leave a comment