Thursday, November 07, 2013

The weirdly under-appreciated power of Microsoft Access - Saved queries behave like Oracle Views.

It was only when I was recently forced to explore SQL subqueries (there's a reason people invented functions and even Entity SQL) that I realized why Microsoft Access [1] is so much more powerful than, say, SQL Management Studio.

Yeah, you can access lots of diverse data sources, do (except, weirdly, for unions) ANSI SQL with an excellent GUI tool, store data locally, etc etc.

That's good, but the weird power is that Access treats queries as though they were views. It's trivial to do deeply nested subqueries, create libraries of modular queries, etc.

Except I must be missing something, because this is too obviously useful...

[1] Old, weird, creaky, infested, bizarre, baroque Microsoft Access, whose useful bits have changed very little in the past 16 years and which is a Frankenstein of every Microsoft technology since 1990.

Friday, November 01, 2013

Unlocking a service swapped AT&T iPhone - a surprisingly good experience.

AT&T iPhones are still sold service-locked to AT&T or one of its MVNOs (like H2O Wireless, now $40/year for limited voice/text). This is unfortunate, because Verizon phones are sold unlocked.

Once your two year contract is done you can ask AT&T to unlock the phone using their online service. I've done this several times. Unlocked phones are handy; my daughters unlocked 4S was a mobile hot spot on our last Canadian road trip.

Unlocking is simple when a contract's phone number (SIM card) matches its host iPhone's IMEI. It's more complex when you've done a service swap, and even more complex when you've service swapped a defective service swap. As I'd feared, when my wife's contract was done the automated unlock form rejected her phone number. 

That wasn't surprising. What was surprising is that I was able to resolve the problem using AT&T's online chat service. I described the problem and passed on the record of IMEI's I'd tracked. I actually don't think she wanted those however, the support person just wanted the current IMEI. I was told an unlock could take up to 7 days, but 12 hours later I got an unlock confirmation mail. After I 'restored' the phone I got an unlock confirmation message.

It's disappointing that AT&T still sells locked phones -- while Verizon doesn't. I hope they'll change that policy. In the meantime, I give them credit for a quick fix to my service swap problem.

Installation notes from buying a new AT&T contract phone iPhone 5s - and advice on 'managed device' updates

This post, I think, is mostly useful for me, though it may be of interest to someone ordering a new contract phone that will be swapped to a different number.

I had an iPhone 5 and Emily had a 4S, we're on an AT&T corporate-discount family plan. My i5 was "blessed" by my employer; I can access our Exchange server with it. I ordered a 32GB AT&T 5s from Apple using Emily's contract, but my plan was to switch it to my account, Emily would get the 5, #1 son gets the 4S and his 4 goes to the phone bin [1]. (Somewhat unfair, but the fingerprint activation is very nice when security controls limit unlocked sleep to 5 minutes.)

It may also help to know that we still USB sync to iTunes rather than do iCloud backups -- a retro behavior that will probably go when the iPhone 6 is released.

Some notes on the transfer - which had more than a few glitches:

  • The 5s (gold fwiw) came with a SIM w/ Emily's number. So once I activated her other phone was offline. That was a nuisance, it left her without a working phone during the transition.
  • I think an Apple shipped phone should be first activated with the SIM (Emily's #) it shipped with. That's what I did, but AT&T activation failed. A message said it was offline. I ended up connecting it to iTunes and doing the activation there.
  • In iTunes I decided to first activate as a new phone, then worried the automatic renaming would match my old phone and confuse the backups. Fortunately I'd changed my old phone name from the default. 
  • During the activation process I entered data, like Location Settings and my iCloud credentials, both by iPHone and iTunes. This is weird; there must be a more standard way. In any case it worked.
  • Once the phone was activated I switched SIMs, then confirmed the numbers had switched. I could reach the 5 with Emily's SIM by phone, but not the 5s. (I'll get to that part).
This is where things got messy; I've revised my original post because I think I know why it got messy. I was giving Emily my 1yo iPhone 5 -- and that device had been attached to the corporate network. It was a 'managed' phone, and managed phones are odd. I should have wiped it first then restored from her 4S backup, but instead I did a simple restore. I ran into these problems:
  • The full restore required a double-sync, where the first sync only restored config data, and the 2nd restored apps and media. The 2nd sync was held up because the iOS corporate configured security settings demanded a passcode. 
  • When I restored Emily's 4S backup to her new iPhone 5 I first had to turn off 'Find My Phone'. After restore her passcode didn't work, but my old passcode did. I also ran into the usual odd experience of having to enter iCloud credentials multiple times (icloud vs. me confusion)?
  • Emily's AT&T visual voice mail was out of order, it behaved like regular voice mail. Fixing this was an odyssey of its own.
  • After the restore Emily had a very large number of apps -- all of my old ones and all of hers.
  • To my surprise her iMessage and Facetime services actually worked.
Emily used her phone like this, but we did see some flaky iMessage behavior (which can be flaky anyway). After a day or so I did another backup, then did a full wipe of her phone and restored from iTunes backup. That's what I should have done the first time around.
 
Incidentally, I bought a SwitchEasy Frost White Numbers case, largely because of a Wirecutter recommendation. I turned out to be a frosty clear case with port seal plugs. I wonder how long the plugs will last, but I like the idea of some water damage protection. 

[1] It needs a new Home button and a new battery; I may pay for a refurb 4 before Apple runs out of them. iPhones have a long useful lifespan and it would be handy to have an unlocked 4 in reserve.

When iPhone AT&T visual voice mail has disappeared and change voicemail password is stuck on "saving password"

I'm used to running into odd problems when I upgrade our iPhones, but Emily's Voicemail malfunction was particularly odd. I do wonder how civilians cope with this stuff [1].

I'd swapped the SIM that came with a 5S I pinched into my former 5 then did a restore from Emily's 4S backup. It had the usual restore quirks -- need to sync twice, entering iCloud credentials multiple times (".me" confusion?), etc. 

The worst was voicemail though. When I checked there was no visual voicemail, just a call to AT&T's old school stuff. Apple's troubleshooting guide didn't work -- including a network settings reset. I reset her voice mail password from the AT&T mobile web site -- that didn't work either. When I tried a reset from the i5 it hung on "saving password".

What seemed to work was a whacky recommendation I've seen in a couple of places.

When I try to setup a greeting for my...: Apple Support Communities

had this problem, and it has stopped. I am not sure if this will work for you, but it worked for me. Call your own number--you should get a prompt to enter your password. Follow the phone tree prompts to personal options. Record and save a new personal greeting. After I did this, and went back to my iPhone visual voicemail screen, I got a new message that said your voicemail password is wrong. I reentered my voicemail PIN and then the save button started working again. Hope this works for you.

 Lost your Visual Voice mail? - MacRumors Forums

I let the direct voicemail call go through, entered my password AND RERECORDED MY GREETING USING THE 3RD OPTION OF FULL PERSONAL GREETING. My iPhone then prompted me with a message saying I had the wrong voicemail password. I entered the password and Visual Voicemail re activated.  

It felt like voodoo, but I had nothing to lose so I looked up the voice mail commands and tried. A minute or so after I disconnected a dialog popped up asking me to enter a voicemail password. I did that and Visual Voicemail returned.

I'm not sure the "magical" fix really did anything. Maybe AT&T's system just took a while to reset. Perhaps if I'd turned the phone on/off a few more times, or just waited, it would have fixed itself. Still, if you get stuck, you might as well try this one.

[1] Maybe it's this kind of thing that causes otherwise rational economists to confuse the cost of replacing a battery on a 4yo phone with the subsidy price of a new device (Rampell seems to have revised her post to cover her confusion).

Update 11/30/2013: This happened to another phone, again with a SIM swap. I wonder if the problem is more common on 7.0.3. This time changing the voice greeting had no effect, but resetting network settings brought up a password prompt and fixed the problem. I only had to reenter the wifi password.

Thursday, October 31, 2013

How to get back the Gmail compose that you used to love.

It's simple, at least in Chrome.

Control-Click on the Compose button. Your Compose opens in a tab - with To and Subject line exposed, full view. Alternatively, shift-click to get a new window.

Shift-C works too, opens a proper compose. Ctrl-C doesn't work though.

Reply isn't as elegant.  Shift-R when in the context of a menu creates a right sided 'pop-out', shift-click or ctrl-click on top right icon to get it in a separate window. Alas, subject line is still hidden, that's another click to expose (Google hates subject lines, no kb shortcut either). Also, prior text is hidden -- yet another click.

Shift-A replies all in new window.

Have I mentioned I don't like Google?

We need a Chrome Extension that fixes Reply.

Monday, October 21, 2013

Why I couldn't unlock my wife's AT&T iPhone 4S - number, contract, family and device

I've had quite good results with AT&T's unlock procedure for our family's post-contract iPhones including a 3GS, 4 and 4S. So I was surprised when I was unable to unlock a phone that I thought was post-contract. I entered the number into AT&T's form, and before I could even enter the IMEI that identies the phone I got an inline message telling me I couldn't do the unlock.

It didn't explain why, so I was a bit frustrated. After I took stock of our phones and used AT&T's obscure contract expiration page I realized it made sense. With various swaps of phones and contracts among the family I'd gotten confused. We have five devices, 3 are unlocked, and we have two 2yr ongoing contracts for the newest phones (a 4S and 5). So I need to wait another month. [1]

If you're confused by this process (who isn't?), it helps to know AT&T's first test is by phone number. The phone number is the unique identifier for a contract. If that number has no eligible IMEIs associated with it then you can't go further (as far as I know).

If the phone number has eligible IMEIs then the next test is IMEI. I'll find out in a month how that works with a device that's been services swapped ... twice (... because the first Apple Store service swap (refurb) was defective of course).

[1] AT&T allows you to get a new contract phone prior to contract expiration, but that doesn't mean you get to unlock the old phone early of course.

Mac OS X Kernel Panic -- some debugging tips

Two  Four months ago my 2009 iMac was, if not rock solid, at least compacted dirt solid.

Then my 1TB internal Seagate drive (a replacement of a recalled drive) failed its SMART test. Since then it's been one odd thing after another; I haven't had a long enough trouble-free period to say anything sensible about the 1TB Samsung SSD I had FirstTech install in place of the failing HDD.

Today it's been a bit worse than odd -- I'm getting kernel panics. The multilingual white screen of death to be precise.

Usually this means a hardware error, and since I recently had a 1 TB SSD installed that's an obvious suspect. On the other hand, I've seen some odd firewire behaviors over the past few months. Maybe something in my 3 device firewire chain is malfunctioning (shades of SCSI chains of old, but I've also seen failing USB hubs cause weird crashes).

I saved one of my kernel logs and went into basic diagnostic mode, removing all peripherals. Apple Hardware extended test seemed to work, but it got stuck when my hard drive fan "Failed" (Presumably with my hard drive gone this result is misleading?).

Next I looked at Activity Monitor for anything running I could uninstall. So far I've removed:
  • Tech Tools Pro
  • Citrix Receiver
  • Carbon Copy Cloner
Of these I'm most suspicious of Citrix Receiver, next Tech Tools (esp with the SSD installed) and least of all CCC.
Then I went looking in LaunchDaemons and I found some odd ones:
  • com.google.keystone.daemon.plist: Google's updater I think
  • com.barebones.textwrangler.plist: probably benign
  • com.mac.adg.SquidMan.plist: Ok, this was amazing. Looks like I installed it in 2001. It had a running process and a file in privileged helper tools
  • com.bombich.ccc.plist
I cleared those out. Next I researched how to interpret kernel panic logs (/Library/Logs/DiagnosticReports), these articles seem to cover the domain ...
Alas, the easiest thing to interpret is the kext list, and mine looked benign even before I removed the above items.

Since my memory is old, and since it passed extended memory tests using Apple Hardware and Tech Tools, I'm most suspicious of a hardware failure in my Firewire chain, secondarily a failing USB hub. I don't know any way to debug those other than slowly adding things in until I get a panic, then removing them and seeing if the panic resolves.

Update: My firewire 400 to 800 cable is ripped apart near its insertion point. Subtle, but I may have a suspect.

Update 10/21/2013: Good app.net thread on this. My overall recommendations on a kernel panic problem is now this sequence
  1. Look at the kernel panic crash log list of loaded kext. Do any of them look odd or unfamiliar? Google and any that are not Apple native. [@gaelicwizard says this is low yield in modern versions of OS X]
  2. From admin account look at Activity Monitor and scan processes for anything odd.  [@gaelicwizard says this is very low yield in modern versions of OS X -- OS is pretty robust to this, see also @clarkgoble's tips below]
  3. Remove all peripherals. Run Apple's Hardware Check (used to come on DVD -- seems to run MacOS Classic!) to check memory or use Apple Diagnostics for machines post June 2013 (issue list documents what it can test). If don't have that use 3rd party app. Apple has its own "Apple Service Diagnostics" which is not legally available to us.
  4. Inspect all peripheral cables for defects (esp. firewire).
  5. Add USB devices. I don't know of any way to check for faults other than running and observing. Try boosting traffic (copy to drive) to stress.
  6. Add Firewire devices, one cable/device at a time.
Some Panics need to be diagnosed via remote network connections, and a networking Panic may need to be diagnosed remotely using a Firewire connection.

Note that if the fault is outside of the Mac a trip to Apple Store is unlikely to help. We can hardly bring all of our peripherals to the store.

There's a way to read a crashlog kext list and identify the kexts associated with Firewire, USB or Bluetooth and thus know where to look. From @gaelicwizard
  • The backtrace of the crash tells you where the actual panic happened. It is often, but certainly not always, within or close to where the error happened (at least as far as hardware faults go, IME). It should say a bunch of IOBluetoothHIDDrive ... AHCI is SATA. OHCI is FireWire (and some old USB). UHCI is USB. Often, the extension will just say FireWire or USB or whatever, but sometimes you see those acronyms too....
@clarkgoble summarized his approach as well (See also: Clark's Regular Maintenance Script) including general maintenance ...
  • I've regularly audited kexts and then launchd agents. With kexts it was relatively easy since 32 bit ones were disabled on newer machines. That meant it was harder for old ones to persist. With launchd I try and know what's there, do a Google search if I don't recognize it, and frequently disable things. (I had problems with a Google updater a few years back for example) 
  • The other debugging I do is to check Secrets (a pref pane for standard defaults modifications) and see if I set something that is a no no with new UI. Then I check pref panes, menulings, and running programs... I also run my maintenance script since the caches often cause some problems in my experience. Especially with older versions of Safari...