Tag Archives: software

Woofi and finding an access point

Wi-Fi Alliance logo

Image via Wikipedia

One of the main points of an app like woofi is to conserve battery life, so implementing features in a resource-conscious manner is paramount.

Of course, the biggest thing we do is make sure the WiFi radio is on for the smallest amount of time possible.  This brings us to the first trade off we have to juggle.  We can’t know for sure if we want the WiFi radio to be turned on without turning it on and checking for available access points.  If we turn on and then connect to an access point, all is good.  If we turn on and there is no access point to connect to we just wasted a bit of your battery life.

What we want to do is turn on the WiFi radio and then only stay on for the absolute shortest time possible.  The problem is this:  we don’t know what the shortest time possible is!  Some Android devices and some access points take longer than others.  If we only turn on WiFi for 5 seconds and then decide no access point is available, but your device and access point normally take 10 seconds to establish a connection we’ve failed the user.

Our solution to this is to pick a reasonable default time, and allow the user to increase it if they have a slow-to-connect access point.

woofi, a location-aware WiFi switcher for Android devices.

Woofi

My most recent project is an app called woofi.  Let me quote the apps description from its market page:

Simply put, with woofi you define locations like “home”, “work”, or “Joe’s house”, and woofi turns your WiFi radio on when near those points and off when not.

More detailed explanation:

Say, for example, that the only place you connect your phone to WiFi is at home. This means you don’t need for the WiFi radio in your phone to be on when you’re not at home. The rest of the day it’s just sitting there trying to connect to access points and wasting battery.

With this app you would save your “home” location (and wherever else you connect to WiFi regularly…like at the office), and the app would keep track of your location throughout the day and when you weren’t near these saved locations turn your WiFi radio off, and then when you were near them it would turn your WiFi radio back on.

You can, of course, simply turn the WiFi radio on and off manually when you are at-home/not-at-home, the only purpose of this app is to automate doing this for you. I always forget to do this manually…thus the idea for this app.

Most people seem to leave their WiFi on all the time and not realize that it’s on because it just connects to networks that they’ve connected to before automatically.

Here’s what normally happens without this app: Once you’ve connected to your home (or office, or wherever) WiFi, Android will just connect to your home WiFi every time you’re in range. The only way it knows to do this is because the WiFi radio in your phone is on all the time looking for WiFi networks to connect to.

This app replaces that procedure by checking your phones location and leaving the WiFi radio off unless it is needed. Doing this saves battery life.

Coming soon expect some posts about the logic and trade offs made in the development of this app.

Toggle Caps Lock with program.

Someone wanted a program to toggle the Caps Lock key on Windows. Here you go! Each time it’s run it just changes the state of the Caps Lock key.

Easier switching of sound devices in Windows with Soundswitch 3.0dev1.

I’ve got a beta-quality release of Soundswitch available now.

You can also peruse the source code.

The big changes for 3.0 are as follows:

  • Configure Source1 and Source2 via tray icon.
  • Select current active sound device from tray icon.
  • Single left click of tray icon switches between Source1 and Source2
  • Rewrites of core parts to reduce bugs and increase speed.

Please let me know about bugs.

A hotkey to switch between headphones and speakers. Soundswitch.

I use USB headphones. I also use regular speakers connected to my sound card. Windows makes it a multi-step process to switch from headphones to speakers.

I tired of this, so I wrote a program to rectify the situation and I called it Soundswitch because I’m a wordsmith. You can find this program here:

Available here.

Basic Use and Installation

Unzip it to the directory of your choice.

Look in the Sound applet in control panel to see which two sound devices you want to switch between. In the following image, the two I switch between are labeled 1 and 4. Thus, in the ini file, I used 1 for Source1 and 4 for Source2.  Update:  Note that the number of items will vary based upon whether you have “Show Disabled Devices” and “Show Disconnected Devices” checked (Right click anywhere in the list to see these).  For the purposes of Sound Switch make sure both options are checked before counting the items. The screenshot below doesn’t reflect this.

sound_panel

The ini by default has the switch key assigned to Ctrl-Alt-F12. Edit this as you like.

Tested on Win7 x64 and Vista x32.   Update:  XP no longer works with the latest updates.  Use this older version for XP compatibility:  soundswitch

Any comments on this are welcome and I’ll try to fix any bugs reported.

Version 2 Notes

I’ve added a good number of features in the latest version. All accessible through the .ini file.

  • “Scroll” through each enabled item in your Sound panel.
  • Hide the tray icon
  • Switch between two speaker configurations for your current active playback device
  • Switch/scroll just the default comm device, default playback device, or both
  • Hotkey to terminate the program

How I recovered my photos and much of the metadata with a few tools (Part 1)

There I was looking to centralize all the storage in my house on a Windows Home Server. I have 8 hard drives that were scattered among 4 PCs and it was just getting impossible to manage in any sane way. As part of this process, I was taking all but one of the hard drives out of each PC while at the same time carefully managing the process of backing the important data on each one into the free space amongst the others.

The Problem

Where I ran into problems is when I went to bed one night during this process. When I woke up the next morning I forgot that I hadn’t finished completely backing up one of the most important hard drives in the house. So, I went ahead with my plan and formatted it.

Big mistake.

It was a little while before I realized what I had done and by the time I did realize it, I had already installed a fresh copy of Vista on it and a few applications. As anyone who has tried to recover data before will tell you, the first thing you should do after accidentally formatting/deleting data is immediately stop writing data to the hard drive!

This hard drive contained all of our personal photos. While the fact that these were personal photos was bad enough, what was even worse was that a huge portion of them (gigabytes) were photos that my wife had spent countless hours manually scanning in and she was in the process of organizing and labeling them.

Getting the data back

So, after realizing my error, I immediately shut off the computer and removed the hard drive.  While I knew the general ideas behind data recovery, I wasn’t really aware of what I should do next, so I hit the internet and did some research.  After awhile I decided to put the hard drive into another PC and try out some various utilities I had come across to scan it and see what kind of data could be recovered.  This turned out to be an exercise in frustration, as all the tools I used just turned out reams of information that would of taken me years to go through and find anything of use.

I was beginning to brace myself for the inevitable storm that would follow after telling my wife that all the photos were gone.  At this point, a friend of mine pointed me towards a tool called PhotoRec.  At a high level, PhotoRec operates like many data recovery tools in that it looks at the unused space on your hard drive for orphaned data, which is often the data you had on their previously.  Where PhotoRec saved me was that it was written specifically to recognize photo data, which saves me from being buried in a mountain of information.

Since we had thousands and thousands of photos, I don’t really have any way to know if any of our photos were lost, but PhotoRec recoverd so many (after 6+ hours of processing) that it seems like I have our whole library back.

In my next post on the subject, I’ll talk about how PhotoRec wasn’t all I needed.

See part 2 of this post here.