Control a wireless card from the shell: “”

Mac OSX Hints has a quick tip on using the (somewhat hidden) airport command to manually manipulate the airport settings. This tool is called airport.

I played around for a few minutes and was pleasantly surprised.
[I’ve edited the output below so it fits, but you should take a look at what it all does under the hood.

$ cd  /System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources
$ ./airport --help
airport AirPort v.421.13 (421.13.0)
Supported arguments:
        -a      --autojoin
        -p      --applyprefs
        -u      --updateprefs
        -z      --disassociate
        -i --ibss=
        -f --file=
        -m --mac=
        -x      --xml
        -h      --help
        -o --oldencrypt=
        -s --scan=
        -r --repeats=
        -A --associate=
        -I      --getinfo
        -P --psk=
        -S      --showstack
                --bssid=
                --channel=
                --password=
                --property=
                --ssid=

Consider adding a softlink to your local bin.

(Via macosxhints.com.)

I’ve had a few e-mail exchanges with friends and family (mostly the latter, even if indirectly) that look suspiciously like:

My dad has an iMac with 10.3.9 on it. He has fat fingers and somehow got his Mail.app into some weird state that I’ve tried working through with him. The problem is, when composing, punctuation characters end up as some sort of international character set. e.g.)

> Where you goingÉÉÉÉ (question mark)

or perhaps:

I love the look and feel of it but I have no idea of what I am doing (I work in MS Office). For instance why do I keep getting french characters on my keyboard – I cannot use my apostrophe and question mark.

So here is the standard canned answer that I’ve been mailing out for a while:


Ah ha! I did this too when I got my 1st 10.X Mac machine.

The problem is that you told the Mac that you wanted a Canadian CSA Keyboard instead of an American one. (Seemed like a good idea at the time to me too).

The keyboards we use in western Canada are American keyboards, in Québec, they tend to use the ‘Canadian CSA Keyboard’ which has French characters where you have the question mark. :-)

What is a CSA Canadian layout? Well, it’s something that the Canadian Standards Association decided was a good keyboard for Canada, in particular, it is used extensively in government. I recall that a contract I once worked on for Air Traffic Control systems used TBITS compliant keyboards — they were a CSA layout too.
Here’s a CSA layout image:

CSA keyboard layout

If you have a Canadian flag in the upper right part of your screen with CSA under it, this is the problem. Read on to see the fix. If you aren’t sure what I mean, look below and the first image — the one with the Canadian flag and menu bar. In your case, you likely have something else (most likely Canadian with CSA underneath it). To see what I mean by Canadian CSA vs. Canadian, see the image near the end of this entry — the capture of the Interational preferences pane. In that image, you can see both the Canadian CSA symbol and the vanilla Canadian symbol. (Applies only to Tiger and beyond).

Menu Bar showing Canadian CSA Locale

Since you have an U.S. layout keyboard, you need to tell the Mac this. You can do cool things like change the layout of the keyboard on the fly and type in other languages, but in all likelihood this is a nuisance. If you ever see anything but a Canadian flag (no CSA) or an American flag in that title bar, click on it and select U.S. or Canada OR follow these instructions. The first time, you must follow these instructions so U.S. (or Canada) is an option to select at all.

NOTE: With Tiger (10.4), Apple provides a Canadian keyboard layout that is identical to the U.S. layout, except there can be a Canadian flag in the menu bar instead of a U.S. flag. This has made the Canadians very happy indeed. For this blog entry, all references to the U.S. selection are for OS X pre-10.4, if you have Tiger (10.4) you can select the Canadian layout instead.

If U.S. (Canadian) is already in the menu that drops down when you click on the flag, just select it and you are done. You might consider following the instructions below and unselecting all keyboard encodings that are not U.S. (Canadian) to avoid accidentally reconfiguring your keyboard.

To fix, this launch the System Preferences from the Apple Menu, Select International, then Select Input Menu.

You should see :

international-prefs.jpg

Except, you will likely see the Canadian CSA Entry at the top. Select the U.S. (Canadian) entry, then unselect the Canadian CSA.
(You have to have at least ONE active, so you have to select U.S. (Canadian) prior to removing Canadian CSA).

Command (or propeller) W to close the System Prefs…

At this point you should see a little US (Canadian) flag up by the time instead of a Canadian one.

menu-international.png

PS: You can change the date and time formats in the International system pane too.

Histogram of Object File Text and Data Sizes I’ve compiled a snapshot of how reSIProcate [Everybody's favorite SIP stack] code size is split between object files, text and data segments. You can see more about it on the reSIProcate wiki. There are three graphs, arranged in decreasing order of object size. Note that these are unoptimized objects on a 64-bit PPC 970 build. Comments and feedback are welcome.[Link ].

resiprocate.jpg resip-stats-thumb.pngA new version of the reSIProcateSIP stack was released today. Kudos to the entire team for pulling this together! See the project’s Wiki for the release notes and additional contributor statistics about this release.

reSIProcate is a part of the SipFoundry family of open sourced telephony and VoIP software.

Our July newsletter is now online. Enjoy! (link)