Chromecast, the Pixel 2, and MDNS

There have been widespread reports of some network issues for users with a certain brand of consumer router, Chromecast / Chromecast enabled devices, and Pixels.  I’ve been having sporadic WiFi issues for a few weeks to a month.  I finally but 2 and 2 together. I have a number of Google devices in my house (a lot..perhaps too many 🙂 ).

  • Google WiFi mesh router system
  • 2 Chromecast audios
  • 3 Chromecast dongles (2 1st gen, 1 2nd gen)
  • 2 Android TV devices, Nexus Player running Android Oreo and a Xiaomi MiBox running Android 6
  • 3 Google Homes, 2 normal, 1 mini

I also use a Google Pixel 2 XL as my main device. I have several test devices as well. A problem I’ve been having for a while now is when I wake my Pixel up I lose my WiFi connection. It happens very sporadically. It’s annoying. There are also times when my Nexus Player loses its WiFi connection. In both instances, the WiFi connection is re-established, but it makes things like streaming video or controlling streaming video (via Chromecast) a nuisance.

I’m also an Android developer by day and have ADB Logcat open at all times. I use a Nexus 6 running Android 7.1.1 as my primary test device. Periodically, I’ll see the following group of log statements printed in Logcat, for my Nexus 6.

I/DeviceScanner: [MDNS] Received response from "Cast Device 1" (-----------) with result "0 No change"
I/DeviceScanner: [MDNS] Received response from "Cast Device 2" (-----------) with result "0 No change"
I/DeviceScanner: [MDNS] Received response from "Cast Device 3" (-----------) with result "0 No change"
I/DeviceScanner: [MDNS] Received response from "Cast Device 4" (-----------) with result "0 No change"
I/DeviceScanner: [MDNS] Received response from "Cast Device 5" (-----------) with result "0 No change"
I/DeviceScanner: [MDNS] Received response from "Cast Device 6" (-----------) with result "0 No change"

Note: I did mask my device names and MAC addresses in this snippet.

These are MDNS requests being logged by my Nexus 6 as they are received. I don’t have significant network experience or a deep understanding on how Chromecast really works at the network level. It appears, to me, that every 20 seconds or so, all of my Chromecast and Chromecast enabled devices send an MDNS packet announcing their presence on my network to devices that can utilize them, like Android phones and Google Home.

In fact, TP-Link, a router manufacturer, has come to the following conclusion:

This issue stems from these devices’ “Cast” feature, which sends MDNS multicast discovery packets in order to discover and keep a live connection with Google products such as Google Home. These packets normally sent in a 20-second interval. However, we have discovered that the devices will sometimes broadcast a large amount of these packets at a very high speed in a short amount of time. This occurs when the device is awakened from its “sleep” state, and could exceed more than 100,000 packets. The longer your device is in “sleep”, the larger this packet burst will be. This issue may eventually cause some of router’s primary features to shut down – including wireless connectivity.

So obviously there’s a problem here. Today I noticed, when I power on my Pixel 2 XL running Android 8.1 (w/ January security update), things get pretty crazy. My Nexus 6 seems to log over 1,000 MDNS responses in a 40 second timespan. With my limited networking knowledge, I don’t really know if anything is wrong, but it seems that something is out of wack. It also convenient that I tend to drop my WiFi connection, on my Pixel 2 XL at this time (when my Pixel is powered on from sleeping).

Running Wireshark on a computer verifies what I see in Logcat.  A gargantuan amount of MDNS activity upon powering on my Pixel can be seen.  It also stops when I put my Pixel back to sleep.  Waking my Nexus 6 up doesn’t result in the same amount of MDNS activity.

Something is probably wrong here.  I can’t identify it specifically, but this is just another data point.

// The Comment #10: I should be doing more

The Comment is a weekly digest of the stuff that grabbed my attention or occupied some part my mind during the past week. Normally, it’ll be one thing that’s really been on my mind, followed by a handful of things that I found interesting. The Comment will be published each Monday at 10:30AM EST. 

Thanks for reading.

## I should be doing more

This a short entry this week and a little personal. It’s a weird feeling to know you can do more, but you’re not, and you know that. I should be doing more and having more of a positive impact on society and culture. On the basis of using my talents and abilities to lift up the next person who may not have the same.  I’m talking about my abilities to write code, put things on the Internet, general handy-ness, time, attention, and effort.

I came to his conclusion recently, but I have been heading down this mental road for a while.  This is something I’m going to resolve in 2018.

// More North Carolina Districting Shenanigans

From The Washington Post:

A federal court on Tuesday ruled that Republicans in North Carolina unconstitutionally gerrymandered congressional districts in 2016 to ensure Republican “domination of the state’s congressional delegation.”

The three-judge panel struck down the map and ordered the state’s General Assembly to come up with a substitute by Jan. 24.

The decision was the first striking down of a congressional map, as opposed to a state legislative map, on the grounds that it was rigged in favor of a particular political party. Redistricting has historically been political and partisan to one degree or another.

Oh look, a federal court struck down another set of maps drawn up by the North Carolina Republican Party. This time, it was the congressional maps…the ones that determine the districts of our Congressional representatives.  As a resident of North Carolina, its getting a bit ridiculous that Republicans continue to draw gerrymandered legislative (and soon to be judicial) maps.  It seems like the kind of thing you do when you know your time in power is coming to an end.

// A Spectre and a Meltdown Walk Into a Bank

Paul Miller writing for The Verge:

You walk up to the door and you don’t go into the bank. In the parallel reality where you do go into the bank, you enter the vault and look at the piece of paper. You read the password and whisper it quietly before you get shot dead.

In the reality where you don’t go into the bank, you own a highly elaborate listening device which can hear your parallel self’s whispers. Now you know Ashley’s Netflix password, and can enjoy all manner of original content at her expense.

This banking analogy is one of the more accessible explanations on what the Spectre and Meltdown bugs are. Spectre and Meltdown are a set of bugs that affect a ton of computers and other devices running Intel, AMD, and ARM processors. As someone who’s actually studied processor design in my college days, many many years ago, I cannot explain why Spectre and Meltdown are such a big deal, but they are.

/* fini */

// The Comment #9: Aye, Yo…TrafficFlow?

Bone chilling temperatures, but a dope sunset.

The Comment is a weekly digest of the stuff that grabbed my attention or occupied some part my mind during the past week. Normally, it’ll be one thing that’s really been on my mind, followed by a handful of things that I found interesting. The Comment will be published each Monday at 10:30AM EST. 

Thanks for reading.

## What’s up with TrafficFlow?

TrafficFlow was a side project I took on to deepen my understanding of machine learning and TensorFlow with some hands on experience. I started out with the goal of being able to train a neural network to tell me if an image from a traffic camera shows traffic congestion. Initially, I did not think that this was an ambitious goal, but it turns out it’s more challenging than I initially thought. I started this project in the summer of 2017 and just got around to training a neural network on the collected data. I haven’t reached my goals, but I have a few takeaways.

Where am I at now?

I have done a first pass at training a neural network with the data I collected and classified.  The Keras code I am using is very similar to a tutorial that walks through training a neural network to recognize cats and dogs.  The network tells me there’s congestion in every image I run inference (prediction) on, even in some of the classified training and validation data. Something is very wrong.

Went well – Programming things

Part of the reason TrafficFlow got off to a great start was because I scripted the data collection aspects. I wrote an Android app for the classification stage. Finally I scripted the data preparation steps. All of the manual work was configuring the neural network (more on this in a later article) and using the app tp classify the data.

Not so well – Data is Key!

The largest portion of TrafficFlow was data collection and classification. I setup a script that automatically saved an image from a traffic camera every 3 minutes. The script worked flawlessly. The challenge I immediately experienced was dealing with data from rotating cameras. I wanted to add a few constraints to minimize effort, one being I would train a neural network to recognize congestion on one side of a street or highway during the daytime. It was really easy to throw out images captured at night. It wasn’t as easy throwing away data from a rotated or zoomed camera. The cameras never returned to the previous position perfectly. Sometimes it would be off or zoomed in (or out). I had trouble determining if I should keep this sample or toss it.

Another challenge I experienced was the lack of data. I captured over 9,500 images. This was not enough. Over half of these images were thrown out because it was night or the camera’s perspective changed. When it came time to train, I had ~270 samples of data showing traffic congestion and ~2,500 samples of data containing no traffic congestion. I estimate that I’d need a magnitude or more of data, (2700 samples of congestion, 25000 samples of no congestion) for me to have a shot at a reasonably trained network.

Where do I go from here?

I’ll need to really dive in to the configuration of my neural network. I re-purposed a configuration from a tutorial thats used to determine whether or not the picture has a cat or dog in it. I have a hunch that I’ll need something more purpose built.  This is the reason why I got into this side project, to really understand why I would use certain configurations of a neural network over another.

In the mean time, I’ll be uploading the scripts and code I wrote to Github sometime this week.

In the meantime, enjoy a time-lapse generated from the collected data.

/* fini */

// The Comment #8: Happy New Year

The Comment is a weekly digest of the stuff that grabbed my attention or occupied some part my mind during the past week. Normally, it’ll be one thing that’s really been on my mind, followed by a handful of things that I found interesting. The Comment will be published each Monday at 10:30AM EST. 

Thanks for reading.

# A few favorites

Here are just a few things that stood out for me in all of 2017.


Kente cloth making in Juaben, Ghana

I traveled to Ghana in March 2017 with my family.  We spent some time in Accra, Kumasi, Takoradi, and a few places in between.  We toured two former slave castles, walked the canopy bridge, and had dinner at a hydroelectric dam.  It was a fantastic trip with a lot of great people, food, experiences, and provided me with a different perspective and worldview.  I look forward to making a few more trips to Ghana.


I read a handful of books in 2017, but my favorite was definitely The Color of Money: Black Banks and the Racial Wealth Gap by Mehrsa Baradaran. Mehrsa documents the numerous economic systems and policies that contributed to the wealth gap between black and white families (and banks) including slavery, sharecropping, Jim Crow, The New Deal, and more.  I will write more on this in the future, but it’s a good, eye-opening read, especially in light of our regressive tax policies going into effect today.

Runner Up: The New Jim Crow


“Mic check, one, two, one, two!”

The Joe Budden Podcast easily turned into my favorite podcast in all of 2017. It’s a hip hop based podcast where Joe, Rory, and Mal chat about news and events in the culture.  It’s hilarious.  Warning: It’s definitely NSFW.

Runner Up: Uncivil

Internet Reading

I’ve been reading James Clear for a couple years now.  2017 is the year where I put some of his lessons into practice. presents an infrastructure for achieving your goals and desires for a better personal life by showing you how establish and consistently follow through on your habits.  All of his recommendations and tips are backed by science.  I found that just buying into a system to be critical, for me, for moving the ball forward in 2017.


Source: CNET

There were a few things here that I could have chose, but the one thing that has had a effect on my life is the camera on the Pixel XL & Pixel 2 XL.  I take a lot of pictures, most of them being of my family.  I used to take “good” pictures with a Sony NEX-6 digital SLR camera.  The NEX-6 takes great pictures, but its big, bulky, and has middling battery life.  Starting with the Pixel, and now the Pixel 2, I’ve begun capturing some of life’s most precious experiences with these devices because the camera is that good.


“Laila’s Wisdom” by Rapsody.  Laila’s Wisdom is the entire package, great production, great lyricism and storytelling, great features, and great artwork.

// Bitcoin vs. LiteCoin vs. Ethereum

Here is a good explainer on the differences between Bitcoin, LiteCoin, and Ethereum.

/* fini */

// The Comment #7: In your inbox soon

Probably flying south soon…

The Comment is a weekly digest of the stuff that grabbed my attention or occupied some part my mind during the past week. Normally, it’ll be one thing that’s really been on my mind, followed by a handful of things that I found interesting. The Comment will be published each Monday at 10:30AM EST. 

Thanks for reading.

## Email Newsletter

I’m going to be turning this into a newsletter in 2018.  More on that in a few weeks. 👀

// How many ISPs are in your neighborhood?

Recode posted an interesting interactive map showing the number of broadband providers in different parts of the country.

Broadband penetration in Raleigh. Darker the blue, less choices available for broadband.

Unsurprisingly, those living in rural areas have fewer choices for broadband than those in the suburbs and the cities. Additionally, the wealthier zip codes tend to have more choices for broadband than poorer ones do. An issue with the rollback of the Title II classification for ISPs is that it opens up the potential for ISPs to implement pricing schemes or network practices that will inevitably be detrimental to rural and poor citizens. They simple won’t be able to change ISPs. The next generation of work is definitely leaning towards the Internet as a requirement. There’s a significant portion of the population who’ll be cut out of that.

// 60 Books, 10 Lessons

Seyi Fabode shared a list of 10 lessons and themes from the 60 books she read in 2017.  There are some good ones here. It’s also a great starting point if you are looking for somethings to read as you head into 2017.

// Fighting Depression and Imposter Syndrome

Wayne Sutton wrote a pretty powerful piece on how he recognized and fought depression and imposter syndrome. A lot of his experiences feel very familiar to me:

Discussing mental health has always been a taboo in America, in tech and especially in the black community. Historically, conversations around mental health are seen as a weakness. As a black man, the stereotype is to be emotionally and physically strong. You never cry, never complain, you survive, you endure. Showing any sign of weakness says that you’re soft. While growing up, I never used words such as empathy, or compassion to discuss my feelings. If I didn’t feel well emotionally, often the solution was religion, medicine or outdoor activities, aka avoidance. Very few times, if any, would I hear, ‘why are you thinking a certain way or feeling a certain way’. The concepts of self-awareness and emotional intelligence were not part of my upbringing.

Growing up, the tools and methods to properly discuss and handle emotions are not available. A lot of the time you are told to push through it, but rarely do we seek to understand why we feel a certain way. This leads to the lack of self-awareness and emotional intelligence Wayne talks about.

/* fini */