Sunday, April 24, 2011

Temporary Solution to AFP, SMB & NAS problems after OSX 10.6.7 update

Okay, so I'm not a command line expert.  When I owned my first Apple IIe years ago, I left the world of command line entries behind.  One of the beautiful things about OS X ( and Windows for that matter) is the lack of a need to know about command line entries.  However, the thing that separates new computer owners from the ones of my youth is the fact that those who grew up in the early days know exactly what is going on under those pretty little icons.

I have been spoiled by the Mac, after walking away from Windows 5 years ago.  But I remember in those early days of Mac Loving, I still had an interest in what was going on in the background.  I wanted to know why the disk drive kept running in the background (Usually Spotlight updating) or more mundane issues,  so I began learning a little about OSX.  As always I have books on the subject, but stopped buying any more books due to the fact that Apple updates its OS every 2 years, making physical books obsolete.

Coming from Windows I had to know about
file servers and a new nomenclature for file transfers, especially the ones that were strictly adherent to the Macintosh:  AFP (Apple Filing Protocol) instead of SMB (Server Message Block).  I needed to know these two separate protocols if I wanted to access a Windows Network Drive or the Windows XP machine that I used.  Additionally, file access to the Mac required the above knowledge in order to access and transfer files to and from the Mac.  With the advances of NAS drives, creating a wonderful extension to the hard drive on the computer, I had to keep up with being able to place and retrieve data from both machines regardless of which machine I was using.  To begin with, I hated SMB protocols because my disk would always disappear, especially when the machine was turned off.  With the machine off, DHCP would take over when I turned the machine on again and my wonderful SMB drive would have a new ip address and so nothing would work.  Live backups were a nightmare.  As I learned more, I realize now that I could have leased the DHCP address for a long time and that would have resolved the issue.

Although learning to use AFP on the Mac was new, it was much easier.  It kept track of the NAS drives even when I turned off the machine and rebooted it.  To be honest, using AFP was akin to having a disk drive sitting right next to me.  However, once in a while it wouldn't work.   Some of the Windows oriented NAS drives would not always respond to the SMB or AFP command.  This would happen in Windows and on the Mac.  However on the Mac I found a solution in one of the books.

With OSX 10.4 there was an interesting command in the command line that showed whether OSX would read/write to the NAS drive.  If written with a boolean command, you could set up a signal to show whether the drive is ready to read/write.   I recall in those early years, 2007 to be precise, how I would toil away trying to decipher why a drive wouldn't work.   It was these wonderful commands that set me free finally. 

I never thought that I would have to return to those days again because my newer network drives are so much more resilient.  First, not having Windows to deal with, I was able to use long file names and strange characters, something that we can now do in Windows 7.   Until I upgraded to OSX 10.6.7 I was in network Nirvana.

So, after upgrading my OSX Snow leopard 10.6.6 TO OSX 10.6.7 as a good Apple Netizen should do a few days ago, I was stunned to find that I could no longer write to my NAS drive.  I thought it was my virus protection acting up, so I turned it off and actually deleted it (I have since reinstalled it, since that was not the problem).  All transfers to and from the NAS drive would hang.  I then remembered the last time that this occurred.   It was during those early learning days.  I wrote it down on a note card.

It turns out that there is a command in OSX that when written with a Boolean request can tell you if the drive is accessible or not.   I believe that the latest update may have turned off a switch that enables Cleartext.  Cleartext is a ZeroConfig set up, meaning that you do very little to set up your network (a la AppleTV) since Apple takes care of all of this behind the scenes.  It is what enables your printer to "just work."  You can use names like "My_Printer" to signify that your printer is attached to a certain ip address hiding behind  your router (preferably an Apple Airport Extreme) and it will show up as "My_Printer.local"  something much easier to remember than or something akin to that.

In reading the latest update, there is a mention of Apple correcting AFP mount errors and SMB mount problems.  Here is the full text from Apple:


In Mac OS X v10.5 and 10.6 you can use a URL in the form afp:// or the mount_afp command in Terminal to mount a shared volume on an AFP server.

Products Affected

Mac OS X Server 10.6, Mac OS X v10.6
In or Safari, when you click on a URL in the form afp:// , the Finder will mount the volume named Sharepoint on the AFP server, and open a window showing the contents of the directory named Folder. If you drag the text of the URL to your Desktop, it will create an AFP link which you can double-click to open that folder.

mount_afp command can be used in a Terminal window or a shell script to mount a shared folder on an AFP server. For more information, type man mount_afp in a Terminal window.

: The path at which the shared folder is mounted is different in Mac OS X v10.6 through 10.6.6 compared to other versions of Mac OS X. For details, see the Additional Information section below.

Additional Information

In Mac OS X v10.6 through 10.6.6, a URL that points to a file on the server (for example afp:// will not work. This issue is resolved in Mac OS X v10.6.7 and later.

In Mac OS X v10.6 through 10.6.6, if the target of the URL or
mount_afp command is a folder within the sharepoint, the folder will be mounted. In Mac OS X v10.0 through 10.5, and Mac OS X 10.6.7 or later, the sharepoint is mounted.
Example: afp://

When you click on this link in Mac OS X 10.0-10.5 and 10.6.7 and later, the Finder will mount the volume Sharepoint. The local path to the shared folder will be /Volumes/Sharepoint/Folder/.

When you click on this link in Mac OS X 10.6-10.6.6 the Finder will mount the subdirectory Folder. The local path to the shared folder will be /Volumes/Folder/.

mount_afp afp:// /Volumes/mntpnt

In Mac OS X v10.5 and 10.6.7 or later, this command will mount the volume Sharepoint at /Volumes/mntpnt. The local path to the shared folder will be /Volumes/mntpnt/Folder/.

In Mac OS X v10.6 through 10.6.6, this command will mount the subdirectory Folder at /Volumes/mntpnt. The local path to the shared folder will be /Volumes/mntpnt/.


I think that somewhere along the road, they turned off the Cleartext switch.  Cleartext is used because the NAS drives are running behind a Router, hence there isn't really a need to encrypt passwords, although it is interesting to note that in Snow Leopard, Apple does not give you a choice of not using a password as they do with the AFP protocol when using SMB.   Regardless of whether a password is used or not, I was able to find out that neither an SMB nor AFP protocol would work on my NAS drive.  The Boolean query showed a " 0 " for the ability to write to the drive.  In discussing this with a Mac Guru and in going back to my meticulous notes that I took 5 years ago, the query is for Cleartext and it is found to be turned off by default.  But only after upgrading to 10.6.7.  On my other Leopard machine which does not have the update and that was never upgraded to Snow Leopard, no matter what I do, the boolean query remains at "1" meaning that it is writeable and accepts Cleartext.

What happens is this.  You log on to your computer (I am assuming that you are using AFP and using a MAC).  You click on to your Network Attached Drive somewhere in your house, apartment or office.  There is a delay.  The drive may or may not open at all.  If and when it does, everything looks okay.  You try to open a folder and the infamous equivalent to the BSOD (Blue Screen of Death on Windows) ensues -  The spinning Beach Ball.  Sometimes you can even get past the folder stage and the system will hang when you try to upload to the directory or download from it.  Or, heaven forbid, Time Machine decides to use it.  What you are left doing is trying to Force Kill the Finder.  That is something that is not nice, because it means that all of your icons disappear temporarily until the next boot up and you're left "hanging."  This is the so-called Kernel Panic.

With the knowledge that the Cleartext flag is turned off, I found that I could get some work done by turning it back on.   The technique used is listed below.  I should let you know that this worked for a while, but it seemed that I had to continue turning this on again, every time I turned on the machine.

Thus, if the solution listed does not work,  try the solution after this.   I tried two other solutions before finally finding one that eventually works for now.

Here is the old school tactic first:

1.  Check to see if cleartext is already enabled:

A.  Shut down the computer.
B.  Shut down the server, modem, gateway modem etc.  (basically shut everything off).  Then turn everything back on.
C.  Turn on your computer.  Go to the login where you plan to use the NAS drive.
D.  Hit the Spotlight icon (looking glass) and type in TERMINAL.  Click on the TERMINAL  icon.
E.  While in the terminal, type the following verbatim:


       defaults read afp_cleartext_allow 

This should return a "1."  If it does then the problem should be solved.  However if the return is "1" but the problem persits,  then the problem with the read/write is different from what is described here and you will probably have to look elsewhere for a solution (in this case, the second solution that I mentioned below).  The first thing would be to make certain that the disk drive is turned on.

However If it returns a "0," then do the following:

2.  Turn on Read/Write: 

A.  Shut down the computer.
B.  Shut down the server, modem, gateway modem etc.  (basically shut everything off).
C.  Turn on your computer.  Go to the login where you plan to use the NAS drive.
D.  Hit the Spotlight icon (looking glass) and type in TERMINAL.  Click on the TERMINAL  icon.
E.  While in the terminal, type the following verbatim:

defaults write com.Apple.AppleShareClient afp_cleartext_allow -bool YES

Test the settings by going back to Step 1.  This should return a "1"  now.  If it does not, go to step 2 and try again.

 You should be able to complete your session without any further hiccups.

Unfortunately, I found that you have to go through this entire thing on all logins, so if you have other members logging in under different accounts, you have to do this again.

So, I wrote most of the above about 2 weeks ago after installing the update.  I had planned on installing Lightroom and using an External NAS drive for storage, but halted after running into this problem.  A problem that has made me shy away from using a NAS drive as an iTunes server. 

So, something came to mind a few days ago.  It was akin to the resolution of the FACETIME fiasco that I faced when I purchased my iPhone 4.  I recall that I had to reset my iPhone's network settings in order to use Facetime.   So I thought about doing the same thing for this issue of the "on again, off again AFP/SMB" switch.   Here is what I did:

Resetting Keychain Login for Nas Drive

1.  Go to Terminal.
2.  Type in "Keychain Access"
3.  Find the name of your Disk Drive login.  ie. "My_NAS.local"
4.  Erase the two files that have the AFP and/or SMB login to that NAS drive.
    (This assumes that you saved them to the Keychain).
5.  Restart your machine.
6.  Try to connect to the drive.

My results for this were mixed.  AFP worked but would hang occasionally.  SMB, surprisingly worked all of the time. 

I then tried one more thing.  I erased all of the network settings and started again from scratch.  The results were the same as before.  My conclusion:  AFP is BROKEN !  Why SMB works is beyond me, but the only thing that I have not done is to reinstall OSX SNOW LEOPARD. 

These are really Band Aid solutions.  I hope that Apple comes up with a solution to this problem as it affects Time Machine which is critical.   One worrisome point is the news that Apple will be abandoning the SMB file protocol in OSX Lion.  This may be a little early given the problems that many are now having with the AFP solution. 

I hope that this helps.  By the way, I am no OSX, Cocoa, Obective-C master.  I am far from it.  I just poked around and I have a few really good books that I look at from time to time; not to mention the bulletin boards.  If you have any suggestions please leave them in the comments.  Especially if you find any mistakes above.

Thanks for reading.

Wednesday, April 20, 2011

Amazon Announces Library Lending. Is it Game Over?

Perhaps the biggest news of the day, sans the Apple blow out earnings report of course, was the quiet announcement from Amazon, as reported by Andrys Basten on Kindleworld, that local libraries will begin placing Kindle formatted books at local libraries - 11, 000 libraries to be precise.  This is huge!  It is a game changer and as I tweeted earlier today, it may be The Endgame! 

The ability for an inexpensive device such as a Kindle to get into the library system and to have Amazon succeed in getting its own proprietary eBook system accepted is not only remarkable, but places Amazon on a path that will be hard to follow, let alone beat. 

To understand this you have to understand that Barnes and Noble has been available to the library system for a while, using The Nook, but it hasn't really caught on.   If Amazon can make this work, then they will have Kindle eBook readers everywhere, from the proprietary Amazon hardware to every Apple iPad, iPhone and/or idevice imaginable.  If you can borrow a textbook in color, why bother going go the library to borrow it or worse, why buy it?  As we can surmise, if this catches on, there will be more books in the proprietary .AZW format.

More importantly, the ePub system may actually die a painful death because of this.  If all of the "good books" are in a proprietary Amazon .AZW (or .MOBI) format, then ePub will become a thing of the past, since Amazon's Kindle system does not recognize the ePub format at all.   I particularly like the ePub format as it seems to accomodate a lot of other ereaders outside of Amazon.  But this announcement could also put a dent in the Apple proprietary ereader iBook as well, since it too does not recognize .AZW.  Amazon will win the format battle.  I have to admit that Amazon's .AZW (and .MOBI) format is quite nice, but .ePub is equally as nice and I would hope that we will still have a choice in formats.  Nevertheless, this is huge and I am surprised that more attention has not been payed to this.

One thing that I will have to say is that if Amazon can get this right with over the air downloads, instead of going through Overdrive on the desktop, they will win hands down.  If you have to be tied to the desktop in order to borrow books, that could put the brakes on the whole thing.  Overdrive is the software needed to facilitate the two-way encryption, DRM and authentication keys to ensure that the book expires after say 2 weeks. 

A copy of the actual news release is listed below and if you get the chance, go to Kindleworld, Andrys Basten's great blog about all things Kindle.

Amazon to Launch Library Lending for Kindle Books

Customers will be able to borrow Kindle books from over 11,000 local libraries to read on Kindle and free Kindle reading apps
Whispersyncing of notes, highlights and last page read to work for Kindle library books
SEATTLE--(BUSINESS WIRE)--(NASDAQ: AMZN)— Amazon today announced Kindle Library Lending, a new feature launching later this year that will allow Kindle customers to borrow Kindle books from over 11,000 libraries in the United States. Kindle Library Lending will be available for all generations of Kindle devices and free Kindle reading apps.
“We’re excited that millions of Kindle customers will be able to borrow Kindle books from their local libraries”
“We’re excited that millions of Kindle customers will be able to borrow Kindle books from their local libraries,” said Jay Marine, Director, Amazon Kindle. “Customers tell us they love Kindle for its Pearl e-ink display that is easy to read even in bright sunlight, up to a month of battery life, and Whispersync technology that synchronizes notes, highlights and last page read between their Kindle and free Kindle apps.”
Customers will be able to check out a Kindle book from their local library and start reading on any Kindle device or free Kindle app for Android, iPad, iPod touch, iPhone, PC, Mac, BlackBerry, or Windows Phone. If a Kindle book is checked out again or that book is purchased from Amazon, all of a customer’s annotations and bookmarks will be preserved.
“We're doing a little something extra here,” Marine continued. “Normally, making margin notes in library books is a big no-no. But we're extending our Whispersync technology so that you can highlight and add margin notes to Kindle books you check out from your local library. Your notes will not show up when the next patron checks out the book. But if you check out the book again, or subsequently buy it, your notes will be there just as you left them, perfectly Whispersynced.”
With Kindle Library Lending, customers can take advantage of all of the unique features of Kindle and Kindle books, including:
  • Paper-like Pearl electronic-ink display
  • No glare even in bright sunlight
  • Lighter than a paperback – weighs just 8.5 ounces and holds up to 3,500 books
  • Up to one month of battery life with wireless off
  • Read everywhere with free Kindle apps for Android, iPad, iPod touch, iPhone, PC, Mac, BlackBerry and Windows Phone
  • Whispersync technology wirelessly sync your books, notes, highlights, and last page read across Kindle and free Kindle reading apps
  • Real Page Numbers – easily reference passages with page numbers that correspond to actual print editions
Amazon is working with OverDrive, the leading provider of digital content solutions for over 11,000 public and educational libraries in the United States, to bring a seamless library borrowing experience to Kindle customers. “We are excited to be working with Amazon to offer Kindle Library Lending to the millions of customers who read on Kindle and Kindle apps,” said Steve Potash, CEO, OverDrive. “We hear librarians and patrons rave about Kindle, so we are thrilled that we can be part of bringing library books to the unparalleled experience of reading on Kindle.”
Kindle Library Lending will be available later this year for Kindle and free Kindle app users. To learn more about Kindle go to

Reference: Link

Other interesting reading:

Book lending on the Nook Link

Thursday, April 7, 2011

The Belkin Verve Folio Cover....Surprising Findings

So, a few days ago I finally received my Belkin Verve Folio from Europe.  It is a nice little cover.  It is thicker than I imagined and the blue accents make for a nice and elegant holder.  The phone fits nicely into the "pocket" and feels very secure.  I actually think that the phone could be dropped on the floor and it would be very well protected by this case. 

The first surprise that I got, and something that I think needs to be clarified, is that I ordered the Belkin Verve Folio version 2, but received version 1 of the device.  You may recall the difference between the two versions in my previous post.  I expected the worst response from this and was prepared to send it back, but after trying out the device for a few days, I am going to keep it.

The biggest issue of course is the sensor issue.  I am happy to report that this is a NON ISSUE with this version of the Verve Folio !   I am very surprised given the fact that the para-sensor setup is very similar to the SENA cases that I reviewed previously.  The latter had many problems with the sensor - showing a blank screen during phone calls.  What is more surprising is the fact that the Verve Folio case is thicker than the Sena Case  around the sensor area and it still does not affect the phone.  I have tried it out in over 10 different lighting scenarios that failed the Sena Hamilton, but there were no outages with the Belkin case.

Something that I really love about this case is the way in which the cover drops down in the back to reveal the camera.  The camera does not have to peer through a hole in the case/cover, it is fully exposed.  What this means is that if you use flash photography with the iPhone, the cover does not get in the way.  The pictures are not washed up due to "tunnel vision."  It is also not obscured by the cover which is nice.  With the weird blue tint of the inner case, you can actually do some interesting photography, such as placing the cover in such a way as to bounce the light upwards and even focus the flash a little more.  Very unique, very nice.

Although I miss the belt clip, I can live without it.  In conclusion, to say that I am very surprised is an understatement.  I was expecting the worse when I first saw the packaging and read the reviews from several sites.  But I have not had the problems that these people have had.  Additionally, although I was looking at a few different cases, I am probably going to stay with this case for a while, hopefully for the life of the phone.  The case is very nice and using my Wife Indicator, it's a winner.  So, it's two thumbs up on the ORIGINAL Belkin Verve Folio case.