I purchased recently one of these
DYKB 1MHZ-3800MHz RF Digital Programmable RF Attenuator 0-31DB Adjustable Step 1dB PC Software Control FOR Spectrum Analyzer
Let’s take a look at how good it is with the nanoVNA.
Test range: 50kHz-1.5G.
5dB
10dB
20dB
30dB
The top line is reference 0dB attenuation going through the attenuator. It’s wiggly I think mostly cause I didn’t bother to do a proper cal.
here is 0dB through the attenuator vs a sma-sma straight passthrough: