WCH CH341 USB to Serial Chip Gets Linux Drivers to Control GPIOs over USB

USB to serial chips are often used as a debug interface either directly on the target board, or via a dedicated debug board. But some models have extra pins exposed, and one of those is WCH CH341, which also includes I2C & SPI interfaces and up to 8 GPIOs. But software support for those extra pins is not currently built-in into the drivers found in Linux mainline, and you’d also have to find a board that breakout the relevant pins. It turns out there are few of things including “CH341A ALL IN 1 USB to SPI/I2C/IIC/UART/TTL/ISP serial adapter” board going for $10 shipped on Aliexpress, and which Zoobab successfully used to control 6 (out of 8) GPIOs over USB. The board comes with a USB board to connect to your computer, several header for I2C, UART, SPI, some LEDs, and jumper to select I2C/SPI or UART mode and voltage (5V/3.3V). […]

FOSDEM 2018 Open Source Developers Meeting Schedule

FOSDEM (Free and Open Source Software Developers’ European Meeting) occurs every year on the first week-end of February, where developers meet for two days discussing about open source software projects. FOSDEM 2018 will take place on February 3-4 this year with  652 speakers, 684 events, and 57 tracks, an increase over  last year 608 speakers, 653 events, and 54 tracks. There will be 8 main tracks namely: Community, History, Miscellaneous, Performance, Python, Security and Encryption, Space, and Global Diversity CFP Day. There will also be 33 developer rooms, and since the full schedule is now available, I’ll make a virtual schedule mostly based on sessions from the Embedded, mobile, and automotive, Hardware Enablement, and Internet of Things devrooms. Saturday 3, 2018 09:50 – 10:15 – Turning On the Lights with Home Assistant and MQTT by Leon Anavi In this presentation you will learn the exact steps for using MQTT JSON […]

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 […]

Getting Started with MicroPython on ESP32 – Hello World, GPIO, and WiFi

I’ve been playing with several ESP32 boards over the months, and tried several firmware images. I started with a tutorial for Arduino Core on ESP32, a few month later I tested ESP32 JavaScript programming with Espruino on ESPino32 board, and recently Espressif Systems sent me ESP32 PICO core development board powered by their ESP32-PICO-D4 SiP, and while I took some pretty photos, I had not used it so far. So I decided to go with yet another firmware, and this time, I played with MicroPython on ESP32, and will report my experience with basic commands, controlling GPIOs, and WiFi in this getting started post. Flashing Micropython Firmware to ESP32 Board Source code is available on Github, as a fork of MicroPython repo as ESP32 support has not been upstreamed yet. We could built the firmware from source, but there’s also a pre-built binary which you can download on MicroPython website. […]

Embedded Linux Conference & Open Source Summit Europe 2017 Schedule

The Embedded Linux Conference & IoT summit 2017 took place in the US earlier this year in February, but there will soon be a similar event with the Embedded Linux Conference *& Open Source Summit Europe 2017 to take up in Europe on October 23 – 25 in Prague, Czech Republic, and the Linux Foundation has just published the schedule. It’s always useful to find out what is being discussed during such events, even if you are not going to attend, so I went through the different sessions, and compose my own virtual schedule with some of the ones I find the most interesting. Monday, October 23 11:15 – 11:55 – An Introduction to SPI-NOR Subsystem – Vignesh Raghavendra, Texas Instruments India Modern day embedded systems have dedicated SPI controllers to support NOR flashes. They have many hardware level features to increase the ease and efficiency of accessing SPI NOR […]

ROCK64 Board Review – Part 2: Quick Start Guide with Ubuntu 16.04.3 MATE, Multimedia Features, Some Benchmarks

Pine64 ROCK64 is the first maker board based on Rockchip RK3328 processor, and is potentially interesting for various applications including network storage thanks to USB 3.0 and Gigabit Ethernet, multimedia applications with 4K HDR video support, as well as other applications requiring I/Os. I’ve already tested Rock64 board with Android 7.1 operating system, so today I’ll report by finding and experience with Ubuntu 16.04.3 with MATE desktop. Selecting and Flashing a Linux Image You’ll find several operating systems in the Wiki, but you’ll also find more cutting edge images in ayufan’s github. But first let me explain some vocabulary used for Pine64 firmware files: Engineering version – Becomes with release build based on the stock build develop by Pine64 and the SoC vendor. It’s supposed to be more stable, but get less updates Community versions (currently managed via ayufan) are more frequently updates, and comes with more recent features. You’ll find […]

Using GPIOs on NanoPi NEO 2 Board with BakeBit Starter Kit

NanoPi NEO 2 is a tiny 64-bit ARM development board powered by Allwinner H5 processor. FriendlyELEC sent me a couple of NEO 2 samples together with their BakeBit Start Kit with a NanoHat and various modules via GPIOs, analog input or I2C. I’ve already tested both Armbian with Linux 4.11 and Ubuntu Core Qt with Linux 3.10, and ran a few benchmarks on NanoPi NEO 2. You would normally prefer to use the Armbian image with Linux mainline since it provided better performance, but at the time I was told GPIO support was not there. Configuring NanoPi NEO 2 board with BakeBit library So this week-end, when I decided to test GPIO support and BakeBit Starter Kit, I decided to follow this advice, especially nanopi-neo2-ubuntu-core-qte-sd4g-20170329.img.zip image is still the recommended one in the Wiki. So I went with that image. I’ll use Python examples from Bakebit library, but if you […]

Review & Quick Start Guide for Khadas Vim Pro Development Board with Ubuntu 16.04

Khadas Vim is the only Amlogic S905X development board I’m aware of. There are 4 or 5 versions of the board, but currently only two models are sold: Khadas Vim with 8GB flash and single band WiFi + BLE 4.0, and Khadas VIM Pro with 16GB flash, and dual band WiFi + BLE 4.2. SZWesion, the company behind the board, has sent Khadas Vim Pro for evaluation. Today, I’ll take a few pictures of the board and its accessories, and report my experience playing with Ubuntu 16.04.2 on the board. They’ve also released Android, LibreELEC, and dual boot Android/Ubuntu (for Vim Pro only) images, which you can find in the firmware resources page. Khadas Vim Pro Unboxing and Photos My parcel included Khadas package that looks like a book, an HDMI cable, and the same IR remote control sent with GeekBox, the first board made by the company, and powered […]