Hacker News new | past | comments | ask | show | jobs | submit login
Building a Faraday cage with data passthrough for ESP32 reverse engineering (esp32-open-mac.be)
138 points by signa11 4 months ago | hide | past | favorite | 28 comments



The TitanRF fabric isn't super durable, so a shell around it is a good idea.

I've had great luck with Ecofoil NT material, which is somewhere between cardstock and cheap poly tarp material in handling properties. (It's a polyethylene weave with foil on both faces.) Easy to work with, easy to fold and tape, easy to cover with other materials for durability. Super cheap in big rolls.

For 120VAC passthrough, the Delta 20DBAG5 is cheap and cheerful. Screw it into a metal junction box and tape all sides of the box to the chamber wall. But a battery in the box is simpler and quieter.

If you need windows/vents, avoid the hobby-store copper mesh that's meant as a stiffener for clay models; the way it's woven, it isn't guaranteed to have connections to itself in adjacent rows. It's good at first but any surface corrosion ruins it.

Go with punched or "expanded metal" sheet, even if you can't find copper, aluminum or stainless works fine in practice. Just make it significantly larger than the window opening and use plenty of foil tape at the edges; I suspect that capacitive coupling through the surface oxide layer means it's an RF short even if it looks open at DC.

I've been wondering if ITO-coated glass would work as a window but have not tried it. But it's no good for ventilation anyway so I'm not sure it's worth the bother.


What kind of stuff are you doing with this? I've pondered setting something up like this in my office for RF testing but I need to pin down my requirements first


Probably a naive question but How do you test the ecofoil?


Same way as OP. Send a signal across it and measure the attenuation.


The detail here is really great!

I thought that maybe aluminum foil would work here. I found this paper: https://www.acsu.buffalo.edu/~ddlchung/Materials%20for%20ele...

> electrical conductivity is not the scientific criterion for sheilding ... Metals ... function mainly by reflection.

> A secondary mechanism of EMI sheidling is usually absoprotion.

> The absorption loss is a function of the product σrμr, whereas the reflection loss is a function of the ratio σr/μr, where σr, is the electrical conductivity relative to copper and μr is the relative magnetic permeability.

> The reflection loss decreases with increasing frequency, whereas the absorption loss increases with increasing frequency.

So it turns out aluminum foil wouldn't actually be much good, with σrμr=.61 and σr/μr=.61. The commercial material listed says it uses copper & nickel: nickel's σrμr=20, copper's σr/μr=1.

So my thought here is completely wrong. Who would have figured the commercial product has gone through more thought than my random guesses!


my laptop can receive packets as quiet as -90 dBm

For comparison, GPS signals in good conditions are around -125dBm, and many receivers can go down to -165dBm, so WiFi signals are still much stronger in comparison.


That's because GPS signals are only encoding 50 bits/second of data, and spreading it across 10 Mhz of bandwidth... with a processing gain of about 43 dB.[1]

[1] https://www.ieee.li/pdf/viewgraphs/gnss_fundamentals.pdf

See slides 37 and 38


Metal MILO [1] tins are pretty good. The tight fitting lid provides a continuous RF seal and being tin-plated you can solder though connectors in place, providing good ground continuity.

[1] https://en.wikipedia.org/wiki/Milo_(drink)


That's an interesting project, going to keep an eye on it! I have a hobby/DIY project involving sending several hundred UDP packets per second to various ESP32s across the house (driving LED strips live based on music playing on my PC). Much to my chagrin, the ESP32s tend to choke/get stuck quite frequently at higher packet volumes, and I've not found a good way to debug the issue further. See [1] below. While I haven't crossed the bridge of leaving the comfort of the Arduino IDE for flashing the ESP32s, trying out/beta-testing an open WiFi stack (once available) that I know I'll have a chance to thoroughly trace/debug would be very enticing.

[1] I did find out so far that my WiFi setup occasionally "clumps" packets, causing like 10 packets to hit a given ESP32 at an instant (instead of a few ms apart) - not great, but should not be disastrous. However, this seems to cause the ESP32 WiFi stack to just slow to a crawl: It responds to pings much slower (like, in 100+ ms range) (to my surprise it actually responds to PING requests out of the box in the first place...) and/or doesn't really process any more packets in general if I continue sending at the same rate as normal. But backing off on the packet stream usually gets it back on track, strangely enough. This also happens if I do nothing in the main loop except clear packets as they come in, so it's not in my code.


You can possibly fix/improve this situation by tuning some config settings on the ESP32 and/or host. Changing these with the ESP-IDF is pretty easy, but you'll have to find the relevant calls that are suitable for an Arduino based project.

Your description of packet clumping sounds like Nagle's Algorithm at play, which I found increased TCP latency on the ESP32 fairly significantly.

If the hardware isn't battery powered, then you might also see improvements by playing with the ESP32's WiFi power saving modes.


I hear that this is one of the advertised benefits of upcoming WiFi 7 - so-called “deterministic latency.”


I worked for a service provider doing some cellular testing and we had a special clear box that did this. It was probably expensive at the time. I wonder how well those faraday bags or boxes for $20 work from amazon or ebay.


There is definitely opportunity for some comparison charts.


Layperson question : does it help if the Faraday cage is grounded, so that the waves it picks up have somewhere to "go"? or does it not work that way? (I fully expect it does not work that way!)


In theory it doesn’t need to be grounded. In practice it can be done.


Don't the pcap dumps contain signal strength for each frame? Is it unreliably measured?


Wrap it in foil and stick it in the oven!


Not sure if it was a joke, but shouldn't a microwave oven shield the 2.4 GHz band pretty well?


> I also tried putting my phone in a (turned off!) microwave, but this did not work either, it was still connected to the Wi-Fi access point.

Apparently modern wifi chips are just too good at picking up faint signals.


Implying faint microwave signals also make their way out, of course.


I have heard of WiFi slowing down when a microwave is running.

Also when a phone is in a microwave, the RF noise is also attenuated, so that helps a little (amplifier noise is unaffected).


My wireless headphones get an unbearable amount of pops and cracks when I'm wearing them close to my (running) microwave. But since I wear them virtually always, I am in effect virtually never next to my microwave when it's on :)


Yeah the shielding is to not cook your eyeballs if you observe the food, and to not cook anything else outside of the chamber, including e.g. your phone's wifi receiver.


"pretty well" means 40-ish dB attenuation - that's about 10000 times weaker signal, absorbing 99.99% of it.

But that's not even close to sufficient for actually isolating wireless transmissions. My microwave got 35-38 dB for WiFi signals when I measured it, and that got through a fairly reliable connection. You might want 90 dB or something like that if you want to ensure that you can't extract the data from the noise - so perhaps a starting point might be to put your device in a small microwave oven and put that oven in a large microwave oven :)


The article says

> I also tried putting my phone in a (turned off!) microwave, but this did not work either, it was still connected to the Wi-Fi access point.

But yeah I would have thought the same.


Anecdotal: I've heard that in Europe EM emissions directives have exceptions for microwave ovens, because without the exceptions none of them would pass the tests and make it to market.

Never checked if true. But that could explain why they're so "leaky" at 2,4 Ghz (and other frequencies).


The radiation is in an ISM band, which has no far field emissions limits beyond "be reasonable". The close-range limits are about safety for living being and other devices nearby, so e.g. not cooking you, and not frying your phone's WiFi receiver.


In terms of dB they're not that leaky. However when the typical wifi power is on the order of microwatts or tens of nanowatts, it's not hard for an 800 W oven to completely drown that signal and/or overload the front-end.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: