Recently in Apple Category
June 4, 2009
Monitoring AirPort access script
As Macintosh computers proliferate and AirPort Wi-Fi base stations are no longer the esoteric boxes they used to be 7 years ago, I hear more and more often the question "How can I monitor my AirPort for intruder access?". Luckily, Mac OS X is built upon UNIX, so all the tools are there, waiting to be used.
Here is a little one-liner shell script I wrote a number of years ago and used ever since to monitor the access on different generations of Apple AirPort base stations:
snmpwalk -v 2c -c [SNMP Community String] -Oq [Airport IP] RFC1213-MIB::atPhysAddress | grep -Eo "([0-9a-fA-F]{2} ){5}([0-9a-fA-F]{2})" | tr "[:lower:]" "[:upper:]" | sed -e 's/[\. ]/:/g' -e 's/[MAC address 1]/[Station name 1]/' -e 's/[MAC address n]/[Station name n]/' | sort | awk '{print FNR "\t" $0}'
I'll explain how it works later on, first you need to prepare your AirPort base station to respond to this script.
In order for the AirPort to allow such inquiry, the SNMP access has to be enabled (to find more about SNMP, you can start with Simple Network Management Protocol's Wikipedia entry).
For this, open AirPort Utility.app, go Advanced → Statistics, check Allow SNMP, also check Allow SNMP over WAN if you need to check the access list remotely; fill in the SNMP Community String — which acts like a password for SNMP inquiries, so try and make it strong, in order to be able to withstand dictionary attacks. Update the configuration, and after the AirPort restarts type in the terminal:
snmpwalk -v 2c -c [SNMP Community String] -Oq [Airport IP] RFC1213-MIB::atPhysAddress
Where you substitute [SNMP Community String] with the SNMP password (without square brackets) and [Airport IP] with AirPort's IP (without square brackets).
The AirPort should reply with a list of MIB values containing the MAC address to IP allocation tables.
You can isolate the MAC addresses with UNIX grep
grep -Eo "([0-9a-fA-F]{2} ){5}([0-9a-fA-F]{2})"
and then make'em look good with UNIX tr
and sed
tr "[:lower:]" "[:upper:]" | sed -e 's/[\. ]/:/g'
And, if you don't want to remember the MAC addresses you can write your own MAC address' to station name conversion table with sed
again
sed 's/[MAC address n]/[Station name n]/'
Where [MAC address 1] is the MAC address of the wireless card of the first computer you want on the table in canonical form and upper case (without square brackets) and [Station name n] is the name you want that MAC address to be substituted with (without square brackets).
If you need to permanently keep an eye on this, you can put the output traight on your desktop with the wonderful GeekTool utility. Just make a new Shell entry, paste the script in there and you're all set.
Please note that the script above should not replace the serious security measures, like Wi-Fi protected access via WPA or WPA2, MAC address access control etc.
September 20, 2008
iPhone: the first month
Back in July 2007 I reviewed here one of the first iPhone units (of its first incarnation) coming to Romania.
In July 2008, the iPhone 3G successfully launched in 21 countries around the world. On the 22nd of August 2008, at zero o'clock, it was launched in 20 additional countries1, including mine.
iPhone 3G launch in Romania: 22nd of August, 0 AM (picture: Monica Popescu, Orange).
I bought it the first day. Here is a subjective account of its pros and cons noticed during the month I've been using it.
The good
· Buying Experience. Painless2. I bought it right on the 22nd at noon, after one hour of waiting on queue (spent in a restaurant across the street). The Orange sales guy even found me a phone number containing six digits of my Vodafone number. Nice.
· 3G coverage. I didn't travel this month, so I have no clue about national coverage, but in Bucharest 3G is present in most places I go.
· App Store. I didn't envision this happening! I actually placed bet against iPhone availability in Romania because I knew that iTunes integration is part of the business model and implementing iTunes Music Store in Romania just doesn't make business sense, mainly because messy copyright laws and a small, piracy-ridden market.
But Apple knew better than that. So they split iTunes Music Store and iTunes App Store apart: while the first is not available, the former is. And it works perfectly.
iTunes Music Store not available, while iTunes App Store is.
I downloaded almost 40 free and commercial applications, adding up to about €50—and that's only in the first month.
· Push mail. Push mail work so great it can be used instead SMS.
First I synced my old .Mac account with the iPhone and the push mail speed was not so great—an e-mail would take up to 5 minutes to reach me. Then I deleted the .Mac e-mail account and rebuilt a MobileMe account from the scratch. Another league.
With a median time of about 15 seconds3, it's good. A local SMS takes about 3 seconds, but international SMS and MMS are slower than Apple push mail.
· Autocorrection. The iPhone keyboard input relies heavily on auto-correction because of its inherent lack of tactile feed-back. And, for English, it works like magic. Typing in an unsupported language is a different story altogether though.
During the 2.0 firmware days, typing in an unsupported language was really, really awful: the aggressive auto-correction engine was continuously taking control over the spelling and it had to be dismissed while typing almost every word.
New Romanian keyboard in iPhone OS 2.1, no language nor auto-correction dictionary though.
The new iPhone firmware 2.1 ads a Romanian keyboard with diacritics and, although auto-correction cannot be disabled4, there is a visible improvement: the iPhone stopped suggesting English spelling when typing Romanian words. Instead, it started suggesting stuff—and that's freakin' weird—in Romanian! And not all of it comes from the address book—don't tell me this thing data-mines previous messages and learns!
Switching to Romanian keyboard (by tapping the globe key) disables English auto-correction.
Some auto-correction suggestions come from the address book (CFR) but where the hell did the second one come from?!?
I am puzzled. Happy, but puzzled—I moved this bullet from "the ugly" to "the bad" and now to "the good" in a couple of days.
A switch for disabling auto-correction altogether would be a plus, though.
The bad
· Keyboard. Yes, it takes about a month to get used to it enough to forget it's not real.
· Camera. God, I don't even know what to begin with!
I need to be able to take close-up pictures of price tags, labels, receipts and so forth. And I can't, because iPhone camera is focused at infinity, making close-ups out-of-focus. I need to be able to snap pictures in passing. And I can't, because iPhone camera is slow. Very slow. I'd like to engage the camera without looking at the phone. I can't, because the camera doesn't have a hardware button so I have to look at the screen and tap the following sequence: switch on, unlock, Camera app, shutter release—it feels like taking a picture with my laptop!
iPhone deserves a better camera.
· Background processes and push notification. We came to a point where there are no longer significant difference between feeds and e-mail. For instance, I want my feeds to be up-to-the-minute, just like push e-mail. For other people the same would apply to instant messaging or other types of content.
In OS 2.2, maybe?
· Notifications during sleep. While the mobile phones employing TFT-LCD screens are able to display informations during sleep, on "switched off" screens, iPhone's LCD screen is not capable to display anything. At a glance: black. In order to see whether there are active notifications for missed calls, new e-mail or SMS, iPhone needs to be switched on.
Takes a bit of getting used to.
The ugly
This is about missing features.
· Google Maps for Romania. Well, the lack of 'em, actually. The weird thing is, there are plenty of maps flying around, for every off-the-shelf GPS thingie out there—hey, even Yahoo has good maps (for Bucharest, at least)—but Google, nada!
Google Maps app vs. Yahoo Maps in browser. Googol, yur doin it rong!
Shame.
· Bluetooth. iPhone's Bluetooth is simply neutered. Utterly useless except for pairing some headsets (ok, pun intended). The level of Bluetooth support Apple gives to other phones is vastly superior to the support they give to their own phone5.
If you do not own a headsets, iPhone's Bluetooth doesn't exist.
· MMS. Cumbersome and capricious as it is, MMS is present in most handsets, while push mail, although vastly superior, it's far from being ubiquitous. It's a weird option6 for Apple not to implement it.
Desktop iChat—that Text app closely mimics—is able to send/receive attachments (graciously), so why not allow attachment sending/receiving for Text app, too?
Bottom line
Don't let my criticism fool you. I only enlisted above "the good", "the bad" and "the ugly" — meaning all that I left out could deservingly be filed under a new section: "the miraculous". And that's the reason why its faults are tolerable.
The iPhone is a game changer. Not because what it does—as you can see above, it actually does less compared with the rest of the smart-phones—but because how it does.
Each time I switch on my old SonyEricsson I shudder with revulsion, despite its superior technical spec list: How the f#%& could I have used this? I could not go back to using this again!
The way Apple changes the game is so radical yet subtle that technical-minded analysts cannot get it: it renders the whole spec-for-spec comparison completely useless. How? By placing the experience on the first place on the feature list. The protocols and the megahertz and the megapixel come afterwards, the top feature being the miraculous design-driven experience.
Despite the fact that people buy clothes, cars, homes and just about everything in between mainly considering design—did you ever seen design (real design i.e. the way it works, not surface cosmetics) on a phone feature list before, let alone at its very top? Me neither.
It was about time!
1 Argentina, Chile, Columbia, Czech Republic, Ecuador, El Salvador, Estonia, Guatemala, Honduras, Hungary, India, Latvia, Lithuania, Paraguay, Peru, Philippines, Poland, Romania, Slovakia and Uruguay.
2 On a side note I have to mention that in Romania the police state practices are still in place somehow—in order to get a new mobile phone subscription the ID and signature are not enough: you are considered as an infractor until proven otherwise and you must provide a copy after your house buying/renting contract, so they know where to find you. Just in case, you know.
3 Here are the 5 tests, in various usage conditions of the handset (minutes:seconds): 0:08, 0:24, 0:29, 0:11, 0:06. Median time: 0:15.
4 It can be disabled via Cyndia, i.e. by hacking into the phone ("jailbreaking" the phone involves replacing the iPhone's firmware with a slightly modified version that does not enforce the signature check) and installing an unsupported application.
5 Can't use the iPhone to dial numbers from desktop Address Book, can't use it to send SMS from desktop Address Book, can't use it to browse the device (to access the pictures folder, for instance), can't use it to access or backup the SMS conversations, call log etc.
6 On the other hand, it might be also a bit of a cultural mismatch—in North America MMS is not being used all that much, as seamless interoperability is challenged by the presence of multiple network technologies and varied business interests among major mobile network operators. Europe seems very different in this regard.
August 11, 2007
The missing tilde
Bug report
Problem ID: 5400784
Summary: TILDE and GRAVE ACCENT missing from Romanian keyboard of MacBook Pro 15-inch 2.4 GHz.
Expected Results: On TILDE key three signs should be present. On the left side should be engraved "`" GRAVE ACCENT and below "~" TILDE. On the right side Romanian letter "Î" LATIN LETTER I WITH CIRCUMFLEX should be engraved.
Actual Results: On TILDE key is present ONLY the Romanian letter "Î" LATIN LETTER I WITH CIRCUMFLEX engraved in the center. No "~" TILDE nor "`" GRAVE ACCENT, were engraved.
Notes: The other keys containing Romanian letters are engraved correctly:
Ă key contains "[" LEFT SQUARE BRACKET and "{" LEFT CURLY BRACKET correctly, Â key contains "]" RIGHT SQUARE BRACKET and "}" RIGHT CURLY BRACKET correctly, Ț key contains "\" REVERSE SOLIDUS and "|" VERTICAL LINE correctly.
Ș key contains "§" SECTION SIGN and "±" PLUS-MINUS SIGN correctly.
The error is limited to the TILDE key.
August 8, 2007
MacBook Pro vs. PowerBook Titanium
The good, the bad and the different
My story with Apple portables [see PowerBooks post on my old Kit.blog] begins in 1999, when I bought my first PowerBook Lombard. God, that was a sexy beast! In 2002 I switched to a PowerBook Titanium and last week I bought a new MacBook Pro, to which I'm still adjusting.
This is hardly a showdown — the title could be a little misleading — the PowerBook is to old to engage in such a competition. Apple portables improved much in 5 years and the new laptop is hands-down better than its five years old ancestor — in fact, it's for sure the best Apple portable, but unfortunately I tend to be harsh with the ones I love, so I'll go on and depict here a subjective yet merciless comparison.
July 20, 2007
iPhone
Live in Romania
After The Rolling Stones, I got to see the iPhone live in Bucharest and it was no less amazement — "the largest commercial product launch in the history of electronics" after "the world’s greatest rock & roll band". Not a bad week.
During my one-hour play (thank you Richard, you lucky dog! I evy your guts sincerely) I made some quick notes:
The indescribably good
• I thought it's larger but it's exactly the right size • I thought scrolling it's going to have a lag, it doesn't • The screen beats the PSP and it's the most gorgeous screen I've seen • Typing takes a while to get, but it rapidly improves • Photo gallery "flicking" is as natural a GUI can get • Pinch resizing just works both in photos and web pages • The web browser (Safari) is in a class of its own.
I thought i will be able to describe it, I'm not. That's how amazing it is.
The faintly bad
• Yes, EDGE is slow • Using it for CPU-intensive tasks makes it get hot • Come on Apple, send that copy-paste feature via software update, please!
Quick conclusion
• The GUI is as polished as the Macintosh GUI and it makes a world of difference • The attention to the details is staggering (and there are lots of little gems hidden in there, for instance deleting a note employs a minimizing effect animation, graphically throwing the page in the trash) • the construction is at or above the "iPod industry standard" • I'd pay double triple the price for one.
The name is misleading, it's not a phone — do not compare the iPhone with any other phones you have used or seen. It's the first of a new breed.
November 30, 2006
Uptime
How often do you reboot?
When terribly busy I simply quit restarting my Macintosh — for weeks — and by busy I mean heavy work in lots of applications both at the office, in presentations and at home.
Today is the 14th day from the last reboot and I guess it'll have to march on some more (in the days of Mac OS 9 something like this would've been a miracle), but it will eventually become sluggish and I'll restart it instead of isolating and killing the processes that hog the system resources or leak memory. I know the uptime-victims that would prefer crucifixion to a reboot (not talking about sysadmins here, those guys get nailed for bad uptime records), and I am definitely not one of those: I usually don't even care.
How often do you shut down / reboot the computer you're working on? Do you simply ignore this and go on for weeks? Hours?