iPhone terms of service – deal breaker

Apple’s iPhone Terms of Service do say some pretty nasty things, enough so that I’ve canceled my plans about getting one in October. However, OpenMoko, the open source phone, has just caught my eye with their sleek development kit. Ooohs and ahhs abound.

Having just read an analysis of the iPhone terms of service, what’s hidden in the fine print is a deal breaker for me.

Until some of this settles down, I’ll not be getting the iPhone as planned.

Poop.

Realistically though, this may have pushed me more seriously at OpenMoko, the open source phone.

I’m especially developing the development kit.

So at this point it’s a race. Either Apple drops the price, adds some features, and addresses some pretty stressful points in the terms of service, or enough applications and positive reports come from OpenMoko.

UPDATE: These points have all been rebutted.

Macbook Pro: Network connectivity just disappears

Interesting problem on the Macbook Pro: after several hours of use, the all the applications act as if the network connection is gone. Problem is, I still have full strength signal and other devices can get to the internet. Toggling the AirPort brings things back. I’m trying to figure out why. Notes, tips, and code fragments.

Shortly after the 10.4.9 update, and even though I’m running 10.4.10, I’ve noticed an odd behavior with my wireless network connectivity. While using my machine, often for hours at a time without incident, my applications will all suddenly act as though there’s no internet, and indeed, looking at the routing tables, by all appearances it is gone.

The odd part is that my signal strength is at full. And, even more confounding, if I turn off the wireless and turn it back on, I suddenly get connectivity again and the applications recover. Meanwhile, other devices connected wirelessly don’t see the drop, so I know it’s local to the Macbook Pro.

Is anyone else out there experiencing a similar problem where the machine just drops internet awareness?

The only clue I ever seem to get in my console.log file is the message:
mDNSResponder: SetupAddr invalid sa_family 0
mDNSResponder: getifaddrs ifa_netmask for fw0(7) Flags 8863 Family 2 169.254.59.71 has different family: 0
mDNSResponder: Repeated transitions for interface en1 (FE80:0000:0000:0000:0216:CBFF:FEB6:AD8C); delaying packets by 5 seconds

According to websites with source code for the operating system, the file dDNS.c contain codes that looks like this:

mStatus dDNS_SetupAddr(mDNSAddr *ip, const struct sockaddr *const sa)
	{
	if (!sa) 
                { 
                LogMsg("SetupAddr ERROR: NULL sockaddr"); 
                return(mStatus_Invalid); 
                }

	if (sa->sa_family == AF_INET)
		{
		struct sockaddr_in *ifa_addr = (struct sockaddr_in *)sa;
		ip->type = mDNSAddrType_IPv4;
		ip->ip.v4.NotAnInteger = ifa_addr->sin_addr.s_addr;
		return(mStatus_NoError);
		}

	if (sa->sa_family == AF_INET6)
		{
		struct sockaddr_in6 *ifa_addr = (struct sockaddr_in6 *)sa;
		ip->type = mDNSAddrType_IPv6;
#if !defined(_WIN32)
		if (IN6_IS_ADDR_LINKLOCAL(&ifa_addr->sin6_addr)) 
                    ifa_addr->sin6_addr.__u6_addr.__u6_addr16[1] = 0;
#else
		if (IN6_IS_ADDR_LINKLOCAL(&ifa_addr->sin6_addr))
                    ifa_addr->sin6_addr.u.Word[1] = 0;
#endif 		
		ip->ip.v6 = *(mDNSv6Addr*)&ifa_addr->sin6_addr;
		return(mStatus_NoError);
		}

	LogMsg("SetupAddr invalid sa_family %d", sa->sa_family);
	return(mStatus_Invalid);
	}

It appears that the software can’t figure out whether IP4 or IP6 is in use, so it reports it has no idea how to set up the socket. It’s interesting to note that the socket isn’t null, so something’s going on.

But what is mDNSResponder? Well, for one, it contains Apple’s Bonjor services that allow zero-configuration networking.


mDNSResponder is a multi-cast DNS deamon
. And, what’s even cooler, is that you can force it to emit its status and dump tons of info in the console.log by sending it a gentle signal:
sudo killall -INFO mDNSResponder

Even FreeBSD has mDNSResponder in its ports collection.

And, even while Apple has a way to disable Bonjour, I’m not sure that I want to, nor am I 100% convinced this is the problem, but is more likely a symptom. Afterall, Apple has had network problems before. Plus, they appear to be actively working on Bonjour.

As my friend Phil points out, the IP addresses in the 169.254 range are in the zero-configuration range for peer-to-peer communication.

Like I said, I’m curious to know if I’m alone in this, or even better, if someone’s solved the problem, what was it…?

UPDATE 1-Aug-2007: It appears that the AirPort Extreme Update 2007-004 fixes this problem. And, while you’re at it, get the Security Update 2007-007 as well.

Fixing Duplicate Menu Items

When duplicate items appear on OS X’s Finder’s Open With pop up menu, there’s something you can do about it. Enter this command…

I’ve recently bumped into a problem where, on occasion, I get duplicate menu items in my right-click pop-up on the OS X desktop, when I select Open With.

Duplicate Menu Items

Turns out this is merely an indicate that the database for LaunchServices needed to be fixed.

And, in fact, this was covered over at Mac OS X Hints a while back. But, given that I had need to look up the command more than once, I present it here.

Inside Terminal, enter:

/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

You don’t even need to enter your administrator password, nor do you need to reboot.

OnyX for OS XOnyX allows you to also rebuild the LaunchServices by going to the Maintenance / Reset panel. Though there are a number of other ways to reset launch services for each version of OS X.



Apple’s Top Secret Feature?

Could Apple’s release of Safari for Windows actually be a hint to one of the Top Secret Features in the forthcoming OS X?

According to WebWare, Apple is releasing its browser, Safari, for the Windows platform.

The initial question from the community is: Why? (Though this may be the wrong question..!)

Clearly the region of the browser application space has been filled by Internet Explorer, Firefox, Opera, and a handful of others.

Wouldn’t releasing Safari simply make the Windows environment more compelling to stay? This got me thinking…

What if multi-platform Safari wasn’t the point at all, but it was actually a proof of concept of something greater?

A while back, Apple made the stunning announcement that it had been secretly working on a way to take the same source code and produce a PowerPC version and a Intel (Mac) version, and have them look identical. Combined together, they make the Universal Binary, which is a program that can be run on either system architecture. This was no small feat of clever engineering.

What if the Top Secret feature is that they’ve added Windows as a target for the same source code? Already RealBASIC is doing it, but that’s BASIC, not the mixed language richness of XCode.

As a developer, if I can use Apple’s amazing environment to produce Windows code, I’m all for it.

As a business owner, if I can produce applications and have them work on Apple’s customers as well, I’m all for the additional marketspace.

And, …if I’m a home user… if I’m wanting to switch to Mac, but I’m tied to the Windows platform because of application lock-in, this is a breath of freedom if my applications and data work elsewhere.

Could it be that Apple has taken Safari and simply “recompiled” it? That this is merely the test run to give applications independence of Windows, allowing users to switch over to a kinder, friendlier environment?

I’d like to think so.

OS X: Batch Rename from GUI

This is the third time I’ve had to go hunting how to enable batch filename manipulations for OS X. Now I’m documenting it so I don’t have to hunt this down again.

I keep forgetting about this trick, so I thought I’d post it in the event I have to ever do it again.

Part of the problem with a graphical GUI is that it’s very difficult to rename files in batches, for instance, prepending some text to a group of files.  This kind of thing is fairly trivial at the command line.

Apple has a facility to do this, but as it’s not something a regular user does often, it’s not enabled by default.  Here’s how to get all kinds of additional functionality out of OS X.

1) Open /Applications/AppleScript

2) Turn on Show Script Menu in menu bar

3) Optional: turn on GUI scripting, show library scripts, and choose where to show them.

You’ll notice up near the time in the menu bar a black scroll has appeared.

All the batch renaming and filename twiddling stuff is under the Finder Scripts.

UPDATE 19-Dec-2009: Upgrading to Snow Leopards deletes some useful scripts, specifically the Finder Scripts.

UPDATE 31-Aug-2010: The scripts live in “/Library/Scripts/Finger Scripts” and are

  • Add to File Names.scpt
    md5 4b0cd899acb19b5fc62ef2049d81a933 – 18114 bytes
  • Change Case of Item Names.scpt
    md5 af7429228be4d0e1a096092af5341c52 – 17808 bytes
  • Replace Text in Item Names.scpt
    md5 716493cab1c569953a7f40d76ed9a1f7 – 24328 bytes