Skip to main content

How a Single `while(1)` Bricked My ESP32-S3 — and What I Learned Fixing It

    This is a custom ESP32S3 prototyping board i built to troubleshoot the issues.  It Started With a Simple Problem I was testing the EvilCrow Cable Wind — a USB HID device built around the ESP32-S3 that executes keystroke injection payloads over WiFi. Everything seemed fine: the keyboard HID was typing correctly, the web interface loaded, basic commands like RunWin worked. But ServerConnect and ShellWin did absolutely nothing. No error. No feedback. Just silence. Digging Into the Code The first thing I found was this pattern — repeated across four commands: ORIGINAL — DANGEROUS if (!clientServer.connect(serverIP, serverPort)) { while(1); // hangs forever if TCP fails } ⚠ Critical Bug If TCP connection failed for any reason, the device entered an infinite loop with no timeout, no error output, and no recovery path. Ever. But there was more. The bugs were stacking: critical   TCP failures were environmental: listener ...

Turning a TP-LINK TL-MR3020 into an Audio player, stream player etc... you name it..

Its been a while i have been messing with TP-LINK TL-MR3020 router. Before with couple of modifications to hardware and software i made a temperature monitor with room light controller via a custom web interface. If you view below links you will have an idea.
http://pixelatedpic.blogspot.com/2013/01/openwrt-on-tl-mr3020-controlling-arduino.html
http://pixelatedpic.blogspot.com/2013/04/openwrt-on-tl-mr3020-controlling.html

This time i flush the TL-MR3020 with Openwrt. After couple of usb packages and audio packages i just plug in the USB sound card (which was given by whoknowz - https://www.facebook.com/nashith) to the router.

When the USB sound card is detected from the linux, you can check by command dmesg. Then install the madplay or any player you prefer.
I installed madplay because it play audio streams and play local files.
For test i played the audio stream from atoll radio and it works great. Just ssh the router and pass this command
wget -o - http://radioatoll.serverroom.us:7088/ | madplay -




Locally played an 1KHz tone to test the audio played locally. madplay 440Hz_44100Hz_16bit_05sec.mp3
when this command passes the mp3 file starts to play. :)


These applications can be used to make many useful gadgets.


Opensource rocks...\::/

Comments