Oct
10
2011
0

Virtual WiFi Access Point Configuration in Windows 7

P1120417-w600-h900.jpeg

Configuring a virtual WiFi access point with my netbook in Windows 7 turned out to be easier than I expected. I boot into LINUX and tether the netbook to the internet over a bluetooth connection to my Blackberry regularly, but I’ve not tried it under Windows 7. This hasn’t been required, until now.

Occasionally, when we travel abroad we rent USB cellular data cards to track the weather and keep in touch. I’ve yet to find a card or service that works predictably with my LINUX kernel of choice. Sadly, this drives me into Windows 7.

You can do this from the command-line. Open a command line with administrative privileges and type:

	netsh wlan set hostednetwork mode=allow ssid=NAME key=PASSWORD

Replace ‘NAME’ and ‘PASSWORD’ with something that makes sense to you and your users will remember. Start the access point with this line:

	netsh wlan start hostednetwork

Stop the access point with this line:

	netsh wlan stop hostednetwork

You can share an existing connection to this interface by going to the ‘Properties’ of a connection, select the sharing tab and enable ICS by choosing the corresponding virtual WiFi adapter.

While this has a certain stark elegance, it is a bit involved and requires more steps than you might want to do on a daily basis. There is an Open Source option that simplifies this considerably.

Virtual Router is a free, open source software based router for PCs running Windows 7 or Windows Server 2008 R2. Users wirelessly share any internet connection (Wifi, LAN, Cable Modem, Dial-up, Cellular, etc.) with any Wifi device (laptop, smart phone, iPod Touch, iPhone, iPad, etc.) Devices connect just like any other access point using WPA2 encryption.

I’ve found this to be pretty handy. What do you use?

(See also: virtual router)

Written by kunau in: tools
Feb
23
2011
0

Broadband tests and remembering Richard Hamming

Minneapolis-20110223-00016-w600-h900.jpg

I spent the afternoon testing internal cabling looking for a transient error. It now looks like we have the bit error rate (BER) under control, BER both pre and post test are now 1.0E-9. The FEC reference in the image refers to forward error correction (FEC) first introduced by American mathematician Richard Hamming who pioneered this field in the 1940′s.

According to wikipedia and what I remember from the Tanenbaum and Stevens books: FEC gives the receiver an ability to correct errors without needing a reverse channel to request retransmission of data, but this advantage is at the cost of a fixed higher forward channel bandwidth. FEC is therefore applied in situations where retransmissions are relatively costly, or impossible such as when broadcasting to multiple receivers. This is the case with cable data connections.

What was old is new again.

(See also: Richard Hamming)

Written by kunau in: general interest,tools
Jan
28
2010
0

iPad Wonderment

iPad-small2.pngI spent some time today exchanging Tweets and Email with friends about Apple’s new iPad and I think we’re on the same page. While I think it would be fun to have, much of the function is found in my iPod touch in a far more portable format.

The iPad does not replace my MBP laptop, or even my netbook (Toshiba N205). It’s tasks are very different. It is interesting to note I can use Adobe Flash apps and video on my laptops and netbook, but not the iPod or iPad. During the product introduction it was obvious Flash didn’t work for the video on the front page of the New York Times site. Yet the image of the Times front page on the Apple website shows content were the Flash video would appear. (update)

The name is dreadful. It was bad when Fujitsu used it in 2002. The Hamming distance between iPod and iPad was simply too powerful for marketing. It also plays on the idea that accessories for the iPod should work on the new device. This remains to be seen. (I preferred something more organic, iSlate, perhaps. Though this suffers from the same ‘i-ing’ of nouns.)

Increasingly, and my deepest concern, I feel left out of the loop on this class of devices. (iPod touch, Kindle, Nook, SonyReader, iPad, etc.) I don’t like being relegated to the role of consumer when I want to be a creator. It is almost as if I’m a ‘revenue stream’ first. Kris’ comment ‘designed for consuming, not creating’ hit home with me. That said, if you are looking to consume media, I don’t know why you would buy a Nook or Kindle, if you had a chance to see the iPad.

A killer app for the iPad could be home automation systems, using the ‘pad to control lights, heat & HVAC, A/V, and security (cameras?). Though the lack of multi-tasking limits monitoring capabilities. Touch panel or voice controled lights and heat, family logistics, ‘iPad, set the heat to 68′,’iPad, did we get any mail today?’, ‘iPad, do we need milk?’, ‘iPad, where are all my children?’.

I’m sure the iPad is beautiful and I intend to test is when it becomes available. It is compelling as a multi-touch development platform. Currently I don’t need a bigger iPod, but I might consider replacing my iPod touch with an iPad when the time comes.

I hope this doesn’t herald the end of ownership or the general purpose computer. A future in which I own nothing, but merely rent access. Where is the Terminal.app, rsync, Perl, Ruby? There is nothing raw or vulnerable about this device. My view of the world is limited to what I’m allowed to buy, not what I’m enabled to create. The iPad is a consumer, not a creator device. The expansion of slick, safe, closed systems prevent users from writing their own utilities or solving their own problems. Not all solutions can be downloaded from an app store. Ultimately, the iPad may be too safe for me.

Don’t protect me from myself. Provide the platform and get out of the way.

(See also: apple.com: iPad)
(See also: engadget: Fujitsu and Apple dispute iPad name)

(See also: engadget.com: Apple excises the false flash)

(See also: O’Reilly Radar: The iPad is the iPrius: Your Computer Consumerized)
(See also: New York Times: Will the iPad cause the end of Innovation)

Written by kunau in: Macintosh,design,tools
Nov
20
2009
0

Perl: Simple MySQL Backup Script

#!/usr/bin/perl -w
#
# Quick and dirty dump and time-stamp of listed MySQL databases.
#
# by Timothy M. Kunau
# Note: There will be a point at which this will run out of diskspace for backs
#       and this script has no way of knowing. There is a companion script 
#       (find one-liner) that iterates through the ARCHIVES and erases files over 
#       a certain number of days old.
#       Assumes 'gzip' and 'mysqldump' are in the PATH.
#
#       Admittedly a bit fast and loose with variables and system returns. 
#       It might also be more useful if you could simply pass in the database name
#       as a variable.
#       These, and numerous other improvements, are left as an exercise for the reader.
 
my $workingdir = "/tmp";
my $host       = "localhost";
my $username   = "root";
my $pw         = "THE_ROOT_PASSWORD_FOR_YOUR_MYSQL_INSTANCE_GOES_HERE";
#
# Add a database you want to backup by name to the @dbs array below:
my @dbs        = qw{ hapmap_human concrete gallery2 wordpress };
 
###############  Nothing should need to change beyond this point.
 
# Create a $TIMESTAMP for log entry.
sub get_date {
   # brute force method
 
   my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
 
   if ($year < 10) { $year = "0$year"; }
   $year = $year + 1900;
   if ($mday < 10) { $mday = "0$mday"; }
   if ($hour < 10) { $hour = "0$hour"; }
   if ($min < 10) { $min = "0$min"; }
   if ($sec < 10) { $sec = "0$sec"; }
 
   # Format a $TIMESTAMP for easy sorting
   $monthord = $mon + 1;
   if ($monthord < 10) { $monthord = "0$monthord"; }
   $TIMESTAMP = "$year$monthord$mday$hour$min$sec";
}
 
####
 
# generate TIMESTAMP
&get_date;
 
foreach $db (@dbs) {
 
    # dump databse
    system("mysqldump --flush-logs --opt --host=$host --user=$username --password=$pw $db > $workingdir/$db-$TIMESTAMP.dmp");
 
    # compress dump file to save space
    system("gzip $workingdir/$db-$TIMESTAMP.dmp");
 
}
 
exit;

A simple place to begin, if you are looking for a script to backup your chosen MySQL databases. The code was written years ago and has been in production ever since. I haven’t had the chance or need to change it.

Suggestions for improvement are listed in the code. Please post your solutions in the comments.

Written by kunau in: databases,tools
Sep
30
2009
0

Lorem Ipsum Generator

lorumipsum.pngLorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut congue arcu. Pellentesque rhoncus quam eget nisi imperdiet a auctor purus rhoncus. Praesent ut ligula libero. Donec eget pharetra metus. Donec vitae aliquet nunc. In gravida ornare dolor non laoreet. Donec sem augue, viverra ac luctus quis, pellentesque ut velit. Maecenas id lectus ac nunc aliquam dictum. Duis eget erat pulvinar arcu dignissim tempus. Aliquam in arcu ante. Nunc elementum orci nec urna dapibus consectetur. Etiam et tortor lacus. Sed quis ante eget dolor blandit fringilla. Suspendisse potenti. Donec lobortis tellus ornare dolor mollis ut tristique tellus sodales.

Sed vel odio sed tortor sagittis vestibulum. Nam in orci vitae purus fringilla consectetur. Donec mollis pharetra viverra. Curabitur cursus, mi ut ullamcorper lobortis, enim enim facilisis nunc, vel placerat augue elit sit amet felis. Fusce at mauris ac risus porta lacinia id in enim. Cras ac dolor ut felis sodales pretium in nec velit. Aenean eget dignissim risus. Curabitur non magna ligula, nec lobortis orci. Nunc quis elit magna, vitae consequat augue. Nulla vitae augue eros. Sed non porttitor mi. Vestibulum in diam in leo sollicitudin placerat et sed eros. Vivamus lacinia auctor ornare. Suspendisse lectus nisl, semper vitae mattis laoreet, tincidunt nec purus. Praesent sed neque felis, ac bibendum metus. Morbi nec dictum metus. Nullam tempor diam in ligula aliquet vel aliquet nibh porttitor.

(See also: lipsum.com)

Written by kunau in: tools

Powered by WordPress. 14 queries in 3.739 seconds.