Introducing NDNts, Named Data Networking libraries for the Modern Web

I'm creating a new Named Data Networking (NDN) client library, NDNts. The initial NPM release, v0.0.20191223-beta.1, was uploaded yesterday. This article explains why I'm doing this, and why you should consider using my library.


I've been developing Named Data Networking (NDN) for several years. Although my specialty is in the forwarding plane, I occasionally build NDN applications, such as a home surveillance camera. A common ingredient of every NDN application is some sort of client libraries, which provides APIs that allow the application to encode/decode NDN packets and communicate over NDN networks in accordance with the NDN protocol. One of these client libraries is the NDN Common Client Libraries (NDN-CCL), which provide a consistent API across several programming languages.

I adopted ndn-js, the JavaScript variant of NDN-CCL, in several projects, and was unhappy about it:

  • The API feels like Java, not JavaScript.
  • Callbacks everywhere, leading to callback hell.
  • The library inserts over 50 symbols to the browser's global scope, causing name conflicts.
  • All features are bundled into a single file that weighs over 500KB.
  • There's no unit testing for the most part, let alone continuous integration.

Bye, C.H.I.P

In 2015, I backed CHIP - The World's First Nine Dollar Computer on Kickstarter. Since then,

In 2018, Next Thing Co went out of business. Disappearing along with them is the software updates. Debian Buster was released in July 2019, but CHIPs are stuck with now two-generation old Debian Jessie, along with a 3-year-old Linux 4.4 kernel. Without software updates, running C.H.I.P computers on the Internet is increasingly risky.

This week, I have decided to sell my collection of C.H.I.P single board computers. They were sold for $77 (equals Kickstarter pricing) within two days of listing on eBay.

my C.H.I.P computers

Show Omega2 Battery Voltage in OpenWrt LuCI

Sometime ago, I bought an Onion Omega2 Pro and flashed it with OpenWrt 18.06. I plan to take my Omega on the road, so I installed a Li-Po battery on the device, so that it does not need to depend on USB power input. One big question is: what's the remaining power level?

Install power-dock2 to View Battery Voltage

The standalone Power Dock has a set of battery indicator LEDs that visually tells how much juice is left. However, the Omega2 Pro that I have does not have battery indicators. Instead, I need to use power-dock2 command to read battery level. Let me try it:

root@Omega2:~# power-dock2
-ash: power-dock2: not found

It does not work, because I flashed my Omega with OpenWrt 18.06, and power-dock2 command is not included in the standard OpenWrt distribution. The command comes from OnionIoT's OpenWrt feed (package source). I must add the OpenWrt feed before I can install the power-dock2 package.


2019年6月,我前往美国俄勒冈州度假7天,租车自驾旅行。 英文游记已经陆续发表,这篇文章是其中一个精彩景点的中文介绍。

波特兰是俄勒冈州最大的城市,也是我俄勒冈旅游的必经之地。 我在查询波特兰旅游信息时,找到了一个名叫“Shanghai Tunnels (上海隧道)”的旅游项目。 景点介绍称,导游将带领大家参观波特兰进行shanghai贸易的地方。 我来自中国上海(Shanghai),一看到“shanghai”这个名字,我就毫不犹豫的报了名。

本着“松紧结合”的原则,我将波特兰市区的游览安排在马特诺玛瀑布之后一天,可以在爬山后稍稍放松一下。 6月11日星期二一大早,我驾车到达密尔沃基轻轨车站,然后搭乘轻轨列车前往波特兰。 虽说这是“自驾游”,我这天选择了乘坐公共交通,以抛弃市区停车的烦恼。 我在市区游览了一整天,参观了国际玫瑰试验园、波特兰日本花园、皮托克豪宅三个著名景点,并在波特兰州立大学校区漫步。 傍晚六点半,我来到位于波特兰中国城的霍博饭店,与导游会合。 我同导游聊起了我决定参加这个旅游项目的原因,导游却告诉我,这个隧道很有意思,但是与上海这座城市没有任何关系。 呃,好吧。

导游让十几位游客在饭店的后院集合,给大家讲解隧道的历史。 他说,我们将要参观的隧道,并不是市政下水道,而是波特兰老建筑的地下室。 在19世纪波特兰建市的时候,每幢建筑都设有地下室,而且这些地下室都是互相连通的,形成了隧道。 1850年代,掮客在隧道里设立了据点,绑架街上游手好闲的人员,将他们临时关押在隧道里,然后拐卖到远洋轮船上。 由于不少远洋轮船的目的地是中国上海,英文“shanghai”就有了另一层意思:强制或诱骗某人去轮船上当水手。

根据网站说明,隧道的入口就在霍博饭店。 我一边听导游讲解,一边四处观望,想看看隧道的入口在什么地方。 我看到有人在使用一部看上去有些年头的电梯,就盯着看电梯是否钻入地下层。 这时,导游仿佛看出了我的心思,介绍道,那是波特兰的第一部液压电梯,安装于1880年代,但是并不通地下室。

Mystery at the Museum - Plan a Trip's newest promotion, Mystery at the Museum, is online today. To qualify for the first three souvenirs, you must find and log a number of geocaches, in a certain order. offers a filter function that shows which geocaches to find and log next. However, it only allows me to select the clue tiers that I currently qualify for. Since I haven't found any geocaches since the promotion started, I can only search for the Detective clue, but cannot search for any other clue types.

CLUES filter disabled except for Detective

This is inconvenient for me, because I prefer to go geocaching offline. I usually download a number of geocaches to my phone, go out to find them, and then log them at end of the day. I want to be able to search for clue types beyond Detective, even if I don't currently qualify for them. Then, I can go out, find enough geocaches to complete two or three souvenirs together, and then log them into the correct order.

I poked around the URI parameters in the address bar, and found two methods. I thought I'd share them, in case anyone needs it.


2019年6月,我前往美国俄勒冈州度假7天,租车自驾旅行。 英文游记已经陆续发表,这篇文章是其中一个精彩景点的中文介绍。

哥伦比亚河峡谷国家风景区位于俄勒冈州与华盛顿州交界处的哥伦比亚河两岸。 马特诺玛瀑布是这个风景区内最著名的景点。 我在下榻的密尔沃基汽车旅馆前台的旅游资料书架上看到了关于马特诺玛瀑布的介绍,当即决定前往参观。 6月10日清晨,我驱车1小时来到位于波特兰市以东43公里的风景区。

马特诺玛瀑布,落差189米,是这里最大、最著名的瀑布。 她的周围还有数十个其他瀑布。 我首先参观的是当地落差第二、158米高的薄雾瀑布。 可惜的是,这个瀑布的水量很小,又有树木遮挡,难以一睹芳容。 然而,我在薄雾瀑布附近找到了1916年建成、1929年烧毁的马特诺玛旅馆的遗迹:一台石头砌成的壁炉。


山间有一条小径可以走近薄雾瀑布,但是这条小径上布满了松散的碎石,我担心脚踝扭伤,决定不再前行。 我小心的下山,把车挪到瓦凯纳瀑布停车场,背好饮用水和干粮,开始爬山参观其他瀑布。 我设计的路线是从420号登山道上山,接上419号登山道往东行进,然后从441号登山道下山。 这条路线既可以途径7个大小瀑布,又可以一览哥伦比亚河两岸的风光。

Oregon Vacation: Looking Back and Looking Forward

My 7-day Oregon vacation is over. It took even longer for me to blog about this experience:

  1. Planning and Departure explains why I chose Oregon, how I planned the trip, and a personal record I set on the departure day.
  2. GC12 and GC17 follows my adventure to Oregon's oldest geocache.
  3. Birthplace of Geocaching introduces a landmark that started one of my favorite sports.
  4. Hillsboro and Outlets tells how I met a Twitter friend in real life, how I contributed to American economy, and a painful DNF story.
  5. Eight Waterfalls, Two Beaches, and a Webcam takes me outdoors to the scenic Multnomah Falls recreation area.
  6. Portland calms me down in the peaceful Portland Japanese Garden, and gets me running around in Portland State University.
  7. Breakfast and Laundry Solutions discusses some logistic issues during my travels.
  8. GC16 in Molalla River makes me huff and puff in seek of a 19-year-old plastic jar.
  9. Oregon City lifts me up along the only vertical street in North America.
  10. Last Day brings me from the peak of Portland to the other side of the state line, and then back to the normal life.


My vacation did not have a planned day-to-day schedule, but adopted a semi-flexible strategy. This differs from my previous vacations such as the Yuma Mega trip, where the planning covered exactly where to exit the highway and take a rest. Being flexible allowed me to spontaneously decide where to go next, based on weather, mood, and other factors. It enabled me to add destinations that I did not know before departure, such as Multnomah Falls and Oregon City, as well as fulfill friend's request of an IRL meet up. This strategy did backfire once, when I went to a museum only to find it closed.

Eventually, my trip achieved an interleaved structure between urban and rural environments:

Oregon Vacation (10) Last Day

By the time I finished my Oregon City tour, I'm 22 miles from the Portland International Airport and I have 8 hours remaining before scheduled flight departure. There are still places worth visiting.

Portland's Highest Point

Council Crest Park is the highest point in Portland at 327-meter elevation. It is also the location of Portland's oldest geocache, hidden in February 2001.

rusty statue and signal tower atop Council Crest

The park was easy to locate. The geocache, on the other hand, was difficult for me. Its location is specified as a vector offset from the hilltop, at "185 meters in the direction of 285° from magnetic north". I've seen "magnetic north" once and looked up some scientific references, but I don't know a practical way to convert magnetic north to true north that is accepted in mobile apps.

Oregon Vacation (9) Oregon City

Driving around the highways south of Milwaukie, I repeatedly saw an End of Oregon Trail sign. I vaguely remember having played a game called The Oregon Trail (paid link), but I don't know exactly what "Oregon Trail" is, so I looked it up. Oregon Trail is a 2170-mile wagon route between Independence, MO and Oregon City, OR, traveled by some of the earlier pioneers that settled in the west. Given its historic importance, after completing my geocaching mission, I decided to spend part of my last two days to visit Oregon City.

Elevator, Artwork, and Oddities

My evening tour of Oregon City was entirely guided by three geocaches:

selfie with Oregon City Municipal Elevator

Oregon Vacation (8) GC16 in Molalla River

My primary goal in Oregon is to find some of the world's oldest geocaches. I've found GC12, GC17, and the Original Stash tribute early on, but there's one more: GC16, hidden in June 2000. Wednesday, June 12, after a breakfast at Hitchin' Post, I started my quest into the BLM lands along Molalla River.


Just like other historical caches in Oregon, GC16 does not have parking coordinates in its listing. Once again, Google Maps tells me that I can drive straight to it. I know it can't be so easy, so I did my planning and identified two potential trailhead / parking locations:

  • Annie's Cabin trailhead, N 45°01.015 W 122°29.001, 3.0 km hike.
  • Hardy Creek trailhead, N 45°02.382 W 122°29.348, 2.3 km hike.

I looked over the "Old Oregon Coast Cache Access" document that I received at GEOregon event, and it suggests the first parking area. I'd better listen. It's a half-hour drive from Molalla on a wide, well-maintained road. I saw several logging trucks passing by, which explain the necessity of good roads.