Saturday, February 6, 2016

Easy Configuration for Ubiquity EdgeRouter X + Unifi AC LITE

Cool gigabit and 802.11ac gear has finally hit the masses, so, like every other nerd, I got myself an EdgeRouter X (ERX) and a Unifi AC LITE access point (UAP).

There's many nice things about this combo, one of them is that you can take the 24V PoE injector from the Unifi and use it to power the ERX (on eth0) and the Unifi (PoE passthrough on eth4.) The PSU gives 24V/0.5A so it's just enough to satisfy both units.

The setup gave me a bit of trouble though. EdgeOS, as the OS on the ERX is called, is very powerful, but also takes a bit of time getting used to. So if you just want a simple SOHO NAT setup, do something like this:

  1. Feed the ERX power though the PoE injector and connect a computer to the LAN port on said injector. Configure the ethernet port on the computer to use 192.168.1.2/24.
  2. Open a browser and connect to 192.168.1.1.
  3. On the Dashboard tab, leave eth0 unchanged, and keep it as your configuration interface.
  4. Configure eth1 to be your WAN interface, so make that DCHP client. Make sure you get an IP address.
  5. Configure switch0 to include eth2 and eth4. Give it a suitable private IP, such as 10.0.0.1/16.
  6. Configure a suitable DHCP server on 10.0.0.1/16. Make sure its DNSs are 8.8.8.8 and 8.8.4.4, and its router is 10.0.0.1.
  7. Add a Source NAT Rule that has "Use Masquerade" and "All protocols" with outbound interface set to eth1.
  8. Change your computer over to eth2 and configure its ethernet port to be a DHCP client. Verify you get an address and can access to EdgeOS web interface on 10.0.0.1.
  9. Verify you can access the internet.
  10. Plug the UAP into eth4.
  11. Download the Unifi Controller program for your OS and install it.
  12. Discover your UAP and configure SSID and WiFi key.
  13. Connect on WiFi and verify that things work.
  14. Make sure to change the default password on the ERX, as the very least.
There's loads more you can do from here, but now you're up and running.

Wednesday, January 20, 2016

Analog audio out on Apple TV generation 4

The newest Apple TV, generation 4, lost its optical audio out port. The only way to get audio out these days is over HDMI. I had an old fully analog 90's amplifier that I would like to use, but I couldn't find a solution. Going through my TV's headphone out port introduced horrible feedback loop noise (and also required the TV to be on) and I didn't really want another gizmo sitting around, so an HDMI audio extractor wasn't ideal either. They were also surprisingly expensive, starting at €30 for sketchy ones off eBay to €100+ for ones sourced locally.

Enter the Airport Express I had sitting in my pile of networking junk. I connected the Apple TV and the Airport Express over Ethernet, configured the Airport as an Airplay device, configured the Apple TV to use it, and, presto, analog sound. Without any noticeably delay, even.

A few notes:

  • The Apple TV can run either WiFi or Ethernet, but not both concurrently.
  • The Airport Express can be configured in Bridge Mode, and you can connect the second Ethernet port to your LAN. Doesn't matter which port is connected to the LAN and which is connected to the Apple TV.
  • Alternatively, you can set up the WiFi on the Airport Express to "Extend Network" and connect the Apple TV and Airport Express to the rest of your network that way.
  • The Ethernet ports on both the Airport Express and Apple TV are only 10/100 ports, so that's the highest speed you'll see on that link. Should be plenty for most applications.

Wednesday, January 6, 2016

External microphone on newer MacBook Pros

Ever had the need to connect an external microphone to a MacBook Pro and realized that the laptop in question only have a single 3.5mm mini jack port, and require a TRRS connector?

The solution seems to be to get a Sennheiser PCV 07 Y-splitter. I only had luck if I also, concurrently, had a pair of headphones hooked up to the headphone port.

This may or may not also work on other Mac laptops such as the MacBook and MacBook Air.