<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Siwar Bel Haj mohamed on Medium]]></title>
        <description><![CDATA[Stories by Siwar Bel Haj mohamed on Medium]]></description>
        <link>https://medium.com/@sbelhajmouhamed?source=rss-8b7c3c67084b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dCTmYWc93Iu-DbAaVBkLKg.jpeg</url>
            <title>Stories by Siwar Bel Haj mohamed on Medium</title>
            <link>https://medium.com/@sbelhajmouhamed?source=rss-8b7c3c67084b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 15:58:11 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sbelhajmouhamed/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Part 2 — A Simulated Mesh, a Lazy Phone, and 1,800 Seconds of Data]]></title>
            <link>https://medium.com/@sbelhajmouhamed/part-2-a-simulated-mesh-a-lazy-phone-and-1-800-seconds-of-data-8f4d2b336580?source=rss-8b7c3c67084b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f4d2b336580</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[simulation-hypothesis]]></category>
            <category><![CDATA[wifi]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[embedded-systems]]></category>
            <dc:creator><![CDATA[Siwar Bel Haj mohamed]]></dc:creator>
            <pubDate>Mon, 16 Nov 2026 16:54:09 GMT</pubDate>
            <atom:updated>2026-11-16T16:54:09.803Z</atom:updated>
            <content:encoded><![CDATA[<p>In Part 1, I asked a simple question: <em>Can a machine learning model steer Wi-Fi clients better than a fixed signal threshold?</em></p><p>Before training a single model, I needed a controlled lab to measure how the standard fixed rule actually behaves in the wild. Here is how I built that environment on a laptop, the dependency traps I hit along the way, and the baseline numbers it revealed.</p><h3>Why Simulate First?</h3><p>I can’t pace around my apartment with a test phone for weeks, and I don’t have a rack of EasyMesh access points sitting on my desk. A simulator lets me replay the exact same walk indefinitely, isolate one variable at a time, and log every millisecond of telemetry to disk.</p><p>I chose <strong>Mininet-WiFi</strong>, an open-source network emulator developed at the University of Campinas. What sold me is that its virtual stations run the actual Linux wireless stack (mac80211 / wpa_supplicant ).</p><p>Roaming decisions come from real production networking software rather than a toy script I wrote myself—meaning my baseline reflects real-world client behavior.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6gqp-OFERQAQ-EGu9zro-w.png" /><figcaption>The Setup</figcaption></figure><h3>The Setup Pain</h3><p>I promised dependency hell in Part 1, and it delivered right on schedule.</p><p>My laptop runs <strong>Python 3.13</strong>, and the default Mininet-WiFi install script pins an older version of numpy that lacks prebuilt wheels for 3.13. The first installation died mid-compilation. I stripped the version pin and moved the entire setup into an isolated virtual environment.</p><p>The bug that burned the most time came next:</p><p><strong><em>ImportError: cannot import name ‘quietRun’ from ‘mininet.util’ (unknown location)</em></strong></p><p>The function was right there in the source file, so the error made zero sense — until I noticed the words (unknown location). The Mininet-WiFi repository contains a local subfolder named mininet/. Because I had installed the repo in editable mode (pip install -e .), Python shadowed the actual installed library with that empty local directory. Reinstalling Mininet as a standard package resolved it immediately.</p><p>Two quick fixes wrapped up the environment setup:</p><ul><li>Newer versions of setuptools dropped pkg_resources (which Mininet-WiFi still imports), so I pinned setuptools&lt;81.</li><li>Installed two unpinned missing dependencies: six and matplotlib.</li></ul><blockquote><strong><em>Debugging takeaway:</em></strong><em> Whenever Python reports </em><em>(unknown location) on a valid import, suspect namespace shadowing—one local folder is hiding your real package.</em></blockquote><h3>Designing the Baseline Scenario</h3><p>I kept the initial topology intentionally minimal: two access points and one virtual phone.</p><ul><li><strong>ap1 and </strong><strong>ap2:</strong> Broadcast the same SSID—just like a router and extender in a home mesh—operating on non-overlapping channels (1 and 6) over a wired backhaul.</li><li><strong>sta1 (the phone):</strong> Starts right next to ap1 and walks in a straight line toward ap2.</li><li><strong>The roaming rule:</strong> A classic fixed RSSI threshold. Once the signal drops below <strong>-60 dBm</strong>, the client scans for a better AP and switches only if the candidate offers at least a <strong>5 dB margin</strong>.</li></ul><p>That rule is the benchmark my model has to beat. Everything in this post is about measuring it honestly.</p><h3>Three Runs to Get One Handover</h3><p>Intuitively, the phone should hand over roughly halfway between the two access points. In practice, it took three calibration runs just to make it roam at all:</p><ol><li><strong>Run 1 — Open APs:</strong> The phone clung to ap1 for the entire walk, refusing to switch even when standing directly beneath ap2.</li><li><strong>Run 2 — Sluggish Background Scans:</strong> With roaming enabled, the scan interval was too slow. By the time sta1 finished scanning for alternatives, it had already walked far past the midpoint.</li><li><strong>Run 3 — Calibrated:</strong> With scan intervals tuned properly, the handover finally triggered around the <strong>15–20 second mark</strong>, right where physics says it should.</li></ol><p>I could have stopped after Run 1 and declared: <em>“Look how broken the fixed rule is the phone never moves!”</em></p><p>That would have been a bogus benchmark — a flaw in my lab configuration, not a limitation of the algorithm. If I want to claim a machine learning model beats a baseline, that baseline has to be fair.</p><blockquote><strong><em>Engineering takeaway:</em></strong><em> Always audit your baseline before blaming it.</em></blockquote><h3>The Baseline Number</h3><p>With a fair lab running, the first real measurement came in: <strong>sta1 switched to </strong><strong>ap2 roughly 4 seconds and about 15 meters of walking later than optimal.</strong></p><p>Four seconds sounds trivial on paper. On a live video call, four seconds is the difference between a seamless transition and a frozen screen. During that window, the phone clung to a dying signal while a strong access point sat right next to it.</p><p>That is the “sticky client” problem from Part 1, now pinned down to a hard metric.</p><h3>Scaling From One Walk to a Dataset</h3><p>One walk is just an anecdote. To train a model that generalizes, I need diverse trajectories — otherwise it will simply memorize <em>“switch at t = 17 seconds.”</em></p><p>To prevent overfitting, I parameterized every simulation run:</p><ul><li>A unique random seed per session.</li><li>Varying network congestion (between <strong>2 and 4 stations</strong> sharing the two APs).</li><li>Randomized movement paths: instead of a single straight line, the tracked phone wanders back and forth between ap1 and ap2 for <strong>300 seconds</strong>.</li></ul><p>Each row in the dataset captures a 1-second snapshot of a station’s state: coordinates, current serving AP, RSSI visible from every AP, channel utilization (how busy each AP is), and achieved throughput. Plotting the runs side by side on a quick diagnostic dashboard immediately confirmed the behavioral shift between Run 2 and Run 3.</p><p>I generated the first batch on November 16: <strong>six 300-second sessions</strong> (seeds 1 through 6). Because Mininet-WiFi emulates packet timing in real time, the batch took roughly 31 minutes to execute.</p><p><strong>SessionActive StationsTracked Phone Handovers1</strong>41<strong>2</strong>44<strong>3</strong>35<strong>4</strong>31<strong>5</strong>23<strong>6</strong>25</p><p>The dataset is compact, but the signal is clear:</p><ul><li><strong>1,800 rows</strong> (6 sessions × 300 seconds, sampled at 1 Hz).</li><li><strong>19 handovers</strong> recorded for the tracked phone (ranging from 1 to 5 per session).</li><li><strong>18% lower throughput</strong> during the seconds a station stayed stuck on a weaker AP compared to seconds spent on the optimal AP.</li></ul><p>That 18% drop is the justification for this entire project. Fixed-threshold roaming isn’t just theoretically suboptimal — even in a clean lab, it leaves measurable throughput on the table.</p><h3>What This Does Not Prove</h3><p>It is tempting to celebrate early numbers, so let’s be clear about the boundaries of this experiment:</p><ul><li><strong>It is still a simulation.</strong> Real apartments have concrete walls, microwave interference, and proprietary client firmware with quirky roaming heuristics. Nothing here has touched physical radios yet.</li><li><strong>Clean telemetry.</strong> The simulator reports exact signal strength without the multipath fading and noise spikes of real RF environments — making inference much easier than it will be in production.</li><li><strong>Small sample size.</strong> 1,800 rows is plenty to expose a clear physical pattern, but far too small to trust a model in the wild.</li></ul><p>The <strong>18% figure</strong> belongs strictly to this synthetic lab, not to real hardware. I am publishing it as a benchmark to beat, not as a universal law.</p><h3>What’s Next</h3><p>In <strong>Part 3</strong>, I will train my first lightweight classifiers — starting with a Decision Tree and a Random Forest — on this dataset, and pit them directly against the -60 dbm rule across the exact same scenarios.</p><p>The model might win decisively, it might barely edge out the heuristic, or it might lose completely. Either way, I’ll share the raw results.</p><p><strong>Links &amp; Resources</strong></p><ul><li><strong>Code: </strong>easymesh-ai-steering</li><li><strong>Simulator:</strong> Mininet-WiFi</li><li><strong>Previously:</strong> Part 1 — Teaching My Home Wi-Fi to Think: Why I’m Adding AI to EasyMesh</li></ul><blockquote><strong>This project is personal and independent; all views, code, and mistakes are entirely my own.</strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f4d2b336580" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your Brain Is a Prediction Machine. So Is AI.]]></title>
            <link>https://medium.com/@sbelhajmouhamed/your-brain-is-a-prediction-machine-so-is-ai-df71af5c3653?source=rss-8b7c3c67084b------2</link>
            <guid isPermaLink="false">https://medium.com/p/df71af5c3653</guid>
            <dc:creator><![CDATA[Siwar Bel Haj mohamed]]></dc:creator>
            <pubDate>Wed, 04 Nov 2026 10:14:40 GMT</pubDate>
            <atom:updated>2026-11-04T10:16:55.793Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ck2qk7O3mUa9gSWMa-rTfg.png" /><figcaption>Your Brain Is a Prediction Machine</figcaption></figure><p>You’ve been predicting the future your entire life. You just didn’t know it.</p><p>Let me ask you something. Complete this sentence:</p><p><em>“I love you to the…”</em></p><p>What came to your mind? <em>Moon?</em></p><p>Exactly.</p><p>Now try this:</p><p><em>“Once upon a…”</em></p><p><em>Time.</em> Easy, right? You didn’t need to think very hard — your brain automatically predicted what was coming next.</p><p>Here’s the fascinating part: that’s also the core mechanism behind ChatGPT. Yes, the same AI that writes emails, explains quantum physics, and helps you politely tell your boss that his idea is terrible.</p><p>Let’s understand why.</p><h3>1. Your Brain Is Always Guessing</h3><p>Imagine you’re sitting in a restaurant. A waiter approaches carrying a tray. Without thinking, you slide your phone away from the edge of the table.</p><p>Why? Because your brain automatically simulated the next few seconds: <em>The waiter places the plate down. The phone is in the way. Unless you want your iPhone served with fries, move it.</em></p><p>Nobody gave you an instruction manual. You didn’t compute velocity or run a physics simulation. Your brain simply drew from past experience to project an immediate future:</p><blockquote><strong><em>Past Experience → Prediction → Action</em></strong></blockquote><p>Now imagine the waiter walks right past you toward another table. The food wasn’t yours. Your brain predicted incorrectly and now you’re emotionally attached to someone else’s burger.</p><p>This is how your mind navigates reality. It doesn’t just passively receive information; it constantly projects what should happen next.</p><p>So what does any of this have to do with Artificial Intelligence? Quite a lot.</p><h3>2. Let’s Play a Game</h3><p>I’ll start a sentence, and you finish it. Ready?</p><p><em>“The cat is sleeping on the…”</em></p><p>You probably thought <em>bed</em>, <em>sofa</em>, <em>couch</em>, or maybe <em>floor</em>. You almost certainly didn’t think <em>refrigerator </em>though if you own a cat, anything is possible.</p><p>Why did those specific words jump out? Because you’ve encountered similar patterns thousands of times. Your brain maps connections between words, context, and real-world environments to anticipate likely endings.</p><p>Now imagine a computer program trained on trillions of words from books, articles, code, and web pages. Given that exact same prompt:</p><p><em>“The cat is sleeping on the…”</em></p><p>It doesn’t “know” what a cat feels like. Instead, it calculates statistical probabilities across millions of linguistic contexts to determine which tokens are most likely to follow.</p><p>That single mechanism is the foundation of modern Large Language Models (LLMs).</p><h3>3. Meet ChatGPT: The Over-Educated Prediction Engine</h3><p>When you ask ChatGPT, <em>“Why do cats sleep so much?”</em>, it doesn’t consult an internal library, nor is there a tiny digital librarian pulling files off a shelf.</p><p>Instead, the model breaks your input down into <strong>tokens</strong> small chunks of text representing words or sub-words and generates a response step by step:</p><ol><li>Starts with: ‘Cats’</li><li>Evaluates the next most probable sequence: ‘Cats sleep’</li><li>Continues extending: ‘Cats sleep in average of ..’</li></ol><p>At every single step, it predicts the next token based on everything that came before it.</p><p>When people hear “it just predicts the next word,” they often dismiss it: <em>“That’s it? It’s just glorified autocomplete?”</em></p><p>Well… yes and no.</p><p>Predicting the next token accurately across millions of diverse topics requires far more than completing simple nursery rhymes. To do it at scale, a model must implicitly learn grammar, factual relationships, logical structure, nuance, humor, and even the endless internet debate over whether pineapple belongs on pizza.</p><p>Remarkably complex behaviors emerge simply from mastering the art of prediction.</p><h3>4. But My Phone Has Autocomplete. Is It Also Einstein?</h3><p>Your phone’s keyboard suggests three basic words based on immediate context:</p><blockquote><em>Input: </em>“I’m going to the…”</blockquote><blockquote><em>Suggestions: </em><strong><em>store</em></strong><em> | </em><strong><em>gym</em></strong><em> | </em><strong><em>office</em></strong></blockquote><p>Now, ask an advanced AI model:</p><blockquote>“Explain why I keep buying things I don’t need, framed as a dialogue between my brain and my bank account.”</blockquote><p>It might produce:</p><blockquote><strong><em>Brain:</em></strong><em> We need new headphones.</em></blockquote><blockquote><strong><em>Bank Account:</em></strong><em> We bought headphones last month.</em></blockquote><blockquote><strong><em>Brain:</em></strong><em> These are different.</em></blockquote><blockquote><strong><em>Bank Account:</em></strong><em> How?</em></blockquote><blockquote><strong><em>Brain:</em></strong><em> They’re blue.</em></blockquote><blockquote><strong><em>Bank Account:</em></strong><em> We are financially doomed.</em></blockquote><p>That isn’t stringing together memorized phrases. The model is maintaining persona, balancing tone, following structural constraints, and executing narrative logic — all while generating one token at a time.</p><p>The underlying math remains probabilistic prediction. But the scale and complexity of the underlying patterns are worlds apart from your smartphone keyboard.</p><p><strong>The take-away:</strong> A simple training objective, scaled up massively, yields surprisingly profound capabilities.</p><h3>5. Your Brain Makes Things Up. AI Does Too.</h3><p>Consider this scenario: You text a friend, <em>“Are you coming tonight?”</em></p><p>You see the read receipt. Five minutes pass with no reply. Your brain immediately gets to work:</p><ul><li><em>“He’s upset with me.”</em></li><li><em>“I said something wrong.”</em></li><li><em>“Our friendship is over.”</em></li></ul><p>Meanwhile, your friend just dropped his phone under the couch. Facing incomplete information, your brain fabricated a plausible narrative — and you believed it without double-checking.</p><p>AI experiences a strikingly similar phenomenon known as <strong>hallucination</strong>.</p><p>Ask a language model about an obscure historical event, and it may reply with unshakeable confidence — complete with dates, citations, and specific quotes. It sounds entirely authoritative. Except the event never happened.</p><p>Why? Because <strong>generating plausible text is not the same as verifying truth.</strong></p><ul><li><strong>Humans</strong> predict based on emotion, past trauma, sensory inputs, and memory.</li><li><strong>AI</strong> predicts based on mathematical distributions across training data.</li></ul><p>The mechanisms differ, but the lesson is identical: <strong>A convincing prediction is not guaranteed to be true.</strong></p><p>Don’t trust every thought your brain manufactures and definitely double-check critical facts generated by AI.</p><h3>6. Does Prediction Equal Understanding?</h3><p>If someone says, <em>“The glass fell off the table,”</em> you immediately picture the scene: liquid splashing, glass shattering, a sudden mess. You understand the physical reality because you inhabit a physical body in a physical world.</p><p>An AI language model learns about glass purely through textual relationships. It learns that glass is <em>fragile</em>, that gravity causes <em>falling</em>, and that broken pieces require <em>sweeping</em>.</p><p>It can reason about these concepts fluently, yet it has never felt cold glass or heard it shatter.</p><p>Whether this statistical world-model constitutes “true understanding” is one of the most fiercely debated questions in modern science and philosophy. But one thing is clear: <strong>AI doesn’t need to learn like a human to perform tasks that once required human intelligence.</strong></p><h3>7. The Big Picture: What AI Really Is</h3><p>Strip away the sci-fi tropes, and the core concept of Machine Learning becomes wonderfully straightforward.</p><p>Imagine teaching a child to recognize a dog. You don’t write down a 500-page manual covering ear shape, tail length, and fur texture. You simply show them examples: big dogs, small dogs, fluffy dogs, and that one Chihuahua down the street that looks permanently offended. Eventually, the child instantly recognizes a dog they’ve never seen before.</p><p>Machine learning operates on the same core principle:</p><ol><li>Instead of programming explicit, rigid rules for every scenario, we feed algorithms massive amounts of data.</li><li>The model adjusts billions of mathematical dials (parameters) to minimize errors.</li><li>For an LLM, the core training task is predicting the next token. (Later, human feedback refines it to ensure it remains helpful, safe, and conversational).</li></ol><p>It isn’t magic. It isn’t a miniature human trapped inside a server rack. It is computational pattern recognition at unprecedented scale.</p><h3>Final Thought: Intelligence as an Act of Prediction</h3><p>For decades, we imagined artificial intelligence as a metallic humanoid with glowing blue eyes, a machine engineered to mirror human cognition pixel by pixel.</p><p>The reality has turned out to be far more interesting. Modern AI shows us that intelligence doesn’t require replicating the human brain. By training systems to identify patterns and predict outputs, extraordinary capabilities emerge naturally.</p><p>And occasionally, ridiculous ones emerge too — just like when your brain predicts someone is waving at you, only for you to realize they were waving at the person behind you.</p><p>So, the next time someone asks you what AI actually is, you can tell them:</p><blockquote>“It’s technology that learns patterns from data and uses them to anticipate what comes next.”</blockquote><p>And if they ask about ChatGPT specifically?</p><blockquote>“It’s a pattern-matching engine that got so exceptionally good at predicting the next word, it learned how to think out loud.”</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df71af5c3653" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Teaching My Home Wi-Fi to Think: Why I’m Adding AI to EasyMesh]]></title>
            <link>https://medium.com/@sbelhajmouhamed/teaching-my-home-wi-fi-to-think-why-im-adding-ai-to-easymesh-382fe826770a?source=rss-8b7c3c67084b------2</link>
            <guid isPermaLink="false">https://medium.com/p/382fe826770a</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[embedded-software]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[easymesh]]></category>
            <dc:creator><![CDATA[Siwar Bel Haj mohamed]]></dc:creator>
            <pubDate>Fri, 21 Aug 2026 14:48:42 GMT</pubDate>
            <atom:updated>2026-08-21T14:48:42.970Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Part 1 of a series on building an ML-powered client steering system for mesh networks</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k7nEJq0m_XENLPcJoCey7Q.jpeg" /><figcaption>EasyMesh</figcaption></figure><p>I’ve spent years working on embedded systems, Networking, WiFi, AI, the kind of work where you obsess over milliseconds and decibels. But a few weeks ago, I started a personal project that’s forced me to slow down and relearn things from the ground up. This series is me documenting that process, mistakes included.</p><p>Here’s where it started: a simple, annoying question.</p><p><strong>Why does my phone stay connected to the weak Wi-Fi extender in the other room, even when I’m standing right next to the strong one?</strong></p><h3>The Sticky Client Problem</h3><p>If you’ve ever walked around your house with your phone and watched the Wi-Fi bars stay stubbornly low even right next to a router you’ve experienced what network engineers call a <strong>sticky client</strong>.</p><p>Here’s what’s actually happening. Most home networks today aren’t just one router anymore. They’re a <strong>mesh</strong>: a main router plus one or more extenders (satellite access points), all working together to blanket your home in coverage. In theory, your phone should always connect to whichever access point (AP) gives it the best signal at any given moment.</p><p>In practice, devices are lazy. Once connected to an AP, most devices won’t bother switching unless the signal gets <em>really</em> bad, sometimes not even then. The device doesn’t know a better AP exists five meters away. It just… stays.</p><h3>Enter EasyMesh</h3><p>This is the exact problem that <strong>Wi-Fi EasyMesh</strong>, a standard from the Wi-Fi Alliance was built to solve. Instead of each access point acting like an independent island, EasyMesh coordinates them as a single, intelligent system.</p><p>There’s a <strong>Controller</strong> (usually your main router) that has visibility into the whole network, and <strong>Agents</strong> (the extenders) that report back data and execute decisions. When the Controller sees that a device would perform better on a different AP, it can trigger something called <strong>client steering</strong>, actively moving that device to a better connection.</p><p>Underneath EasyMesh sits another standard, <strong>IEEE 1905.1</strong>, which is less glamorous but just as important, it’s the abstraction layer that lets all these devices talk to each other consistently, regardless of whether they’re connected via Wi-Fi, Ethernet, or powerline.</p><p>I won’t pretend I understood any of this deeply a month ago beyond a surface level. I’m learning it properly now, piece by piece, and I’ll be sharing that learning process in this series too.</p><h3>So Where Does AI Come In?</h3><p>Here’s the thing that got me hooked on this as a project: <strong>today’s client steering decisions are still mostly rule-based.</strong></p><p>Something like:</p><blockquote>IF signal_strength &lt; -70 dBm<br>THEN steer client to another AP</blockquote><p>Simple. Predictable. And kind of dumb, honestly, because it only looks at one variable in isolation. It doesn’t ask:</p><ul><li>Is the “better” AP actually better, or just less crowded right now?</li><li>Is this device about to move again anyway (like a phone that’s always in motion)?</li><li>What’s the actual <em>experienced</em> throughput, not just the theoretical signal strength?</li></ul><p>Real network conditions are messy and multi-dimensional. That feels like exactly the kind of problem machine learning is good at finding patterns across many variables at once, instead of one threshold rule at a time.</p><p>My hypothesis for this project: <strong>a model that learns from multiple signals, RSSI, throughput, AP load, device mobility patterns, should make smarter steering decisions than a fixed threshold ever could.</strong></p><p>I don’t know yet if that hypothesis holds up. That’s honestly the fun part.</p><h3>What’s Next</h3><p>In the next article, I’ll walk through how I’m building a simulated mesh network from scratch using Mininet-WiFi, including the very unglamorous reality of dependency hell, Python version mismatches, and the small victory of just getting a virtual access point to boot.</p><p>If you’re also into wireless networking, mesh systems, or just enjoy watching someone learn something hard in public, follow along. I’ll be posting the rest of this series as I go, warts and all.</p><p><strong><em>This project is personal and independent, views and mistakes are entirely my own.</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=382fe826770a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Ghost in the VLAN: AI and the “Self-Healing” Network]]></title>
            <link>https://medium.com/@sbelhajmouhamed/the-ghost-in-the-vlan-ai-and-the-self-healing-network-ce4c2b023394?source=rss-8b7c3c67084b------2</link>
            <guid isPermaLink="false">https://medium.com/p/ce4c2b023394</guid>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[solana-network]]></category>
            <category><![CDATA[engineering]]></category>
            <dc:creator><![CDATA[Siwar Bel Haj mohamed]]></dc:creator>
            <pubDate>Mon, 27 Apr 2026 14:08:18 GMT</pubDate>
            <atom:updated>2026-04-27T14:09:41.385Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WUR6xMIf0Aka22dtLvlmyg.png" /></figure><p>There was a time when networking was simple:</p><p>Something breaks → you log in → you type show ip route → you fix it.</p><p>That hasn’t disappeared.</p><p><strong>AI just added a new layer on top.</strong></p><p><em>1. From Reaction to Early Signals</em></p><p><strong>Before:</strong></p><p>The network fails</p><p>You investigate</p><p><strong>Now:</strong></p><p>Systems continuously collect telemetry (latency, packet loss, retries)</p><p>They detect small deviations</p><p>They raise early warnings</p><p>This is called predictive analytics.</p><p><strong>But let’s be clear:</strong></p><p>It’s smarter monitoring, not real prediction.</p><p>And sometimes it overreacts:</p><p>Normal traffic spikes → flagged as anomalies</p><p>Slight behavior changes → treated as issues</p><p><em>2. “Self-Healing” Is Just Controlled Automation</em></p><p>“Self-healing” sounds impressive.</p><p>In reality, it’s structured automation.</p><p>Typical flow:</p><p>Detect anomaly</p><p>Match against predefined rules</p><p>Execute an action (reroute, rollback, failover)</p><p>This is closed-loop automation.</p><p>Important:</p><p>The system doesn’t understand the network.</p><p>It executes logic defined by engineers.</p><p><em>3. AI Doesn’t Understand Intent</em></p><p>You might say:</p><p>“Make Wi-Fi fast in the breakroom.”</p><p>The system doesn’t understand “fast.”</p><p>It converts that into:</p><blockquote>latency thresholds</blockquote><blockquote>throughput targets</blockquote><blockquote>QoS rules</blockquote><blockquote>This is translation, not intelligence.</blockquote><p><em>4. Where AI Actually Helps</em></p><p>AI is useful for:</p><blockquote>Reducing alert noise</blockquote><blockquote>Detecting patterns</blockquote><blockquote>Assisting with capacity planning</blockquote><blockquote>Minor performance optimization</blockquote><blockquote>It saves time.</blockquote><blockquote>It improves visibility.</blockquote><p><em>5. Where It Fails</em></p><p>When real problems happen:</p><blockquote>driver bugs</blockquote><blockquote>firmware issues</blockquote><blockquote>RF interference</blockquote><blockquote>protocol edge cases</blockquote><blockquote>AI stops being useful.</blockquote><blockquote>These require:</blockquote><blockquote>deep system knowledge</blockquote><blockquote>packet-level analysis</blockquote><blockquote>real debugging skills</blockquote><p><em>6. The Engineer’s Role Is Changing</em></p><p>Before:</p><p>You fixed issues manually</p><p>Now:</p><p>You validate automation</p><p>You interpret telemetry</p><p>You step in when systems fail</p><p>You’re no longer just operating the network.</p><p>You’re responsible for how it operates itself.</p><p>The Bottom Line</p><p>AI in networking is:</p><blockquote>Not magic</blockquote><blockquote>Not useless</blockquote><blockquote>Not a replacement for engineers</blockquote><p><strong>It is:</strong></p><blockquote><strong>Automation + data + better visibility</strong></blockquote><p><strong><em>Final Reality Check</em></strong></p><p><strong><em>You can trust AI to:</em></strong></p><blockquote>detect anomalies</blockquote><blockquote>automate safe actions</blockquote><blockquote>assist with monitoring</blockquote><p><strong><em>You cannot trust it to:</em></strong></p><blockquote>deeply understand systems</blockquote><blockquote>debug complex failures</blockquote><blockquote>replace engineering judgment</blockquote><p><strong>One Sentence Summary</strong></p><blockquote>The network isn’t becoming self-healing.</blockquote><p>It’s becoming self-adjusting, within limits defined by humans.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ce4c2b023394" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Succeed in Your Interview]]></title>
            <link>https://medium.com/@sbelhajmouhamed/how-to-succeed-in-your-interview-8c7b2194d01a?source=rss-8b7c3c67084b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c7b2194d01a</guid>
            <category><![CDATA[hr]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[hr-talent-management]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Siwar Bel Haj mohamed]]></dc:creator>
            <pubDate>Sat, 11 Apr 2026 02:33:42 GMT</pubDate>
            <atom:updated>2026-04-11T02:33:42.232Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Ultimate Guide from Someone Who’s Been on Both Sides of the Table (and survived).</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lqy3yCGGpKLoiopCLbY7qg.jpeg" /></figure><p>Before We Start: The Truth About Interviews</p><p>I’ve been on both sides:</p><p><strong>Candidate side: </strong>overthinking every word like it’s a life decision.</p><p><strong>Interviewer side: </strong>just hoping you don’t completely panic.</p><p>And here’s the truth no one tells you:</p><p>Interviewers are not looking for perfection. They’re looking for someone they can actually work with without stress.</p><p>Also — small secret:</p><p><strong>They want you to do well.</strong></p><p>Because interviewing 10 bad candidates is exhausting.</p><h4><strong>PART 1:</strong> Before the Interview (Where You Actually Win)</h4><p>Most people think interviews are won in the room.</p><p>No.</p><p>They are won:</p><p>- on your couch</p><p>- with Google open</p><p>- slightly stressed but prepared</p><p>Research Like a Slightly Obsessed Person</p><p>Don’t be creepy.</p><p>But also… don’t be lazy.</p><p>Spend 2–3 hours understanding:</p><p>- What the company actually does (not just the homepage slogans)</p><p>- What tech they use</p><p>- Who might interview you</p><p>If you walk in and ask:” So what does your company do?”</p><p>It’s over. Respectfully.</p><p>Prepare 3 Stories — Not Your Whole Life</p><p>You don’t need 20 examples.</p><p>You need 3 stories you can reuse like a smart engineer reuses code:</p><p>| Story | What it proves |The bug that almost broke you | Problem-solving, persistence | The conflict where you didn’t lose your mind | Communication, emotional intelligence |The project where you actually delivered something | Leadership, ownership |</p><p>And yes — use STAR (Situation, Task, Action, Result).</p><p>Not because it’s fancy…</p><p>but because it stops you from rambling for 10 minutes.</p><p>Prepare Questions (Or Look Like You Don’t Care)</p><p>When they ask:</p><p>” Do you have any questions for us?”</p><p>And you say:</p><p>” No, I think I’m good.”</p><p>You’re basically saying:</p><p>” I didn’t think about this at all.’</p><p>Instead ask:</p><p>| Question | Why it works |</p><p>| “What does success look like in the first 6 months?” | Shows you want to deliver value |</p><p>| “What’s the biggest challenge your team is facing?” | Shows strategic thinking |</p><p>| “Why did you join this company?” (to interviewer) | Builds personal connection |</p><p>Instant upgrade in how they see you.</p><h4><strong>PART 2:</strong> During the Interview (Don’t Panic Phase)</h4><p>First Impression = Fast Judgment (Yes, It’s Unfair)</p><p>Within 30 seconds they already decided if you’re:</p><p>- confident</p><p>- awkward</p><p>- or about to collapse</p><p>So:</p><p>- Smile (not like a robot)</p><p>- Say thank you</p><p>- Sit like a normal human</p><p>And please… don’t start with: ” I’m really nervous”.</p><p>We know. Everyone is.</p><p>Technical Questions: Think Out Loud (We’re Not Mind Readers)</p><p>Silence = scary.</p><p>If you stay quiet, interviewer thinks:</p><p>-” They’re stuck” or worse…” They gave up”</p><p><strong>Instead:</strong></p><p>” Okay, let me think through this… First, I would check… Then I would consider…”</p><p>Even if you’re wrong — you look smart.</p><p>If you don’t know:</p><p>” I’m not sure, but here’s how I’d approach it.”</p><p>This is 10x better than guessing random nonsense.</p><p>Behavioral Questions: Stop Saying “I’m a Team Player”</p><p>Everyone says that.</p><p>Nobody believes it.</p><p>Show it with a story.</p><p>| Bad | Good |</p><p>| “I’m good at teamwork” | “We had a deadline issue, I noticed X, I did Y, we delivered Z” |</p><p>Simple. Real. Done.</p><p>“Tell Me About Yourself” (The Trap Everyone Falls Into)</p><p>This is not:</p><p>- your childhood</p><p>- your hobbies</p><p>- your life story</p><p>This is your professional trailer.</p><p>Keep it short (120 seconds max):</p><p>” I started in X, moved into Y, now I focus on Z — and I’m looking for…’</p><p>Done.</p><p>If you’re still talking after 2 minutes → you lost them.</p><p>Weakness Question (Don’t Try to Be Smart)</p><p>We’ve all heard:</p><p>” My weakness is I work too hard”</p><p>Please don’t.</p><p>Pick something real but controlled.</p><p>Example:</p><p>I used to struggle with public speaking. So, I started presenting in team meetings. I’m still not perfect, but I’m much better than before.”</p><p>Shows growth. That’s it.</p><h4><strong>PART 3: After the Interview (Where Most People Disappear)</strong></h4><p>Send the Thank You Email (Yes, It Still Matters)</p><p>Short. Clean. No drama.</p><p>Not: 3 paragraphs, not emotional, not “I’m so sorry if…”</p><p>Just:</p><p>” Thanks, I enjoyed the discussion about X. Looking forward to the next steps.”</p><p>That’s enough.</p><p>Reflect (Or Repeat the Same Mistakes Forever)</p><p>After the interview, ask yourself:</p><p>1. What went well?</p><p>2. Where did I struggle?</p><p>3. Do I even want this job?</p><p>Yes — you are also choosing.</p><p>The Only Mindset That Actually Matters</p><p><strong>You’re not there to impress. You’re there to connect.</strong></p><p>You don’t need to be perfect.</p><p>You need to be:</p><p>- clear</p><p>- calm</p><p>- real</p><p>That’s what people hire.</p><p>Final Reality Check</p><p>You will:</p><p>- mess up answers</p><p>- forget things</p><p>- overthink later</p><p>Everyone does.</p><p>The goal is not perfection.</p><p><strong><em>The goal is:” Would I want to work with this person every day?”</em></strong></p><p><strong><em>Make the answer yes.</em></strong></p><p><strong>Your Turn</strong></p><p>What’s the one question that always messes you up?</p><p>Drop it in the comments — we’ll fix it together.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c7b2194d01a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Things I Wish I Knew Before Starting My IT Career]]></title>
            <link>https://medium.com/@sbelhajmouhamed/5-things-i-wish-i-knew-before-starting-my-it-career-46d8a888c6dc?source=rss-8b7c3c67084b------2</link>
            <guid isPermaLink="false">https://medium.com/p/46d8a888c6dc</guid>
            <category><![CDATA[life-lessons]]></category>
            <category><![CDATA[it-career]]></category>
            <category><![CDATA[success]]></category>
            <category><![CDATA[mindset]]></category>
            <category><![CDATA[motivation]]></category>
            <dc:creator><![CDATA[Siwar Bel Haj mohamed]]></dc:creator>
            <pubDate>Sat, 11 Apr 2026 01:48:32 GMT</pubDate>
            <atom:updated>2026-04-11T01:49:40.328Z</atom:updated>
            <content:encoded><![CDATA[<p>By Siwar</p><p><strong>Introduction</strong></p><p><strong><em>“If you had to start over, what would you do differently?”</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/876/1*WWbyXOc5fLcbq56Ua0aXKg.png" /><figcaption>IT Career</figcaption></figure><p>I used to avoid this question. Not because I didn’t have an answer, but because I knew the truth was uncomfortable.</p><p>I didn’t fail because of bad luck. I made things harder for myself because of my mindset. After years in tech — navigating confusion, self-doubt, and long nights where I questioned everything.</p><p>Here are the five things I wish I had understood from Day 1.</p><p><strong>Your first job doesn’t define you — but your mindset does</strong></p><p>I used to believe my first job had to be perfect: the right company, the right team, and the right project. I felt that if I started on the wrong foot, everything would fall apart.</p><p>But looking back, the real issue wasn’t the job; it was me — constantly doubting myself and waiting to feel “ready.” I was putting immense pressure on every task and every mistake.</p><p>The difference between those who grow fast and those who stall isn’t always the environment; it’s how they handle uncertainty.</p><p><strong>Action for you:</strong></p><p>Stop waiting to feel ready. You won’t. Start anyway and adjust as you go.</p><p><strong>Feeling lost is normal — staying silent is the real problem</strong></p><p>I remember sitting in technical meetings, listening carefully, and understanding only a fraction of what was being said.</p><p><strong><em>I thought, ”Everyone gets this except me.”</em></strong></p><p>So I stayed quiet. Not because I didn’t care, but because I didn’t want to look incompetent. The truth? I was slowing down my own growth by not speaking. Nobody expects you to know everything at the beginning, but they do expect you to engage.</p><p><strong>Action for you:</strong></p><p>Ask questions. Even the basic ones. Growth starts the moment you stop hiding what you don’t know.</p><p><strong>Technical skills matter — but they’re not enough</strong></p><p>I thought my job was simple: become technically strong, and everything else would follow. I focused entirely on coding and learning.</p><p>However, I overlooked something critical: Being understood is just as important as being skilled.</p><p>You can have the best technical idea in the world, but if you can’t explain it clearly, it gets ignored.</p><p><strong>Action for you:</strong></p><p>Work on how you express your ideas. Clarity isn’t an “extra” skill — it is a core part of your job as an engineer.</p><p><strong>You don’t build a career alone</strong></p><p>At the start, I believed I had to figure everything out by myself. I thought asking for help was a sign of weakness.</p><p>Over time, I realized that progress becomes exponentially easier when you stop isolating yourself. Every time I improved quickly, it was because I asked for help, listened to feedback, or learned from someone else’s experience.</p><p><strong>Action for you:</strong></p><p>Don’t wait until you’re drowning to connect with others. Learning is faster when it’s collaborative.</p><p><strong>Burnout doesn’t happen suddenly</strong></p><p>I used to think burnout was a dramatic, obvious event. But it’s not. It builds slowly.</p><p>It starts by pushing yourself “just a bit more” until that extra pressure becomes a habit. You stop noticing how exhausted you are until you realize you’ve been running on empty for months. And the hardest part? You realize you did it to yourself, thinking it was the only way to succeed.</p><p><strong>Action for you:</strong></p><p>Pay attention to the early signs of exhaustion. Taking care of yourself is not a reward for finishing your work — it is a requirement for doing it well.</p><p><strong>Conclusion</strong></p><p>If I could go back, I wouldn’t change the job. I would change how I approached it.</p><p>Less pressure. More curiosity. Less fear. More action.</p><p>You don’t need perfect conditions to grow. You just need to stop getting in your own way.</p><p><strong>Your Turn</strong></p><p>What is one lesson you learned the hard way in your career?</p><p>Share it in the comments, someone else might need to hear it today.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46d8a888c6dc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[OpenWrt on Raspberry Pi 4 (Part 2): From “It Won’t Boot” to a Working Access Point]]></title>
            <link>https://medium.com/@sbelhajmouhamed/openwrt-on-raspberry-pi-4-part-2-from-it-wont-boot-to-a-working-access-point-c377ef8076b9?source=rss-8b7c3c67084b------2</link>
            <guid isPermaLink="false">https://medium.com/p/c377ef8076b9</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[openwrt]]></category>
            <category><![CDATA[rasberry-pi-4]]></category>
            <category><![CDATA[embedded-systems]]></category>
            <dc:creator><![CDATA[Siwar Bel Haj mohamed]]></dc:creator>
            <pubDate>Mon, 02 Feb 2026 20:33:33 GMT</pubDate>
            <atom:updated>2026-02-02T20:33:33.210Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ueumd5vFKM-27pQlT8imoA.jpeg" /><figcaption>Rasbery PI 4</figcaption></figure><p>If you followed my first article, you already <strong>built a custom OpenWrt image with hostapd. </strong>you successfully compiled a custom OpenWrt image with hostapd support.</p><p>You probably felt great. You felt like a Wi-Fi Wizard. You had your custom .img file ready to go.</p><p>Then comes the moment of truth. You flash the SD card, put it in the Raspberry Pi, turn on the power, and…</p><p><strong>Nothing happens.</strong></p><p>Or, if you are lucky, you get a pink screen that screams at you.</p><p>This article is the story of how I went from a non-booting board to a working OpenWrt system. It’s not just a tutorial; it’s a guide to troubleshooting when real life happens.</p><h3>Step 1: The “Oh No” Moment</h3><p>I flashed my custom OpenWrt image, connected the HDMI cable, and powered up the Pi. I was expecting scrolling text. I was expecting a cool logo.</p><p>Instead, I got this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SFVMkvqo5gBollREwJtUig.jpeg" /><figcaption>Image KO</figcaption></figure><p><strong>The Problem:</strong></p><p>See that line saying Trying boot mode USB-MSD?</p><p>That is the Raspberry Pi politely telling me: <em>“I looked at your SD card, I didn’t see anything I could boot from, so now I’m giving up and looking for a USB stick.”</em></p><p>My custom image had failed.</p><h3>Step 2: The Sanity Check (Is my Hardware Broken?)</h3><p>Before I started panicking and blaming my code, I needed to rule out the hardware. Was the SD card dead? Was the Pi broken? Was the power supply too weak?</p><p>To find out, I decided to flash the official <strong>Raspberry Pi OS</strong>. My logic was simple: <strong>If the official OS boots, the hardware is fine.</strong></p><h4>The Permission Struggle</h4><p>I popped the SD card into my Linux laptop and fired up the <strong>Raspberry Pi Imager</strong>. I was ready to fix this.</p><p>But Linux had other plans.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*c3QBPj7Nb-uMswwN3Flpbg.jpeg" /><figcaption><em>Linux reminding me who is actually in charge</em></figcaption></figure><p><strong>The Obstacle:</strong></p><p>I got an “Insufficient Permissions” error. I forgot that writing to a physical disk requires <strong>Root (Administrator)</strong> privileges.</p><p><strong>The Fix:</strong></p><p>I had to close the app and launch it properly from the terminal:</p><h4>Configuring the Test Image</h4><p>I didn’t want to just flash it blindly. I wanted to make sure I could actually access the Pi if it booted.</p><p>I selected the standard 64-bit OS:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MGS0GPKvHafcZ66k7QneMA.jpeg" /><figcaption>64B SD Card</figcaption></figure><p>I selected my 64GB SD Card:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eJmASYVMjPl5xozqDVGK6w.jpeg" /><figcaption>Storage Device</figcaption></figure><p>Then I went into the <strong>Settings</strong> (the gear icon) to customize it.</p><p>I gave it a hostname ‘Siwar” so I could find it on the network:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w2IoZMUSAcW5q_iXtecxyA.jpeg" /><figcaption>Hostname OS</figcaption></figure><p>I set a username and password (crucial, or you get locked out!):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Va7YhTlVAu5D3WnigW9XvQ.jpeg" /><figcaption>username/passwrd</figcaption></figure><p>And most importantly, I enabled <strong>SSH</strong>. This would let me talk to the Pi remotely if the screen didn’t work:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TycYmlM0k2hax_96kwoz7g.jpeg" /><figcaption>SSH Authentification</figcaption></figure><h4>The Point of No Return</h4><p>I reviewed my settings one last time. Everything looked green.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wOFvEE-2PPttjt2FGO3Dng.jpeg" /><figcaption>Customisation to apply</figcaption></figure><p>I hit <strong>WRITE</strong>, and the tool gave me the classic scary warning box: <em>“All existing data will be erased.”</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ufYmQ7youMKa-NUHA-twA.jpeg" /><figcaption>ERASE Data</figcaption></figure><p>I took a deep breath. <strong>Yes.</strong></p><h3>Step 3: The Waiting Game</h3><p>Writing an OS isn’t instant.</p><p>It started slow…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4tq2TdYRABwbnksYrep0uw.jpeg" /><figcaption>Writing 1%</figcaption></figure><p>Then the progress bar marched on. 84%…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FJMuGxy9U0R1kaMFUWHyLQ.jpeg" /><figcaption>Writing 84%</figcaption></figure><p>Finally, success!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*73x4Hif0JEXKbqmTniMwUw.jpeg" /><figcaption>Write Complete.</figcaption></figure><p>The tool confirmed that the OS was written and — this is the cool part — my <strong>SSH and User settings</strong> were automatically applied. The SD card was ejected safely.</p><h3>Step 4: The Verdict (It Lives!)</h3><p>Now for the hardware test.</p><p>I put the SD card into the Raspberry Pi.</p><p>I reconnected the power.</p><p>I stared at the HDMI monitor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U0ORDkOcGRCZwAhsfE2OcA.jpeg" /><figcaption><em>Behold! A Desktop!</em></figcaption></figure><p><strong>We have a desktop.</strong></p><p>Seeing that familiar sunset wallpaper was the best feeling. It confirmed three things:</p><ol><li><strong>The Pi works.</strong></li><li><strong>The SD card works.</strong></li><li><strong>My cables work.</strong></li></ol><p>The problem was definitely my software flashing process, not the hardware.</p><h3>Step 5: Back to Business (Flashing OpenWrt)</h3><p>Okay, we had our fun with the desktop. But I am not building a desktop computer; I am building a Router.</p><p>It was time to wipe that SD card and try OpenWrt again.</p><p>This time, instead of using the GUI tool, I used the <strong>dd command</strong>. It is faster, rawer, and preferred by developers for custom images.</p><p>Here is the exact command I used:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sSl8uvyrz52E9b13Icllug.jpeg" /><figcaption>Flash Openwrt Image</figcaption></figure><pre>sudo dd if=openwrt...img of=/dev/sdb bs=4M conv=fsync status=progress</pre><p><strong>Why this command matters:</strong></p><ul><li>if : Input File (my custom image).</li><li>of : Output File (my SD card).</li><li>conv=fsync: This forces the computer to physically write the data before finishing. This prevents corrupted cards!</li></ul><p>It took about 14 seconds.</p><h4>Trust, But Verify</h4><p>Before ejecting, I ran fdisk to check the partitions. I wasn&#39;t going to make the same mistake twice.</p><p><strong>[INSERT IMAGE: 16.jpg]</strong></p><p>The output showed two beautiful partitions:</p><ol><li><strong>W95 FAT32:</strong> The Boot partition.</li><li><strong>Linux:</strong> The Root file system.</li><li>Everything looked perfect.</li></ol><h3>Step 6: The Moment of Truth</h3><p>I inserted the SD card into the Raspberry Pi.</p><p>I plugged in the power.</p><p>I waited for the “Pink Screen of Death”…</p><p>But it didn’t come.</p><p>Instead, text started scrolling. Fast.</p><p>And then, it stopped here:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ur7h1Hyu_xPngb2vn9ynqA.jpeg" /><figcaption>Openwrt OS</figcaption></figure><p><strong>Victory!</strong></p><p>That ASCII art logo is the trophy. We are in.</p><p>If you look closely at the logs in that screenshot, you can even see:</p><p>brcmfmac: ... Firmware: BCM4345/6 ... version 7.45.241</p><p>That means our <strong>Wi-Fi drivers loaded successfully</strong>. The beast is alive.</p><h3>What’s Next?</h3><p>We now have a booting Raspberry Pi running our custom OpenWrt build. The hardware is validated, and the OS is live.</p><p><strong>But this is just the beginning.</strong></p><p>We will continue working on this project step-by-step, unlocking new capabilities in each upcoming article. Our goal is to transform this simple board into an intelligent, high-performance network node.</p><p>In the next articles, we will explore:</p><ul><li><strong>Wireless Mastery:</strong> Configuring hostapd, optimizing signal strength, and securing the network.</li><li><strong>AI Integration:</strong> Adding Artificial Intelligence features to analyze traffic or manage network resources smartly.</li><li><strong>Advanced Networking:</strong> Deep diving into VLANs, routing protocols, and custom firewall rules.</li></ul><p><strong>In Part 3</strong>, we start with the essentials:</p><ol><li>Configure the Wireless Interface.</li><li>Set up hostapd correctly.</li><li>Connect our first client to our new custom Wi-Fi network.</li></ol><p><strong>See you in Part 3!</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c377ef8076b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Custom OpenWrt Image with Full hostapd for Raspberry Pi 4]]></title>
            <link>https://medium.com/@sbelhajmouhamed/building-a-custom-openwrt-image-with-full-hostapd-for-raspberry-pi-4-0dddd3550817?source=rss-8b7c3c67084b------2</link>
            <guid isPermaLink="false">https://medium.com/p/0dddd3550817</guid>
            <dc:creator><![CDATA[Siwar Bel Haj mohamed]]></dc:creator>
            <pubDate>Tue, 06 Jan 2026 14:17:24 GMT</pubDate>
            <atom:updated>2026-01-06T14:43:41.363Z</atom:updated>
            <content:encoded><![CDATA[<h3>Step-by-Step Guide with Real Issues and Fixes (My First Medium Article)</h3><p>This is my <strong>first Medium article</strong>, and I decided to document a problem that <strong>many people struggle with</strong>:</p><blockquote><em>Compiling a custom OpenWrt image with </em><strong><em>full hostapd support</em></strong><em> for </em><strong><em>Raspberry Pi 4</em></strong><em>.</em></blockquote><p>When I started, I thought this would be straightforward.<br>Instead, I faced:</p><ul><li>confusing menuconfig options</li><li>missing packages</li><li>DNS issues</li><li>download failures</li><li>empty output directories</li><li>and many undocumented pitfalls</li></ul><p>This article explains <strong>everything step by step</strong>, including <strong>the real issues I encountered and how I fixed them</strong>, so you don’t have to lose the same time.</p><h3>What This Article Covers</h3><ul><li>Selecting the correct Raspberry Pi target</li><li>Enabling full hostapd (wpad-openssl)</li><li>Enabling Wi-Fi drivers and tools</li><li>Enabling DHCP (dnsmasq + odhcpd)</li><li>Fixing common OpenWrt build errors</li><li>Verifying the generated image</li><li>Understanding where hostapd code lives</li></ul><h3>Step 0 — Preparing the Build Environment</h3><p>Install required packages (Ubuntu):</p><pre>sudo apt update<br>sudo apt install build-essential gawk gcc-multilib flex bison gettext \<br>libncurses5-dev libssl-dev python3 rsync unzip git zlib1g-dev</pre><p>Clone OpenWrt:</p><pre>git clone https://git.openwrt.org/openwrt/openwrt.git<br>cd openwrt</pre><p>Update and install feeds:</p><pre>./scripts/feeds update -a<br>./scripts/feeds install -a</pre><h3>Step 1 — Selecting the Correct Raspberry Pi Target (CRITICAL)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*UBjfXVS5vjOkAEwxcsJ0DQ.png" /><figcaption>Target System</figcaption></figure><p>In make menuconfig, select:</p><ul><li><strong>Target System:</strong> Broadcom BCM27xx</li><li><strong>Subtarget:</strong> BCM2711 boards (64 bit)</li><li><strong>Target Profile:</strong> Raspberry Pi 4B / 400 / CM4 (64bit)</li></ul><h3>Common issue</h3><p>The build succeeds but <strong>no image is generated</strong>.</p><h3>Fix</h3><p>Verify with:</p><pre>grep CONFIG_TARGET .config</pre><p>Expected:</p><pre>CONFIG_TARGET_bcm27xx=y<br>CONFIG_TARGET_bcm27xx_bcm2711=y</pre><p>If wrong → reselect the target.</p><h3>Step 2 — Enabling DHCP Server (dnsmasq)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TBEgA03X0YmVtB2ss6TYYw.png" /><figcaption>dnsmasq</figcaption></figure><p>Many people look for DHCP under <strong>Network</strong> — this is wrong.</p><p>Enable:</p><pre>Base system → dnsmasq</pre><h3>Why this matters</h3><p>Without dnsmasq:</p><ul><li>Wi-Fi clients connect</li><li>but never receive an IP address</li></ul><h3>Common issue</h3><p>Only dhcpcd or dmapd are enabled (these are <strong>clients</strong>, not servers).</p><h3>Fix</h3><p>Enable dnsmasq in <strong>Base system</strong>.</p><h3>Step 3 — Enabling Wireless Regulatory Database</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*iqNbyjY9XaI5OP9tAKbLoA.png" /><figcaption>Regdb Package</figcaption></figure><p>Enable:</p><pre>Firmware → wireless-regdb</pre><h3>Why this matters</h3><p>Defines:</p><ul><li>allowed channels</li><li>TX power</li><li>regulatory compliance</li></ul><p>Without it, Wi-Fi may fail to start.</p><h3>Step 4 — Enabling Full hostapd (Most Important Step)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*UVGtXx7W94lx1gaL9_wu_w.png" /><figcaption>hostapd-openssl</figcaption></figure><p>Enable:</p><pre>Network → WirelessAPD → hostapd-openssl</pre><p>Do <strong>NOT</strong> use:</p><ul><li>hostapd-mini</li><li>hostapd-basic</li></ul><h3>Why hostapd-openssl</h3><p>Provides:</p><ul><li>WPA2 / WPA3</li><li>SAE</li><li>802.1X</li><li>full debugging</li></ul><p>This is what people mean by <strong>“full hostapd”</strong>.</p><h3>Step 5 — Enabling Wi-Fi Tools (iw, iw-full)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*p02TDeCXJOqp2y4TEPTudw.png" /><figcaption>iwfull package</figcaption></figure><p>Enable:</p><ul><li>iw</li><li>iw-full</li></ul><p>These tools are essential for:</p><ul><li>debugging Wi-Fi</li><li>checking channels</li><li>verifying regulatory domain</li></ul><h3>Step 6 — Enabling iwinfo (Very Confusing Step)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4lfMW-7v_uF3PvajlBZGpA.png" /><figcaption>Iwinfo Package</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X43ZnVsblniACdXta2LdjQ.png" /><figcaption>iwinfo utility</figcaption></figure><h3>Common issue</h3><p>Searching for iwinfo shows only:</p><ul><li>DEFAULT_iwinfo</li><li>DEFAULT_libiwinfo</li><li><em>Type: unknown</em></li></ul><p>This looks like a bug.</p><h3>Explanation</h3><p>These are <strong>internal default symbols</strong>, not packages.</p><h3>Fix</h3><p>Enable:</p><pre>Utilities → iwinfo</pre><p>Dependencies (libiwinfo) are selected automatically.</p><h3>Step 7 — Enabling Raspberry Pi Wi-Fi Driver</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*QHg_E1NawZ8RSab70rFCKA.png" /><figcaption>kmod-brcmfmac</figcaption></figure><p>Enable:</p><pre>kmod-brcmfmac</pre><h3>Why this matters</h3><p>This is the <strong>Broadcom Wi-Fi driver</strong> used by Raspberry Pi.</p><p>Without it:</p><ul><li>no wlan0</li><li>hostapd fails</li><li>AP cannot start</li></ul><h3>Step 8 — Build the Image</h3><p>Save menuconfig, then run:</p><pre>make -j$(nproc)</pre><p>This will take time.</p><h3>Issue — Build Fails: “unable to resolve host address”</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6auIWxq0D3TGXaNQ4xx9Ng.png" /><figcaption>wget Failure</figcaption></figure><h3>Error</h3><pre>wget: unable to resolve host address</pre><h3>Root cause</h3><p>DNS broken on the build machine (not OpenWrt).</p><h3>Fix</h3><pre>sudo sh -c &#39;printf &quot;nameserver 1.1.1.1\nnameserver 8.8.8.8\n&quot; &gt; /etc/resolv.conf&#39;</pre><p>Verify:</p><pre>getent hosts sources.openwrt.org</pre><h3>Step 9 — Verifying the Generated Image</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lrHEpvKhVsmr-Fj9jXabFQ.png" /><figcaption>Image Generated</figcaption></figure><p>Check:</p><pre>ls bin/targets/bcm27xx/bcm2711/</pre><p>Expected files:</p><ul><li>openwrt-bcm27xx-bcm2711-rpi-4-*.img.gz</li><li>manifest files</li></ul><h3>Verify packages inside image</h3><pre>cat bin/targets/bcm27xx/bcm2711/*manifest | grep -E &quot;wpad|brcmfmac|dnsmasq&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8OWv0DX7BHbeXUWwYBgKeg.png" /><figcaption>Packages Inside Image</figcaption></figure><h3>Where Is hostapd Source Code?</h3><ul><li>OpenWrt packaging:</li></ul><pre>package/network/services/hostapd/</pre><ul><li>Extracted source:</li></ul><pre>build_dir/target-*/hostapd-*/</pre><ul><li>Original tarball:</li></ul><pre>dl/hostapd-*.tar.*</pre><h3>Conclusion</h3><p>Building OpenWrt from source is not just about creating an image.<br>It is about <strong>understanding Linux, networking, and embedded systems</strong>.</p><p>You will hit errors.<br>That’s normal.</p><p>This article exists to make that path <strong>clearer </strong>for others.</p><h3>What’s Next?</h3><p>This article focused on <strong>building a custom OpenWrt image with full hostapd support</strong> and documenting the real issues encountered during compilation.</p><p>In the next steps of this project, I plan to go further and explore more advanced features, including:</p><ul><li>Flashing the image to the SD card and validating the <strong>first boot on Raspberry Pi 4</strong></li><li>Configuring the Raspberry Pi as a <strong>Wi-Fi Access Point</strong> using hostapd</li><li>Deep dive into <strong>hostapd configuration files</strong> and parameters</li><li>Debugging Wi-Fi issues using tools like iwm iwinfo and logs</li><li>Understanding how OpenWrt manages wireless interfaces internally</li><li>Exploring security features (WPA2, WPA3, SAE)</li><li>Customizing OpenWrt further for advanced networking use cases</li></ul><p>The goal is not only to make OpenWrt work, but to <strong>understand how it works</strong>.</p><p>This project will continue as a series, with each part going deeper into OpenWrt, Wi-Fi, and embedded Linux customization, explained in a simple and practical way.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0dddd3550817" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>