[Dissecting OpenWRT]#1: Preface

From today I would like to start a new series (挖坑) called “Dissecting OpenWRT” (深入浅出 OpenWRT). Unlike other tutorials about OpenWRT, this new series will try to dissect OpenWRT from a developer’s point of view. It will focus on the implementation of OpenWRT core components, such as ubus, procd, netifd and luci. I hope that with the help of this new series, people will not only understand the insider but also know how to extend OpenWRT.

1. https://clockworkbird9.wordpress.com/2016/09/29/openwrtlede-system-boot-sequence/

1. https://clockworkbird9.wordpress.com/2017/02/05/openwrtlede-wifi-statup-process/

Posted in OpenWRT | Leave a comment

WPAN support for netifd

netifd is an RPC-capable daemon written in C for better access to kernel APIs with the ability to listen on netlink events. Netifd has replaced the old OpenWrt-network configuration scripts, the actual scripts that configured the network e.g.,


The WPAN support is now a simple clone of 802.11 support which include C code for netifd and Ash scripts to handle wpan interface.

The hardware platform I use is ci40 from Imagination, which has ca2810 802.15.4 radio chip. For most router without 802.15.4 hardware chips, fakelb is a good choice for testing. here is a simple tutorial how to setup a 6lowpan test network.

The OpenWRT source code is here

Posted in 6lowpan for linux, 802.15.4, Ci40, netifd, OpenWRT | Leave a comment

OpenWRT/LEDE WiFi Statup Process

This article will briefly introduse the WiFi startup process of OpenWRT/LEDE system.
The analysis will start from boot script which is located in /etc/initi.d/


Posted in 6lowpan for linux, 802.15.4, LEDE, Linux, OpenWRT | 1 Comment

iwpaninfo: Bring 802.15.4 into OpenWRT/LEDE

During last few days I have worked on a new project called iwpaninfo. It is a “clone” project from iwinfo and designed for 802.15.4 protocol. It is a wrap program like wpan-tools but it only read 802.15.4 device information via nl802154 interface. It also provides Lua bindings.

WIth the help of this project the intergration of 802.15.4 into OpenWRT/LEDE project will become easier.


Posted in 6lowpan for linux, 802.15.4, LEDE, OpenWRT | Leave a comment

[802.15.4 Linux] Add BEE click board support for Ci40

This post will briefly introduces how to add support of BEE click board for IMG ci40 board.

BEE Click is an accessory board in mikroBUS form factor. It features 2.4 GHz IEEE 802.15.4 radio transceiver module MRF24J40MA. This module includes an integrated PCB antenna and matching circuitry and is connected to the microcontroller via a SPI interface. As such, this module is an ideal solution for wireless networks, smart home automation, building automation and other electronic applications that need wireless communication. Board is designed to use 3.3V power supply only.

ci40 Linux kernel (4.4.14) has already driver support for MRF24J40. What we should do is adding device tree config for it, like

    mrf24j40ma@0 {
        compatible = "microchip,mrf24j40ma", "microchip,mrf24j40";
        spi-max-frequency = <4000000>;
        reg = <2>;
        interrupt-parent = <&gpio1>;
        interrupts = <5 GPIO_ACTIVE_HIGH>;

Or you can find the patch here.

It is noted that current driver has no support for reset and wake pin. And a pending patch is not merged. Since ci40 board has already 802.15.4 support via ca8210. mrf24j40 driver will be not automatically activated but explicitly loaded mrf24j40 driver via modprobe or insmod.


Posted in 6lowpan for linux, 802.15.4, Ci40 | Leave a comment

[802.15.4 Linux] MCR20A Driver is Comming

The MCR20A expands the NXP® portfolio of wireless connectivity products by delivering a new generation of 2.4 GHz transceiver for the IEEE® 802.15.4 standard. The MCR20A provides a world-class link budget of 110 dB that ensures the longest range of communication. At the same time, the MCR20A is able to receive and transmit at significantly lower peak currents than other competitive devices. This enables mesh networks to run on the same battery for a much longer period. The Dual PAN support allows the system to concurrently participate in two 802.15.4 networks, eliminating the need for multiple radios.

  • High-performance 2.4 GHz IEEE 802.15.4 RF transceiver
  • 802.15.4 PHY/MAC support
  • -102 dBm sensitivity +8 dBm maximum output power reducing the need for external power amplifiers
  • Low-power receive mode (LPPS)
  • TX 17 mA @ 0 dBm and RX 19 mA typical
  • TX 18 mA @ 0 dBm and RX 19.5 mA max
  • Dual PAN support
  • Supports single-ended and fast diversity antenna options: single 50 ohm antenna uses single balun to reduce component count and cost
  • Packet processor for hardware acceleration
  • 128-bit random number generator
  • 1.8-3.6 V operating range
  • Small footprint: 5×5 LGA 32 pin
  • –40 ˚C to +105 ˚C operational temperature range
  • Supports SMAC, Thread Networking Protocol and ZigBee stacks

The MCR20A Linux driver is coming soon. link

Update: 16.02.2017
* Support only one PAN network

Posted in 6lowpan for linux, 802.15.4, Linux | Leave a comment

[802.15.4 Linux] CC2420 driver

This is a deprecated cc2420 driver for Linux 802.15.4 and it is developed based on Imote2 platform.

Because I do not have any Imote2 or cc2420 boards. I can not continue maintain this driver.

Any Donation of cc2420 or Imote2 boards are welcome, thus I could try to push this driver to mainline.


Posted in 6lowpan for linux, Linux | 5 Comments