Sunday, 17 April 2016

Android Phone Not Connecting via DHCP

I had a weird problem where suddenly my phone stopped connecting to my home WiFi. I was getting the WiFi icon with the exclamation mark, meaning that the router was connecting but I wasn't getting all the info needed to participate in the network.

(The solution further down doesn't require you to understand the next couple of paragraphs, so don't despair if there's too much tech talk in what follows.)

Many posts on-line suggested using a static connection. I was able to do that at home, because I knew the range of DHCP addresses that my router would not give out. But I wasn't satisfied with that solution. I hate it when problems mysteriously arise, and I couldn't identify any reason why my network connection at home should have suddenly started failing.

About the third time I looked for a solution, I came across this document from Princeton. It mentions that there's a bug in some Broadcomm chips that messes up DHCP when the network stays on when the device is asleep.

Well, I remember noting that I had my network configured to stay up when the device was asleep. I noticed it because I didn't think I had configured it that way. (I sometimes find my phone on the settings screen when I pull it out of my pocket, and settings are accidentally changed.)

So (here's the solution), I went back to Settings-> WiFi, then touched the three dots near the top right of the screen, then Advanced, then I turned off "Keep Wi-Fi on during sleep", which set my network to go off when the device sleeps. After that, my phone connected to my home network just fine.

My phone is a Nexus 4, running Android 5.1.1, but obviously this might affect other models since it looks like it's because of the hardware.

Saturday, 9 April 2016

Installing a Brother MFC9340CDW on Ubuntu 14.04

The printer install was easy. Just follow Brother’s instructions, which at the time were at: Brother seems to change the location of their documents. A lot of the links on the net were broken.

The trick was when I installed on the second computer. It couldn’t find the printer. Once it woke up the printer, then I was able to install.

(I think I saw some references to wake-on-lan being an issue. I haven’t had a chance to look into it.)

As usual, installing the scanner was a bit of an adventure. I did the instructions here:

and this:

sudo usermod -a -G lp <username>
sudo usermod -a -G lp saned

and rebooted, and it still didn’t work. But then I just ignored it for about eight hours and did some yard work and cooking, and scanning worked. Go figure.

It’s sure nice to have double-sided scanning and printing. One trick with xsane and double sided-scanning is that you enter the number of page sides you’re going to scan, not the number of physical sheets of paper. In other words, when you’re scanning three pieces of paper double-sided, tell xsane that you’re scanning six pages.