Off topic / iOS Management

Not applicable

Greetings all.

Deployment of iOS devices came up a few weeks ago and, as usual when that subject is mentioned, I groaned loudly.

Last week I deployed another large batch of these devices and I once again began fuming at the tedium of the whole process. Especially report generation and the initial process of getting them onto our wireless network.

As I mentioned once before, we use a combination of WPA2 and MAC whitelist to gatekeep our wireless -- so even after deploying a profile to our iThings, I still have to generate a list of all MAC addresses to import into the accepted device list before I can even get them on the network.

I hate, hate, hate copying those MAC's from ICU to my csv import. Hate it. It ruins my whole zen thing every time. Especially when I'm kicking out more than a small handful.

So, I finally decided to do something about it.

To begin with, ICU handles each device as an individual record. This record is saved as an xml file in ~/Library/MobileDevice/Devices using a naming convention that was clearly designed to drive me insane all Lovecraft style. (i.e. a935d360ecd164c7a30ad5144c5beb2f743faff2) These xml files are roughly 2400 odd lines of text and in somewhere therein lies the actual information needed.

I installed ICU on a test box, hooked up an iPod and wrote a device record. Then I searched for the MAC address in that record and mapped out its location.

The information specifically regarding the hardware looks like this:

<key>deviceActivationState</key>
<string>Activated</string>
<key>deviceBluetoothMACAddress</key>
<string>xx:xx:xx:xx:xx:xx</string>
<key>deviceBuildVersion</key>
<string>8B117</string>
<key>deviceCapacityKey</key>
<integer>31436480512</integer>
<key>deviceClass</key>
<string>iPod</string>
<key>deviceIdentifier</key>
<string>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</string>
<key>deviceLastConnected</key>
<date>2010-12-24T03:46:52Z</date>
<key>deviceName</key>
<string>iOS4_Test</string>
<key>deviceProductVersion</key>
<string>4.1</string>
<key>deviceSerialNumber</key>
<string>xxxxxxxxxxx</string>
<key>deviceType</key>
<string>iPod3,1</string>
<key>deviceWiFiMACAddress</key>
<string>xx:xx:xx:xx:xx:xx</string>
<key>provisioningProfiles</key>
<array/>

I considered what additional info I wanted/needed (specifically: name, product version, serial #, device type and WiFi MAC) and prepared a quick and dirty grep | sed > foo to handle the rest:

grep -r -i -B8 -A1 -h deviceWiFi ~/Library/MobileDevice/ | sed 's/<string>/ /g' | sed 's/<key>/ /g' | sed 's/</string>/ /g' | sed 's/</key>/ /g' | sed 's/deviceName /Device Name /g' | cut -d= -f2 > iOSMACReport.txt

This will search all the device records in ~/Library/MobileDevices and kick out a text file on your desktop the looks like this.

Device Name
iOS4_Test
deviceProductVersion
4.1
deviceSerialNumber
xxxxxxxxxxx
deviceType
iPod3,1
deviceWiFiMACAddress
xx:xx:xx:xx:xx:xx
--

If you've got a lot of devices, you'll have a very long text file.

This is great for my record keeping, but it still leaves a crap load of copying for that MAC list. So:

grep -i '[0-9A-F]{2}(:[0-9A-F]{2}){5}' ~/Desktop/iOSMACReport.txt | awk '{print $1}' > ImportMAC.txt

The output of which gives me just a list of only WiFI MAC addresses.

Finally, I lightly tossed the two in bash script and enjoyed the results with a glass of bourbon as my angst washed away. There's obvious room for refinement (as well as plenty of options to flesh out), but this hopefully will keep the insanity at bay a little longer.

Apologies if I went into too many details, I just figured that if anyone wanted a quick and dirty fix to the process, I'd offer it up as a whole.

Happy New Year, folks.

thom

7 REPLIES 7

Not applicable

Still can't/won't as of last week. I've been asking for ages.

I've been rolling these out since last October and this continues to be one of my largest gripes -- well, my most vocal gripe when I'm deploying, well, my most vocal gripe during deployment while getting them on the network...

I used to use a wrt-54g flashed with DD-WRT and tail'd the dhcp server collecting MAC's as they joined. For various reasons, I stopped doing it that way.

It's always entertaining...

jarednichols
Honored Contributor

Do iOS devices have their MAC address on the box sticker like Mac
computers? (Asking because I honestly don't recall.) If so, why not just
barcode scan that into your accepted list as you're unboxing the device.
Then it's already in your list when you go to set it up.

j
-- Jared F. Nichols
Desktop Engineer, Client Services
Information Services Department
MIT Lincoln Laboratory
244 Wood Street
Lexington, Massachusetts 02420
781.981.5436

ernstcs
Contributor III

Negative. Just S/N unfortunately.

jarednichols
Honored Contributor

Well crud. That'd have been a hot workaround. Apple can provide a list of serial numbers of machines on POs. I wonder if they can provide MAC addresses too. Apple Sales POC would probably be the best place to start.

j

John_Wetter
Release Candidate Programs Tester

That's also a negative. They can't do any of he managed services like
sending the spreadsheet of info they can with their computers... At least
they couldn't a month ago...

John

tlarkin
Honored Contributor

Well it looks like we just bought some MDM licenses and will be pushing out profiles to our iPads. I still don't have an iPad in my hands to test this stuff with but I am thinking now actually someone else may be taking responsibility to manage them. Which in all honesty, is fine by me.

I'll report back my trials and tribulations after I actually start working with them.

Not applicable

Hello,
I've been using Casper 8.0 and MDM since it came out, and have nothing but good things to say so far. However I do have the following feature requests in:

  1. Update building and department information for a device based on IP address and defined network segments

  2. Smart groups and advanced searches for mobile devices based on IP Address

  3. Inventory update flexibility - Allow devices to check-in, in 30 min increments and to apply specific update times to devices / groups / smart groups (I want our iPads checking in every 6 hours and iPhones checking in once a day)

  4. Device / App usage - uptime for a device, usage of an internal app, safari, youtube, etc

  5. Enrollment Invitation - Allow users ID to be queried by AD for email enrollment...For instance when I send an enrollment invitation by email, it auto-populates the username field for the user with their email address instead of their AD user id.

  6. A feature to allow live, text based chat, and send screen shots back for troubleshooting

  7. Ability to do an immediate inventory update of all devices and/or groups, smart groups - they provided a work around by simply sending out an empty profile.
    I hope this provides some insight!