PO Box 3943

PO Box, or post-office box, is a uniquely addressable lockable box located on the premises of a post office station. There is a wall of PO Boxes in the University of Arizona's Student Union Memorial Center, where it costs $25 to rent one for a semester. I found them interesting, although I didn't use one because I could receive mail in my apartment, and the Tucson heat did a good job to keep the grounds dry so I didn't have to worry about packages.

When I first came to Maryland, I rented a room in Orchard Place neighborhood. It rains often, and the house does not have a porch. Seeing the post office right outside the neighborhood, I thought it would be the perfect chance to try a PO Box.

Opening My PO Box

Rental fee for a small PO Box at Diamond Farms post office is $54 for six months, or $30 for three month. I would live at Orchard Place for two or three months, so the 3-month option seems more reasonable. However, it is cheaper to choose the 6-month option, because the post office offers a ½ refund if I close the PO Box within three months, so the final price is only $27.

PO Boxes at this location include "premium service": every PO Box comes with a street address, and can accept deliveries from non-postal carriers. This is an important factor for me, because most items I buy online are not shipped via USPS, and having a street address allows me to receive them at the PO Box.

NFD on Windows 10 WSL

The NDN Forwarding Daemon (NFD) connects every Ubuntu and Mac OS machine to the Named Data Networking (NDN) testbed network. While it's awesome to get your NFD connected from a Linux server or a Macbook, 82.56% of the desktop users running Windows are out of luck. Compiling NFD for Windows is possible, but the amount of patches needed is astonishing.

Then the good news came: Microsoft announced Windows Subsystem for Linux (WSL), which lets developers run Linux environments directly on Windows, unmodified, without the overhead of a virtual machine. Ubuntu is the first Linux distribution supported by WSL. This means, we can now run NFD natively on Windows!

How to Install NFD on WSL

This section outlines how to install NDN Forwarding Daemon (NFD) on Windows Subsystem for Linux (WSL). As of this writing, I have Windows 10 version 1709 (Fall Creators Update), and the latest NFD release is version 0.6.1.

The steps to install NFD on Windows are:

How to Flash C.H.I.P Offline

Next Thing Co (NTC), the company that made the $9 C.H.I.P computer, is not doing well: orders are not shipping on time, and support is not answering emails. While the little CHIPs would still work even if NTC no longer exists, same cannot be said for firmware flashing: the recommended method for flashing firmware is through Chrome App developed by NTC, which in turn downloads from NTC's file servers. If Next Thing Co evaporates and their file servers go offline, the Chrome App would not be able to download the firmware, and therefore I cannot re-flash my CHIPs if I ever mess up their operating system.

To keep my C.H.I.Ps working for as long as possible, I have to plan for the inevitable and find out how to flash a CHIP without relying on the Internet, or at least, without relying on the opensource.nextthing.co file server. NTC has published some scripts, known as CHIP-tools, to work with CHIP computers. The chip-update-firmware.sh script is a command line tool to flash the device. While the content of this script is complicated, to make it work offline, I just need to figure out what it needs from NTC file servers, and download these files in advance.

A brief read and tests indicate that chip-update-firmware.sh has the following workflow:

  1. Verify all necessary programs are available.
  2. Select a flavor according to command line arguments. It is one of server, gui, pocketchip, and buildroot.
  3. Download a latest file that contains the latest firmware version number.
  4. Download SPL, sunxi, and U-Boot images.
  5. Connect to CHIP in FEL mode, and determine whether the CHIP has a Hynix or Toshiba NAND chip.
  6. Download CHIP operating system image that suitable for the NAND chip.
  7. Connect to CHIP in Fastboot mode, and send the operating system image to CHIP.

Files for each flavor is hosted in a different directory on the file server. For server flavor, the files are:

Orchard Place

I moved into Mr Argoti's house on the afternoon of Oct 29, 2017, and became a resident of Orchard Place neighborhood.

The Tiny Bedroom

My assigned bedroom is incredibly small. There are five pieces of furniture: a BED that later turns out to be a sofa, a four-drawer DRESSER, a big glass DESK, a nice office CHAIR, and a small wooden end TABLE. My room also includes a small FRIDGE and a MICROWave. The following diagram shows their placement.

+--------------------------------------E------------------+-------------------------+
| [HEAT]            +-----------------------------------+ |   =====   |             |
| +-------+         |                                   | |  | TOI |  |   SHOWER    |
| |       |         |                                   | |  | LET |  |             |
| |DRESSER|         |                BED                | |   \---/    \____________|
| |       |         |                                   | |                  |      M
| |       |         |                                   | |S                 | SINK I
E +-------+         +-----------------------------------+ | TC               |      R
|                                                         +D            /-+------E--+
W                                                                  /DOOR            |
I                                 |CHAIR|                      DOOR         CLOSET  |
N                                 \-----/                                           |
| +--------+ +-----+    +----------------------+                      DOOR+---------+
| | FRIDGE | |     |    |         DESK         |                          |
| | MICROW | |TABLE|    |                      |             DOOR         E
| +--------+ +-----+    +----------------------+                 \DOOR-\  |
+------------------------------------------------------S--D             \-+

<--- SOUTH            E=electric outlet  S=light switch

The existing furniture took up more than half of the floor space, so that everything I have must fit into the other half. When I moved from Arizona, I had four roller bags, two small bags, and a large box of cookware. Half of my clothes already filled the dresser and the space on top of it, so the other half had to stay in the luggage. The desk obviously belonged to my computers and other gadgets. I managed to squeeze the cookware box and a smaller roller bag into the tiny CLOSET. One of my roller bags could fit under the bed by opening it to two halves. The last two roller bags had to stay in the open in front of the WINdow. After settling all my belongings, I only have an open "hallway" between the desk and the bed, just enough for doing a few push-ups.

Settling in Gaithersburg

I moved to Gaithersburg Maryland to start a research job at National Institute of Standards and Technology (NIST). As I exited Washington Union Station on Oct 26, 2017 after enjoying an epic 4-day Amtrak train journey, I felt lost immediately: this is no longer Tucson, the toasty city that I know and love, but a completely different place. Nevertheless, Cortana's voice guided me along Interstate 270, and my rental car arrived at Extended Stay America Gaithersburg South, where I was greeted by James and received a spacious and comfortable room.

Apartment Search

Before I first came to Tucson, I signed up for a student housing apartment online. Unlike six years ago, I did not select an apartment before traveling to Maryland. Gaithersburg is not a college town, and I am no longer a student, so that I couldn't get a fairly straightforward "student housing" option. Instead, I am facing a much larger and complex apartment rental market. I want to see the apartments myself before committing to sign a lease.

Oct 26 is a Thursday, so there was only one weekday remaining before the weekend when most leasing offices would be closed. I browsed online apartment listings, and selected four apartment complexes to visit on Friday. I still wanted to avoid owning a vehicle, so location was the most important factor in my consideration. I also preferred a furnished apartment, to avoid the hassle of buying and selling furniture.

Spring Ridge apartments model room

Enter WiFi Credentials on ESP32 with One Button

It is considered bad practice to hard-code WiFi credentials into Arduino sketches. Typical recommendations include the WiFiManager library for ESP8266, and SmartConfig for ESP32. Both require the user to have a smartphone to send command to the ESP chip, which otherwise does not have any User Interface (UI).

My ESP32 board is the Heltec WiFi_Kit_32 (paid link) that comes with a 0.96 inch OLED display and a little PRG button connected to pin #0. Can I use these minimal UI to enter WiFi credentials without involving a smartphone?

Heltec WiFi_Kit_32 OLED board with one button

Design with Minimal UI

I took inspiration from Prof Stephen Hawking's computer:

"Wireshark" on ESP8266: PacketDump

I dived into the open source lwip library in ESP8266 Arduino Core, and figured out how to observe raw Ethernet packets.

PacketDump.ino demo

lwip's struct netif

lwip declares a network interface structure in lwip/netif.h:

struct netif {
  struct netif *next;

  ip_addr_t ip_addr;
  ip_addr_t netmask;
  ip_addr_t gw;

  netif_input_fn input;
  netif_output_fn output;
  netif_linkoutput_fn linkoutput;

  u16_t mtu;
  u8_t hwaddr_len;
  u8_t hwaddr[NETIF_MAX_HWADDR_LEN];
  u8_t flags;
  char name[2];
  u8_t num;

  // (some fields are omitted)
};

Happy New Year 2018 on ESP32 OLED

I've been playing with ESP8266 for one and a half years now. Recently, I'm upgrading to its bigger brother, the ESP32. I purchased two development boards, one of them is the Heltec WiFi_Kit_32 (paid link) that comes with a 0.96 inch OLED display.

When 2018 arrives, what's a better way to say Happy New Year than on the ESP32? Therefore, I crawled out of the bed at 4AM, turned on the computer, and started Arduino IDE. Half an hour later, I tweeted this picture:

"Happy New Year 2018" on Heltec WiFi\_Kit\_32 OLED display

The code is simple yet effective. It was modified from u8g2 library full_buffer/HelloWorld example, with the constructor line found on Robot Zero One.

#include <U8g2lib.h>

U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, 15, 4, 16);

void setup() {
  u8g2.begin();
}

void loop() {
  u8g2.clearBuffer();
  u8g2.setFont(u8g_font_helvB10);
  u8g2.drawStr(0, 20, "Happy New Year");
  u8g2.setFont(u8g_font_helvB24);
  u8g2.drawStr(0, 60, "2018");
  u8g2.sendBuffer();
  delay(1000);
}