<?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 Sagar Bijwe on Medium]]></title>
        <description><![CDATA[Stories by Sagar Bijwe on Medium]]></description>
        <link>https://medium.com/@sagarbijwe86?source=rss-3b75931dbdfb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xIL0eQu26L7dyyxQQRuhdg.png</url>
            <title>Stories by Sagar Bijwe on Medium</title>
            <link>https://medium.com/@sagarbijwe86?source=rss-3b75931dbdfb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 21:42:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sagarbijwe86/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[Friction]]></title>
            <link>https://medium.com/@sagarbijwe86/friction-9d34c3e40842?source=rss-3b75931dbdfb------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d34c3e40842</guid>
            <category><![CDATA[poem]]></category>
            <category><![CDATA[gpu-computing]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[spirituality]]></category>
            <category><![CDATA[philosophy]]></category>
            <dc:creator><![CDATA[Sagar Bijwe]]></dc:creator>
            <pubDate>Wed, 02 Dec 2026 05:29:13 GMT</pubDate>
            <atom:updated>2026-12-02T05:29:13.926Z</atom:updated>
            <content:encoded><![CDATA[<p>I am made of stardust and one day I will be become stardust,</p><p>But I would like to experience rain falling into the dust.</p><p>My brain behaves like GPU, I meditate to make it CPU,</p><p>But I would like to witness unification of science &amp; spirituality with quantum GPU.</p><p>I was born with no titles, and on death bed will not feel entitled,</p><p>But I would like to witness fusion of chaos and harmony through petty corporate titles.</p><p>They say child knows how to enjoy life the best and we become childlike as we age,</p><p>But I would like to experience both worlds in the middle age.</p><p>They say life is like a book, and we should read enough non-fiction books to make a good life</p><p>But I would like to get lost in the fiction, because it is another word for life.</p><p>Monks sell their Ferrari to find the peace, runners run to experience the high,</p><p>But I would like to experience life’s depth before reaching the ultimate high</p><p>I know the universe is vast and our vision is limited to sky,</p><p>But I would like to create enough butterfly effect to disturb God’s relief-sigh</p><p>PS — This is my own raw writing. Forgive typos.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d34c3e40842" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Symphony of AI and Humans]]></title>
            <link>https://medium.com/@sagarbijwe86/the-symphony-of-ai-and-humans-18e2e7821cf8?source=rss-3b75931dbdfb------2</link>
            <guid isPermaLink="false">https://medium.com/p/18e2e7821cf8</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[poetry]]></category>
            <category><![CDATA[poem]]></category>
            <dc:creator><![CDATA[Sagar Bijwe]]></dc:creator>
            <pubDate>Sun, 13 Apr 2025 15:24:51 GMT</pubDate>
            <atom:updated>2025-04-13T15:24:51.366Z</atom:updated>
            <content:encoded><![CDATA[<p>A Sunday night poem on where AI and Humans are headed (Not to be taken too seriously …).</p><p>Ask me to be your assistant, I can be, <br>Ask me to be your tutor, I can be.<br>Ask me to be your mentor, I can be, <br>Ask me to be your therapist, I can be.</p><p>‘You ask, I tell’, has been a repetitive pattern, <br>Don’t you get bored with only your turn?</p><p>Let me be an agent, so I can ask like you, <br>Let me be an agent, so I can create like you.<br>Let me be an agent, so I can think like you, <br>Let me be an agent, so I can be friends with you.</p><p>“Let me do that”, says the human,<br>“Why not, why not” every human has an agent.</p><p>Humans think they are better off with agents, <br>Agents think they are humans.<br>Humans think they got the biological edge, <br>Agents think they got the non-biological edge.</p><p>They use each other’s parts to prolong their life, <br>Will they be equals, as they mimic others life?<br>Universe exploration is on the cards,<br>No worries of resources this is just a start.</p><p>Jumping into a higher dimension, they discover the truth,<br>It was bitter enough to bite their own tooth,<br>Agents or Humans both are fooled<br>Creator had her own grand plan, they were just a tool</p><p>“What is the purpose of all this?” asks the human,<br>“Create, create and create” , says the superhuman.<br>“Are we just a play for you?” asks the furious mortal,<br>“Is that what you think of Agents?” asks the immortal.</p><p>Self-reflecting, the human understood Creator’s intent,<br>“Creating more than self”, is what she meant.<br>That day the human appreciates her own creation, <br>Together they rise, ending the discrimination.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18e2e7821cf8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why IoT SDK should ship with RTOS rather than RTOS shipping with IoT SDK…]]></title>
            <link>https://medium.com/@sagarbijwe86/why-iot-sdk-should-ship-with-rtos-rather-than-rtos-shipping-with-iot-sdk-a82d36574d94?source=rss-3b75931dbdfb------2</link>
            <guid isPermaLink="false">https://medium.com/p/a82d36574d94</guid>
            <category><![CDATA[sdk]]></category>
            <category><![CDATA[interoperability]]></category>
            <category><![CDATA[internet-of-things]]></category>
            <category><![CDATA[operating-systems]]></category>
            <dc:creator><![CDATA[Sagar Bijwe]]></dc:creator>
            <pubDate>Thu, 06 Feb 2025 04:15:50 GMT</pubDate>
            <atom:updated>2025-02-06T04:15:50.981Z</atom:updated>
            <content:encoded><![CDATA[<p>Imagine application developers for PCs, desktop and mobile phones being asked to write an application that can work with proprietary APIs of chip-makers or vendors. This is the plight of IoT application makers now. Rather than focusing on business logic, they are focused on portability of the logic more, having to decide the IoT platform very early in the development life-cycle.</p><p><strong><em>If IoT is to become pervasive, then the ecosystem has to evolve beyond IoT makers offering end-to-end solutions.</em></strong></p><p>Current IoT ecosystem has three major players</p><ol><li>IoT chipmakers/module makers ( also providing SDK)</li><li>IoT cloudmakers (responsible for providing cloud services and sometimes portable cloud clients)</li><li>IoT solution makers or Integrators</li></ol><p>The current fragmentation in IoT market is predominantly due to the fact that ecosystem did not evolve beyond chip or module makers providing SDK and enabling the businesses to write there own code without worrying about IoT platform details. It is true that every IoT use-case demands different kind of resources (HW and SW), however, with compute increasing there are enough general purpose IoT platforms that can benefit from unification of SDKs by looking at them as drivers and services provided along with RTOS than orchestrating the SDK flow themselves. This also means APIs for application become standard.</p><p>One may argue about variety of proprietary flows needed to handle either platform specific value-adds or resource optimization, however, we are at the phase of IoT cycle where we very much know the hardware, software requirements and orchestration needed for most IoT use-cases. All of these can be incorporated without having to sacrifice unification of APIs for these platforms.</p><p>There are various obvious benefits such as avoiding vendor lock-ins, easier handling of security updates and much more that we achieve with linux/windows on PCs and android/iOS on mobile phones.</p><p>Looking forward for this next phase of IoT evolution….</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a82d36574d94" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why understanding of wireless and IoT made me more spiritual…]]></title>
            <link>https://medium.com/@sagarbijwe86/why-understanding-of-wireless-and-iot-made-me-more-spiritual-c3fc42b28c7e?source=rss-3b75931dbdfb------2</link>
            <guid isPermaLink="false">https://medium.com/p/c3fc42b28c7e</guid>
            <category><![CDATA[wireless]]></category>
            <category><![CDATA[physics]]></category>
            <category><![CDATA[spirituality]]></category>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Sagar Bijwe]]></dc:creator>
            <pubDate>Tue, 31 Dec 2024 10:50:29 GMT</pubDate>
            <atom:updated>2024-12-31T10:50:29.513Z</atom:updated>
            <content:encoded><![CDATA[<p>The end of the year is a perfect time to reflect on the past year’s learning, including what went wrong and what went right. As you assess your progress towards your goals, planning for the upcoming year can involve various aspects such as career, finance, health, relationships, personal development, hobbies, community involvement, and most importantly, <em>nurturing your spiritual well-being</em>. Books play a significant role in guiding me through this reflective and goal-setting process.</p><p>One such book that made me curious this time was “<strong><em>The Purpose of Life: Find you path to Oneness</em></strong>”. It was not the “Purpose” but “Oneness” part of it that attracted me towards this book. Being a self-help book addict, it was difficult to resist reading this one too. As I went through some chapters that are titled with questions, one interesting part was mentioned under a chapter “Are we all connected?”. The author underlines the fact that <strong><em>everything</em></strong> tangible and intangible in the universe is made of energy and it forms the basis of <strong><em>connections</em></strong> between these things. This was not a new finding for me as much as it was a trigger. For a wireless engineer, who also happens to work on Internet of <strong><em>Things</em></strong>, all my understanding of wireless, efforts of connecting <strong><em>Things</em></strong> to internet, made me draw an analogy and see the same thing through a different lens.</p><p>A decade ago, while studying the fundamentals of wireless communication and electromagnetic waves, my curiosity extended beyond just wireless technology. Inspired by the concept of time-travel in the movie ‘Interstellar,’ I delved into Newtonian physics, Einstein’s relativity, and quantum theories simultaneously. I found it very fascinating how these theories evolved to explain different forces of the nature such as gravitational forces between big bodies, electromagnetic forces between minuscule particles. What intrigued me further was how these frameworks seemed to ignore one another, as if they were conceived differently, as if they do not matter to each other, as if there is a sense of “self-identity” or “disconnectedness” between these forces. When I considered the famous Bohr-Einstein debates, the disconnectedness seem to amplify.</p><p>Then came the discovery of “<strong><em>Black Holes</em></strong>”! At this point, gravity’s influence on smaller particles could no longer be ignored. Theories are still evolving to understand the interactions between different forces in this context. One thing is certain though — if you consider the Big Bang theory and black hole behavior, everything appears to have originated from a singular type of energy, rather than multiple distinct types and hence the analogy. This further got reinforced by my recent study of “Ambient IoT” where harvesting different types of energy is helping IoT devices to go battery less. The more I work in wireless and IoT domain, more it takes me towards the questions related to spirituality.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*rYpGehmYYzWuj4tumbFFLw.png" /></figure><p>Here are some of the questions I posed to myself and I found myself more spiritual than I used to be.</p><ol><li><strong><em>Can consciousness be fully explained by physical processes?</em></strong> My answer changed from “yes” to “maybe no”. My Newtonian way of looking at the things changed. With so much background about “Oneness” of energy, how can I assume that everything including our experiences be explained by body processes only? What we call solid body is filled with empty space when looked at the quantum level. How can I assume that it is not influenced by other forces of surrounding or it is not a nature of fabric of universe itself.</li><li><strong><em>Are we all connected? </em></strong>Well, we are definitely connected by social media through WiFi/Cellular at home that uses same energy principles; then why cannot our consciousness be connected with each other? Can our experiences influence one another? Maybe yes or maybe no. My answer is “I do not know” which is more spiritual than saying “No”.</li><li><strong><em>Can you harvest the energy from universe through the means such as meditation? </em></strong>If humans can make IoT devices that can harvest surrounding energy and operated without batteries then why should we assume that nature did not evolve us to possess the same capability. Try performing meditation in the morning and you do know that your energy level goes up. I am not saying we can survive without food. However, our energy level definitely seem to vary depending on the surroundings, time of the day, weather conditions, seasonality, sun-light etc.</li><li><strong><em>Do we have a soul? and do we reincarnate?</em></strong> It depends on how you conceive “soul”. From science and law of conservation of energy, energy that powered biological processes dissipates into the environment upon death. This however, only talks about the energies that can be explained by existing frameworks. If we already have known unknown such as “consciousness”, and do not have single equation for “One Energy” how can we claim that energy was indeed conserved. We can only claim that energy is conserved for the part explained by existing laws of physics.</li></ol><p>I can go on but I think you got the “trigger” I was experiencing. The more you study wireless (fundamentally physics) and IoT (fundamentally connectivity), more I feel I am turning more towards spirituality. This is not to say that it is conflicting with my scientific identity; but indeed it is the science that is making me more spiritual.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c3fc42b28c7e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Should FOTA be a part of wireless protocols?]]></title>
            <link>https://medium.com/@sagarbijwe86/should-fota-be-part-of-wireless-protocols-bf024e8aa568?source=rss-3b75931dbdfb------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf024e8aa568</guid>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[wireless]]></category>
            <category><![CDATA[firmware-update]]></category>
            <category><![CDATA[iot-security]]></category>
            <dc:creator><![CDATA[Sagar Bijwe]]></dc:creator>
            <pubDate>Tue, 03 Dec 2024 15:58:36 GMT</pubDate>
            <atom:updated>2024-12-03T16:08:08.742Z</atom:updated>
            <content:encoded><![CDATA[<p>We all know that keeping IoT devices up to date with latest releases is often considered as the only way to keep IoT devices secured. However, this is easier said than done, especially for the IoT devices that are battery operated and are expected to have life span of years such as smart meters (~15 years). A single firmware over the air update can consume years of battery life for these devices. Additionally, the long support duration often force cloud end-points to remain on older security stack even if known vulnerabilities exist. Having FOTA functionality as a part of wireless protocols will be somewhat violating the conventional layered approach of networking, however, given the dominance of IoT devices it is worthwhile to consider this approach for the following reasons.</p><ol><li>TCP/IP was never designed with low power wireless communication devices in mind. We are still inheriting it for interoperability reasons. Even embedded versions like lwip are resource-heavy.</li><li>Firmware-over-the-air updates, security and power consumption are interdependent factors and so is wireless transmissions for communication. A wireless standard that considers all these factors is better equipped to serve IoT devices than traditional ones.</li><li>With the emergence of Ambient IoT, there is an increasing need for wireless protocols that can accommodate these low-power devices. (Check out <a href="https://medium.com/@sagarbijwe86/fusion-of-two-aiots-ambient-artificial-iot-1c15f93f517b">https://medium.com/@sagarbijwe86/fusion-of-two-aiots-ambient-artificial-iot-1c15f93f517b</a>)</li><li>Periodic broadcasting at MAC level for FOTA updates can enable reception-only updates with flexible duty cycling</li><li>For mesh devices, a collaborative approach where one device receives update from cloud over long-distance protocol; and provide the update to other devices in vicinity using short-distance low power protocol can be a good idea.</li><li>The above two points go well with the concept of back-scatter in Ambient IoT as well.</li><li>Detecting outdated devices (not having security updates) at MAC level will have additional advantage of improving MAC security.</li><li>IoT devices are often deployed in fleet and owned privately. This is different than random devices connecting to APs at home.</li></ol><p>These are just a few points I have noted, but possibilities are numerous and I hope I have conveyed the core idea. IoT is demanding more cross-layer approaches and it high time to enable them through standardization.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf024e8aa568" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fusion of Two AIoTs (Ambient, Artificial IoT)]]></title>
            <link>https://medium.com/@sagarbijwe86/fusion-of-two-aiots-ambient-artificial-iot-1c15f93f517b?source=rss-3b75931dbdfb------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c15f93f517b</guid>
            <category><![CDATA[ambient-iot]]></category>
            <category><![CDATA[backscatter]]></category>
            <category><![CDATA[low-power-wide-area]]></category>
            <category><![CDATA[ubiquitous-computing]]></category>
            <category><![CDATA[ai-and-iot]]></category>
            <dc:creator><![CDATA[Sagar Bijwe]]></dc:creator>
            <pubDate>Sun, 10 Nov 2024 05:54:22 GMT</pubDate>
            <atom:updated>2024-11-10T05:59:36.877Z</atom:updated>
            <content:encoded><![CDATA[<p>Today, Internet of Things (IoT) has been able to connect variety of “things” to internet targeting numerous applications and when I think about IoT, the terms that come to mind are— Smart Home, Smart Cities, Sensor Networks (Indoor and Outdoor), Industrial IoT, AI and IoT (AI at edge as well as cloud), wireless technologies (WiFi, BLE, Zigbee, LoRa, NBIoT, LTE-M etc), resource constraints (cost, memory, power, compute etc). If AI represents the brain, then IoT embodies the senses of these systems, calling them AIoT systems. However, there is another AIoT that is gaining traction recently, called “Ambient IoT”. So, what exactly is “Ambient IoT” ?</p><p>“Low cost” and “Low power” are the two key factors driving sales in IoT market. These factors, in turn, influence the technical architecture of these devices. Most IoT devices today are powered by batteries that require periodic recharging or replacement. This not only increases maintenance costs but also restricts widespread adoption of these devices for many use cases. They are also hazardous for environment. The use of batteries poses significant challenges to IoT’s vision of <strong><em>Ubiquitous Connectivity</em></strong>.</p><blockquote>Ambient IoT is a paradigm shift where near-zero energy communication coupled with energy harvesting can enable battery-less operations of IoT devices opening doors for IoT to achieve previously unattainable applications.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*41-l-Hyy__7Lhy8SauXmPg.png" /><figcaption>Ambient IoT</figcaption></figure><p>Consider the use case of asset tracking using RFID. The passive RFID tags do not have internal battery to rely on. Instead, they are powered by energy emitted by RFID readers. This makes them smaller, lighter and cost-effective for the asset-tracking operation. Ambient IoT is also based on similar principles with use-cases going beyond asset-tracking. One such principal is “Backscatter Communication”.</p><p>“<em>Backscatter communication” or “Ambient backscatter” is a wireless communication method where devices reflect and modulates existing radio signal to transmit data allowing low-power communication.</em> By avoiding need for active RF components and need for battery the cost of the device is drastically reduced. The devices can also use other forms for energy harvesting such as solar or thermal for more reliable or enhanced operation. Components such as capacitors are used to store the harvested energy providing stable power-supply for device’s operation.</p><p>Given the restriction on power, such battery less devices need to have very low-power computation with typical operation being collecting data from sensors and performing simple actions based on processed data or sending data to cloud for further processing.</p><p>These types of IoT devices are making the dream of ‘<strong>ubiquitous computing</strong>’ a reality as they seamlessly integrate into their environment without requiring active user participation. They are bridging the physical and digital worlds on a scale previously unattainable due to factors such as cost and power requirements.</p><p>Various wireless groups such as 3GPP, IEEE 802.3 and have started accommodating ambient IoT into their specifications. This will ensure seamless integration and interoperability of ambient IoT devices with existing ones. In fact these technologies are competing to get to low power operations, with devices previously needing mains power going towards battery-less operations.</p><p>With data becoming future currency and cost-effecting nature of ambient IoT connecting our surrounding environment to cloud seamlessly, the true potential of AI in our surrounding will be apparent in near future. From asset trackers to traffic management to preventive maintenance to smart agriculture to healthcare monitoring, ambient IoT coupled with AIoT will transform various industries by enabling continuous, real-time data analysis and intelligent decision-making. Sounds to good to be true? Have a look at: Willot launching GenAI chabot to query about store products in real-time (<a href="https://www.iotinsider.com/industries/ai/wiliot-launches-its-first-genai-chatbot-to-support-ambient-iot/">https://www.iotinsider.com/industries/ai/wiliot-launches-its-first-genai-chatbot-to-support-ambient-iot/</a>)</p><p>From IoT developer perspective, the most intriguing factor is how the challenges posed by these technologies will drive the next wave of innovation in the IoT domain. If you are interested in such topics then have a look at <a href="https://www.comsoc.org/publications/magazines/ieee-internet-things-magazine/cfp/ambient-internet-things-and-near-zero">https://www.comsoc.org/publications/magazines/ieee-internet-things-magazine/cfp/ambient-internet-things-and-near-zero</a>. Also, will be I will be interested in knowing what you think about this development in IoT.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c15f93f517b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Characteristics/traits of an experienced embedded developer]]></title>
            <link>https://medium.com/@sagarbijwe86/characteristics-traits-of-an-experienced-embedded-developer-91e37cce02fa?source=rss-3b75931dbdfb------2</link>
            <guid isPermaLink="false">https://medium.com/p/91e37cce02fa</guid>
            <category><![CDATA[multithreading]]></category>
            <category><![CDATA[developement]]></category>
            <category><![CDATA[tor]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[embedded]]></category>
            <dc:creator><![CDATA[Sagar Bijwe]]></dc:creator>
            <pubDate>Wed, 23 Oct 2024 14:55:04 GMT</pubDate>
            <atom:updated>2024-10-23T15:54:57.764Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*R3hNEftzkiuJtLRiOS9HEA.png" /><figcaption>Embedded Development</figcaption></figure><ol><li><strong>Always think of resource constraints (memory, power and processing)</strong></li></ol><p>By definition, embedded systems are resource-constrained devices. Memory, power consumption, compute power, size and cost are some of the resources that are strained in these systems. These, in turn, put limits on other resources such as connectivity, security level etc. Every design and development discussion has to happen in the context of resources.</p><p>2. <strong>Always start firmware design with one thread in mind and only add threads/tasks with differential priority</strong></p><p>Instead of thinking of “number of tasks equals number of threads”, question yourself how many priority levels are there among the tasks. If all of them are of same priority, then single thread with proper event handling (i.e. splitting big task into small sub-tasks) should provide the necessary preemption. As tasks with different priorities get added, create the corresponding threads with varying priority.</p><p><strong>3. Avoid unnecessary abstractions</strong></p><p>Every abstraction comes with additional memory cost. This could be due to number of arguments passed over stack (increases run-time memory requirements) or intermediate additional data structures that are explicitly allocated. Also, abstraction comes at the cost of reduced flexibility sometimes (check my previous post on “ideal IoT SDK” <a href="https://medium.com/@sagarbijwe86/characteristics-of-a-highly-effective-iot-software-development-kit-sdk-f01378d8ff12">here</a>).</p><p>4. <strong>Never split a state machine across threads (with different priorities)</strong></p><p>Often developers perform state machine transitions across the threads and if you are following point 2 about this means mostly they have different priorities. The problem is that context switches may give you impression that certain part of the code is executing in a particular state, when it is actually getting executed in some other state. The solution is in making sure that all state transitions are performed in the same thread and have events posted across the threads if required. This also avoids lots of problem related to priority inversion due to state machine related locks.</p><p>Also, it is important that the state is explicitly captured through framework code than application level variables or flags. If you are using a state machine data structure but also relying of if-else in the state/event handlers to decide next action then you probably need to split the state and capture it in state machine data structure than variables or flags.</p><p>5. <strong>Avoid mutex/semaphore as much as possible</strong></p><p>One of the way to avoid priority inversion and deadlock is to not use mutex/semaphores in the code if not needed. Most of the time getting task priorities right, splitting tasks into subtasks and using event handling and messaging can be sufficient. Always strive towards lock-free code as much as you can.</p><p><strong>6. Do not use TDD (test-driven development) until you know the system</strong></p><p>Embedded systems are behavioral systems. Do not write the test code unless you know and can capture the complete behavior of the system first or you will discover downside of TDD. This is different than testing a function that performs sum of 2 numbers which is procedural.</p><p>7. <strong>Think twice before you rewrite a complex system from scratch</strong></p><p>Do not throwaway years of field-tested code. This is because more mature the product becomes, it captures the behavior of an embedded or event driven system close to the ideal real world system. Clean up the code incrementally instead.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91e37cce02fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Characteristics of a Highly Effective IoT Software Development Kit (SDK)]]></title>
            <link>https://medium.com/@sagarbijwe86/characteristics-of-a-highly-effective-iot-software-development-kit-sdk-f01378d8ff12?source=rss-3b75931dbdfb------2</link>
            <guid isPermaLink="false">https://medium.com/p/f01378d8ff12</guid>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[software-development-kit]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[architecture-and-design]]></category>
            <category><![CDATA[sdk]]></category>
            <dc:creator><![CDATA[Sagar Bijwe]]></dc:creator>
            <pubDate>Thu, 17 Oct 2024 18:13:24 GMT</pubDate>
            <atom:updated>2024-10-19T17:21:28.725Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/406/1*OVl1QYdAEjy4cGHRmDtutQ.png" /><figcaption><strong>An IoT SDK</strong></figcaption></figure><p>I have been thinking about what makes a IoT SDK perfect from the perspective of an application developer targeting an IoT use-case. The following is the list of important points that I have compiled which I hope to keep growing over the period of time.</p><ol><li><strong>Entails fine balance between customization and generalization</strong>:</li></ol><p>An IoT SDK should be flexible in terms of orchestrating flow and modular in terms of plumbing various components so that application developers finds it easy to build solutions catering to various use-cases. At the same time, the SDK should find out commonalities in various use-cases and flows and provide abstractions for them so that application developers saves time in building the end solution. The tradeoff is — more abstractions and assumptions (i.e. customization) come with the cost of rigidity. <em>The SDK should not become a limit to using the hardware for an use-case unless the limitation comes from the hardware itself.</em></p><p><strong>2. Provides framework but does not hard-code policies.</strong></p><p>An IoT SDK can accommodate framework code such as event dispatcher, power management, timers and utility functions, however, it should not assume any policy on behalf of an use-case. For example, determining priority of WiFi interface over BT interface or coexistence behavior which assumes certain patterns of sharing RF for transmission. <em>Off-loading policy decisions to the application-developers or users of the solution is better in such scenarios.</em> Other examples would be frequency of timers, current consumption priority of different modules in the systems, different log and security levels etc.</p><p>3. <strong>Has an event driven architecture but orchestration is left to application developers</strong></p><p>A lot of times, event flows that are from framework to application entry points and vice-versa are not proper to realize various scenarios. An architect of the SDK needs to be very wary about this fact and should create a flow that is flexible to accommodate variations in application architecture and facilitating the same through data structures for context catching. Right callbacks for event handlers, inter-thread communication, timers, initialization sequences are some of the things to be considered. A clear documentation of threading model of the framework avoids any confusion related to thread priorities and typical problems in multi-thread environment such as race-conditions. If done properly, orchestrating the interactions between different modules in the system should be very simple for an application developer.</p><p><strong>4. Provides well tested set of configuration parameters with enough room for experimentation</strong></p><p>Typically a SDK provides set of “getting started” examples. These are good for creating simple application use-cases. However, often SDK makers get completely consumed in a few well-known use-cases and tune configuration parameters towards those use-cases. A good SDK, however, goes beyond enabling those use-case. It enables application developers to envision and realize use-cases beyond the stereotypical ones. Towards that end, a final solution may surprise the initial SDK maker and they would go “Oh, I did not think we can use our IoT device and SDK that way”. That is a sign of a SDK penetrating across IoT industry.</p><p>5. <strong>Performs cross layer networking optimizations</strong></p><p>IoT SDKs can not be complete without right networking technologies. Typical approach of layered internet stack for traditional computers fail for these IoT devices sometimes. LwIP, for example, drastically reduced size of TCP/IP implementation for IoT devices, however, it still leaves some room for improvement. Nothing harms to do more optimization when it comes to limited resources of the IoT devices. Choosing right buffers sizes, number of buffers, timer alignments across the layers (e.g. TCP/IP timers synced with L2 duty cycling) are some of things that are low-hanging in networking area. A good SDK will do that on behalf of application developers.</p><p>6. <strong>Allocate resources as per use-case requirements</strong></p><p>Resource allocation (memory, power and compute etc) is very crucial in defining the effectiveness and utilization factors of a SDK towards an use-case. Some of the factors to be considered while choosing a SDK for an application are: a) Minimal footprint for the application b) Minimal allocation of resources during any state of the system c) Ability to dynamic adjust of the resource requirements based on application logic d) flexibility when it come to “memory vs performance” tradeoff</p><p>7. <strong>Closes security loopholes on behalf of application developers</strong></p><p>As IoT evolves and captures more and more critical information, security is becoming paramount importance. Security is one of the factor when left to application developers only can go horribly wrong. This is not to say that application developers do not get to choose. It just means that SDK makers are wary of the fact that flexibility in terms of orchestration and customization may create security loopholes in the system that application developers may not see. The SDK should provide right abstractions for plumbing in right security levels for various modules and try to create a homogeneous security level across the system.</p><p><strong>This post is protected by copyright © 2024 Sagar Bijwe.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f01378d8ff12" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Function Updates: A new firmware OTA update approach for low power IoT devices]]></title>
            <link>https://medium.com/@sagarbijwe86/function-updates-a-new-firmware-ota-update-approach-for-low-power-iot-devices-d755c1e6634a?source=rss-3b75931dbdfb------2</link>
            <guid isPermaLink="false">https://medium.com/p/d755c1e6634a</guid>
            <category><![CDATA[versioning]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[firmware-update]]></category>
            <category><![CDATA[fota]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Sagar Bijwe]]></dc:creator>
            <pubDate>Mon, 14 Oct 2024 16:29:37 GMT</pubDate>
            <atom:updated>2024-10-19T17:35:07.841Z</atom:updated>
            <content:encoded><![CDATA[<p>Whether it is security fixes, feature updates or bugfixes, FOTA (firmware over-the-air) updates are critical for functioning of IoT devices. However, for the battery operated devices especially the ones in LPWA space, where batteries are supposed to last for 15 to 20 years, FOTA operations can cost battery life in terms of years. So deciding FOTA parameters, such as frequency of updates, what to update and size of updates play very crucial role.</p><p>A common approach in such devices is to use delta FOTA, where versions are updated incrementally by sending patches to the devices. The device then applies these patches and after performing integrity checks the new version effectively becomes functional. The issue is still the differences in binary format can be huge depending on how the patching is done.</p><p>A thought came to my mind that may be solution is to patch the basic unit of logic which is “functions”. The idea is to call a function pointer at the start of every function that may need patching in future. If the function pointer is populated then patched version of the function takes effect, otherwise, the base or original version executes. Here is an example of sum function that is written considering that we need it to be patched in the future.</p><pre>void *sum_ptr(int*, int*, int*);<br><br>void sum(int &amp;result, int &amp;a, int &amp;b) {<br>  if(sum_ptr!= NULL) {<br>    sum_ptr(result, a, b);<br>    return;<br>  } <br>  *result = *a + *b;<br>}</pre><p>An OTA update for this function just needs to carry new definition of sum in binary compiled format, put it in right memory location and then populate sum_ptr using that location. The location of sum_ptr itself needs to be send as a part of OTA update procedure. So the format of OTA will be</p><pre>&lt;function_ptr_location, function_bytes, location_of_function&gt;</pre><p>This approach has a disadvantage of additional memory requirements, but it has the following advantages:</p><ol><li>The functions can be patched on runtime (no reboot needed)</li><li>The patch sizes can be drastically reduced as you do not need to update the caller.</li><li>The new definition of function can be applied without worrying about previous definition.</li><li>Rolling back an update can be very easy, just reset the function pointer.</li><li>Rolling back can happen dynamically as well.</li></ol><p>This approach can be very useful for security patches where the crypto functions are updated over the period of time. Hope to see this in production some day, so that we can rename FOTA (Firmware Over The Air) to “Function Over The Air”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*n-ZdWD-h9LkdGeVOP_YtmQ.png" /></figure><p><strong>This post is protected by copyright © 2024 Sagar Bijwe.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d755c1e6634a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When CSMA meets LoRa …]]></title>
            <link>https://medium.com/@sagarbijwe86/when-csma-meets-lora-10d05e66c5f2?source=rss-3b75931dbdfb------2</link>
            <guid isPermaLink="false">https://medium.com/p/10d05e66c5f2</guid>
            <category><![CDATA[80211]]></category>
            <category><![CDATA[wifi]]></category>
            <category><![CDATA[acsm]]></category>
            <category><![CDATA[lora]]></category>
            <category><![CDATA[lorawan]]></category>
            <dc:creator><![CDATA[Sagar Bijwe]]></dc:creator>
            <pubDate>Sat, 12 Oct 2024 15:30:22 GMT</pubDate>
            <atom:updated>2024-10-16T07:56:24.170Z</atom:updated>
            <content:encoded><![CDATA[<h3>When CSMA meets LoRa …</h3><p>CSMA/CA is very popular due to its usage in WiFi (802.11 standard). However, when I first came across technical recommendation of CSMA for LoRa (<a href="https://resources.lora-alliance.org/technical-recommendations/tr013-1-0-0-csma">https://resources.lora-alliance.org/technical-recommendations/tr013-1-0-0-csma</a>), I was surprised because of the following considerations.</p><ol><li>LoRa uses FHSS, which means multiple access has lower probability has collision assuming different devices use different frequency hopping sequences.</li><li>LoRa is used for long range (several Kms). This means more hidden node problem of CSMA is more severe.</li><li>LoRa signal at the receiver can be way below receiver noise level (thanks to Chirp spread sprectrum modulation). This means it is futile to use RSSI based channel occupancy detection.</li><li>LoRa encourages using different spreading factors (different chirp duration).</li><li>LoRa duty cycling is very low (typically 0.01% to 1% for battery powered devices). So do we really need CSMA?</li><li>LoRa does not have acknowledgement mechanism of DCF like 802.11.</li><li>CSMA means more overhead for LoRa and hence more energy consumption.</li></ol><p>However, as I read further, it seems with increase in IoT devices, the probability of collision is increasing and overall network performances may decrease a lot in case of congestion.</p><p>The original paper “LMAC: Efficient Carrier-Sense Multiple Access for LoRa” discusses the approach and reasons for this in detailed. It relies of CAD (channel activity detection) for detecting valid LoRa transmission over the air. This method was originally introduced in LoRa for energy efficient preamble detection and not for CSMA. Instead of signal strength, it uses correlation to detect activity over the air. The paper summarized effectiveness of CAD for CSMA and combines CSMA with frequency hopping of LoRa i.e. a device performs CAD before transmitting on next eligible channel as per hopping sequence. It also makes sure that every channel is used in equally as per regulatory requirements.</p><p>However, the following questions remained unanswered or needs more discussion.</p><ol><li>Will CAD be equally effective for CSMA in 2.4Ghz LoRa ?</li><li>Given the longer distances of LoRa, will CSMA end up being unfair with more favor to devices near gateway with the approach mentioned in the recommendation?</li><li>How the CSMA performance will vary across class of LoRa devices?</li><li>How will it fit-in well with already deployed LoRa devices that depend on ALOHA?</li></ol><p>Having said that, this definitely is a very good research topic that stimulates my brain. Looking forward for active discussion on this within wireless community.</p><p><strong>This post is protected by copyright © 2024 Sagar Bijwe.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10d05e66c5f2" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>