If you see this error when using the Amazon MP3 Android app to download songs, don’t bother calling Amazon Customer Care (like I did). I was told that it was a problem with my ISP (Yeah, you heard me right). Any way you will see this error if you do not 1-Click ordering enabled on your Amazon account. Follow the instructions here to turn on -Click ordering, and you should be good to go.
Category: Uncategorized
Printing on NSLU2
Using a Linksys NSLU2, I’ve got it unslung using v6.10.
Originally I got the NSLU2 because it seemed like a good, cheap way of getting a big networked data drive on my home network.
I quickly realized that the factory firmware from Linux was rather limited.
You get A LOT more functionality when you use Unslung.
The real bonus was that I was also going to get a home print server AND a more powerful shared network drive.
I started by carefully following the instructions to get the NSLU2 working with Unslung.
I chose to use a 250GB external USB drive connected to Port 1 for my Unslung install.
Once Unslung was installed, I was able to use the drive as an networked storage device.
The next step was to install CUPS and get the NSLU2 working as a print server.
I have an HP Photosmart 7350 that I wanted to use with the NSLU2.
All the instructions to add CUPS are available here.
The actual CUPS installation when pretty smoothly – according to plan.
However, I got stuck once CUPS was installed, trying to get the printer to do anything.
I connected the usb cable to port 2. The port 2 light on the NSLU2 never lights up.
The CUPS instructions say that you should “just try printing” once you get CUPS installed.
I did this by trying to click the “Print Test Page” button for the default hp990c printer.
I got garbage out on my page.
DON’T TRY CHANGING ANY SETTINGS ON THE NSLU2 AT THIS POINT.
- I tried permissions changes, more software installs on the NSLU2… totally wrong approach.
- Just leave the base CUPS install and config alone.
The hp990c should be setup as a RAW printer in CUPS on the NSLU2 at this point. If it isn’t (because you messed with it) – click “modifiy printer” and change the driver to RAW.
From either a Mac or Windows machine on your network you now setup an Internet Printer.
Windows
- Add Printer
- Networked Printer
- URL – the address should be the entire link to the CUPS address on your NSLU2
- http://192.168.0.110:631/printers/hp990c
- make sure to include the “http://”
- also make sure to include the port “:631”
- When prompted, select the print driver that matches your printer
- In my case for the Photosmart 7350 I had to click “Have Disk”
- This also required having ALREADY INSTALLED the printer as a local usb connected printer so that the drivers were installed by the HP software in the directory c:\program files\HP Photosmart 11\enu\drivers
- Finish the Add Printer install and give it a try by printing a test page!
Mac
- DO NOT USE THE SYSTEM PREFERENCES PANEL TO DO THIS
- Open a web browser and go to http://localhost:631/admin
- This is the local admin control panel for the CUPS system that is built in to your Mac
- Use the Add Printer wizard
- Install using Internet Printing (HTTP)
- when you’re asked for the printer location, use the entire CUPS address on your NSLU2
- http://192.168.0.110:631/printers/hp990c
- make sure to include the “http://”
- also make sure to include the port “:631”
- Finish the wizard and give it a try by clicking “print test page”
Querying the Global Address List (GAL) via Exchange Web Services (EWS)
If you are looking for a way to search the Global Address List (GAL) for a particular contact via Exchange Web Services, read on. Please note that this only works for Exchange 2007 and above.
- Grab the WSDL and generate stubs. The normal location for the WSDL is
[sourcecode language=”html”]http://Your_exchange_server_name/EWS/Services.wsdl.[/sourcecode]Note that when you plug this URL into your browser, you might be directed to login. Once you login with your credentials, you will be redirected to your regular email page. Despair not. Enter the URL in your address bar again and you should have the WSDL.
- Use the code below to query for a user with a name “test”. The code below is in C#, but should translate quite easily to other languages. Also take note of the URL. In my case, I needed to use https. Also note that the username is not the email but just the prefix i.e. the @domain.com is not required.
[sourcecode language=”csharp”]
static void Main(string[] args)
{
ExchangeServiceBinding esb = new ExchangeServiceBinding();
esb.Url = @"https://myserver/EWS/Exchange.asmx";
esb.Credentials = new NetworkCredential(
"username",
@"password",
@"domain");// Create the ResolveNamesType and set
// the unresolved entry.
ResolveNamesType rnType = new ResolveNamesType();
rnType.ReturnFullContactData = true;
rnType.UnresolvedEntry = "test";// Resolve names.
ResolveNamesResponseType resolveNamesResponse
= esb.ResolveNames(rnType);
ArrayOfResponseMessagesType responses
= resolveNamesResponse.ResponseMessages;// Check the result.
if (responses.Items.Length > 0 &&
responses.Items[0].ResponseClass
!= ResponseClassType.Error)
{
ResolveNamesResponseMessageType responseMessage =
responses.Items[0] as
ResolveNamesResponseMessageType;// Display the resolution information.
ResolutionType[] resolutions =
responseMessage.ResolutionSet.Resolution;
foreach (ResolutionType resolution
in resolutions)
{
Console.WriteLine(
"Name: " +
resolution.Contact.DisplayName
);
Console.WriteLine(
"EmailAddress: " +
resolution.Mailbox.EmailAddress
);if (resolution.Contact.PhoneNumbers != null)
{
foreach (
PhoneNumberDictionaryEntryType phone
in resolution.Contact.PhoneNumbers)
{
Console.WriteLine(
phone.Key.ToString() +
" : " +
phone.Value
);
}
}
Console.WriteLine(
"Office location:" +
resolution.Contact.OfficeLocation
);
Console.WriteLine("\n");
}
}
}
[/sourcecode]
Vista’s UAC – An exercise in frustation?
From Slashdot
I had probably the most frustrating ten minutes i have ever spent on a computer before.
Start, typed in regedit enter.
Vista:Are you sure you want to run this program?
Me: Yes. I went OUT of my way, hit start, run and typed in the pogram name I wanted. Thanks for checking though. (click) ….
Edit the registry, close it. That was easy. ….
double clicked on setup. Stupid shield on my icon, what does that mean?
Vista: are you sure you want to run this? it’s a program, you know.
Me: Oh that must be what the shield is for. Vista feels like it should protect me from software!
Vista: This is from AMD. Do you trust AMD?
Me: yes, they pay me. I trust them. (click) …..
Install……that was easy. ….
Oops, there’s a problem. Well, let’s grab the correct file from the build server and copy it over …
Open my computer, go to program files ….
Vista: Are you sure you want to go there?
Me:Yes (click) …
open up the application folder ….
drag a file from a network share to the application folder….
Vista: Are you sure you want to overwrite this file?
Me: Yes (click)
Vista:A program wants to write to the Program Files folder. Is this ok?
Me: Yes (click)
Vista:You are trying to copy from a network share to the program files folder. This isn’t allowed. Hit ok.
Me: (Pounds head) (click) ….
Drag to Desktop. ….
Drag from desktop to application folder. …
Vista:
Are you sure you want to overwrite this file?
me: for the love of god yes
Vista:A program wants to write to the Program Files folder. Is this ok?
Me: Die.Die.Die.Die.
Want a free domain name?
Are you on the lookout for a free domain name? If you are then head over to Office Live and sign up for the Live Basics Beta. This beta comes with a free domain name and easy-to-use design tools (at least that’s what Microsoft says). Anyway there are a couple of caveats:
- You will need to provide a valid credit card number. This is not charged, and Microsoft promises that the service will remain free. I provided a credit card number and cancelled the credit card soon after
- If you plan to customize the website to your liking, I don’t think you want to go this route. I do not think Microsoft allows you to point the domain to another location. So you are pretty much stuck with the tools they provide.
- Office Live is an IE only website (what else can we expect from Microsoft!)
All in all it looks like a good deal if you want a spare domain you can call home ;). I got vivekiyer.com
Code Snippet Hell
Microsoft recently released a bunch of code snippets for C#. These snippets looked quite interesting and I decided to install them. I came across a post on CodingHorror
that indicated an easier way to install these snippets. Being quite adventurous, I decided to give these a whirl. Unfortunately in the process, I mucked up somewhere and ended up installing my snippets from an incorrect location. Now since Visual Studio 2005 is a final product and not a beta, I assumed that I will be able to undo this stupidity (how foolish of me!). So I opened up the snippet manager and tried to remove stuff from there. However this did not work. I cleaned up the registry entries and cleaned up all the folders, but still no luck. I thought reinstalling these snippets the way Microsoft expects me to do might help, but this is what I ended up with
Now I have multiple entries in my snippet browser and no way to delete these entries. This drives me crazy. I tried to fix this by reinstalling Visual Studio, but even that doesn’t fix this. Yes I actually uninstalled Visual Studio fully and reinstalled it, but Visual Studio is kind enough to remember all my snippets. So now I am stuck with a feature that I want to use, but no longer can. Looks like I am not alone.
Technorati tags: code snippets, visual studio 2005
My experience with Ubuntu
I recently purchased a new 250 GB hard drive. After several days of procastination, I finally upgraded my desktop ( a dell Dimension 3000) from a measly 40 GB to 250 GB. Now since I had so much space, I decided to dual boot my Windows XP Pro installation with Linux. I have been hearing several good things about Ubuntu, so I decided to give it a shot.
Downloading Ubuntu was quite painless, I used a torrent and was able to download the iso in under an hour. I burned a CD on my Mac (I don’t have a CD burner on my desktop), and booted my desktop from the CD.
Partioning the hard driver was quite painless. I just had to specify that I wanted to use only a small portion of my hard drive and the installer took care of the rest. I think I was presented with a login screen under 15 minutes and after one reboot.
Once I logged in I realized that I was running at a horrible 640 x 480 resolution. A little bit of googling led me to this solution
In terminal type: gedit /etc/X11/xorg.conf
In /etc/X11/xorg.conf under the line Option “DPMS” (use the find option) just add:
HorizSync 28-49
VertRefresh 43-72
Save and reboot your system.
This worked like a charm. This fixed the screen resolution. Then came the part I was really scared of, configuring my wireless card. I have had bad experiences in the past with wireless cards and Linux, and I thought that this time would be no exception. I have a D-Link wireless card (AR5212 802.11 abg NIC). Anyway surprise surprise, Ubuntu recognized the card and configured it impeccably. I just had to enter my wireless authentication and I was good to go. However, I would like to point out that the key should be entered in Hexadecimal and not in ASCII, else it does not work. I was impressed.
Next step, my Dell 720 color printer. This printer has been a pain. It works only on Windows and refuses to connect to my powerbook. Anyway a bit of googling, led me to this website. Once I was done with the steps mentioned there, I restarted my computer (maybe logging off would have been enough, but face it, I am coming from Windows. I restart everytime I install a Messenger, so a printer is a HUGE thing). Then I opened the printer utility (System->Administration->Printing). I clicked Add Printer, my printer was shown in the list of detected printers. I selected my printer type as Lexmark, and the printer driver as z600-v1.0. Voila, my printer now works.
Overall I am pretty pleased with the distro. Everything I wanted worked out of the box with minimal work required. Compare this with Windows where I had to install drivers for my video card, sound card, wireless card, ethernet adapter and printer. Now if I did not have another computer this would not have been possible because Dell did not provide me with CD’s for the drivers. I instead had a restore CD which I did not want to use.
I am still trying to get a hang of Gnome. I can install KDE, but then I think I should give Gnome a fair chance. I will try to boot into Windows as less as possible. Next step, installing Mono on Linux. That will be a story for another day.
Technorati tags: Ubuntu, Linux, Dell 720, Dell Dimension 3000
Heard of C++0x?
I was quite surprised when I came across an article on C++0x. I thought it was another language much like Microsoft’s F#. Anyway was I mistaken. Quoting from the one and only Stroustrup (emphasis mine)
In this article, I examine the main principle we use to guide the development of C++0x, the next version of the C++ Standard.
C++0x will be almost 100-percent compatible with the existing Standard C++. Your existing code will, with a very high probability, be C++0x conforming if it was compliant with C++98, the existing Standard.
If you are a C++ developer, you really should read the article.
Technorati tags: C++0x, Stroustrup, C++
Deploying Services in C#
In case any of you have ever written a Windows Service in C#, I am quite sure you have deployed the service via a setup and deployment project in Visual Studio .NET. In any case writing and deploying such a service is quite an easy task. You can find instructions on how to write a service and get it installed via a setup file on MSDN.
Now this works fine for the ideal case where you perform only two actions on your service, namely Install and Uninstall. However if you have worked on Windows and installed as many programs as I have, you might have noticed that under Add / Remove programs almost all apps have an option – Repair. Now a repair merely reinstalls the application. In case of the above mentioned setup project, the re-installation fails with the error
This occurs because a reinstall includes running custom actions, and so the Installer class tries to install the service all over again. This can be prevented by adding a Condition of NOT REINSTALL on the Install and Commit custom actions in the setup project. This way these won’t get called during a repair / reinstall.
Technorati tags: windows services, c#, setup
Obtain the DNS while on DHCP on Mac OS X
Just the other day I needed to look up the DNS on my Mac. Now if you look at network preferences and if you are connected to the net via DHCP, Mac OS X provides you with a quite unhelpful looking window.
Network Preferences
Of course there is a CLI to obtain this information. All you need to do is hit
(en1 is the network interface you are interested in). Voila, you have what you need.
I was pretty surprised that ipconfig works on *nix too. I always thought that ifconfig was for *nix and ipconfig was for Windows.