azonenberg changed the topic of #scopehal to: libscopehal, libscopeprotocols, and glscopeclient development and testing | https://github.com/azonenberg/scopehal-apps, https://github.com/azonenberg/scopehal, https://github.com/azonenberg/scopehal-docs | Logs: https://freenode.irclog.whitequark.org/scopehal
<_whitenotifier-3> [scopehal] azonenberg pushed 1 commit to master [+0/-0/±4] https://git.io/JUUAK
<_whitenotifier-3> [scopehal] azonenberg 7406b95 - Various bugfixes from refactoring
<_whitenotifier-3> [scopehal-apps] azonenberg pushed 1 commit to master [+2/-2/±18] https://git.io/JUUA6
<_whitenotifier-3> [scopehal-apps] azonenberg 6bb578b - Updated glscopeclient to handle multi output filters
<_whitenotifier-3> [scopehal] azonenberg pushed 1 commit to master [+0/-0/±1] https://git.io/JUUAd
<_whitenotifier-3> [scopehal] azonenberg 83e7494 - Fixed typo
<_whitenotifier-3> [scopehal] azonenberg commented on issue #230: Wrong FFTS include path - https://git.io/JUUAj
<miek> ooh zoom to mouse is a thing now, nice :D
<azonenberg> miek: yep
<azonenberg> We also support multi channel filters
<azonenberg> right now "downconvert" is the only one
<azonenberg> which mixes with a LO and spits out I and Q
<azonenberg> But when I implement the OFDM demodulator... lol
<azonenberg> that will actually be a challenge UI wise
<azonenberg> since the default behavior is to create a trace for every output
<azonenberg> and i really don't want 64 I and 64 Q plots showing up
<azonenberg> i might have to add a heuristic saying if a filter has more than N outputs, only add plots for the first fw
maartenBE has quit [Ping timeout: 258 seconds]
maartenBE has joined #scopehal
nelgau has quit [Remote host closed the connection]
nelgau has joined #scopehal
nelgau has quit [Ping timeout: 256 seconds]
electronic_eel has quit [Ping timeout: 240 seconds]
electronic_eel has joined #scopehal
Famine has joined #scopehal
Famine_ has quit [Ping timeout: 260 seconds]
nelgau has joined #scopehal
nelgau has quit [Ping timeout: 258 seconds]
nelgau has joined #scopehal
nelgau has quit [Ping timeout: 246 seconds]
Degi has quit [Ping timeout: 240 seconds]
Degi has joined #scopehal
<azonenberg> tnt: so if i'm understanding this right
<azonenberg> one of the benefits of the cyclic prefix in OFDM is that if your symbol sync is slightly off, the FFT will come out the same?
<tnt> azonenberg: not exactly the same, but good enough.
<tnt> and any misalignement in time will show up as progressive phase rotation through the bins across frequency. Any misalignement in frequency will show up as progressive phase rotation over time.
<tnt> (both of which you would track using known pilot symbols / subcarriers)
<azonenberg> this doesnt look right at all, right? :p
<tnt> Looks better than I expected tbh.
<tnt> But there is obviously some residual frequency error and so it's rotating over time.
<azonenberg> I see rotation
<azonenberg> but this is supposed to be 64QAM if i'm reading things right
<azonenberg> that's the other thing actually, the thing seems to be constantly changing the modulation rate
<azonenberg> so if i plot consecutive packets they may not be using the same PHY
<tnt> Yeah, wifi packets use dynamic settings.
<tnt> Also, the chances of you seeing any recognizable constellation without being protocol specific and using the pilot symbols and doing equalization are very low. You'll also hit things like STBC which you just can't undo/decode into symbols without knowing which protocol it is to decode properly.
<tnt> To see a constellation "blindly", you'd pretty much need a pure OFDM signal out of a siggen in my experience.
<azonenberg> This is a nearfield antenna coupling right to the TX antenna from a probe thickness away
<azonenberg> it should be almost perfect
<azonenberg> the RX signal is like a volt p-p
<tnt> What's the transmitter ?
<azonenberg> ESP32
<azonenberg> with a pcb trace antenna
<azonenberg> i have a 20mm nearfield H loop right on top of it
<tnt> mmm, I was going to say try to lock it to a given modulation but ... an esp32 not sure if you can.
<azonenberg> I also dont have control of the firmware on it
<tnt> I'd start with trying to see the pilot carriers.
<azonenberg> this is literally a random embedded gizmo from $dayjob
<azonenberg> lol
<azonenberg> some iot thing
<azonenberg> I'm just using it as an OFDM signal source while i have it handy
<tnt> if you can't get a clean looking BPSK out of the pilots, then seeing payload is not going to happen.
<azonenberg> I'm trying to figure out which subcarriers *are* the pilots at this point
<azonenberg> lol
<tnt> -21 -7 7 21 I think ?
<azonenberg> my fft cells are indexed from 0 to 63
<azonenberg> so i guess my 31 is their 0
<tnt> huh ... depends if you did the fft shift.
<azonenberg> so probably around my 10 should be a pilot tone...
<azonenberg> fft shift?
<tnt> when you do a fft usually you end up with the DC bin at offset 0.
<tnt> and so you end up with positive freq from [0 to fft_size/2[ and then negative freq from [fft_size/2 fft_size[
<azonenberg> Hmm, so in that case i should have a pilot at bin 7?
<tnt> but that's not the "usual way" we view FFT so you can apply the so called fft shift to renumber the bins and have negative freq on the left and positive freq on the right and DC in the center.
<tnt> yes.
<azonenberg> it looks literally random
<azonenberg> no obvious structure whatsoever
<tnt> :/ This is 802.11g (or n in legacy mode) 20MHz wide right ?
<azonenberg> This is 20 MHz N, yes
<azonenberg> hold on a minute, i just swapped antennas
<azonenberg> seems to be causing less loading on the radio
<azonenberg> ok so back to basics
<tnt> gotta run, bbl.
<azonenberg> The overall signal path is, direct digitize at 10 Gsps
<azonenberg> Mix with 2.437 GHz sin/cos tones
<azonenberg> Decimate by a factor of 500 to get 20 Msps
<azonenberg> That's 50ns per sample, so a 64 point FFT is 3.2 us which is one OFDM symbol time
<azonenberg> OK so looking at the first symbol of each burst only... bins 4 and 8 are much stronger amplitude than the rest but have what appears to be random rotations
<azonenberg> Which makes sense because i just did rough symbol sync w/ the schmidl-cox
Nero_ has joined #scopehal
Nero_ is now known as NeroTHz
nelgau has joined #scopehal
nelgau has quit [Ping timeout: 240 seconds]
juli965 has joined #scopehal
sorear has quit [Read error: Connection reset by peer]
sorear has joined #scopehal
juli965 has quit [Quit: Nettalk6 - www.ntalk.de]
nelgau has joined #scopehal
nelgau has quit [Ping timeout: 256 seconds]
nelgau has joined #scopehal
nelgau has quit [Ping timeout: 265 seconds]
nelgau has joined #scopehal
nelgau has quit [Ping timeout: 246 seconds]
nelgau has joined #scopehal
nelgau has quit [Ping timeout: 264 seconds]
pepijndevos has quit [Ping timeout: 260 seconds]
pepijndevos has joined #scopehal
juli965 has joined #scopehal
m4ssi has joined #scopehal
m4ssi has quit [Remote host closed the connection]
nelgau has joined #scopehal
nelgau has quit [Ping timeout: 246 seconds]
nelgau has joined #scopehal
nelgau has quit [Ping timeout: 240 seconds]
nelgau has joined #scopehal
bvernoux has joined #scopehal
nelgau has quit [Ping timeout: 258 seconds]
nelgau has joined #scopehal
<azonenberg> tnt: ok so the first mistake i was making was assuming the entire 802.11 burst was a single OFDM stream
<azonenberg> It's not
<tnt> oh really ? I mean I expected them to change modulation per symbol, but I expected the symbols to be one after the other ...
<azonenberg> Lol
<azonenberg> So, as far as i can tell
<azonenberg> the preamble is ten 800ns long symbols, with no guard interval between them, sent on 12 carriers
<azonenberg> If you do the math for 50ns per sample, this comes out to a 16 point FFT
<azonenberg> (That's the "short preamble")
<azonenberg> it appears that FFT bin 0 is the DC offset and 7-9 around the zero frequency are unused
<azonenberg> putting the preamble symbols in bins 1-6 and 10-15
<azonenberg> And now here's where it gets even more fun
<azonenberg> this is preambles of a few dozen packets stacked
<azonenberg> measuring phase angle of each preamble symbol relative to the first one
<azonenberg> i'd expect a constant rotation
<azonenberg> But what i see instead is a constant rotation up to about pi/2 then it levels off??
<azonenberg> and this curve shape is consistent across dozens of captures
<azonenberg> at different times
<tnt> I wouldn't expect any coherence across packets whatsoever.
<azonenberg> No you misunderstand
<azonenberg> X axis is symbol within a packet
<azonenberg> Y axis is phase of the preamble symbol relative to the first symbol *of that packet*
<azonenberg> As you can see by the scatter plot, the shape from packet to packet is pretty consistent. But what's more interesting is that symbols 1-5 or so have a pretty straight line - what i'd expect from a constnat error between my LO and the TX carrier
<azonenberg> But then it levels off
<azonenberg> Which makes no sense to me
<tnt> Ah ok. Well ... time for some oscillator in the ESP32 to stabilize.
<tnt> it probably turns off between packets.
<tnt> that'd be my guess.
<azonenberg> Yeah
<azonenberg> That makes sense
<azonenberg> So in that case i should use the much smaller slope AFTER that point as the drift for locking to the constellation rotation?
<azonenberg> And not the huge rotation of the early preamble?
<tnt> definitely.
<tnt> tbh, it's a bit weird they tx before they're stable, kind of defeats the point of the preamble :/
<tnt> AFAIU at tleast.
<monochroma> remember that the ESP chipsets are not normal wifi radios
<smkz> perhaps it's some sort of PLL locking
<azonenberg> monochroma: they're not?
<azonenberg> i mean they can also do bluetooth
<azonenberg> but thats not what i'm seeing here
<monochroma> azonenberg: i mean the market segment they are geared towards, compared to say, a qualcomm atheros/intel/realtek chipset. more concerned with a low BoM count than RF quality and total data bandwidth
<monochroma> so i would not be surprised to see looser tolerances
<azonenberg> I mean yeah it's very possible it's not quite pll locked during the tx
<bvernoux> hello
<bvernoux> today I have just found an amazing stuff thanks to a friend
<bvernoux> since WIndows 8.1 or more WIndows can auto install USB Virtual Serial Port without any driver
<bvernoux> It is mainly to think to add in USB descriptor => USB Class = 02 & SubClass = 02
<bvernoux> so it just need bDeviceClass to be set to 02 which is standard but also bDeviceSubClass to be set to 02 (which is not required for Linux but mandatory for Windows 8.1 / 10 for auto install)
NeroTHz has quit [Read error: Connection reset by peer]
bvernoux has quit [Quit: Leaving]
<_whitenotifier-3> [scopehal] azonenberg pushed 1 commit to master [+0/-0/±5] https://git.io/JUkVT
<_whitenotifier-3> [scopehal] azonenberg 31a7e42 - Changed antialias config in downsample filter. Lots more initial work on OFDM filter but doesn't work yet.
<azonenberg> I think i'm gonna scrub the OFDM work for now
<azonenberg> it's cool and fun, but it's taking too much time and i have other priorities
<azonenberg> i've done enough I/Q filters to know that the multi output stuff is working which was really the main goal
<azonenberg> I pushed the very incomplete code i have now