Learn More About Linux’s New GPIO User Space Subsystem & Libgpiod

Sysfs was used to control GPIOs on Linux system with the GPIOs defined in /sys/class/gpio, but starting with Linux 4.8, a new GPIO interface for user space was introduced, with gpiochip becoming char devices foudn in /dev/gpiochip0, dev/gpiochip1, etc.. , and sysfs allegedly become deprecated. But a quick check in NanoPi Duo with Linux 4.11 shows both GPIO user space interfaces appear to be enabled: Nevertheless overtime, sysfs will die out, and the new subsystem will likely be used by all systems, so it might be useful to learn more about it. One way to do that is to watch Bartosz Golaszewski’s ELCE 2017 talk entitled “New GPIO Interface for User Space” with the video embedded below. But I first I’ll summarize some of the key points. Now GPIO handling from user space becomes similar to other char driver with ioctl, poll and read functions, and beside assigning numbers to GPIOs you can assign names. The API (in linux/gpio.h) provides …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

Arm’s Platform Security Architecture Aims to Secure the Internet of Things (IoT)

News are published nearly everyday about a security breach or flaw in IoT devices, and last year, Softbank CEO, and new Arm owner, Masayoshi Son explained that to reach his goal of one trillion IoT devices and singularity, security had to be addressed, as everything was currently too easily hackable, including cars equipped with lots of electronics but very weak security. As Arm Techcon 2017  is underway, the company has been working on improving IoT security and announced the Platform Security Architecture (PSA) designed for low cost IoT devices. PSA has three major components: Threat Models and Security Analyses derived from a range of typical IoT use cases. Architecture specifications for firmware and hardware. An open source project, similar to Arm Trusted Firmware for mobile clients. PSA is designed for low cost IoT devices, which would have not the resources (processing power, memory, battery power…) to run a full Trusted Execution Environment (TEE) , aims at protecting assets such keys, …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

Secure96 is a 96Boards Mezzanine Expansion Board To Experiment with Hardware Based Security

With the Internet of things booming and taking a more important role in our lives, security will become more and more critical. So far, it has often been an afterthought with modems & routers frequently shipping with default username and password, and getting security right is really hard, as shown by the recent CLKSCREW attack that somehow leverages DVFS to break ARM TrustZone security, and that “is not a software bug, nor a hardware bug, it’s a fundamental part of the energy management design”, so most ARM platforms are vulnerable. Optimal security normally combines software and hardware, so having a platform to experiment with different HW security solutions would be useful, and that’s what Secure96 Mezzanine board for 96Boards aims for. Secure96 expansion board specifications: Security ICs Microchip Atmel ATSHA204A SHA-based CryptoAuthentication crypto element device Microchip Atmel ATECC508A crypto device with ECDH (Elliptic Curve Diffie–Hellman) key agreement Infineon SLB 9670 TPM 1.2/2.0 Storage – EEPROM USB – micro USB port connected …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

When Your Code Lands You in Jail

You’ve probably heard about Volkswagen emission scandal that surfaced last year. Basically, the company used some tricks to detect when the vehicle was under test and ran in low emission mode during those tests, and normally on the road emitting up to 40 times over the U.S. pollution limits. Cheating is quite easy because testing is performed indoor with the car wheels on rollers as shown in the picture below, so all the software had to do is detect whether the car was actually moving forward to select the right mode. Several executives involved in the decision to rig the emissions tests got charged as expected, but what happened to the engineer who implemented the code following his  boss(es)’ request? Reuters reports that he’s been sentenced to 40-month prison term, and a $200,000 fine, after pleading guilty early on, and collaborating with authorities. His lawyer argued that Jiang (Engineer surname) was no a “mastermind” of the emissions fraud, and “blindly …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

Banana Pi BPI-M2 Berry Allwinner V40 Development Board, Allwinner Business Units & SDK/Software Management

SinoVoIP has unveiled yet another new board with Banana Pi BPI-M2 Berry this week-end. It’s actually quite similar to Banana Pi BPI-M2 Ultra board, by they replaced Allwinner R40 with Allwinner V40 processor, removed some features, and use Raspberry Pi 3 form factor. If we look at Allwinner V40 product brief we can see the specifications look almost identical, with V40 potentially exposing an extra CAN bus. The company’s announcement was very confusing since they show Banana Pi BPI-M2 Berry board with Allwinner R40 instead of Allwinner V40. Banana Pi BPI-M2 Berry Banana Pi BPI-M2 Berry specifications: SoC – Allwinner V40 quad Core ARM Cortex A7 processor with ARM Mali-400MP2 GPU System Memory – 1G DDR3 SDRAM Storage – micro SD slot, SATA interface Connectivity – 1x Gigabit Ethernet port, 802.11 b/g/n WiFi and Bluetooth 4.0 (AP6212 module) Video Output – HDMI 1.4 port up to 1080p60, 4-lane MIPI DSI display connector Audio I/O – HDMI, 3.5mm headphone jack, built-in …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

Google’s Project Treble To Allow Easier & Faster Updates to a New Android Versions

If you’ve ever purchase a phone with Android X, you may have noticed it takes a long time to get an update to Android Y after Google officially release the latest version. The reason it takes so long, except on Google’s own hardware, is that the latest Android version needs to be update by the Silicon vendor, which then sends a BSP to manufacturers, who in turn brings their own tweaks, with in some cases telecom carriers involved in the last step, before delivering the update the end users. This is normally a time-consuming and costly process for all parties involved. One of the reasons is that while the higher level app API is fairly stable, the Android framework (middleware) interface to the Vendor’s implementation may change greatly between different major Android versions. Google is aiming to fix that with Project Treble, starting with Android O, by providing a stable vendor interface between versions. That means we get from the …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

Embedded Linux Conference & OpenIoT Summit 2017 Schedule

The Embedded Linux Conference 2017 and the OpenIoT Summit 2017 will take place earlier than last year, on February  20 – 23, 2017 in Portland, Oregon, USA. This will be the 12th year for ELC, where kernel & system developers, userspace developers, and product vendors meet and collaborate. The schedule has been posted on the Linux Foundation website, and whether you’re going to attend or not, it’s always informative to check out the topics. So as usual, I’ll make a virtual schedule for all 5 days. Monday, February 20 For the first day, the selection is easy, as choices are limited, and the official first day it actually on Tuesday. You can either attend a full-day paid training sessions entitled “Building A Low Powered Smart Appliance Workshop“, and the only session that day: 14:30 – 15:20 – Over-the-air (OTA) Software Updates without Downtime or Service Disruption, by Alfred Bratterud, IncludeOS Millions of consumers are at risk from security vulnerabilities caused …

Support CNX Software – Donate via PayPal or become a Patron on Patreon

FOSDEM 2017 Open Source Meeting Schedule

FOSDEM (Free and Open Source Software Developers’ European Meeting) is a 2-day free event for software developers to meet, share ideas and collaborate that happens on the first week-end of February, meaning it will take place on February 4 & 5, 2017 this year. FOSDEM 2017 will features 608 speakers, 653 events, and 54 tracks, with 6 main tracks namely: Architectures, Building, Cloud, Documentation, Miscellaneous, and Security & Encryption. I won’t be there, but it’s always interesting to look at the schedule, and I made my own virtual schedule focusing especially on talks from “Embedded, mobile and automotive” and “Internet of Things” devrooms. Saturday 4, 2017 11:00 – 11:25 – Does your coffee machine speaks Bocce; Teach your IoT thing to speak Modbus and it will not stop talking, by Yaacov Zamir There are many IoT dashboards out on the web, most will require network connection to a server far far away, and use non standard protocols. We will show …

Support CNX Software – Donate via PayPal or become a Patron on Patreon