Handcrafted open-source news and technical content, with hundreds of thousands of programmers and Linux enthusiasts already following.
Introduction | Embedded Linux can significantly accelerate the development speed of IoT solutions, simplify functional expansion, and provide IP gateway services for the IoT ecosystem. Moreover, the vast array of drivers, functional libraries, and even open-source code within the Linux ecosystem will become extremely powerful resources when building IoT projects. |
Clearly, whether expanding existing devices or designing new devices or systems from scratch, using embedded Linux can achieve the most ideal speed for building the IoT ecosystem. Embedded Linux shares the same codebase as desktop Linux, but it matches different user interface tools and other high-level components.
Next, we will explore several common scenarios together.
Typically, ultra-low power applications (such as sensors) can run for months on a single-use battery or even their own power generation mechanism. This means that any Linux running on them will impose an unbearable load. Its low power characteristics mean we cannot directly use IP connections, and must work with an internet gateway. The gateway can interface with sensors through low-power protocols and convert them to IP. Depending on specific protocol requirements, Linux is fully capable of providing support for existing protocols or similar solutions.
Now, let’s look at a wireless outdoor thermometer or “smart bulb” that operates with a CR2032 button battery. This smart bulb may not seem like a low-power application, but the specifics still depend on how it operates when not lit. If a pure Linux solution is used, it means that when the bulb is off, the system cannot or takes a long time to boot (at least users cannot accept waiting 10 to 20 seconds the first time they turn on the bulb).
If we directly run an IEEE 802.11 (WiFi) solution in the above example, the battery life will become very limited. Therefore, we need to use low-power networking protocols in the bulb, such as a simple 2.4 GHz signal system or Bluetooth Low Energy connection. The embedded Linux gateway can convert low-power wireless links into WiFi or even Ethernet for internet access. For this reason, most devices on the market currently adopt Linux gateways and low-power wireless protocols.
Additionally, embedded Linux also plays a role in many non-IoT devices. Designers often find it difficult to choose between a bare-metal/RTOS (real-time operating system) approach and using system-on-chip with Linux. The bare-metal option can effectively reduce material costs, but it is not conducive to time-to-market, development costs, and support costs. Embedded Linux can complete adjustments faster and provide a wider user base with low-cost access to various engineering techniques and development tools. Moreover, the large Linux user community helps expand testing coverage and simplify technical support.
The main requirement for IoT devices is connectivity, usually in the form of IP. This connectivity capability is often realized through web servers. While bare-metal/RTOS can also provide IP connections, they are prone to errors and compliance violations. For example, many RTOS do not isolate the IP stack users from the IP stack itself. Internet connections may need to handle low-speed or congested links. Additionally, when the stack is mixed with other code, buffer handling issues may become unclear and difficult to debug. In contrast, embedded Linux can achieve hardware separation and broadly use various IP stacks. Even from a cost perspective, embedded Linux can effectively offset the initial advantages of bare-metal/RTOS in speeding up time-to-market and reducing technical support and development costs.
Another common use case is to add functionality to existing IoT designs. From a discussion standpoint, this means we need to add mechanisms to read device status, configuration, and control, or even a web browser to the device. This means we need to find a binding mechanism to merge the IP stack, web server, and device software.
For existing devices that have adopted bare-metal settings, the above discussion applies to improving their internet connectivity. In this case, adjusting the device to use embedded Linux is often the simplest implementation method. For embedded Linux devices, adding IP connectivity only requires enabling the IP stack through kernel options. You also need to add some software packages to configure the system while introducing a web server. In this regard, you will need to write software binding code to serve web requests. We can accomplish this task using simple shell scripts, Python, and JavaScript. Adding IoT functionality is crucial for the product’s time-to-market, so you can parallelize various steps to effectively accelerate development speed.
For embedded Linux devices connecting to the IoT, security is undoubtedly a major concern. IoT services are often directly exposed to dangerous and unfiltered internet. While this topic could warrant a separate article, we can provide some summary opinions here, namely utilizing multiple native embedded Linux features—including multi-user, SELinux, and containers—to control and mitigate this risk. The large community that Linux possesses will also bring secure and reliable patching capabilities.
In conclusion, embedded Linux can significantly accelerate the development speed of IoT solutions, simplify functional expansion, and provide IP gateway services for the IoT ecosystem. Moreover, the vast array of drivers, functional libraries, and even open-source code within the Linux ecosystem will become extremely powerful resources when building IoT projects.
Original article from: http://os.51cto.com/art/201703/533838.htm
Article link: http://www.linuxprobe.com/linux-iot-speed.html Edited by: Shan Yue, Reviewer: Pang Zengbao
Click the lower left corner to see more hot technologies