<?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 Kisaka the Jones on Medium]]></title>
        <description><![CDATA[Stories by Kisaka the Jones on Medium]]></description>
        <link>https://medium.com/@kisakathejones?source=rss-84d90c0fdceb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*BsgjFmrXKuGlwCTbZ9uByA.jpeg</url>
            <title>Stories by Kisaka the Jones on Medium</title>
            <link>https://medium.com/@kisakathejones?source=rss-84d90c0fdceb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 10:58:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kisakathejones/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[Building the S0: The IoT Gateway of the future | Blog]]></title>
            <link>https://medium.com/abstract-machines-blog/building-the-s0-the-iot-gateway-of-the-future-blog-d708aa1d1c87?source=rss-84d90c0fdceb------2</link>
            <guid isPermaLink="false">https://medium.com/p/d708aa1d1c87</guid>
            <category><![CDATA[hardware]]></category>
            <category><![CDATA[s0]]></category>
            <category><![CDATA[pcb-design]]></category>
            <category><![CDATA[pcb-manufacturing]]></category>
            <category><![CDATA[gateway]]></category>
            <dc:creator><![CDATA[Kisaka the Jones]]></dc:creator>
            <pubDate>Thu, 05 Mar 2026 08:46:19 GMT</pubDate>
            <atom:updated>2026-03-05T08:46:19.018Z</atom:updated>
            <content:encoded><![CDATA[<h3>Design Journey</h3><p>The journey of a thousand miles begins with the first step. When we set out to design the S0 gateway board, we had a clear vision: create a comprehensive solution for aggregating smart meter data from both wireless and wired M-Bus meters. What followed was an educational journey through PCB design challenges, debugging sessions, and valuable lessons that shaped not just our board, but our approach to hardware design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*iV_vmWkj-a_EhCn7.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jQwZyXF3qNDhSeLn.png" /></figure><h3>The Vision</h3><p>The <a href="https://hardware.absmach.eu/s0">S0</a> is a dual-board system designed to act as a smart meter gateway with impressive connectivity options:</p><p>The S0 Main Board features:</p><ul><li><a href="https://www.espressif.com/en/products/socs/esp32-c6">ESP32-C6</a> microcontroller (RISC-V powered, USB-C programmable)</li><li><a href="https://www.simcom.com/product/SIM7080G.html">SIM7080G</a> NB-IoT module for cellular connectivity</li><li><a href="https://www.radiocontrolli.com/rc-s2lp-868">RC-S2LP</a> Wireless M-Bus module (868MHz) for reading wireless meters</li><li>Battery power support via JST connector</li><li>JTAG debugging capability</li></ul><p>The S0 Baseboard extends functionality with:</p><ul><li>W5500 Ethernet chip with RJ45 Jack and Magnetics</li><li><a href="https://www.digikey.com/en/products/detail/texas-instruments/TSS721ADR/1910054">TSS721ADR</a> Wired M-Bus module for reading wired meters</li><li>SD card slot for local data logging</li><li>Power management and distribution</li></ul><p>Both boards connect via 92-pin headers, creating a compact yet powerful gateway system. Our ambitious goal for S0? Make it pin-compatible with the BeagleV-Fire development board.</p><p>Just like any design, we had our fair share of challenges, which has made this journey a learning experience.</p><h3>Challenge 1: The Form Factor Puzzle</h3><p>Our first major hurdle hit us during component placement. We wanted the S0 to be pin-to-pin compatible with the <a href="https://www.beagleboard.org/boards/beaglev-fire">BeagleV-Fire</a> while maintaining a compact form factor. It sounds simple on paper, but when you’re trying to fit multiple radio modules, power circuits, and connectors onto a constrained PCB while maintaining proper spacing for RF performance, reality sets in quickly.</p><p>The ESP32C6, SIM7080G, and RC-S2LP modules each had their own keep-out zones and antenna requirements. We found ourselves playing 3D Tetris, rotating components, trying different orientations, and constantly checking clearances. The lesson? Start with your largest and most constrained components first, then build around them. And always, always verify mechanical compatibility early in the design phase.</p><h3>Challenge 2: The Impedance Matching Reality</h3><p>Routing the Baseboard introduced us to the critical world of impedance matching. We knew differential pairs needed careful routing, but understanding it theoretically and implementing it practically are two different things.</p><p>The Ethernet circuit with the W5500 was particularly demanding. Those differential pairs needed 100Ω impedance matching, which meant calculating trace widths, spacing, and considering the PCB stackup. Get it wrong, and you get signal reflections, communication errors, and mysterious failures.</p><p>What we learned: Use your PCB manufacturer’s stackup calculator. Don’t guess at trace widths for controlled impedance. And yes, all those differential signals — USB, Ethernet, high-speed SPI — they all need proper impedance matching for reliable communication.</p><h3>Challenge 3: The SPI Bus Sharing Saga</h3><p>This one caught us off guard. We designed the Baseboard with both the Ethernet chip and SD card sharing the SPI bus — a common and reasonable approach. Different chip selects would handle arbitration, right?</p><p>Wrong.</p><p>We discovered that our SD card was holding the MISO line even after being deselected. This meant the Ethernet chip couldn’t communicate properly because the SD card was still driving the shared bus. Classic bus contention.</p><p>The solution: We implemented a tri-state buffer (essentially an SPI isolator) on the SD card’s MISO line. The buffer’s enable pin connects to the SD card’s chip select, ensuring that when the SD card is deselected, it truly releases the MISO line. Problem solved, and we gained a deeper understanding of proper SPI bus sharing techniques.</p><h3>Challenge 4: The Bootstrap Pin Blunder</h3><p>This was a facepalm moment. On the first revision of the S0, we connected SPI lines to the ESP32-C6’s bootstrapping pins. For those unfamiliar, bootstrap pins are sampled during power-up to determine boot mode and configuration.</p><p>The result? A completely non-functional SPI bus. The ESP32-C6 was fighting with our peripherals for control of those pins during startup.</p><p>The fix: We moved the SPI connections to regular GPIO pins in Rev2. The lesson: Always check your microcontroller’s datasheet for special-purpose pins, especially bootstrap, strapping, and configuration pins. Don’t assume any GPIO is fair game.</p><h3>Challenge 5: SPI vs. SD Card Pin Mapping</h3><p>Here’s a subtle one that cost us some debugging time. We thought we had correctly connected the SD card to the SPI bus on the Baseboard. The pinout looked right, the connections were there, but nothing worked. The issue? SPI domain and SD card domain use different pin naming conventions and mapping. What’s MOSI in SPI world isn’t necessarily CMD in SD card world without proper mapping. We had made assumptions about pin compatibility without verifying the actual protocol requirements.</p><p>The takeaway: Don’t rely on “looks right” when dealing with protocol conversions. Verify with datasheets, reference designs, and if possible, official application notes. SPI-to-SD interfacing has specific requirements that must be met.</p><h3>Challenge 6: The Power Circuit Journey</h3><p>This challenge taught us perhaps the most important lesson of the entire project. On the Baseboard, we designed what we thought was a clever overvoltage protection circuit using a MOSFET. We were proud of the design — it was elegant, compact, and theoretically sound.</p><p>It didn’t work. The MOSFET wouldn’t turn on, and the board wouldn’t power up.</p><p>We spent hours debugging, checking gate voltages, trying different MOSFETs, questioning our understanding of transistor physics. Then it hit us: we never simulated this circuit before committing to the PCB.</p><p>This realization led to a broader epiphany. We had multiple ideas for complex power protection schemes. Some were innovative, some were borrowed from high-end designs. But complexity for complexity’s sake is engineering ego, not engineering excellence.</p><p>The solution: We simplified. Dramatically.</p><p>Overvoltage protection: resistor-Zener diode clamp (simple, reliable, well-understood) Overcurrent protection: a fuse (can’t get simpler than that) Reverse polarity protection: Schottky diode (low drop, fast, effective) Not innovative. But it works, it’s reliable, and anyone debugging the board can understand it instantly.</p><p>The lesson: Simulate before you fabricate. And remember: a working simple circuit beats a broken clever one every single time. Your future self (and anyone else working on the project) will thank you for choosing clarity over complexity.</p><h3>What We’d Do Differently</h3><p>Looking back at this journey, here’s what we’d change:</p><ul><li>More upfront mechanical planning — Create a 3D model early with all components placed before starting routing</li><li><a href="https://jlcpcb.com/pcb-impedance-calculator">Impedance calculator</a> from day one — Don’t wait until routing to think about controlled impedance</li><li>Bus sharing validation — Test SPI bus sharing scenarios on a breadboard first</li><li>Pin assignment review — Have a dedicated review session for all microcontroller pin assignments checking for conflicts</li><li>Reference design study — Spend more time with reference designs, especially for SD card interfaces and <a href="https://docs.wiznet.io/Product/Chip/Ethernet/W5500/ref-schematic">Ethernet W5500</a></li><li>Circuit simulation mandatory — Make LTSpice simulation a requirement before any new circuit enters the schematic</li><li>Simplicity first — Start with the simplest working solution, then optimize only if needed</li></ul><h3>The Win</h3><p>Despite the challenges, Rev3 of the S0 system works. It reliably reads both wireless and wired M-Bus meters, communicates over NB-IoT, logs to SD card, and connects via Ethernet. The form factor works with the BeagleV-Fire. The power circuit is rock-solid.</p><p>More importantly, we learned lessons that will make every future design better. Hardware design is iterative, and every challenge is a chance to deepen understanding.</p><h3>For Those Starting Their Journey</h3><p>If you’re designing your first complex board, here’s our advice:</p><ul><li>Start simple — Get basic functionality working before adding features</li><li>Read everything twice — Datasheets, app notes, reference designs — read them carefully</li><li>Simulate critical circuits — Especially power, protection, and anything you haven’t built before</li><li>Plan for debugging — Add test points, LED indicators, and JTAG/SWD access</li><li>Embrace iteration — Rev1 rarely works perfectly, and that’s okay</li><li>Document your mistakes — They’re learning opportunities, not failures</li><li>Keep it simple — Especially for power and protection circuits</li></ul><p>The S0 journey taught us that good hardware design isn’t about being clever — it’s about being thorough, methodical, and humble enough to learn from mistakes. Every challenge we faced made the final product better and made us better engineers.</p><p>Here’s to many more revisions, lessons learned, and working boards. 🔧</p><p><em>Originally published at </em><a href="https://www.absmach.eu/blog/building_the_s0/"><em>https://www.absmach.eu</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d708aa1d1c87" width="1" height="1" alt=""><hr><p><a href="https://medium.com/abstract-machines-blog/building-the-s0-the-iot-gateway-of-the-future-blog-d708aa1d1c87">Building the S0: The IoT Gateway of the future | Blog</a> was originally published in <a href="https://medium.com/abstract-machines-blog">Abstract Machines Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Connect BeagleV-Fire to SuperMQ and send data via MQTT and CoAP.]]></title>
            <link>https://medium.com/@kisakathejones/how-to-connect-beaglev-fire-to-supermq-and-send-data-via-mqtt-and-coap-53e3280ab48a?source=rss-84d90c0fdceb------2</link>
            <guid isPermaLink="false">https://medium.com/p/53e3280ab48a</guid>
            <category><![CDATA[beaglebone]]></category>
            <category><![CDATA[supermq]]></category>
            <category><![CDATA[mqtt]]></category>
            <category><![CDATA[coap]]></category>
            <dc:creator><![CDATA[Kisaka the Jones]]></dc:creator>
            <pubDate>Wed, 10 Dec 2025 14:38:46 GMT</pubDate>
            <atom:updated>2025-12-10T14:38:46.012Z</atom:updated>
            <content:encoded><![CDATA[<p>Today, the BeagleV-Fire is one of the most exciting RISC-V development boards today — built for experiments in AI acceleration, FPGAs, Linux, and real hardware exploration. But one of its biggest strengths is how easily it can integrate with modern IoT platforms.</p><p>SuperMQ is a modern, scalable, secure open source and patent-free IoT cloud platform written in Go.</p><p>It accepts user and client connections over various network protocols (i.e. HTTP, MQTT, WebSocket, CoAP), thus making a seamless bridge between them. It is used as the IoT middleware for building complex IoT solutions.</p><p>To get more familiar with SuperMQ, checkout <a href="https://www.absmach.eu/supermq/">SuperMQ</a> by Abstract Machines. A great product i tell ya!</p><p>In this guide, I’ll walk you step-by-step through how to connect the BeagleV-Fire to SuperMQ using MQTT and CoAP, authenticate your client, and publish messages to a topic.</p><p>By the end, you’ll be able to send MQTT and CoAP messages directly from your BeagleV-Fire Linux terminal.</p><p>🖥️ What You Need</p><ul><li>The BeagleV-Fire running Linux/RISC-V</li><li>SuperMQ cloned and running in your PC.</li></ul><p>1.<strong> Setting up and running SuperMQ on your PC.</strong> <br>Setting up SuperMQ is easy.</p><p>Clone the repository from <a href="https://github.com/absmach/supermq">Github</a> to your PC.</p><pre>git clone https://github.com/absmach/supermq.git<br>cd supermq<br>make run up args=&quot;-d&quot;</pre><p><strong>Install the SuperMQ CLI</strong></p><p>The cli makes it easy to to manage users, clients, channels and messages. It can be downloaded as separate asset from <a href="https://github.com/absmach/supermq/releases">project realeses</a> or it can be built. For our purposes we will build the CLI.</p><p>Build the SuperMQ cli and see the available commands using the commands.</p><pre>make cli<br>./build/cli --help</pre><p>We start of by creating a user.</p><pre>./build/cli users create &lt;username&gt; &lt;email&gt; &lt;password&gt;</pre><p>Then get a user token</p><pre>./build/cli users token &lt;username&gt; &lt;password&gt;<br># Save this access token as USER_TOKEN<br>export USER_TOKEN=&lt;your-user-token&gt;</pre><p>Next is to create a domain</p><pre>./build/cli domains &lt;my-domain-name&gt; create &lt;route-name&gt; $USER_TOKEN<br># This returns the domain ID <br>export DOMAIN_ID=&lt;your-domain-id&gt;</pre><p>Create a client</p><pre>./build/cli clients &#39;{&quot;name&quot;:&quot;client-name&quot;}&#39; create $DOMAIN_ID $USER_TOKEN <br># This command returns the client id and the client secret<br>export CLIENT_ID=&lt;your-client-id&gt;<br>export CLIENT_KEY=&lt;your-client-secret&gt;</pre><p>Create a channel</p><pre>./build/cli channels &#39;{&quot;name&quot;:&quot;channel-name&quot;}&#39; create $DOMAIN_ID $USER_TOKEN<br># Note the channel ID from the response<br>export CHANNEL_ID=&lt;your-channel-id&gt;</pre><p>The crucial step after these creations is to connect the client to the channel using the command:</p><pre>./build/cli clients connect $CLIENT_ID $CHANNEL_ID &#39;[&quot;publisher&quot;,&quot;subscriber&quot;]&#39; $DOMAIN_ID $USER_TOKEN</pre><p>2.<strong> Setup the BeagleV-Fire Board.</strong></p><p>Power the BeagleV-Fire using the USB cable. Find the serial device</p><pre>ls /dev/ttyUSB* /dev/ttyACM*<br># Usually /dev/ttyUSB0 or /dev/ttyACM0</pre><p>and connect with your board using screen</p><pre>sudo screen /dev/ttyUSB0 115200</pre><p>Login to the terminal</p><pre>Username: beagle<br>Password: temppwd</pre><p>Connect an Ethernet cable from the router to the Beagle and get an IP address:</p><pre>sudo dhcpcd eth0</pre><p>To find the assigned IP address:</p><pre>ip addr show eth0<br># Look for the inet line, e.g., 192.168.8.133</pre><p>With this the Board is connected to the internet and you can now install packages.</p><p>Install mosquitto-clients:</p><pre>sudo apt update<br>sudo apt install mosquitto mosquitto-clients -y</pre><p>Set the environment variables by configuring the connection details from the credentials acquired in the supermq setup.</p><pre>export SUPERMQ_HOST=&lt;your-computer-ip&gt;<br># SuperMQ runs in your PC Therefore use your PC&#39;s IP  <br>export DOMAIN_ID=&lt;your-domain-id&gt;           <br>export CHANNEL_ID=&lt;your-channel-id&gt;         <br>export CLIENT_ID=&lt;your-client-id&gt;           <br>export CLIENT_KEY=&lt;your-client-secret&gt;      </pre><p>Test the connection:</p><pre>ping -c 4 $SUPERMQ_HOST</pre><p>It should result to:</p><pre>PING &lt;hostname&gt; (&lt;ip-address&gt;) 56(84) bytes of data.<br>64 bytes from &lt;ip-address&gt;: icmp_seq=1 ttl=XX time=YY ms<br>64 bytes from &lt;ip-address&gt;: icmp_seq=2 ttl=XX time=YY ms<br>64 bytes from &lt;ip-address&gt;: icmp_seq=3 ttl=XX time=YY ms<br>64 bytes from &lt;ip-address&gt;: icmp_seq=4 ttl=XX time=YY ms<br><br>--- &lt;hostname&gt; ping statistics ---<br>4 packets transmitted, 4 received, 0% packet loss, time ZZZ ms<br>rtt min/avg/max/mdev = aaaa/bbbb/cccc/dddd ms</pre><p>Now that the board is all setup and mosquitto is installed, we can connect to SuperMQ.</p><p><strong>MQTT Connection</strong></p><p>Using MQTT, on your PC terminal, subscribe to a topic with the following command:</p><pre>mosquitto_sub -u $CLIENT_KEY -P &quot;&quot; -t &quot;m/$DOMAIN_ID/c/$CHANNEL_ID/messages&quot; -h localhost -v</pre><p>In this case, we have created a topic called messages and are subscribing to it . This will wait and display any messages published to this channel.</p><p>To publish messages on the BeagleV Fire terminal:</p><pre>mosquitto_pub -u $CLIENT_KEY -P &quot;&quot; -t &quot;m/$DOMAIN_ID/c/$CHANNEL_ID/messages&quot; -h $SUPERMQ_HOST -m &#39;{&quot;temperature&quot;: 25.5, &quot;humidity&quot;: 60}&#39;</pre><p>The message should appear in your PC subscriber terminal.</p><p><strong>CoAP Connection</strong></p><p>For this protocol we first need to install the CoAP CLI on your PC.</p><pre>git clone https://github.com/absmach/coap-cli.git<br>cd coap-cli<br>make all<br>scp ./build/coap-cli-linux-riscv64 beagle@&lt;beaglev-ip&gt;:/home/beagle/coap-cli<br># This sends the CoAP cli from your PC to the BeagleV board </pre><p>To publish via CoAP from the BeagleV side:</p><pre>./coap-cli post m/$DOMAIN_ID/c/$CHANNEL_ID -a $CLIENT_KEY -H $SUPERMQ_HOST -d &#39;[{&quot;bn&quot;:&quot;coap-device:&quot;,&quot;n&quot;:&quot;temperature&quot;,&quot;u&quot;:&quot;Cel&quot;,&quot;v&quot;:25.5}]&#39;</pre><h4><strong>Troubleshooting</strong></h4><h4>Connection Refused</h4><ul><li>Verify SuperMQ is running on your x86/ARM machine: docker ps -a (should show multiple containers that are healthy)</li><li>Check your computer’s firewall settings</li><li>Ensure MQTT port 1883 is accessible from the network</li></ul><h4>Authentication Failed</h4><ul><li>Verify that the CLIENT_KEY is the client secret, and not the client ID</li><li>Ensure that the client is connected to the channel</li><li>Check that the domain ID matches</li></ul><h4>Messages Not Appearing</h4><ul><li>Ensure subscriber and publisher use the exact same topic</li><li>Verify both your PC and BeagleV Fire are using the same domain IDand channel ID</li><li>Check SuperMQ logs: docker logs supermq-mqtt or docker logs supermq-coap</li></ul><p>This is all for this blog. Have fun with it. Happy Coding :-)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=53e3280ab48a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>