Tech posts by aclassifier
Also see Designer's note page

You are at http://oyvteig.blogspot.com
Archive by month and about me: here
Last edit: 4Sept2015
Started move: September 2012
All updates at http://www.teigfam.net/oyvind/home/, but the overview is updated

Monday, July 20, 2009

014 - Notes about iPhone

Please observe that this note, even if started on July 20, 2009 has been extended with several sub-posts that are being continuously updated (last in 6Mar11)

Being a software engineer (with some older hw skills mingling about), I am used to collecting lists of errors, problems and ideas. Here is my list for my iPhone. I have an iPhone 3G, quickly updated to latest upgrade from Apple. At the moment I have sw version 4.21, build 8C148, but the problems below have been tagged with actual versions of the time. Please also note that my experience here is with Mac machines, not with say, iTunes on Windows.

I will try to update the list when the problems have been fixed as seen from my iPhone. I also have some other iPhone posts in this blog. My goal is to try to help getting a great mobile phone even better!

Disclaimer: I try to be accurate and not confuse here. But what I say may not be correct for your configuration, iPhone or machine. Some times I do arrive at conclusions, but I try not to jump on them. Still I might have! I would certainly appreciate comments of any serious sort!

iPhone Troubleshooting Assistant etc.
Observe Apple's at iPhone Troubleshooting Assistant. Pages there lead you safely through scary encounters like restoring the phone. Don't be afraid, the procedures are as elegant as the rest. Bear in mind that data belonging to your AppStore are not any "restored", but reappear on your next synchronization. (Norwegian: Problemløsingsassistent for iPhone)
Also notice chapter 7 - Disappearing iPod/iPhone from machine (iBook) here, ref [2].
1 - "Empty" Camera Roll (closed for Mac/Windows users, open? for Apple)

16 - iPhone synching picture fails on 3G, not 3GS
See http://oyvteig.blogspot.com/2010/09/020-mac-os-x-network-disk-partially.html, chapter "Related problem - iPhone synching picture fails on 3G, not 3GS"
15 - Spacebar double-tap to close brackets?
Depending on user settings it's possible to insert a period character (dot) by double-tapping the space bar. This is very nice. After the period it also insert a space proper, making ready for next word.
However, some times I'd like (the same function) instead to close a bracket. 
See the use in the above sentence. I have in my mind double-tapped to get the ) and then later on for the ending period. 
It's easy to implement this. Just make a priority list and do accordingly. In my suggestion, all closing of any left bracket type has priority to inserting a period. 
I'd like to close these type of parenthesis: [ ], ( ), { }, < >.
Easy with virtually no side effect! Most brackets a user doesn't want to close before a period. Of course, it is possible to have a dot inside a parenthesis. Either make a small select box to select the right bracket or the dot, or make an exception for email addresses or url.
This may of course be configurable, as en extra option in addition to the dot insertion.
How about also including other block defining characters, like quotation marks
Reported to http://www.apple.com/feedback/iphone.html 
14 - 4.0 GB not sent and 4.0 GB not received
iOS 4.2.1 8C148 on a 3G iPhone
My iPhone told me I had sent and received 4.0 GB ("Mobilnettverksdata: Sendt 4.0 GB, Mottatt 4.0 GB" in Norwegian):

Having heard about iPhone users with too large bills, I immediately logged into My Account at Network Norway. I had in sum used less than 50 MB (0.05 GB). I have now learnt that if iPhone shows 4.0 GB in both directions, it is probably wrong. But what it it shows other figures?
This was the first time after a couple of years. I cleared the statistics, as I have done every 20th. And it's not run wild yet
Reported to http://www.apple.com/feedback/iphone.html
13 - MMS settings changed all by itself!
iOS 4.2.1 8C148 on a 3G iPhone
All of a sudden my mobile data settings had been changed! I usually have Network Norway with this set up. All of a it pointed to TIM, a subsidary of Telecom Italia!
It is true, my wife and I were in Italy this summer, and TIM came up as an operator then. But that's 8 months ago! And it does not explain this!
I have changed synching iTunes machine lately (from iBook Tiger to Mac Mini Snow Leopard), but it points to the same network disk. See figure on my Blog 019
Observe that "all the time" I have had this iPhone, the Mobile Data settings have been volatile, but they have changed to all empty - see chapter #3 below. So, I am used to typing in all the settings, if one could ever get used to that sort. I think it may be after synchs, but I know it's also after restarts, that I've had to retype. (I have a Picture folder called iPhone with screen shots from the correct settings. Nice to have.)
But this time: I have no idea, and have decided not to speculate, just to be open for comments from any one of the below - or from you! 
I have reported this to Network Norway (mail), TIM (Olivetti, mail) and Apple (http://www.apple.com/feedback/iphone.html). 
Responses
Network Norway: "We know that settings may change when one has been abroad with iPhone. If you have got new settings, and a field is non-blank, it is often because the operator abroad has sent new settings to your phone. However, in the cases where we have seen this, the mobile user has usually been queried for approval." (translated by me) My comments: I have not been queried, and it's 8 months ago and I think the response quite vague. However, I did learn that an operator may update my settings.
Search words in Norwegian 
iPhone Instillinger / Nettverk / Mobildatanettverk (Mobildata) MMS forandret av seg sjøl! 
12 - iPhone screen canals?
According to Wikipedia [1] "waterway canals are navigable transportation canals used for passage of goods and people, often connected to existing lakes, rivers, or oceans."
An "iPhone canal is a navigable icon transportation canal used for passage and short stop of icons, often connected to existing screens or passing through them". This is my suggestion of a definition of one such.
I'd like to have it!
The figure shows my page 1 at three stages. I have a hand made canal there. It's the open unused space. To illustrate I have filled up my page 2 fully. Usually all my screens have a canal. Let me try to transport the iPod icon (1.2). When it's out of the way, the screen reorders (1.3) - the "Instillinger" ("Settings") fills up the vacant place. I like this, no empty space, shuffle into sequence is the rule. All black space is left at the end.
The problem comes when I want to take iPod past page 2 to page 3. Page 2 is continuously being reshuffled. No, not really: if I keep on pushing to the right, on page 2 it would discover that I want to move on to page 3 before if starts to reshuffle page 2. This is grand design!
However, it's not obvious. And, I cannot take a pause and stop at page 2. It then would spill over to page 3 the last icon. Of course, it would not know that I just took a break.
What I would like is that the next screen would shrink and align to top so that I get a black channel beneath. Should I stop, my icon on its way would just sit in the channel. Should I continue? Yes, I grab it again and push to screen 3. Screen two is normalised on its way out of the visible area.
When I am finished I push the icon up into the shrinked screen, the canal is pushed down and out, and the screen scales to standard wiggling icons and does the spillover if it's necessary.
Another great thing about this is that reshuffling would not happen before I ask it to.
Even when I start to move, that screen would open a canal for me. Fine!
Reported to http://www.apple.com/feedback/iphone.html on Nov. 21st 2009.
[1] - Wiki on "Canal": http://en.wikipedia.org/wiki/Canal
11 - iPhone disabling cellular internet access - button missing (closed)

Thanks, Apple! Fixed on version iOS 4! But I've kept the legacy text:
At the moment, the only way I know of how to disable cellular internet access - to save me from a catastrophic bill when I go abroad with my iPhone - is to set the mobile data network APN name wrong.
My provider tells me to set APN to "internet" (fancy name..). That's OK in Norway, where I can afford the data megabytes. But even moving myself into neighbour Sweden makes the megabyte rate n-fold, in other word: prohibitive. (The reason for this is that the providers milk the abroad market here, and there is not yet any regulatory mechanism to stop them. Also, we're in the pre-competitive market phase, it's simply too early. The iPhone, which has made us want to surf, also when abroad, just hasn't been around long enough yet. And not enough regulators seem to have an iPhone..)

So, abroad I set APN to "internet not in use" - which is a perfectly wrong APN name - and when I get back home again I reset to "internet".

I certainly appreciate the minimalistic iPhone user interface, but this solution does not help me! What about a button somewhere? (3.1.2, 7D11, open)

Reported to http://www.apple.com/feedback/iphone.html on Oct. 17th 2009.
10 - Moving iPhone backup files to/from a network disk - Or: how to restore iPhone from another machine (closed)
When I had to do a synch of my iPhone from the first floor machine connected to the network disk instead of the ground floor machine (which I usually use), I got a problem. I needed to take a complete restore of a previously stored backup file. 
Standard synching with iTunes seems to be ok, even if you have to be aware of calendars and address book (and maybe other things which belongs to a machine). Blog 3 gives a flavour of the iTunes network disk world [1].
However, even if the iTunes data base is on the network disk, the iPhone backups are not. They reside locally in your Mac home folder /Library/Application Support/MobileSync/Backup [2].
When I needed to restore from an earlier backup, I moved all the directories there (with names like 5390181f63c8d9bd90bfb99e893792f48cebef08-20090802-114557) from the ground floor machine to the network disk. Good to have for backup of the backup! Then I moved them, or the one I wanted, to the first floor machine.
Perfect, now they were visible in the iTunes' - Preferences - Units on the first floor machine (bare with me if you cannot find things by my names, I have translated the menus from Norwegian). So, now I could "restore without backup" (using the just moved "backup" file!) also on the first floor machine. 
It looks to me that "without backup" means "without your backup" or "with iPhone backup of operating system and associated files only". 
A warning: Restoring Without Backup is a Serious Thing (it's meant to be - restore and backup are separate things - as is synchronizing). If you want newer Notes notes to survive, copy them first with PhoneView; (or similar, search here) and restore them afterwards. And, data that are local to AppStore applications would not survive - you did choose to restore without backup! So, if you restored with no backup, then no backup of those things will appear. So, the lists you had in Todo will reside somewhere in another backup. But afterwards, you may synch again with your present music, movies, pictures etc. 
Still, it's not that servious to restore without backup! You could restore with backup of an earlier version and do screen cuts and save to the notes, or (if it's 3.0 or newer), cut and paste data from the applications and send offas mail or paste in a note (ref. PhoneView). Just find a way to store if (be it pen &amp; paper if you must!) Then you could restore without backup and paste things in again more or less by hand. So, the name you had put in there isn't as losta s you thought. It was recoverable, as long as you have a backup - which iTunes does for you when it wants!
Still, I think that restoring without backup is advocated too often. At least, it's my experience. Do try to avoid it! 
I am afraid that parts of this chapter may be vague or confusing. Whenever I know better, I might try to do a rewrite. 
[1] - 003 - Shared iTunes library on a network disk
9 - Sending mail via GSM server when home's wifi is out of reach - (closed)
After receiving my "swap" iPhone (point 4 here), I goofed the SMTP outgoing list, even if I had saved the setup (point 8 here) screens!
Earlier, the iPhone switched to GSM mail when I left home's safe wifi network. Now I got a response saying that the mail server did not like the address I sent to. But it was my own.
When I called my GSM mobile provider, they said that I did not need the user name and password. They were almost right, because when I switched off the primary SMTP server (most often used from home), sending mail did work. But enabling the primary server again, it failed.
To make a long story short: when I included user name and password for both primary and secondary SMTP servers (even if they individually did not seem to require this), then the failure of the primary's attempt did not stop the process - but went on to try the secondary as well - for success. (This is how I "read" the behaviour.) (3.0.1, 7A400, closed)
8 - Cannot delete SMTP server(s) (closed)
The list of my outgoing mail SMTP [1] servers had added up - and for some days I could not figure out how to delete the unnecessary entries. I only needed my wireless SMTP server as the primary, and my GSM or mobile provider as the only secondary.

However, while fiddling around (during point 9, above), the primary server appeared three times, just between primary and secondary! And when I opened them, they were grayed out. Trying to disable them, they looked enabled again - even if they weren't.
So, how did I clean the list? Here is a recipe that worked for me (inspired by [2]):
First, take a back-up of your settings. The easiest right there may be to take screen snapshots of all the correct SMTP settings. And if you need to note on the pictures, install Sketches from AppStore. (Then, when you synchronize pictures, upload these to the laptop camera upload directory and make a new iPhone pictures directory called iPhone, and move the configuration screen shots to that directory. You'll regret it so little that you will expand to several other set-ups. (You take screen shots by pressing the middle and the off button simultaneously.))
Then, back to the ugly SMTP list. Open the primary, or any one that you are allowed to edit, i.e. not grayed out. Presumably you should try with the entries you want to remove. If the red "Delete server" button is not there, empty the host name field, go up one menu level and open it again. Then the iPhone realises that an SMT server with no name is deletable, and the delete button should appear. Use it. (I had noticed before that the iPhone uses this behaviour: you'll have to make a field empty, then a branch in the menu tree happens - with new buttons arriving.)
Repeat this procedure until you're done. Then add the SMTP server(s) that you had to delete but really wanted to keep - since there is no way to slide table entries up and down. As I said, this certainly worked for me. (3.0.1, 7A400, closed)
[1] - SMTP server: http://en.wikipedia.org/wiki/SMTP_server
[2] - http://discussions.apple.com/thread.jspa?threadID=1711342 - see esullender 30. Jan. 09
7 - iPod / iPhone disappeared from machine (iBook) (not really closed)
When I needed to synch my new "swap iPhone" (note 4 here), my Tiger PPC iBook had decided not to see it! It was not seen by any application, be it iTunes, iPhoto, Image Capture or PhoneView. The iPod also was lost!
However, I noticed in System Profiler [1] that the iPhone was seen by the lower layer USB driver. I observed that it was misplaced on some occasions, and I even could find a configuration where it was not seen. I don't exactly remember how, but I did a mix of the two iBook USB connectors and a hub, with the hub, an external mouse and the iPhone in combinations. Cabling around and updating the display gave me some scenarios. I imagined: there must be some invalid USB descriptors(?) in there! But I had tried several times to restart the machine.
I was pressed. Even if the Intel Mac Mini worked, I did nat want to use it for iPhone work. And the PPC Lamp Mac worked, but with USB 1.0 it took too long. I needed the iBook up! Observe that iTunes with a network disk has been described in post 3.
I thought that maybe the operating system would clean the USB table if I restarted the machine with the iPhone connected! I did, and the soothing beep from the iPhone came twice during power up! And the rest... is just bliss! All is fine now!
I don't know why this happened. I had done Security Updates 2009-003 and 2009-004 on the iBook Tiger PPC in the meantime. But I have no reason to believe that this could be the cause. Or maybe I had plugged the iPhone into the unpowered USB hub [2]? There certainly must have been some reason?!
Update 22June2010: This problem is still persistenet with iPhone 3G with 3.1.3 and iTunes 9.2 (61) running on iBook with Tiger Mac OS X 10.4.11 (8S165). Same solution as above, though!
Update 1April2010: iPhone picture upload from Camera Roll failed to start Image Capture. All of a sudden this happened, the iPhones were visible in iTunes and iPhoto, but even after all combinations of plug, unplug, restart etc,. the Camera Roll (3.0.3 (333) Mac OS X Tiger 1.4.11) did not start. My fix was to start PhoneView (2.3.2) and copy the pictures over manually, and then delete the whole DCIM camera folder, including sub-folders .MISC and 110APPLE. On my iPhone, several other sub-folders 111APPLE up to 120APPLE had appeared. Some contained pictures, some not, but all pictures were visible in Camera Roll. On my wife's there were only the two sub-directories. For both iPhones, PhoneView helped. After I had deleted the directories, I stopped PhoneView and unplugged the iPhone. Then I  filled a picture into Camera Roll and plugged the iPhone in again to find that Image Capture started again! (Filed 1April10, but it's no hoax!) (iPhone 3G and 3GS 3.1.3 (7E18))
Filed to http://www.apple.com/feedback/iphone.html
[1] - Mac OS X System Profiler: en.wikipedia.org
[2] - In Troubleshooting and Maintenance - iPhone: The Missing Manual by David Pogue: http://oreilly.com/iphone/excerpts/iphone-themissingmanual/iphone-troubleshoot-maintenance.html - chapter "Doesn't Show Up in iTunes" it reads "don't plug it into an unpowered USB hub."
6 - Setting light intensity (comment)
I wish setting the iPhone light intensity would be faster. I wouldn't mind if the last screen, with the slider and the Auto switch was gone. Here is a naïve suggestion, where it's controlled in the Settings screen directly:
Fig. - (Norwegian: Instillinger/Settings, Lysstyrke/Light Intensity)
Of course Apple has thought about this. They don't want the graphical and functional overload of this suggestion, or anything similar. But maybe they would be able to handle the text in different languages (lengths) better than above? And the extra Auto button of the last screen - here, with no text, or some pop-up - combined in the slider, where my suggestion is to push it down and then slide it in lower position.
In some AppStore apps one just slide the finger up and down on the screen to get it lighter and darker. But if the SDK API allows a user to do this, then Apple can't (or will not) take it over as a system wide command? (Comment to 3.0)
Filed to http://www.apple.com/feedback/iphone.html
5 - Could not connect to any operator - had to remove and insert SIM card (open)
After I had an incoming call perfectly fine, coming home I sent an SMS. But it failed! The exclamation mark was shown. A resend did not help. I tried to call, but failed. Initially with no warning, but down in this procedure - with a warning. I could not be called. I had no Phone, just the i.
I looked at the service providers, they were three. The list looked correct. One of them was my wife's provider, which worked for her. We tested it. The Auto mode did not connect to any, and the forced mode seemed like it would connect, but it did not.
I switched the telephone completely off and on: no help. Then I switched off, took out the SIM card, inserted it again and switched the iPhone on. Worked!
Now I'll carry the supplied SIM card removal pin in my wallet.

I don't know to which degree any mobile could exhibit this behaviour from time to time. The program base from which the code is taken, and the degree of control when gluing that sw and some new together - for that particular phone, would probably never yield a 100.000% stable product. Now I am uncertain as to which side of the decimal point my phone is. However, hoping for updates does help.

Disclaimer: I do not know if, by coincidence, my service provider was down for that very period. That probability is very low. (3.0, 7A341 no fix yet - point 4 (below)-not done yet)
4 - Cannot connect to network "somename" (closed - was hw)
My iPhone just got unwilling to connect to any wifi (wi-fi) network - even if it displayed the list of possible networks perfectly fine. This most probably is a hardware failure, so it will be returned for repair. The Apple reseller agreed. My guess, as an old hw engineer, is that it's the wifi sender that waved goodbye.
I searched in the Apple support pages and on the net to try to get some tips. So, I reset the network settings in the iPhone, restored the iPhone from iTunes (both with and without backup (bear in mind that data belonging to your AppStore are not any "restored", but reappear on your next synchronization - provided you have a backup.)) - but nothing helped. Switched airplane mode on and of. Removed wifi password and tried different wifi locations that I knew had worked a few days earlier - it still could not connect. Beware, I always keep my iPhone in protective silicone and am careful with it.
I have a feeling that bluetooth also has died, but since I normally don't use it, I am not certain if the connecting problems there are finger trouble. (My iPhone serial number 85838VNMY7H, model MB046LL)
Result: I got a new "swap iPhone" back from service. (It's serial number 5K9276D6Y7H, model MB489B). Observe it's a new model number as well. It now works!
I delivered it to Eplehuset here in Trondheim on a Monday (in August 2009) at 12, it was received by Moobi in Oslo on Thursday at 17 (3 nights!), and the new was sent on Wednesday the week after and arrived here on Thursday (1 night!). That's about 11 days (*). I should have, but was not able to track what happended on Moobi's service page (it was not updated even if I received an SMS telling me it should be). I called Moobi on the phone and received both very supportive responses and one who said he definitively was not allowed to answer me (it should go through Eplehuset, he said, which would have been void, because when I asked them they told me to call Moobi). I called back and hit a different person.
(*) 11 days, when Eplehuset could have swapped the phone over the service department's counter while I waited, or delivered it 1 day after! However, my wife's old 1999 Nokia surviving in a box saved me those days, since my 2004 Sony Ericsson (in the same box) did not like my iPhone SIM-card.
(Norwegian phrases: feil på iPhone, repare, reparert, fikset, wifi sender funket ikke)
3 - Mobile data network settings partly lost (open)
Some times the mobile data network settings disappear, so I have to reenter. This also goes for the MMS settings. I have learnt it now, it's only three easy lines of text, but it's irritating. However, in case I forget, all the settings have been screen clipped and synched and moved into an iPhone picture album. So it's always with me! (3.0, 7A341 no fix yet)
2 - Audio memo with "zero size" plays (open)
I did some recordings the other day. In the list of memos, some display as length 0 (zero, null) seconds. But they play correctly, and the time progress line shows correct length. In PhoneView (point 1, below), size comes out as "unknown". (3.0, 7A341, no fix yet)
See http://discussions.apple.com/thread.jspa?threadID=2086056&amp;tstart=0
1 - "Empty" Camera Roll (closed Mac/Windows users, open for Apple!)
Right now the Camera Roll tabular view (with pictures in a table) looks empty! However, the count of pictures and the single thumb, in the list of all albums is right. And all pictures upload correctly - so that I may see them for the first time. So, I have a film type camera at the moment (not 100% true, though: shooting pictures very fast may help..). This all happened after - you tell me? See http://discussions.apple.com/thread.jspa?messageID=9850890#9850890
(3.0, 7A341, closed for me, open for Apple!)
Apple could have saved us iPhone users of this unnecessary frustration. The iPhone operating system could have discovered that the user "has put a picture into Camera Roll, but it displays none ..oops ..rebuild contents database (xml file?)". But then, in the first place, why does the operating system allow a program to corrupt a (database) file?
Reported to http://www.apple.com/feedback/iphone.html 
Fix (Mac) 
I discovered several places where this has been discussed over the years, a notable one being [1]. But I stopped at http://www.zeldman.com/2007/11/11/iphone-camera-bug/, Jeffrey Zeldman's blog. There, "Ben said on 24 June 2009 at 4:48 pm" (search for that text) pointed to the solution. There, Ben points us to PhoneView at http://www.ecamm.com/mac/phoneview/ by Ecamm Network. I downloaded the free trial version and did Settings, Show Entire Disk. I did like Ben had suggested and deleted the /Disc/DCIM/ folder on my connected iPhone. This is the same exercise that Finder allows me doing on any other camera (and I seem to remember that the iPhone's camera has been visible in Finder earlier?)
Now, Camera Roll again works as expected, it's empty and ready to be filled again!
Ooops... I experienced a problem with PhoneView, where it did not read Notes files etc.. I don't know if it in that situation would have failed to delete /DCIM. However, Ecamm sent me a procedure to rectify: quit PhoneView and clear its preference file at Home/Library/Preferences/com.ecamm.PhoneView.plist. Then do an iPhone/iTunes sync, and restart PhoneView. I have not verified this procedure, but post me if this helped get Camera Roll on the air again 2nd attempt.
Fix (Windows)
Ecamm Network (above) recommends TouchCopy for Windows users (see http://www.wideanglesoftware.com/touchcopy/). NeoDoc has confirmed that TouchCopy has directory delete functionality, and that - with the iPhone directory /DCIM gone - it works. But do remember to load the pictures to the PC first! Thanks, NeoDoc!
(Norwegian search tags: "problemer med iPhone, feil, virker ikke")
.

If you want to comment, please refer to section numbers!
.
.

Sunday, July 12, 2009

013 - Overview

10May2021: Moved to https://www.teigfam.net/oyvind/home/older-blog-notes/

Friday, July 3, 2009

012 - Wishes for a folding editor (2)

This blog has been moved to http://www.teigfam.net/oyvind/home/technology/060-wishes-for-a-folding-editor/ in January 2013.

That page also includes how to run winf32 on Apple OSX on the free WineApp (Wine) emulator, using free X11 (XQuartz), rendering Parallels and Windows not necessary (added january 2013)

Tuesday, April 7, 2009

011 - When is my mail really outgoing?

I would like to know about outgoing mail

I have this interesting case that when I am a visitor I am not allowed to send outgoing mail with my mail client (Mac OS X Mail 2.1.3), but I am with my iPhone (any version, including 3.1.2 October 2009). Both, over the local wireless network at the places we visit.

Disclaimer: sending and receiving mail with a net browser it not the theme of this post. That always works, from any location. I guess - since I am a known user.

Also, if I try sending mail from an iPod under these circumstances, I am neither allowed. With same mail set-up as the iPhone (iPod any version, including 3.1.2 October 2009).

At home

There, the outgoing mail server is smtp.online.no. All users of the wireless which uses that server with my name and password could set up their clients to send in my name. All machines on the net, including iPhone.

Visiting

The network at a friend we often see has smtp.bostream.nu as outgoing mail server. Since I want to send as myself, I have not asked for the friend's log-in details. So, Mail "refuses" me do send over that server, and trying to use the same set-up as at home it refuses me to send over smtp.online.no. I guess it's because the latter server knows the ip address or network provider I use, and then it knows who is sending: it's me, at home, I have paid for the connection: all is well. So, it's not Mail that "refuses", it merely reflects the outgoing mail servers' responses.

My queries

But why am I allowed to send via the visiting wireless from my iPhone (and neither iPod nor Mail)?

Observe that I have told the iPhone not to use the telephone connection by giving it a rubbish APN name - and configured the iPhone so that the telephone provider's server is second to the wifi server. I can see on the mail I this way am able to send from the iPhone that it's routed from bostream's dsl.bredbandsbolaget.se directly to my mail address's incoming server at start.no. My iPhone telephone provider does not seem to be in the expanded mail heading anywhere.

What are the (protocol) mechanisms?

Apple support discussion



Wednesday, March 18, 2009

010 - A running Promela model

Why does this code run and don't deadlock?

mtype = {M_UP, M_DW};

#define LEN 0

chan Chan_data_down = [LEN] of {mtype};
chan Chan_data_up   = [LEN] of {mtype};

proctype P1 (chan Chan_data_in, Chan_data_out)
{
    do
    ::  Chan_data_in  ? M_UP -> skip;
    ::  Chan_data_out ! M_DW -> skip;
    od;
};
proctype P2 (chan Chan_data_in, Chan_data_out)
{
    do
    ::  Chan_data_in  ? M_DW -> skip;
    ::  Chan_data_out ! M_UP -> skip;
    od;
};

init
{
    atomic
    {
        run P1 (Chan_data_down, Chan_data_up);
        run P2 (Chan_data_up,   Chan_data_down);
    }
}


Sunday, March 15, 2009

009 - The "knock-come" deadlock free pattern

Intro and disclaimer

This note is based on a published paper [1]. At the time of publication (2005) I did not think that chapter 10 would describe any more than an interesting case of software engineering. To this date it stays so. However, people have asked me about this pattern. This note therefore describes nothing new, but will add some more discussion.

Disclaimers: 1.) Should anybody claim this pattern as already used, invented or even patented, prior to 2005 - good! It is not known to me (but now I do know that I am not alone, see bullet list below). Please mail me if this is the case - so that I may be abe to honour it here - or obsolete - at least the suggested name. 2.) Even if the pattern is deadlock free, there may be errors in this note. 3.) Any usage of this pattern is out of my control and responsibility.
  • In Jan.10 I discovered that the "USL Distributed Event Driven Protocol" seems to be similar. See [4].
  • In Feb.10 I was made aware that the OpenComRTOS also uses a mechanism in the same street. See [5].
I have named the pattern "knock-come" for a rather obvious reason - the explicit behaviour it must display in order to function properly. The name does not fully describe the behaviour, but it should hold as a reminder.

Rationale

When two software threads or rather, processes, need to talk with each other at the same time, we would get a deadlock if they were communicating over synchronous, blocking channels. This note describes a simple software pattern that removes the possibility of deadlock. It also shows a formal model and verification of the algorithm, written in Promela and evaluated with Spin [2].

The original description, from [1] - of the "knock-come" pattern:
10. Deadlock avoidance
Where two processes spontaneously need to send data to each other, a blocking communication scheme might cause deadlock. This is a state where processes try to communicate – in a circular pattern – blocking for each other to become ready, and therefore unable to proceed. This is pathological and must not happen. All processes run at the same priority, so any priority inversion problem is ruled out in the system.
Figure at http://www.teigfam.net/oyvind/pub/ercim05_at_euromicro-2005/Figure_chapter_10.jpg from [1]. 

The pattern we chose to avoid this was to give the processes clear roles: slave and master. Master may send on the blocking channel any time (solid arrows) when it has something. Slave would never block on any spontaneous message, since the asynchronous “poll me” message (stippled arrow) lets the slave go on and not block, and then instead hang in an INPUT or ALT on the input channel. When the “OK, come on” message arrives from the master, the agreed upon protocol assures no deadly embrace.
Software architecture


Figure at http://www.teigfam.net/oyvind/pub/CPA2006/presentation/Fig1.jpg, from [3].

We see two processes, the top and bottom P_.. processes. The left dotted lines, downwards are asynchronous non-blocking send channels. One one of them is of interest now. Let's call it the knock channel (Chan_202 in the figure). It carries no data.

The other arrows are one up-going come channel (Chan_201) and the down-going channel (Chan_200). Both are synchronous non buffered and blocking send and receive. Both carry data, together with a tag that describes the contents. They are drawn like a two-way channel, but they are two one-way channels. In addition to the come message, these channels are also used to send the actual data - in both directions.

Message sequence in words

Whenever the bottom process needs to send data, it may do it any time. It is the master.

Whenever the top process, the slave, needs to send data, it may send one only query ("knock") any time. For the 1.) data up and the 2.) query - not to deadlock, the query is sent as a no data "interrupt" signal. The slave would send only once per session, so P1_Slave will always proceed (and not block) on this sending.

Whenever the bottom process decides that it has time to handle the query, it sooner or later sends the "ok, come on" up and immediately waits for the slave to respond to that message by sending the data down. Whenever the data has left slave, the sequence with the query may be repeated.

By sooner or later we mean that in the meantime the master may send any number of messages up. As we started with saying, the master may send any time.

The reason why the knock /query / interrupt channel has no data, is really that is simply that it does not need to have any data. Also, in real life, it is simple to implement an asynch channel with zero buffer.

Formal proof of deadlock freedom

The Promela model code below verifies to no "invalid end state", using spin / xspin. This means that it will not deadlock. Observe that with LEN set to zero it will deadlock. It has been modeled to resemble how the processes are coded with a standard synchronous methodology (language or library) - where only inputs may be ALT'ed over. (Note 010 above gives a very interesting deadlock free alternative.)

The code is my initial iteration on the theme:

mtype =
{
    M_KNOCK_DIRDOWN,
    M_COME_DIRUP,
    M_DATA_DIRUP,
    M_DATA_DIRDOWN
};

#define LEN 1 /* Invalid end state (ie deadlock) if this is zero */

chan Chan_knock_down = [LEN] of {mtype}; /* Chan_202 */
chan Chan_data_down  = [0]   of {mtype}; /* Chan_200 */
chan Chan_data_up    = [0]   of {mtype}; /* Chan_201 */

proctype P1_Slave (chan Chan_knock_out, Chan_data_in, Chan_data_out)
{
    bool Knock_send;
    bool Knock_sent = false; /* necessary? */

    Run:
        if
        ::  Knock_send = true;  /* non-deterministic setting to true.. */
        ::  Knock_send = false; /* ..or false */
        fi;

        if
        ::  (Knock_sent == false) && (Knock_send == true) ->

            /* Am slave, but want to get rid of my data now */
            Chan_knock_out ! M_KNOCK_DIRDOWN;
            Knock_sent = true;

        ::  else -> skip;
        fi;

        if
        ::  Chan_data_in ? M_DATA_DIRUP -> skip;

            /* Am slave, always able to receive from master */

        ::  Chan_data_in ? M_COME_DIRUP ->

            /* Got "come" from master, do it */
            Chan_data_out ! M_DATA_DIRDOWN;
            Knock_sent = false; 
        fi;
        goto Run;
};

proctype P2_Master (chan Chan_knock_in, Chan_data_in, Chan_data_out)
{
    bool Knock_received = false;
    bool Data_send;

    Run:
        if
        ::  Data_send = true;  /* non-deterministic setting to true.. */
        ::  Data_send = false; /* ..or false */
        fi;

        if
        ::  (Data_send == true) ->

            /* Is master, may always send */
            Chan_data_out ! M_DATA_DIRUP;

        ::  (Knock_received == true) ->

            /* Send "come" and get data, according to "contract" */
            Knock_received = false;
            Chan_data_out  ! M_COME_DIRUP;
            Chan_data_in   ? M_DATA_DIRDOWN;

        ::  else -> skip;
        fi;

        if
        ::  Chan_knock_in ? M_KNOCK_DIRDOWN ->
            /* Slave "knocks" */
            Knock_received = true;

        ::  timeout -> skip;
            /* global "else" to make "Chan_knock_in" input a poll */
        fi;
        goto Run;
};

init
{
    atomic
    {
        run P1_Slave  (Chan_knock_down, Chan_data_up,   Chan_data_down);
        run P2_Master (Chan_knock_down, Chan_data_down, Chan_data_up);
    }
}

Daisy-chaining this pattern

This pattern scales. You may take a slave's Chan_data_down and connect to another's Chan_data_up, and let a new master have one more Chan_knock_down from each new slave. This daisy-chains with loop-back, equal slaves, which must then share via-traffic for the others. I have proven it deadlock free with a slightly modifed Promela model.

References

[1] - From message queue to ready queue. Øyvind Teig, 2005. Subtitle: Case study of a small, dependable synchronous blocking channels API. "Ship & forget rather than send & forget". Ref chapter "10 - Deadlock avoidance". See http://www.teigfam.net/oyvind/pub/pub_details.html#Ercim05 and read at http://www.teigfam.net/oyvind/pub/ercim05_at_euromicro-2005/paper.pdf. In First ERCIM Workshop on Software-Intensive Dependable Embedded systems. Editors: Amund Skavhaug, Erwin Schoitsch. ISBN 2-912335-15-9, IEEE Computer press

[2] - Promela and Spin. See http://spinroot.com/ and http://en.wikipedia.org/wiki/Promela

[3] - No Blocking on Yesterday’s Embedded CSP Implementation. Øyvind Teig. Subtitle: The Rubber Band of Getting it Right and Simple. In Communicating Process Architectures 2006, Peter Welch, Jon Kerridge, and Fred Barnes (Eds.) IOS Press, 2006, pages 331-338, ISBN 1-58603-671-8. Read at http://www.teigfam.net/oyvind/pub/pub_details.html#NoBlocking

[4] - "USL Distributed Event Driven Protocol", described in Universal Systems Language: Lessons Learned from Apollo. Margaret H. Hamilton and William R. Hackler, Hamilton Technologies, Inc. In IEEE Computer, Dec. 2008 pp. 34-43
("USL"). Also see my 007 - Synchronous and asynchronous, where this is discussed thorouhgly.

[5] - Comment [C.4] of 007 - Synchronous and asynchronous

--

Sunday, March 1, 2009

008 - Safari oblivion - Firefox to the rescue

I did something legal and lost both new and old Safari

Today (March 1st 2009) I downloaded Safari 4.0 beta for Tiger, to run on the iMac G4 (800 MHz) and iBook G4 (1.33 GHz) - both running Tiger 10.4.11 and security update 2009-001.

The conclusion now is that the on both machines, I have no working Safari browser! The beta crashed on both machines, and the old Safari did not work on either - I started Firefox and downloaded Safari 3.2.1 for Tiger to be reinstalled.

The good tip is to have more than one browser installed on your machine! Should the browser you updated fail, you'd have an easy road to the net. (There is ftp on any machine, to download new versions, or you would have more than one machine or friends with machines, and a memory stick..)

Safari.crash.log

See next - Safari discussion group:

This note at Safari discussion group

I have added this note to the Safari discussion group at Apple's site. Some quite good comments there: http://discussions.apple.com/thread.jspa?messageID=9084774&#9084774


Solution

1.) Delete the Safari.app (it's probably a mix of 3.2.1 and 4.0 beta?)
2.) restart the machine
3.) install with Safari3.2.1Ti.pkg (downloaded with Firefox) 
4.) run it for a day, install another browser, then go ahead with Safari 4.0 beta

Cause of problem - and a suggestion for Apple

Prior to installing the 4.0 beta I had moved the original Safari.app to a subdirectory and even renamed it. The Installer got confused - without warning me and do appropriate action - and the unInstaller also got confused (see Apple discussion thread).

Apple should enhance their install software (script) not to err (so fatally for some who would not have an alternative browser) - since it's completely legal to move and rename applications.


Sunday, February 22, 2009

006 - Preferential programming versus me

This post is in work

My goal with this post is to try to position paper [1] and [2] and my own programmer's life, perhaps with the table below. The table may be removed later, right now I will see if it helps me even writing this post.

(un)real disagreement
I prefer Why? ! Why not?
Why not? Why? They don't prefer
Doesn't interest me Why? agreement Why not?
Why not Why? Doesn't interest them
I don't prefer Why? ¡ Why not?
Why not? Why? They prefer
(un)real agreement

References
[1] - Epistemological Pluralism and the Revaluation of the Concrete
Sherry Turkle and Seymour Papert
http://www.papert.org/articles/EpistemologicalPluralism.html
[2] - On the difference between analysis and design, and why it is relevant for the interpretation of models in Model Driven Engineering
Gonzalo Génova, María C. Valiente and Mónica Marrero
http://www.jot.fm/issues/issue_2009_01/column7/
[3] - Epistemology
http://en.wikipedia.org/wiki/Epistemology
...
...

Monday, February 9, 2009

005 - Press '?' for help, press '!' for new idea

This post is a copy of a the initial (27Aug08) version of a note that was first published at the "Designer's Notes" at my home page (press picture on top of this page..).

..or right at http://www.teigfam.net/oyvind/pub/notes/17_Innovating_in_a_window.html

----- copy begin -----

Innovating in a window ("winnovating")

Always present '?' is for help, but why isn't '!' also always there?

Online help systems [1] have been at our fingertips for many years. I remember, back in the early 1990's that we started to use a "help editor" to create a "help" for the Windows systems that we shipped to customers. The systems were clients, doing man-machine communication, with buttons and menues, and nice curves of pressure samples from rotating diesel engines. The embedded data collecting and computing units were mounted in the ships' engine rooms, while the PCs were in the engine control room. And, the intricacies of the system were detailed for the user, available by pressing the ? question mark button. The help was context sensitive, so that one should get the info needed right then. Not more, not less.

Over the years, we have become accustomed to a computer based unit's context sensitive help system, whenever there's knowledge to reach for.

But, how about the opposite? Some new idea or additional information, some small or large innovation we want to jot down, now! The other direction from the help system, so to say, seen by an ! exclamation mark.

Implementing such an exclamation mark would be difficult. It would contain tools, complex logistics and legal matters. At least the suggestion outlined here.

We talk about context sensitive innovation "in a window". Cast in an idea-editor, especially made for the purpose. More that the "send us feedback" menu entry often found.

When we have jotted down the idea, we would need to store it. An idea-server would handle this for us. It would store the idea where it's supposed to. Like, on my local machine.

Or, you may want to send this idea to the maker of the product or anyone who could handle it.

Sending off good ideas right now is a black hole. The recipient could wrap the idea to oblivion. Therefore, we need an idea-agency or idea-bank, a public and safe place where the idea may be posted. The service should be free, since an agency would get neutral money. The people has understood that it's for the best of all, to have an idea-boiling society.

Now, when a user is able to take advantage of the idea, its source is cast in iron. It's me, and it's my idea that's used. For the user of the idea, "not invented here" could become an asset. "Idea! inside" labeled on the product could display this. People would love these products.

And the user would easily find ideas, through some kind of global idea-portal.

The system should be able to inspire any small or big idea. Jot them down, send them, cast them in iron. And idea-sense would collect money for used (and browsed) ideas.

Of course, this would be sitting above the world's patent system (or..below?), like PayPal uses the banking system to make it easier for the payer.

Did I say that the idea-bank should have an idea-server to handle new ideas coming from reading another person's idea? Stored locally at my machine only, or sent externally to the idea-bank.. So, idea-branching should be catered for. Ideas seldom appear in vacuum. Is an idea the most recursive cognitive pattern in the universe?

Humankind certainly needs to come up with some new ideas. We can't afford to waste one of them!

Except some, that would not serve us..

---

This naive set of ideas I have never seen before. I have made a pdf of the original version of this file at 17_Innovation_in_a_window_27Aug08.pdf virtually becoming my safe? idea-bank. Should this not be new, it would certainly be against my knowledge. If so, please mail me. Should my use of words in this note infringe on any trademark etc., rememeber that I use them in a descriptive context only, not pertaining to any such registered use.

This idea is open for use by any. But (disclaimed above): don't think it's your idea! So, give me what's my part of it!

However, it would need much de-naivification!


----- copy end -----


Sunday, February 1, 2009

004 - Living with a network disk in the house

This note is updated at my new blog space only, blog note http://www.teigfam.net/oyvind/home/technology/050-sound-on-sound-and-picture/. Welcome there!

Intro

Updated 28Feb2012.

Chapters 1-8 (before Nov 2011)
Our network disk was connected to an Apple AirPort Extreme, version 7.3.2 (1Sept09: 7.4.1 (after 7.4.2 failure (*)) - but the problems below still exist), over its USB line, with no hub. Mac OS X Tiger 10.4.11 on this machine. In this post I will discuss aspects around having a network disk.
(*) If I ever get any of these problems after the update from 7.4.1 to 7.5.2 on Dec. 2010 (and Oct. 2011!) (where Apple seems to have done a version quantun leap) I will update here. If not, consider points closed. New: follow on 004.6 - Airport Extreme version juggling
Chapters 9-.. (after Nov 2011)
Apple Airport Extreme with external network disk over USB replaced by Apple Time Capsule with internal NAS disk.
Chapter 11. February 2012
11. File creation- and modification dates years ahead and synching with ChronoSync
1 - Disk write access lost

Today I ran iTunes (as we're getting used to now, against the network disk as described in the previous post) when iTunes said something like this: "Could not store the iTunes Library file. Unknown problem (-50)."

I thought that this was a multi-access problem, even if no of the other machines were on. Maybe they had left the file in as read-only? I checked the named file on the network disk: nope. I saw no problem with other files, either.

But when I tried to make a new directory on the network disk, I also got the (-50) error! Some access rights problem for the whole disk I soon learnt!

I started the Airport tool (5.3.2) and disconnected "all users", and disconnected the USB cable for some seconds and then connected again. Then I mounted the external disk again from this machine.

Problem gone!

Here is my recipe to reproduce this error (there may be others): My Tiger iBook is connected to the home network via cable. Airport is switched off. The network disk has, prior to this, been automatically mounted with the Apple Airport disk tool (1.5). I then unplug the cable, and Finder (or the disk tool using Finder?) spins around to eventually discover and tell me that the network disk connection is lost. During that waiting period I try to use the network disk, which is still to some extent visible in Finder - or it may have been that I plugged in the camera, which Image Capture did not see during that time. When I later plug in the cable and mount the network disk manually, write access to it is lost.

2 - iPhone crashed when iTunes got (-50)

Incidentally, my iPhone (2.2.1) was connected to iTunes when I got the (-50) error. To my surprise it crashed and restarted when I had an unacknowledged error (-50) window waiting for me. And it crashed again! And again!

I am not 100% positive that I have seen cause & effect correctly here, but until I see it again this would suffice.

Why did it start again without asking for the telephone pin code? I though this was strange, so I switched the iPhone nicely off and on again. Then it asked for the pin code.

There is a history to the iPhone here. It had, prior to this, restarted because I had received 8 MB of attachments in a mail, that I tried to delete while it was spinning to input.

When problem 004.A was solved I synchronized the iPhone. It now seems to run fine!

3 - Backup of the network disk

Observe that if you have a network disk, you are bad off if it dies on you. You only have that copy!

Observe that the longer a disk has been working fluently, the shorter it is till it fails!

There are several things you may do to soothe the situation, should this happen. Here I list what I do, there are a hundred different other ways to do it.

Pictures, f.ex. I synchronize between the network machines, so that at least one of them has a copy. I use ChronoSync on the Macs, and tells it to "Synchronize Deletions". This means that the network disk ends up with a directory ("archive") which effectively contains the old files, the garbage.

However, with a centralized iTunes library (see post 003) it's different. You would have only one copy. So you would need to mirror or backup or synchronize your network disk with yet another disk! And once you find out how to, this turns out to be A Good Thing for all your files.

Try having another disk, of equal size, to the network disk stored at a friend or neighbour or at work. In another house. Then you would be safe against burglars and fires, while the disks are separated - so make the period they are in the same house short. However, with this scheme there would be lag. Synchronize 4 times a year, and you would loose max 3 months. A combined scheme with local synchronized copies then helps you almost to 100%.

I use ChronoSync also for the backup copy of the network disk. I "synchronize" all of it - quoted because I only do it for that disk from the main to the backup - one way. Having snapshots of the whole disk, times 'n' soon fills up your backup. With synchronization, the backup proper is increased or decreased in size along with the original system. Only the garbage directory grows - but you could delete that "archive" whenever you want to.

Observe that backup of the bootable parts (with system files) of your machines is an altogether different story. And backup of programs as well. However - most of that stuff has not been generated by you, so it's very probable that it would be possible to recover them. I mean, Apple iWork or Microsoft Office you would find on the original DVDs.
On Mac, Time Machine would help me with all of the factors above. When I installed the network disk, the Mac OS X version Leopard asked me if I wanted to use that disk for Time Machine storage. It's very nice, but I declined. Since we we also have earlier Mac OS X versions (Tiger) on the network, and since the hand-scheme I use serves us well, I decided to decline. And I don't really need to recover my system 143 weeks ago - and would want that storage space to be used for my daily more or less linear increase.

A psychological question now seems quite appropriate: wouldn't it be good for mental health to actually have a broken disk once or twice in a life time? Or even more often? Why were we supplied with the ability to forget? One thing is certain, some times that is necessary, too. And the controlled version of a broken disk: to throw away. That, too, is a privilege - some times.

4 - Airport and cabled mounting of disk is not seemless ::

If I connect my Airport Extreme network disk by cabled connection, then unplug the cable with the Airport active on my Mac OS X 10.4.11 Tiger iBook, I get a long period when the cabled connection will time out. This makes the file system non-responsive for that period.

I would like the Airport to take over this connection dynamically. I have a mental connection to the network disk. The operating system should make it like this for me - and to the client programs. (It could, immediately ask me if I wanted to switch to Airport (or back to cabled), if a "finger" is thought necessary in the handling.)

Filed to http://www.apple.com/feedback/airportextreme.html on 29 July 2009.

5 - Time Machine backup on Airport Extreme's USB connected disk ::

This chapter is obsoleted with this fact: "Apple does not support Time Machine backups to a drive connected to an AEX". See http://discussions.apple.com/thread.jspa?messageID=12975885#12975885 (started chapter 6 below, date 23Jan11). I also updated with this info on Wikipedia: http://en.wikipedia.org/wiki/AirPort#AirPort_Disk
  1. 6Jan11:
  2. Mac OS X 10.6.5 Snow Leopard mac Mini
  3. Airport Extreme serial number 6F8390GLYEW version 7.4.1 (tried both 7.4.2 and 7.5.2)
  4. Using AirPort Tool 5.5.2 on Mac Mini
  5. Decided no to use corresponding AirPort Tool 5.4.2 from Tiger in fear of compatibility problems
  6. Network disk is Western Digital myBook 1TB type 0x11102 connect to USB on Airport Extreme
  7. 20Jan11: (see log in chapter 6)
  8. Airport Extreme 7.5.2 (75200.14 when I press the version number)
  9. 22Jan11: (see log in chapter 6)
  10. Airport Extreme 7.4.2 (74200.9 when I press the version number)
  11. Airport Extreme 7.4.1 (74100.25 when I press the version number)
Had several problems with destroyed Time Machine image on the network disk. Lost with Airport Extreme 7.4.1 once but when I changed to 7.5.2 I lost again almost immediately, so I went back to 7.4.1.

It is very bad to loose the Time Machine backup! With this experience it's not a good idea to use Time machine as an archive, only backup! I use ChronoSync for archive!

By intuition I though that I could try yo move the disk cable! When I connected the disk to Mac Mini, Time Machine allowed me to start all over on that disk. I didn't. But when I put it back to Airport, Time Machine could not see it. If found a recipe on MacWorld: Take the disk back to Mac Mini and run Disk Tool and let it verify and reapair. I did - and the disk had error! The Extended attributes file had wrong number of access control lists (4949 instead of 4952), whatever this means. I let Disk Tool repair it and plugged it back into Airport. Now Time Machine saw it, exactly like MacWorld had said!

I am now running Time Machine anew with the 6Jan11 versions, crossing my fingers.
.
6 - Airport Extreme version juggling ::

This chapter may be related to problems described in intro above, chapter 5 above, and to 020 - Mac OS X network disk partially seen. I will try not to repeat, but update new things here. However, there is much version and config info up there.

Summary
  1. OLD IS BEST: Airport Extreme old 7.4.1 seems more stable than 7.4.2. The newest 7.5.2 has crashed and restarted on some occasions ("much" traffic). Presently running 7.4.1
  2. REPAIR DISK: Network disk needed repair (why?). May this have been the cause of Time Machine backup lost? See chapter 5 above.
  3. MOUNTING: Mounting the network disk for iTunes on Snow Leopard must be done by "connect server", not double-clicking. See 020 referenced above.
  4. DUBIOUS: There may be a problem with different AirPort Tool client versions if I used them at the same time on different machines. Now only using the newest 5.5.2, on Snow Leopard. How about two of same versions up?
MyDiskAcidTest is that I press "New Folder" on my network disk. If unkown error (-50) then it failed, elso ok with a new directory!

Log (newest bottom short log in (see log in chapter 5))
  1. 6Jan11. Chapter 5 above done.
  2. 7Jan11. The Mac Mini is always on, never idle. But when I came back to it tonight, the network disk was gone (for the millionth time), and I had to unplug/plug it the Airport Extreme 7.4.1. I had not used any Airport tool in between. Time Machine had a compliant up that it had not been able to run the backup. But the two network disk icons were there, I was able to unmount and mount again ok. But MyDiskAcidTest failed.
  3. 8Jan11. Same problem as yesterday: Time Machine had failed and MyDiskAcidTest failed. Unplugged/plugged the USB cable in Airport Extreme, then ok. I decided to look further at the MyBook Home (WD10000H1CS-000) network disk.So I downloaded from Western Digital's page here. It really said to update from Tiger (10.4.x) or Leopard (10.5.x) but did not mention Snow Leopard (10.6.x). I chose Tiger (even if Snow Leopard probably would have been ok). Then I went into Activity Manager and killed two processes named WD_*, I could see that they were both some Western Digital button manager etc. But I did not write it down. I then ran Disk Tool and verified, and there appeared an error again! I fixed as with chapter 5 above. The Tiger Disk Tool said it fixed it but then summed up in red that it was unfixable! Anyhow, I then updated the MyBook Home with WD_MB_Home_1034 (1.03).app that had to be run from the downloaded image. The program said update was successful. I then ran Disk Tool again and now all was fine! I did not "Download and install the latest WD Drive Manager program" as in the recipe, as the disk appeared fine and passed MyDiskAcidTest. Another observation is that the disk needed repair even if I had stayed at Airport Extreme 7.4.1 and Airport tool 5.5.2 on Mac Mini all the time!
  4. 19Jan11. Still working (since 8Jan11), after almost a week! Time Machine works, iTunes runs continuously, and the Airport Extreme also runs!
  5. 20Jan11 - Time Machine stopped! However iTunes ok, MyDiskAcidTest, wifi ok! Remember that last time (8Jan11) MyDiskAcidTest did not work! So now only Time Machine stopped! So, updating the disk firmware may have helped? But Time Machine could show the files, I could restore - but it complained that it could not go on with the present data base after having verified it. So, if I now had trusted Time Machine, my 28 GB would have been lost! Now I try Airport Extreme old 7.5.2 again.
  6. 3 hours after. Wifi died! Easy to see on all equipment. But MyDiskAcidTest and wired network was fine. In my bewilderness I opened the AirPort Tool, and it showed green status. So I pressed the green "light", and it reported "no problems". After this, wifi came back. The physical LED had been green all the time.
  7. 22Jan11. Airport Extreme 7.5.2 restarted several times, I think during copying to the extern disk. Another thing I had noted was that the disk never spinned down, which it had done with 7.4.1! AndYellow and blinking yellow LED. "Initialized (7.5.2)" or something like that in log. I lost Wifi and wired ethernet, and internet. It crashes so much that I'll try 7.4.2 (not 7.4.1 again now). Time Machine and MyDiskAcidTest are ok when the router is up. But what happens with the Time Machine data base on the network disk if it fails during updates?
  8. 22Jan11. 7.4.2 just crashed almost immediately! Giving up, reverting to 7.4.1.
  9. CONCLUSION for now: going for 7.4.1, switching off Time Machine on the Mini, and will run it by hand. However, I will use ChronoSync for real backup work, since Time Machine with the network disk simply cannot be trusted. Also, will have to mount iTunes disk by hand, see Post 020. Will not throw away more time before Apple updates 7.5.2 to something that works. Updating the MyBook network disk firmware helped, see above - so it's not been a complete waste of time.
  10. 23Jan11 - yes, the network disk now does spin down again, within some minutes after last usage. 7.4.1 is best.
  11. 23Jan11 - reported this to http://www.apple.com/feedback/airportextreme.html with this text (minus links to here): "My conclusion is that Airport extreme 7.4.1 is the only present version that I can use. 7.4.2 or 7.5.2 will not work. Even with 7.4.1 I have to do Time Machine manually, so that I hopefully will not loose my backup. Even then I do ChronoSync backup to make sure, since Time machine cannot be trusted. iTunes with that network disk is now ok running continuously, as is general access from other machines - even if I have to mount iTunes' network disk by hand. And now the network disk spins down when it's not in use like it should. Airport extreme serial number 6F8390GLYEW. Before I updatde the firmware on the MyBook disk, also 7.4.1 was unstable."
  12. I also posted the same as a support discussion, see http://discussions.apple.com/thread.jspa?threadID=2730728&stqc=true. Maybe there is some help to get 7.5.2 up again?
  13. Have a look at this: "Apple does not support Time Machine backups to a drive connected to an AEX" (ref http://support.apple.com/kb/HT2421?viewlocale=en_US "Uses for the USB port of Time Capsule, AirPort Extreme, AirPort Express"). I replied in the post that "Another thing, if Apple does not support Time Machine on an Airport Extreme eXternal disk AEX - then why do they allow me to select it? And run the animal every hours for a week or three, let me extract files from it, until one day - bang!"
  14. 2Feb11 - Wifi stopped after 1.5 week! I had to restart the Airport Extreme (7.4.1, no use of Time Machine).
  15. 21June11 - trying 7.5.2 again. Just a temptation..
  16. 27June11 - reverting to 7.4.1 again. Same problems as described above. Any surrounding updates hadn't fixed the problems.
  17. Filed to http://www.apple.com/feedback/airportextreme.html on 27 June 2011.
7 - Backup of the network disk was only a partial backup! (Access problems) ::

The network disk (figure, see Post 019) I synch by hand with ChronoSync (Mac), so I may loose the disk at any time without loosing anything within a week or two. Even the iTunes library I do a one-way copy into one of the permanent machines.

To complete the backup regime I use a disk the same size as the network, located in another house, which spends its life unpowered inside a plastic box meant for the freezer. Two to three times a year I bring it home and mirror the running disk onto it. In the daytime, while I'm home.

Both are 1TB disks, so I don't want to copy over the network. I disconnect the USB of the local disk and connect directly to the Mac Mini. The external drive I connect to FireWire on the same.

However, I only now solved a problem where, what's happened is that I really didn't get an exact copy. I had tried to copy with Finder, but some problem had it stop. And Finder stops after an error report, which ChronoSync doesn't. So I have used ChronoSynch with Backup Left-to-Right or Blind Backup Left-to-Right, but it complained that I didn't have access right to some of the files (reading access right, even if it looks from the log like I had writing access right problem).

This must be because the directories have been created from any of the connected machines, while it stood as a network disk. Since the disks now were connected directly, I tried to change the access right recursively at the top level for the disk as a whole. There even was an Ignore access rights to this disk, but none of them solved my problem.

What worked for me (disclaimer: in perspective - don't do this - see quote below) was to set the access rights to each of the few top level directories, recursively on subdirectories. It took a while. To start afresh I formatted the destination disk. Now, copying the some hundred GB of data went like a dream! All came over, no files were lost (I hope!). It seemed to work fine when I reconnected the network disk to the Airport Extreme again. iTunes worked fine, Time Machine etc. And ChronoSync from the other machines with the network disk.

Quote from an e-mail from somebodey who knows better than me:
- What I do know is that a 'network' drive connected to an Airport Extreme acts as Network-Attached-Storage (NAS) and is managed by the AFP server built into the Airport Extreme. All files and folders created on the NAS volume have ownership, group membership, and read/write/execute permissions set by the Airport Extreme and AFP.
- Connecting that NAS drive locally to a mac can deliver unexpected results. If I were to attempt such an operation I would most certainly not change all the ownership, group membership, and read/write/execute permission recursively on the volume.
By the way, we also some times send the best pictures to family, a pleasant backup type! And wo don't use Dropbox or any other file hosting services yet. And music is here, no streaming yet.

8 - iTunes 10.4.1 and Snow Leopard 10.4.8 with destroyed files ::

(Oct 2011) -8084, -8072 etc. unknown error codes

I tried to iTunes-synch the the iPad with the picture library I now had had for years, on the network disk. It complained that it could not synch the pictures, that I did not have correct access rights for the some 450 last pictures. I tried again. Same problem. The iPad picture library was acomplete mess! Pictures in wrong folders etc. Then I decided to move the source library into the Mac Mini and observe how it failed.

One jpg file seemed to have an IPCT digest code that Mac OS or Finder or iTunes did not like(?). When I copied the group of files individually I got them across!

Then, some of the jpg files were unix executables from Snow Leopard, and not accepted by iTunes. But Tiger saw them as proper pictures and I saved them under new names, deleted the old (not allowed from Snow Leopard), and named back to original.

Finally I was able to get a clean 2804-numbered picture library that iTunes again synched!

I seem to experience increased problems with the Airport Extreme controlled MyBook disk. I don't know what to do.

How about a Time Capsule with built-in server grade disk? Will it come with Thunderbird? Hmm.

9. Moving from Airport Extreme to Time Capsule ::

See http://oyvteig.blogspot.com/2010/08/019-play-with-network-disk-based-itunes.html#fig2 for the figure.

There were several reasons for the move:
  1. A while now I have been running iTunes on the Intel Mac Mini, and its Time Machine backup software will not work correctly on the disk that I had connected to Airport Extreme [1]. Time Capsule is made for it. Apple "forced" me to buy an Apple product. As a programmer I know how complicated making things work across platforms is, but then I may be too forgivable.
  2. The Western Digital myBook external hard disk made too much noise when it at least once per minute seemed to be accessed. It didn't seem to spin down ever, especially not since I started to have iTunes always run (I didn't play all the time!). This may not be a blame on myBook, but I did't like it. Time Capsule spins down under the same circumstances. And I can't really hear it when it runs.
  3. I had updated the firmware on myBook, but in a way there was some problems left. The result seemed to be the "Airport Extreme version juggling" above. Now I run Time Capsule's latest firmware version. It seems to be ok.
  4. I had problems with access to myBook (read: Airport Extreme'sn USB connected hard disk) from iTunes (on Mac Mini with newest OS) and iBook running Tiger. Picture directories for iTunes synch had to be created from the Mini, but could be filled from Tiger. I also saw some files turning up as "unix binary" as seen from the Mini, but perfectly ok jpg from Tiger. I hope this will not be so with Time Capsule.
  5. Lots of pictures have turned up to have been created in 2013, some two years from now.
  6. Synching with ChronoSynch between the machines started to take time. I could see 8 minutes. Not it's under 2
I studied Time Capsule's supposed heat problems, but decided to try it. The place I mounted it, it has never become as hot as the Extreme, even if max dissipation is 34 Watt for the Capsule, some 13 Watt more then the Extreme. I mounted Capsule below all units, and it has freen air underneath, and is held by a solid aluminum bar, that I thought would help cooling. I have never hear it start its fan, which I think is there also at this version [2].

I think our internet connection has become faster. It feels like it, even if the service provider has not upgraded.


This chapter is not a recipe. Apple has the recipe [1].

But you might encounter problems. I did. I also did at least one thing wrong.

The new iTunes directory structure [2] is very clean, as opposed to the earlier. I wish I had looked at [2] and [1] again before this exercise. But when the iTunes config dialogue asked me to give the position of the new "iTunes Media" directory, I thought that since I had always there pointed to the iTunes base directory, that Apple now had decided that it should be called "iTunes Media". So I made the new position on the Time Capsule disk to be "iTunes Media". When iTunes had moved the files another "iTunes Media" directory had appeared underneath. It was empty. It started to smell.

Lesson one: the root iTunes directory is still "iTunes". When you want to tell iTunes of the new position, make this "iTunes" directory - and a directory called "iTunes Media" under it. Then, point iTunes to the latter! Observe that an "iTunes Music" directory is gone, it's now "Music" under "iTunes Media".

This is a change in the iTunes config dialogue box semantics that Apple did not get across to me! It would have been easy to either explain, or just let me point to "iTunes" and they could have added "iTunes Media" themselves.

This seemed to cause a lot of problems. But I had a backup copy of my complete iTunes system, which was nice. But before that, iTunes all of a sudden told me that my "iTunes Media" file complete path had a "-1" or "-2" in the part of the path that contained the name of the Time Capsule's internal disk name. Like, instead of "CAPSULEDISK" it would be "CAPSULEDISK-1" or "CAPSULEDISK-2". This was complete nonsense, and iTunes then could not find the place where it should find the files.

I did not fix this before I had started all over, with correct "iTunes Media" pointer, and the old data iTunes base files. Now iTunes moved over and placed all "media files" in subdirectories in "iTunes Media". Fine! After this I stopped iTunes. Moved data base files to just under "iTunes". Then started iTunes by holding down the command button. Fine! (According to [1] it seems like iTunes do move these files?)

Almost fine! But some of the files were not seen! I could not understand a thing, so I exported the library to a text file. I inspected it and searched for the old file position, like "MYBOOKDISK" for13 files that iTunes had told me were not there, when I tried to access them. I noticed that I could not open the directories they were in, because I didn't have access. The myBook disk was now not connected to the parked Airport Extreme, but to the Mac Mini. I changed access rights to them, and moved them to the new Time Capsule disk. I then (after lots of fiddling), I deleted them in iTunes, and imported them anew. Voila!

But iTunes hadn't said a thing! If I hadn't been so accurate and visited every song (open list mode and arrow down and don't expect and exclamation mark), my directory could have rot on root. Apple has chosen to inform when a song is accessed (playing or synching). But, I wonder what the reason is for not telling during moving?

Another thing, keep the "sentinel" file [3].

Reported to http://www.apple.com/feedback/itunesapp.html

[1] - iTunes for Mac: Moving your iTunes Media folder (Windows)

[2] - What is the default iTune Folder Structure for iTunes 10? (see graphics somewhat down)

[3] - What is the Sentinel File in the iTunes Directory?

Afterword

When I wanted to synch the pictures, iTunes failed for some reason. The pictures again should be on the external drive. I deleted the "iPod Photo Cache" directory and restarted. No help. After two hours of trial and not succed, I tried to move the last synched picture directory from the Mac Mini to the external drive. I also deleted "iPod Photo Cache" there. Only then did it complete the synch, with pictures on the iPad again. Please, Apple - say something understandable in a dialogue box when things fail!

I did get an "unknown error 1630" that iTunes "could not search for updates for operator configuration for iPad" (translated from "iTunes kunne ikke søke etter oppdateringer for operatørinnstillingene på iPad. Det oppsto en ukjent feil (1630)" in Norwegian.) I don't know how this should have influenced picture synching.

Analysing afterwards. I had made a copy of the whole Time Capsule picture directory, and now wanted to delete it. But there was one file that could not be deleted, since it was "used", Lion said. This was not so, it was a jpg having become a "unix binary" (see chapter 8 above). I saw that this was also present in the directory that iTunes had used to synch the pictures, but that "picture" was not synched, but the rest was ok. When I looked at the file from Tiger - this time it was also a binary. But as I did not succeed in deleting the file from Lion, I was from Tiger. I have no idea if this was the problem, but since iTunes did complete the synch, my guess is that this was not the problem.

11. File creation- and modification dates years ahead and synching with ChronoSync ::

I had seen files get creation dates and modification dates into the future. For perhaps a year, but synchings seems to have been ok, since I probably haven't modified much on these files. I have kept an eye on the results, but the other day I got an overwrite. I found the original in "_Archived Items".

A while ago I asked ChronoSync what I could do. They were not sure, but sent me this reference to some scripts: http://hints.macworld.com/article.php?story=20060703160750583. The script I ended up using, some half a year after, I think is based on one of those. I did some work on it back then. I have informed Econ Technologies support about my new endeavours here.

I have two Tiger machines and one Lion. I now have one Time Capsule. All updated to newest versions.

I have not synched many of these files with the machine that now runs Lion, which previously ran Snow Leopard and before that Leopard. But I have synched a lot between the Tiger machines. Always used ChronoSync with updated versions. The obsoleted Airport Extreme with MyBook disk connected over the USB port was updated once with new firmware. This blog tells a lot of that experience, which ended with Time Capsule. Almost any part of this chain could have garbled the file dates.

Here is how I was able to fix this. I now have no file from the future. Yesterday I had almost 10.000!
  1. In Tiger I did a spotlight search of jpg files at a given top-node directory. I took three different large directories, one per time. I have my corresponding three .synch files for the same.
  2. I added a search criterion of creation date after the next date. Lots of files appeared.
  3. I tested the script below, and saw that it worked on an individual file down in the directories somewhere. Creation and modification dates were now for today.
  4. I dragged all the files that were from the future into the script and waited. I could see spotlight update with less and less files. I had to take jpg, pdf etc. in chunks. Do observe that the jpg I started with at the top doesn't matter when you add a new search criterion.
  5. I added a search criterion of modifcation date after the next date. Lots of files appeared. I repeated as above.
  6. Then I synched with ChronoSynch, but important - I told it to to resolve conflict with "Use Left" instead of "Use Newer". Left is the machine I'm sitting at. After I had synched all, I set it back to "Use Newer" again.
  7. I checked again to see that all seemed fine. For some reason less that 5 files remained. So I took them over again. Ok.
  8. My aliases were not willing to be fixed. I just deleted them, as I really didn't like them. Search does it better than keeping alisases.
  9. I updated the other Tiger machine by first doing a hard move to the network disk, as a backup (of the backup (of..)), then just copied all from the synched directories on the network disk to that other Tiger machine. Then I set up new ChronoSync scripts for the next runs.
Here is the script I earlier had inserted into Mac OS X Script Editor and made an app of. It was commented that it did not work for files dragged and dropped onto it from the search window. But it did! (Test it first on one file and don't blame me if it does not work). When I once dropped some 5000 files on it, the script ran for some half an hour. But you may follow it in the search window, that the file number count decrements:

on open files_
set cnt to 0
display dialog "Start"
repeat with file_ in files_
tell application "Finder"
set file_ to POSIX path of file_
do shell script "touch " & quoted form of file_
set cnt to cnt + 1
end tell
end repeat
display dialog cnt
end open

I will update here should files creep into the future again.

I certainly would like this automated with ChronoSync. I'd like an - "If creation date or modification date is after now, then set both to now" - function!
.

Archive and about

Popular Posts

Øyvind Teig

My photo
Trondheim, Norway

All new blogs and new home page start at
http://www.teigfam.net/oyvind/home

Overview of old blog notes here

My technology blog was at
http://oyvteig.blogspot.com

and my handicraft blog was at
http://oyvteig-2.blogspot.com

PS: just call me "Oyvind"