Home »

Script for Finding the Best WiFi Channel

When running a wifi router in a public space, the least congested channel will offer the best performance. Use this script for Apple computers to help you find that channel fast.

For live sound events I often use wifi to interact with computers and digital devices that control audio, video, and lighting. Having dedicated, reliable wifi is critical for successful productions, so I bring my own router with me to live events. This is the model I own and recommend.

image of TP-Link router

All your [wifi] base belong to us.

WiFi is has become nearly ubiquitous. Networks are everywhere. The increasing number of public, private, commercial, and consumer grade broadcasts mean that the designated wifi spectrum is growing more crowded. Like lanes on a highway, there are a limited number of wifi channels to choose from. Car drivers try to avoid traffic and choose the least crowded lane on the road. Likewise, you will get the best wifi experience by “driving” in the least congested wifi channel.

icon for Wireless Diagnostics application

Also available by Option-clicking on the WiFi icon in the menu bar and choosing Open Wireless Diagnostics…

Apple computers have a built in Wireless Diagnostics service with a sub program that recommends the best wifi channel. It’s hidden away in the system folder and I have a hard time remembering the exact clicks and keystrokes to find it. So I wrote an AppleScript that runs inside an Automator Service to make the exact window pop up when I need it.

screenshot of Automator workflow

This is how I wrote the script in Automator. Can you make it better?

This is the easiest way to get it in the right place:

  1. Download this ZIP file: Find-Best-Wireless-Channel.workflow.zip
  2. Double-click the ZIP file to unzip it.
  3. While still in the Finder, click Go to Folder… under the Go menubar item. Alternatively, press the key combination ⇧⌘G (Shift-Command-G).
  4. In the little window that drops down, type the following: ~/Library/Services
  5. Hit the (Return) key. The Finder will navigate directly to that folder.
  6. Copy or move the Find-Best-Wireless-Channel.workflow file to that folder.
    screenshot of folder location in Finder window

    This is place the file should be put.

Once you’ve put the workflow file into that folder, look for it under Finder > Services > General.

screenshot of Finder Services menu items

Mine has a key command assigned to it. See the note at the bottom about how to set that up.

When you click on the “Find Best Wireless Channel” service item the workflow will run and a you should be left with a window named “Scan” opened. The wireless networks that your Mac has found will be listed on the right. Look at the panel on the left.

screenshot of Wireless Diagnostics Scan Summary panel

The red circle is provided to direct your eyeballs where to look.

The best wifi channels will be listed at the bottom. Use these numbers to set your router’s wifi channel. Good luck!


OS Compatibility

This Automator service works on macOS Sierra. Depending on your current OS and any future OS updates, YMMV.

No Library?

If you can’t see your Library folder, follow the directions found here to unhide your Library.

Roll Your Own

For those of you that like to DIY, here’s the raw script.

tell application "Wireless Diagnostics"
	# opens Scan Window
	tell application "System Events" to keystroke "4" using {command down, option down}
	# brings Assistant Window to the front and closes it
	tell application "System Events" to keystroke "1" using {command down, option down}
	tell application "System Events" to keystroke "w" using {command down}
end tell

Keystroke Combo Power-Ups!

If you want to assign a key command to this workflow service like I did, open up  > System Preferences… > Keyboard > Shortcuts. In the left panel select Services and scroll down to the bottom of the right panel. Next to “Find Best Wireless Channel” click the word “none” and then the “Add Shortcut” button that appears. Press the combination of keys you want to trigger the workflow. Voilà!

screenshot of Keyboard Shortcuts in System Preferences

Assign whatever key combination you like.

Home »

iPad/iPhone Live Video Streaming

Need to stream video over a network using iOS devices? Transmitting video over wifi or Cat5e using an Apple tablet or phone can be really easy. This is how to do it.

A recent gig required live video and audio streamed from one building to a projection screen in another building some distance away. The gig came as a last minute request (the night before a morning event). I had little time to prepare. They were in a bind and didn’t have anyone else they could count on. Though I did not own very much video equipment, I knew I had to help. I had to be creative in order to accomplish the task. Here is what I did.

First, I broke the problem into 2 parts: audio and video. Figuring out an audio solution was easy, since I’m primarily experienced in audio and had all the gear for that portion. So the tough part was figuring out video. Another factor to consider was that the signals needed to be fairly secure (to prevent easy hacking), so wired was preferred over wireless options. My plan was to send audio over balanced audio cables and video over ethernet/Cat5e cable to reassemble on them together on the other end.

Second, I scoped out the location. The buildings were two small structures set on opposite sides of a small parking lot. A quick reading with my super handy laser distance measurer revealed the buildings sat about 100 feet apart. This measurement was helpful for figuring out how much cabling I need to run between the two locations. In addition to the distance between the two, there was also a height factor (the receiving location was on the second floor), plus there were interior distances that needed to be run. Altogether the total distance from the source to the destination required enough cable to reach somewhere in the ballpark of 200 feet.

Third, I needed to inventory my equipment list to figure what I needed to buy, if anything. Luckily, I found a nice iOS app that streams video quite reliably.

Video Signal Flow

This is the basic routing I came up with:

iOS Device with Video Source App > Wifi Router > Ethernet Cable > Computer with Video Destination App > HDMI Cable > Output Device (Display or Projector)

And here are the specific details of my setup:

  1. a newer iOS Device (iPad/iPhone/iPod touch) with good camera (I used an iPad Mini 2.)
  2. a video streaming iOS app (I used AirBeam by Appologics UG with its companion desktop app AirBeam Pro.)
  3. a wifi router (I used an older AirPort Extreme Base Station A1354. For increased security, I also made sure the SSID was not broadcast, the network required a WPA2 password, and the password was fairly long and complicated. Not a perfect solution, but much better than an open wide, password-free network.)
  4. Cat5e cable (I used cable rated for outdoor use since it was kind of rainy and wet outside.)
  5. an Apple computer with ethernet jack (I used an aged Mid-2010 MacBook Pro.)
  6. a video adapter for connection to video cable (I used one of these AmazonBasics Mini DisplayPort (Thunderbolt) to HDMI adapters.)
  7. a video cable (I used an HDMI to HDMI cable.)
  8. an output device (I used a projector.)

Here is a sketch of my set up:

diagram of iOS live video streaming  gear connections

Not shown: MiniDisplay Port to HDMI adapter

I didn’t describe or diagram my audio setup as it was a little more traditional in approach. I may or may not write about that in another article.

No Comments >