I faced a strange problem today. I have an iPhone 4s with iOS 5.1.1 on AT&T’s 4G network in Boulder, Colorado.
I tried opening this blog of mine on my phone today. I tried multiple times when the bus was moving over many miles and also when I had stopped at a particular location. No show. I asked a friend to open it on his Samsung Galaxy Note (which is also on AT&T’s 4G network) but again, no show.
The blog was constantly giving us a 502 Bad Gateway error, meaning that either AT&T’s or my hosting provider’s servers are configured badly. When I reached my office, I opened the blog on my computer. It worked like a charm. At the same time, it did not load on my phone right there and then.
Upon digging a bit, I found that this is a problem for a lot of people all over the country, specifically on AT&T’s amazing 4G data network. Wonder what else doesn’t work!
Ever since my blog went down, one of my best posts, this one to be precise, is unavailable. This is an upgraded and a more complete version of the same.
The method of consoling into a network device (router/switch/firewall/Load Balancer) from Windows is pretty well explained. Download PuTTY, connect a serial cable and you’re good to go. But how to do the same in Mac? Well, Mac’s Terminal.app has inbuilt ssh and serial abilities. You just need to extend it with a small plugin. The plugin for your device can be downloaded from this website or, for the lazy and impatient, from here.
Please note that this tutorial works for Mac, Linux as well as the Windows command line, you just need the right drivers from the website. You will also need this –
This is an RS232 to USB adapter that you can find on Amazon or at the Telecom Lab at CU Boulder.
After you’re done installing the drivers, connect the cable and fire up the Terminal app.
Then, run the following command –
This will give you a list of all the ports that you can console with. (Observe the keyword tty, it’s the basis for the name PuTTY).
The port you’re looking for will look like – tty.usbserial-A4008Ywd (the name could vary)
After you know this port, run the following command –
screen /dev/tty.usbserial-A4008Ywd 9600
(replace the tty… with your port name)
Screen is the inbuilt program used to console into devices from terminal. 9600 is the baud rate of the device and is also often configured differently for each device in PuTTY.
Once you see Screen running, you’re in! You can now see the exact same result you see using PuTTY.
Screen has it’s own quirks that you must remember –
1. To exit the program, press Ctrl+a and then Ctrl+d to get back to terminal
2. Often, you need to use a break sequence when booting up a device in order to get into password recovery mode. The sequence for Screen is – Ctrl+a and then Ctrl+b Ctrl+b Ctrl+b (note that after pressing Ctrl+a, you will need to press Ctrl+b about 3 times to go into recovery mode.) Thanks to EtherealMind for this tip.
That’s all folks! You now have the freedom to console into network devices using your Mac!