Tucson's Museums

Visiting museums is a good way to learn about the culture of a region. During my six years living in Tucson, I found and visited many museums in this city, and here are some of my favorites.

5. Arizona State Museum

Arizona State Museum is located on University of Arizona campus. I knew about this museum since the beginning when I participated in ISA's very first campus race event, but I never paid a visit because I thought it is literally steps away from my office so I can visit "some time". In August 2017, when I'm days away from graduation, I finally visited this museum. My visit spanned two afternoons due to the rich content in this museum.

Paths of Life exhibit in Arizona State Museum

The main exhibit at Arizona State Museum, Paths of Life, presents the origins, histories, and contemporary lifeways of ten Native American cultures in Southwest America. While I have interacted with members of Tohono O'odham and Yaqui tribes through their presentations at Tucson Meet Yourself, I gained better understanding at this Paths of Life exhibit about their culture, religious beliefs, and struggles. I also learned about eight other indigenous tribes in the Southwest region but further from Tucson.

Tunnel Ethernet Traffic Over NDN

Named Data Networking (NDN) is a common network protocol for all applications and network environment. NDN's network layer protocol runs on top of a best-effort packet delivery service, which includes physical channels such as Ethernet wires, and logical connections such as UDP or TCP tunnels over the existing Internet. Using this underlying connectivity, NDN provides a content retrieval service, which allows applications to fetch uniquely named "Data packets" each carrying a piece of data. The "data" could be practically anything: text file chunks, video frames, temperature sensor readings ... they are all data. Likewise, a packet in a lower layer network protocol, such as an Ethernet frame, is also a piece of data. Therefore, it should be possible to encapsulate Ethernet traffic into NDN Data packets, and establish a Virtual Private Network (VPN) through NDN communication. This post describes the architecture of a proof-of-concept Ethernet-over-NDN tunneling program, and shows a simple performance benchmark over the real world Internet.

The Program

tap-tunnel creates an Ethernet tunnel between two nodes using NDN communication. Each node runs an instance of tap-tunnel. This program collects packets sent into a TAP interface, and turn them into NDN packets. It then gains NDN connectivity by connecting to the local NDN Forwarding Daemon (NFD). The diagram below shows the overall architecture:

Hiking in Arizona

I was a couch potato before I came to the United States six years ago. There aren't many outdoor adventures in my hometown Shanghai, because Shanghai is located on a flat peninsula, and the only place that resembles a mountain is the 97-meter Sheshan Hill. In contrast, Tucson is surrounded by five mountain ranges, and it is a hiking paradise.

My First Hike

Among the grad students in computer science department, there is an organization called the Graduate Student Council (GSC). On the same week as orientations, I attended the first GSC meeting, and learned about various activities organized by GSC. One of them is a "hiking club". I joined their mailing list, although I did not know what I was signing up for.

The first hike was on Oct 01, 2011 going to Butterfly Trail. I took an early morning bus to school, and brought "plenty of water for yourself, sturdy hiking shoes, lunch, warm cloth" as instructed by the trip leader. We departed shortly after 09:15, and it was a long ride in Jeremy Wright's car.

Butterfly Trail, 01OCT2011

My Favorite Tucson Restaurants

During my six years living in Tucson, I visited hundreds of local restaurants. Here are my top picks. Those restaurants are all good, and their order within this article does not indicate my preference.

Best on campus: IQ Fresh

crispy fish wrap from IQ Fresh

Located in the main student union, IQ Fresh is my usual place for a quick lunch between classes. They mainly serve wraps: shredded meats and veggies rolled inside a piece of tortilla. They offer 14 different meats and veggies, and 10 tortilla flavors, giving 140 choices.

My favorite is the crispy fish wrap in spinach wrapper, with a side of sweet potato fries. Sadly, this particular item has been discontinued in 2015, and I stopped going there altogether.

Academic Papers

Writing and publishing academic papers is an essential part of PhD education. During my 6-year PhD career, I published three academic papers as first author in peer-reviewed conferences:

Publishing an academic paper is hard. In the process, I must:

  1. Come up with an idea.
  2. Confirm the idea is feasible.
  3. Design and execute experiments to show the design is superior to competitors.
  4. Write the paper to make others understand my idea and experiments.
  5. Submit the paper, and hope my paper is better than most submissions in the same conference.

The Idea Phase

Heat and Monsoon

Tucson has four seasons: spring, summer, monsoon, and winter. Located in the desert, the climate is very different from my hometown Shanghai. I have been accustomed to Tucson's climate after living here for six years.

Summer Heat

The summer is extra long. @TheTucsonHeat arrives in April or earlier, and would not leave until Halloween at end of October. Thus, seven of the twelve months belong to the summer.

Heat is the number one weather related killer in Arizona. House cooling is not optional. Heat warning signs are everywhere:

"the heat is on" sign in Joel D Valdez Main Library

Heavy Iron Stuff

I started going to the gym regularly during my fourth through sixth years at University of Arizona. Weight lifting helped me to lose weight of up to 30lb, and replaced some of my body fat with juicy muscles.

How It All Started

I have been swimming since the second day I arrived in Tucson, but my body looked the same, because my roommate was cooking large bowls of white rice and fatty meats for me. Since I moved to University Arms and started living alone, I decided to change things up. I started running on treadmill and using the elliptical trainer on and off in the Campus Rec. I was thinking to eat less and cut back on ice creams.

I ate only one apple at the breakfast of Oct 14, 2014, and felt hungry two hours later. I wondered, am I eating too little? To find the answer, I decided to calculate how much calories I was eating on that day. I searched online for a "calorie calculator", and found MyFitnessPal. It is not only a "calculator", but also an app to keep track of how much I ate. I made my first entry:

MyFitnessPal food diary on Oct 14, 2014

On Two Wheels

Tucson is walkable when staying around UA campus and downtown area. To go farther, I often ride a bus with six wheels, hail a taxi with four wheels, or drive a rental car behind one wheel, all of which costs money. More frequently, I would ride a bike on two wheels. I enjoy riding a bike because it is free: I can go places without buying a ticket, and I have the freedom to go anywhere without worrying about being late for bus or issues in finding parking.

Rillito River Park, π day, 2015

First Ride on Cat Wheels

Cat Wheels bike sharing program, offered by Parking & Transportation Services, loans bikes to students for free. I can pick up a bike at any parking garage, ride for a whole day, and return by 16:00 the next day. Since garages are only open on weekdays, a bike borrowed on Friday won't be due until Monday, making this a plusgood deal.

my first Cat Wheels rental bike

Share LaTeX Document on Netlify

My dissertation is finally finished. Before finishing my dissertation, I was eager to share it with my classmates so that they could read and give me suggestions. Normally, I would give them read-only access on the Git or Subversion repository containing my dissertation, so that they can check out the LaTeX source files, and then compile the dissertation. This procedure creates a hurdle for them, because LaTeX is normally not installed on mobile devices they might use.

For most people, the solution would be sending PDF attachments. However, when I add more and more text and pictures into my dissertation, the PDF becomes increaseingly large, and I don't want to send large files and use up the quota of my and my classmates' mailboxes. There is a better solution.

Netlify is a free hosting service for static web sites. It provides a Node.js client app, which can deploy a prepared website from the command line. It can also pick up commits into a git repository, and compile the website from source code.

While my dissertation is not a website, hosting it on Netlify is totally feasible. Although Netlify's continuous deployment does not support LaTeX, I can still compile the PDF locally, and upload it to Netlify. To do so, I added a Makefile rule:

Meet the World at International Student Association

Most of my social life during my six years at University of Arizona was at the International Student Association (ISA). I made friends, made frenemies, and had fun through events and gatherings organized by ISA.

ISA Trail Dust Town visit, Apr 04, 2013

The Very First Event

Every incoming international student is required to attend the International Student Orientation, organized by International Student Programs and Services (ISPS). In the 2011 orientation, ISPS recruited a group of student workers, called Peer Integrators (PIs), to assist with the orientation, and to plan and participate in orientation social events for new international students. One of the social events was a campus race on Aug 14, 2011, organized by Morris Zhou, a PI from China. I participated in this event because its name sounds like my favorite TV show The Amazing Race.

The goal of this event was to make students familiarize with the UA campus. Each team of two or three students were given a sheet of hints, each referring to a location on campus. Within one hour, the team must visit as many locations as they can, and take pictures of the team members in front of those locations. The team that gets the largest number of correct answers would be awarded the winner.

I am a Moviegoer

I watched over 150 movies during my six years at University of Arizona.

What did I Watch

My favorite genre is action and adventure. I love seeing superheroes save the world, because they bring hope to our world. My favorite character is Spider-Man, because he only does good things and is full of positive energy.

I also frequently watch science fiction films. I particularly enjoy films set in the outer space, such as The Space Between Us and Passengers, because the weightless shots are breathtaking.

My third favorite genre is drama. Some of my favorites are National Lampoon's Christmas Vacation, Nebraska, and Instructions Not Included. I can have a good laugh out of them.

How I Started Geocaching

Geocaching is an outdoor treasure hunt game. Participants, or "geocachers", use a Global Positioning System (GPS) receiver to hide and seek containers, called "geocaches" or "caches", at specific locations marked by coordinates all over the world. I learned about geocaching by accident in Jul 2013, and I was immediately hooked to this game. Since then, Geocaching had a strong influence in my weekend activities, gadget purchases, and travel choices.

selfie with GC5WHZV container

It All Started from Jenny

Grocery stores offer discounts with a loyalty card, but I forgot to bring mine on Jul 12, 2013. I complained on Facebook, and my friends told me that I could give my phone number to the cashier, and they would be able to apply the discounts. Daniel's answer mentioned that I could enter "area code + 867-5309" as the phone number, and there is usually a loyalty card associated with this phone number. I did not understand what's special about this phone number, so I started online searching.

Facebook post about forgotten grocery loyalty card

Hailing Taxis

When I was little, taxis were my favorite form of transportation. I could have my own seat in the taxi, and the taxi would go directly to the destination. I would not need to walk to the bus stop, wait for the bus, get squeezed in the bus, and walk to the destination after getting off the bus. In early 1990s, taxi fare of a 5KM trip was about 30 times the bus fare. However, I didn't understand the value of money at that time, so I always wanted to travel by taxi.

I started attending a boarding school since the seventh grade. Mom would give me ¥65 every week, and I was allowed to spend the money however I wish, but this money was all I have for meals, transportation, and anything else except books and school supplies. While I could spend ¥5 to take a taxi from the bus terminal to the school, I usually chose to walk 20 minutes and save the money for snacks. I got used to bus rides and long walks, and forgot about taxis, when money became a constraint. In fact, I got so used to public transportation that, even if I was on a business trip when I later worked for a company, I would prefer to take a bus instead of a taxi, and I sometimes had to explain to finance why I could not produce a receipt for a bus ride.

When I came to Tucson in 2011, having limited cash and being accustomed to public transportation, my primary form of transportation is of course the city bus. However, the operating hours of city buses are limited. When I stayed in Grant Inn during my first days, the last route 20 bus from UA campus back to Grant Inn was departing at 18:20. If I wanted to stay at school later than that, I would have to find my alternate transportation.

Clint's Taxi

When I was dropped off at Grant Inn, the volunteer gave each student a business card of "Clint's Taxi", and told us to call Clint when we need to go to school. Since buses are cheaper, I took the city bus most of the time. On Aug 14, 2011, I attended a "Campus Race" scavenger hunt activity, organized by an organization called Meet The World, which later became International Student Association (ISA). The activity lasted until 20:00, at which point there were no more buses available. This was when I called Clint for the first time.

Behind the Wheel

Sun Tran bus system was my primary form of transportation during my six years at University of Arizona, but it wasn't my only transportation. Sun Tran services city of Tucson, city of South Tucson, and select areas out of city limits. When I needed to go beyond the service boundary, or to haul cargo, it makes sense to get my own set of wheels.

I decided not to buy a car during graduate school early on. When I attended my first "grad tea", a social event among computer science grad students, I asked an American student the cost of owning a car, and the answer was $200 per month including "everything". A simple calculation indicated that owning a car would not be a good financial decision for me. Owning a car would allow me to rent an apartment far from the campus, but it is unlikely to find an apartment that is cheaper than $439/mo NorthPointe.

Zipcar Nissan Altima Brenton

Arizona Driver's License

Fast forward to spring 2014, when my life at NorthPointe went downhill due to a noisy roommate. I signed a lease at my new apartment, and moving was put on the agenda. I moved from Grant Inn to NorthPointe on a taxi, at which time all I had was two checked bags and two carry-on bags. Three years later, I had accumulated many more things than that, and the taxi driver would be charging by minute while I'm loading my stuff into his trunk. Thus, I need a driver's license!

My Story with Sun Tran

Tucson is a "small" town. Compared to my hometown Shanghai, Tucson is 10 times smaller in land area, and has 3% of Shanghai's metro population. Nevertheless, Tucson is still the second largest city in Arizona. You can't reasonably walk to everything, so transportation is a necessity.

America is a country on wheels, but Tucson has a nice public transportation system, Sun Tran. During my six years at University of Arizona, I never bought a car, but used Sun Tran bus system extensively.

Sun Tran bus 3000

City Bus in Shanghai vs Tucson

American city bus system do not have a good reputation: vehicles are old, schedules are infrequent, and operating hours are limited. Nevertheless, the first transportation service I experienced in Tucson is the city bus, when I visited UA campus for the first time.

Floating in the Pool

As it's said, if a foreign student does not have a girlfriend, he would start physical exercises sooner or later, because he has nothing else to do.

RT @Dtiberium 顺便有个定律:来了美国的中国留学生如果没有女朋友,迟早会开始健身。道理很简单:他们实在没什么别的事情可干。

This is very true of me.

Before I Came to Arizona

When I was an undergraduate student in Shanghai Jiao Tong University (SJTU), although the university has a gym, it only has a few treadmills and ellipticals, and students must pay an entrance fee upon each usage. I never went to this gym. There was no swimming pool at SJTU, and a security guard once warned me not to swim in the lake, when I stepped one foot into the lake trying to feel the water temperature.

Roommates or Not?

Food, water, shelter, and warmth are the basic needs of human beings. Food is available in any restaurant and grocery store. Tap water is safe to drink, as I asked at the orientation. Warmth is not an urgent problem when I arrive because I have enough clothes in my luggage. The biggest problem is: housing!

There are two main housing options for University of Arizona students: on campus housing and off campus housing. If I live on campus, I can walk to class and enjoy all the good vibes, but the room is small and costs a ton of money. Thus, during my six years in Arizona, I lived exclusively in off-campus housing. This article describes the two apartments I lived in, shares my experiences of living with or without roommates, and includes reviews of NorthPointe Student Apartments and University Arms Apartments from a real tenant.

How I Evaluate Off-Campus Housing

When I started surveying off-campus housing options, I set a few requirements:

  • I must have my own bedroom. When I was an undergraduate in Shanghai Jiao Tong University, I shared an on-campus dormitory with three other boys. We lived in the same bedroom, went to class together, and were good friends. The dorm manager enforced strict rules such as "lights off" time. However, American off-campus housing has no such strict rules, so sharing a bedroom is going to cause roommate conflicts in the long term, and I'm not really into cohabiting.
  • I want to have my own bathroom. I saw too many TV episodes about how American kids make a mess in the bathroom, or spend too long time in the shower in the morning when I would need to go to class.
  • I prefer to have individual leases. Some property owners would rent out a big house to multiple students on one lease. If any tenant quits, the remaining tenants still must pay the full rent. I would not want to get into such trouble.
  • I can get to school without a car. Owning a car is too much hassle for me.

My First Days in Tucson

Six years ago, on Apr 12, 2011, I was admitted as a PhD student in the Computer Science PhD program at The University of Arizona. After a round of paperwork and an interview for the US visa, I flew from Shanghai, China to Tucson, Arizona on Aug 04, 2011. This was when it all began.

The Flight and Arrival

My uncle bought me an one-way flight ticket. I was booked on United flight 588 departing PVG at 20:10, transfering to United flight 6458 arriving TUS at 21:10. The time difference between Shanghai and Tucson is 15 hours, so this seemingly 1-hour flight route is actually 16 hours.

My dad drove me to the airport, with mom and grandpa also in the car. After saying goodbye to my family, an officer stamped my passport indicating that I had left China territory. I had two checked bags full of clothing and cookware, a duffle bag with more clothes, and a briefcase containing an old laptop. I also had thirteen $100 bills, a few $20 and $10 bills, and several quarter-dollar coins; this was all the cash I had.

say goodbye to grandpa


六年前,在2011年8月4日,我从上海飞赴美国亚利桑那州图森市(Tucson, Arizona),到亚利桑那大学(The University of Arizona)攻读博士学位。 六年后,我已经通过了论文答辩,正在准备毕业。


  • 我作为第一作者在各大学术会议上发表了三篇论文,并且出席了其中一次学术会议演讲了我的论文。
  • 我上了88学分的课程,保持了全A的优异成绩。
  • 我获得了三次奖学金,其中包括科学学院只授予最优秀的学生的Galileo Circle Scholar称号。
  • 我参加了国际学生协会(International Student Association)的社团活动,遇见了一批极棒的朋友,并曾担任该社团的干事。
  • 我开始了定期体育锻炼,包括游泳与负重训练。
  • 作为一项兴趣爱好,我开始了地谜藏宝。
  • 我观看了150余部电影。
  • 我享受了徒步登山、野营、皮划艇等户外运动的乐趣。
  • 我骑自行车或搭乘公共汽车走遍了图森每一个角落,参与了本地的各种节日庆典,并尝试了许多本地的餐馆。
  • 我前往加利福尼亚州、科罗拉多州、哥伦比亚特区、夏威夷州、马萨诸塞州、内华达州、纽约州、宾夕法尼亚州、田纳西州、得克萨斯州、犹他州、华盛顿州旅行。
  • 我考出了亚利桑那州驾驶执照,在波士顿、凤凰城、圣地亚哥、旧金山湾区、西雅图、图森和尤马开过租来的汽车。
  • 作为亚利桑那大学的留学生, 作为图森市的居民, 我感到很自豪。

English version

Six Years in Arizona

Six years ago, on Aug 04, 2011, I flew from Shanghai, China to Tucson, Arizona, and began my life as a PhD student in The University of Arizona. Six years later, I have defended my dissertation, and am on my way to graduation.

During these years,

In this month, I am going to write a series of articles about my life in Arizona, to record the good memories of the past six years.


How I Setup my NFD Development Machine

I'm the lead developer of NDN Forwarding Daemon (NFD). In this article, I want to share how my development machine is setup.

Everything in Virtual Machines

I do all NFD development work in virtual machines. There are many benefits in using VMs: I can have a clean operating system, I can test out different OS versions if necessary, and I can work on a different change on another VM when "my code's compiling".

My VM was setup using Vagrant, using the following Vagrantfile:

Measure Bike Speed with PocketCHIP and GPS Receiver

I won a #FreePocketCHIP last Christmas. It is a "pocketable" Linux computer running Debian, and has one USB 2.0 host port. Apart from adding a speaker and playing PICO-8 games, PocketCHIP's form factor and hackability make it suitable for many other projects. Today, I'm going to find out how fast I am riding a bike, with the PocketC.H.I.P and VK-172 GPS receiver.

PocketCHIP and VK-172 GPS receiver

Meet the GPS Receiver

The GPS receiver I have is the VK-172 G-mouse USB GPS receiver. It has a small form factor, and connects to the PocketCHIP via USB. When connected, it identifies itself as a USB device with ID 1546:01a7, and shows up as a serial port:

Alexa, ask UA Campus Rec when does the gym open?

I built an Alexa Skill, and got it published.

How I Learned Alexa Skill Kit and Why I Picked it Up Again

I learned about Alexa Skill Kit at Hack Arizona 2017, and built an incredibly complicated 520bus skill to query departure times of Sun Tran buses and Sun Link modern streetcar. I didn't win a prize, and quickly forgot about that.

A few months later, a tweet caught my attention: publish a skill, get an Echo Dot & Alexa dev swag. I always wanted to own a hardware device that integrates with Alexa. I considered the "practically free" Dash Wand, but gave up when I found out it is powered by batteries. I couldn't afford to buy an Echo, because I already spent all my money on those ESP8266 toys. However, I'm not going to miss a FREE Echo Dot.

How I Put a Temperature Sensor on the NDN Testbed

The frontpage of my recently renovated website shows a room temperature reading of my apartment. This is not your average IoT project, but a showcase of how an IoT device can communicate directly over Named Data Networking (NDN). This article explains where does this temperature reading come from, how is it turned into NDN Data packets, how the sensor appears on the NDN testbed, and how the temperature reading shows up on the website.

room temperature display on yoursunny.com frontpage

Sensor Hardware

If you have been reading my posts, you may have guessed that the temperature reading comes from an ESP8266. Of course! It is actually my very first ESP8266, which I received from Losant IoT Inc. It comes with a TMP36 analog temperature sensor, and has been reporting my room temperature to Losant platform since May 2016.

Losant Builder Kit with all the additions

How HomeCam Registers NDN Prefixes?

HomeCam, a browser-based home surveillance camera, is one of my major side projects during the past few years. My last post gave an overview on the overall architecture and various components of HomeCam. I mentioned that HomeCam delivers pictures via Named Data Networking (NDN), which provides better scalability because the camera only needs to serve each picture once even if there are multiple viewers, and the network takes care of the distribution.

Both HomeCam viewers and cameras connect to the global NDN testbed network via WebSockets. A viewer sends Interests to the network to request a picture from a specific camera identified by part of the Interest name. The network forwards the Interests to the named camera, and the camera responds with Data packets that contain the picture. But how does the network know where the camera is?

The camera must register its prefix onto the NDN testbed network.

For a regular end host running the NDN Forwarding Daemon (NFD), you may let the world reach your NFD via auto prefix propagation. This procedure involves sending a prefix registration command to the network, which causes the router to add a route toward the end host. A requirement is that the prefix registration command must be signed by a key trusted by the network.

HomeCam camera is a browser-based application that directly connects to a testbed router, and there is no NFD running local to do auto prefix propagation for us. However, HomeCam can still have a route added toward the camera by sending a prefix registration command.

How to Change the MAC Address of ESP8266?

Each ESP8266, like every other WiFi network interface card, comes with a MAC address that identifies itself to the network. Sometimes you want to change the MAC address of an ESP8266. How to do that?

ESP8266 has the built-in MAC address

ESP8266 Arduino core does not provide an API to change ESP8266's WiFi MAC address. While there is a WiFi.macAddress function, it actually retrieves the current WiFi MAC address, instead of setting it. However, Espressif SDK offers an API to change the WiFi STA MAC address:

Show Temperature and Humidity as WiFi SSID with ESP8266 and HTU21D Sensor

Since I started playing with ESP8266 WiFi microcontroller in 2016, I had a TMP36 temperature sensor. TMP36 is an analog sensor: it uses a voltage between 0.00V and 1.75V to represent a temperature reading between -50℃ and 125℃. The ESP8266 has an analog-to-digital converter (ADC) capable of reading voltages up to 1.00V. To read a temperature from TMP36 into ESP8266, I need to use a pair of resistors as a voltage divider, so that the resulting voltage does not exceed ADC's limit. However, I feel the temperature reading is very inaccurate: is my room really 19℃ when @TheTucsonHeat is in town? I once replaced the carbon resistors with metal film resistors, and the temperature reading instantly changed by as much as 8℃.

I need an upgrade to the temperature sensor! The new sensor must output digital signal, so that my lousy resistors wouldn't affect its accuracy. After comparing DHT11, DHT22, DS18B20, and several others, I eventually chose HTU21D-F because it has an I2C interface, which can be added directly to my LCD kit.

The HTU21D sensor arrives in the mail a few weeks later. It needs a bit of soldering to add the pin headers onto the breakout board; ImmodderNation has a soldering video to get you started. Afterwards, wiring is simple: just add it into the existing I2C bus! As long as you don't short the wires, you won't burn down the office.

HTU21D on I2C bus of ESP8266

A quick test with Adafruit's library confirms the HTU21D sensor is working correctly. Temperature and humidity readings are showing up on the serial console. However, I don't want to tug around the laptop to measure temperature around the house, and don't want to program the LCD or connect to Losant or NDN right away. I thought up a quick and easy way: let's create a Wi-Fi hotspot from the ESP8266, and show temperature and humidity as the WiFi network name (SSID)!

How to Deduplicate BibTeX Entries?

I'm writing my dissertation recently. My dissertation is a combination of several publications from my PhD career. Therefore, part of my dissertation writing process involves copy-pasting the papers together into a single document.

Like any good academics, I typeset my publications with LaTeX, and use BibTeX to incorporate citations into the documents. My collection of bibliographies is fairly ad hoc: during each writing project, I search for related work to cite in my paper. Unlike most others, I create a separate bib file for each BibTeX entry named after the citation key. For example, I would have bib/ndn-tlv.bib for a BibTeX entry named "ndn-tlv", and bib/Mininet.bib for the "Mininet" entry. This allows me to find available citation keys with a quick glance over the bib/ directory. My build process then concatenates these small bib files into ref.bib as an input to BibTeX.

My dissertation combines all my publications, and thus needs a union of BibTeX entries from those combinations. To make this union, I can copy all these single-entry bib files into the same directory. If two previous papers cited the same reference, their bib files should have the same name, and only one copy would be left in the combined directory.

Except that the above assumption is true only if I cited the same reference with the same citation key. And so I discovered a citation appearing twice in my dissertation:

duplicate references in dissertation

How HomeCam Works?

HomeCam, a browser-based home surveillance camera, is one of my major side projects during the past few years. HomeCam allows you to capture pictures via the webcam on a laptop or smartphone, and view real-time images from a different device. No specialized hardware or software installation is needed: HomeCam works directly in a web browser. This article gives an overview of the web technologies that enable HomeCam.

If you have not used HomeCam, try it today!

Functionality Review and General Workflow

The HomeCam web app can operate in either viewer or camera mode. To enter either mode, the user is required to specify a "camera name", which serves as an identifier. Each camera should have a distinct camera name. Any number of viewers can be active at the same time, and they will retrieve real-time pictures from the camera with the same camera name.

Under the hoods, this works in three steps:

yoursunny.com is in Git and Completely Rebuilt

I started making websites since 2001. This website, yoursunny.com, started in 2006. In the past 11 years, I've rebuilt the site several times, switched from ASP to PHP, and moved from Windows dedicated hosting to shared hosting and eventually to Linux VPS. So far, every time I want to perform a major edit to the website, I copy original versions of affected files to a backup folder on my computer, and then go ahead to do the edit. After having tested the modification locally, I upload changed files via FTP or SFTP to the server. One constant worry over my head is, what if I lose all the files on my computer, and my hosting provider vanishes so I can't get them back? Another headache is, sometimes I may make an edit incorrectly, but I couldn't revert it back because I didn't copy the original files to the backup folder as I determined the change wasn't "major" enough to warrant a backup.

During my studies at University of Arizona, I learned a useful tool called git. Git is a source control system: it allows developers to create a repository and put source code into the repository, and will automatically keep track of all the edits applied to each file. By putting website source code into a git repository, I can find out what modifications I've performed to each file over time, regardless of whether it is "major" or "minor". Additionally, I can synchronize the git repository with a remote git server, so that the server has a copy of my website, including edit histories as well. This would solve both the worry of losing files, and the headache of not having an earlier version to revert to in case of an incorrect modification.

After delaying this projects several times, I am finally determined to move yoursunny.com into git repositories in Apr 2017. At the same time, to keep the website source code as clean as possible, I decide to try out two new technologies: static site generators and Composer. That is, I would rebuild yoursunny.com, copying page by page, into a new website stored in git repositories.

I spent about 2 months for this rebuild/move, and I'm happy to announce that yoursunny.com is now under source control.

Main Site with Composer

How to Access Gogo Inflight WiFi on American Airlines for Free?

Gogo offers WiFi Internet access on American Airlines domestic flights within United States. The Internet services are provided through Air-To-Ground (ATG) technology: a cellular radio network of over 200 towers in North America points their antennas to the sky; a Gogo-equipped airliner connects to one of these cellular towers, and provides Internet to passengers via WiFi. Pricing for Internet access via Gogo in-flight WiFi starts at USD 4.95 for 30 minutes.

gogoinflight airborne splash page

American Airlines and Gogo also provide inflight personal device entertainment through the same gogoinflight Wi-Fi signal. This service is free of charge, and allows passengers to watch movies and TV episodes on their own smartphones and tablets. Presumably, contents are pre-downloaded to a server located inside the aircraft, and therefore accessing those contents do not consume radio bandwidth.

Rogue One: A Star Wars Story movie provided on gogoinflight

While watching videos are permitted during the flight, Gogo does not want passengers to download these copyrighted movies for watching later at home. Therefore, users must have the Gogo Entertainment app on their mobile devices in order to watch movies. The app is compatible with the Digital Rights Management technology used in the entertainment server, to ensure that the movies can be watched for free, but cannot be (easily) downloaded. But what if the device does not already have the Gogo Entertainment app?

reboot-into.sh: Fast Operating System Switch for BerryBoot

BerryBoot is a bootloader for Raspberry Pi, allowing multiple operating system images to be placed on a single microSD card. It displays a menu upon system boot, so that the user can choose which OS to load.

I use a Raspberry Pi 3 as my primary desktop computer. It loads Ubuntu Mate 16.04 by default, in which I can code, read, and write dissertation. The same computer is also equipped with RetroPie, as my gaming machine playing FreeDoom.

One problem I'm frequently facing is: in order to switch from work mode to game mode, I must reboot the machine. Shutting down Ubuntu Mate can take as little as 10 seconds, or as much as 3 minutes, depending on luck. I hate to stay with the machine while it's rebooting, but if I walk away, I may miss the 10-second window in which I should select RetroPie from the BerryBoot menu, before it loads the default, Ubuntu Mate, automatically.

A less known feature of BerryBoot is its runonce file. You may have BerryBoot to load a specific image at next boot by writing the image name to data/runonce file in BerryBoot partition. This works particularly well if the Raspberry Pi is headless and does not have a keyboard, but it requires 5 steps and requires typing the full image name in the runonce file.

To simplify this process and quickly switch to another operating system in BerryBoot, I wrote a little script:

"freewifi" via ESP8266 Captive Portal

Many outdoor places do not have permanent Wi-Fi access points. Occasionally I can get a weak unencrypted WiFi signal from a nearby shop; otherwise, I'll have to face the fact of not having WiFi, and resort to my slow and expensive SIM card for cellular Internet access.

Since I learned that the ESP8266 can serve as a WiFi hotspot, I got an idea. I can make the ESP8266 as a Wi-Fi access point (AP), and provide free WiFi to everyone at the outdoor venue. Except that, this is a freewifi prank: I am providing free WiFi, but my WiFi does not offer Internet access.


ESP8266 makes a freewifi WiFi access point SSID:

freewifi SSID

Install OpenConnect VPN Server with Trusted Certificate from Let's Encrypt

OpenConnect VPN server, or ocserv, is an SSL VPN server compatible with Cisco AnyConnect. It can easily be installed in a cheap OpenVZ Virtual Private Server (VPS) with TUN capability. However, most online tutorials for installing OpenConnect VPN server rely on certtool to generate a self-signed certificate via OpenSSL. Afterwards, since the self-signed certificate is not trusted by operating systems, either the VPN client must be configured to skip certificate checking, or the self-signed certificate must be imported as a trusted certificate on the VPN client machine. Both practices are insecure. Bypassing certificate checking would allow an attacker to impose as the VPN server. Importing a trusted certificate does not seem wrong at first, but in case the private key is compromised, an attacker would be able to impose as any server to the client, including online shopping and bank websites, using a certificate signed by that private key. Remember that the self-signed certificate's private key is stored on the VPS filesystem, it is much less secure than Hardware Security Modules used at real CAs to store private keys, and therefore it is a bad idea to trust such certificates in client machines.

Let's Encrypt is a free, automated, and open Certificate Authority (CA). It allows anyone to obtain a domain-verified certificate within minutes, and without paying anything. Certificates from Let's Encrypt are trusted by most modern operating systems. They are ideal for securing an OpenConnect VPN server.

This article explains how to request a proper trusted certificate from Let's Encrypt for use with ocserv, how to install OpenConnect VPN Server and use the Let's Encrypt certificate, and how to configure Cisco AnyConnect client to connect to ocserv. These steps are verified with an OpenVZ Ubuntu 16.04 64bit VPS provided by SecureDragon. It is required to enable TUN devices for the VPS, typically through a button in SolusVM or other control panel provided by the hosting company.

Request Let's Encrypt Certificate for OpenConnect VPN Server

Before requesting a certificate from Let's Encrypt, you must have a Virtual Private Server with an IPv4 address, and have a domain name (could be subdomain) resolved to the server so that you are able to ping the server via the domain name.

ndnping Jewelry on ESP8266

I was wearing a unique piece of jewelry at NDN community meeting, Mar 2017: a pair of ESP8266 units that communicate with each other over the NDN testbed. They are ugly, but it is a nice way to demonstrate my creation in a Named Data Networking community meeting.

Two Witty Cloud boards are tied to my wrists, and powered by a USB powerbank in my pocket. One of them runs a ndnping client, and the other runs a ndnping server. The client sends Interests to a router in Arizona, the Interests (under a multicast prefix) are flooded through the testbed, and reach the server which is connected to a router in Memphis.

Arduino Code

Library: esp8266ndn