Tuesday, February 26, 2013

Keeping a smartphone from dropping the wi-fi connection

This is a "note to self" post covering what I've tried to keep my phone (a Motorola Atrix MB860) from repeatedly dropping and reconnecting to my wireless network.

* Connecting to Wireless G seems more stable than N (probably varies with the router) - on my dual-band router I have the two bands set up as Wireless G and Wireless N networks with different SSIDs for identification.

* Change router DHCP lease time changed from "forever" to the next longest time available ("two weeks" in my case) - I recall reading that "forever" is actually sent as a really large numeric value that is not properly handled by some devices - it instead overflows into a really small value.

* On the phone:
* When you want to stay connected, set Battery Mode to Performance. Depending on the application (such as Netflix or Hulu Plus) you will also want to keep the display from sleeping (set Display Timeout to Never).
* Additional settings I set:
* In Wi-Fi Settings uncheck the options to auto connect to "AT&T Wi-Fi Hot Spot" - I think this reduces the phone scanning for other wi-fi networks and possible switching when you're already connected to your preferred/home network.
* Uncheck Network Notification > Open Network and Secure Network - again, I think this reduces scanning for other networks.
* In Wi-Fi Networks, remove the Wireless N network and set up the Wirless G one to make sure we connect to the preferred one.

So far so good - my phone has not dropped my wi-fi connection while I was using it over the last two days.

Tuesday, February 5, 2013

Changing the Berryboot selected OS on a keyboard-less Raspberry Pi

If you're using Berryboot on your keyboard-less Raspberry Pi, here's how to switch to another OS on reboot, based on the instructions from the Berryboot thread here:
1. Login to SSH
2. Mount raw storage:
mount /dev/mmcblk0p2 /mnt
(I suppose the actual mount point doesn't matter)
3. Check what the full file name of the operating you would like to run is:
ls /mnt/images
4. Write out the desired image file's name to "runonce"
echo "[filename_of_operating_system].img[memsplit amount]" > /mnt/data/runonce
Oddly, this command line above kept giving me permissions errors, even when prefixed with "sudo" - I had to use "sudo su" first and then it worked.
5. reboot
Note that this will only change the booted OS for the next reboot. You could probably change the default by changing the 4th step to the following:
echo "[filename_of_operating_system].img[memsplit amount]" > /mnt/data/default