Homebrew versus Consumer Routers

Arstechnica has an interesting article on typical consumer home routers versus a pfsense configuration running on a mini-computer. The article is very interesting to me as I have been thinking about doing something similar such as having a router/firewall on wired device and setting up separate access points with different hardware. The comments are also very interesting, making mention of SOHO networking equipment from Ubiquiti Networks or MikroTik. I love the idea of putting up Ubiquiti UniFi APs on each floor of my house, and having them feed into a router with PoE. However, I would need to figure out how to run Ethernet cable up three floors in this townhouse. I suppose I could try to run it up behind the drywall in the staircase, and install one AP between the first and second floor, and the other AP in the basement. However, I don’t know that there would be an easy way to run the Ethernet cable. I would probably have to drill through some 2x4s. It would be a fun and interesting project too…one to put on the TODO list I guess!

Decisions: Buying a new laptop

I am snowed in with 60cm surrounding the home, so after some shoveling and fun in the snow, I took advantage of the slow day to do some cleanup. I cleaned up my old Macbook I purchased back in 2007.  I have not used it in over a year now.  It still works, though it is incredibly slow. Frankly I believe the real issue is that the HDD is slowly dying. I made sure I grabbed all of the data off of it so that I can be ready to retire it. It sure had a good run, it was worth the money I paid for it. I also took care of my wife’s last two notebook computers and pulled out the HDD and memory modules for separate destruction. Call in paranoia I guess.  I was also very thrilled at how easy it was to remove the HDDs and memory, there were compartments for each for easy access.

I am currently using an Asus X401A that I bought refurbished. I bought this machine for US $200 in 2013 when my MacBook started to really slow down and the OS was obsoleted. I got the machine as a travel computer that I could use for my graduate school work while on the road. It has been good for that, but lately it is showing that its ready to go soon. The keyboard is squeaking and the fan on the side rattles at random times. I think I am ready to get a new machine…

I am now trying to decide between getting a MacBook Air or a Dell XPS 13 Developer Edition. I have the XPS 13 which I use at work and it is a great machine.  The size and weight are perfect for all of the travel I have to do, and the Linux support is superb. The only downside to this machine is that the web came is below the screen rather than above it. For my work computer, that is fine because I don’t use the web camera. But for a home computer that is troublesome though, as I use Skype to talk with family and friends. The MacBook Air is portable and light weight as well though, and the camera is in a much better position.

The other issue is that Linux would be my primary desktop. That is fine for most things, after all an Android tablet is good enough for most day to day things. However, for video editing I do like iMovie, and my school still uses Silverlight and it is a pain to get working on Linux these days.  However, I prefer writing C++ code on Linux, but I suppose I can always just have Linux in a virtual machine that I can fire up when I get the C++ itch. There isn’t much of a difference in the hardware either:

Category MacBook Air 13″ Dell XPS 13
CPU 1.6GHz dual-core Intel Core i5 processor Intel Core i5-5200U Processor
Graphics Intel HD Graphics 6000 Intel HD Graphics 5500
RAM 8GB 1600MHz LPDDR3 SDRAM 8GB Dual Channel DDR3L-RS 1600Mhz
HDD 256GB PCIe-based Flash Storage 256GB Solid State Drive
Cost US $1299 US $1199

My gut tells me to just go with the MacBook and there will be no regrets. But the Dell XPS is such a slick machine…

Struggle with Java EE

I am trying to get my head around Web Services at the moment for a new project. I really struggle with the Java community though, or perhaps I just have not found the right information yet. I suppose it may have to do with the complexities of Java EE actually, and my lack of understanding about what Java EE truly represents. Unlike Java SE, you cannot just download an SDK and start compiling with javac. Java EE from Oracle is an application server called Glassfish.  In order to use Java EE features like web services, you have to get to know the application server too.

So many of the examples programs require a lot of third party tools, like Maven or Spring.  The SOAP example app in the Oracle tutorial on Web Services uses either NetBeans or Maven. Why happened to keeping examples simple, using the javac/java to build the examples, so that the learner can focus on the Java SOAP technology and not everything else? I would even settle for just an Ant build script!  Perhaps it is just because I am a curmudgeon C++ programmer who likes to keep things simple and at a low-level…but I am just frustrated by all that is required to try out a simple Java app!

I stumbled onto RedHat’s OpenShift, a PaaS-provider for hosting web-based applications. I created a JBoss cartridge and with the hope that I won’t have to worry too much about installing and configuring a Java EE platform. JBoss is a Java EE application server like Glassfish, but developed by RedHat.

If all else fails, I guess I will just go for Apache Tomcat, it has been almost a decade, but I remember that tool being very easy to setup and understand.

Regardless, I have much to wrap my head about in the world of Java. Hopefully I will get smart enough, as I would love to get back to my aging QuickfixJ tutorials.

Trying Vada Pav

An Indian fast food franchise shop recently opened up in the area. I was out running errands today and realized it was 14:00 already, and I was “starving”, so I decided to give the shop a try. The theme of the shop was Indian takes on “Western” style foods like burgers, sandwiches and pizza, such as masala veggie burgers or Tandoori paneer pizza. There were several other dishes on the menu that were totally foreign to me: vada pav, veggie masala pav, and some other chick-pea curry type dishes with various garnishments such as eggs or nann.

Without knowing anything about the vada pav other than a picture on the menu, I decided to begin my adventure with the Mumbai-style vada pav. The shop offered it with mild, medium, or hot levels of spiciness.  I went with medium. It was quite delicious for just US $2.00, I would much rather have it than a McDonald’s cheeseburger or a Taco Bell taco!

According to Wikipedia, the vada pav is a deep-fried potato patty with various spices. The outside of the patty was crispy, while the inside was a dry-moist grit, yellow in color from cumin perhaps, as well as with various other spices. Until I checked Wikipedia, I honestly thought it was made of corn meal. The patty itself was enclosed on both sides by a regular hamburger bun which was nothing to write home about. However, on both sides of the hamburger buns a layer of green paste, and then a layer or red paste was spread onto the buns. It as smokin’ hot!

There is a significant Indian community where I live due to the area being a technology corridor, and I am hoping that as the community grows and thrives more such restaurants and shops will open up! Having never been to India (would like to visit some day though!) it would be nice to be able to try and experience various foods from the Indian subcontinent.

All in all the vada pav was a very good and makes a great, quick snack all on its own. I would like to try some more things from the menu, particularly dahi puri or pani puri.

Wireless AP and OpenWRT

Getting the wireless access point (AP) up and running looks to be a painless task. By default for my WRT160Nv2, OpenWRT provided the following settings in /etc/config/wireless (dumped via the UCI tool).

root@OpenWrt:~# uci show wireless
wireless.radio0=wifi-device
wireless.radio0.type=mac80211
wireless.radio0.channel=11
wireless.radio0.hwmode=11ng
wireless.radio0.path=platform/rt2800_wmac.0
wireless.radio0.htmode=HT20
wireless.radio0.ht_capab=GF SHORT-GI-20 SHORT-GI-40 TX-STBC RX-STBC12
wireless.radio0.disabled=1
wireless.@wifi-iface[0]=wifi-iface
wireless.@wifi-iface[0].device=radio0
wireless.@wifi-iface[0].network=lan
wireless.@wifi-iface[0].mode=ap
wireless.@wifi-iface[0].ssid=OpenWrt
wireless.@wifi-iface[0].encryption=none

I want to create a custom SSID, ‘Armadillo’, and also set a WPA2 key for accessing the router. Furthermore, I want to make sure that my wireless radio in the router is configured for proper use in the United States.

root@OpenWrt:~# uci set wireless.@wifi-iface[0].ssid='Armadillo'
root@OpenWrt:~# uci set wireless.@wifi-iface[0].encryption='psk2'
root@OpenWrt:~# uci set wireless.@wifi-iface[0].key='****************'
root@OpenWrt:~# uci set wireless.radio0.channel=6
root@OpenWrt:~# uci set wireless.radio0.country=US
root@OpenWrt:~# uci set wireless.radio0.disabled=0
root@OpenWrt:~# uci commit

With the configuration written to /etc/config/wireless, issue the wifi command to start the wireless service:

root@OpenWrt:~# wifi
Configuration file: /var/run/hostapd-phy0.conf
wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Using interface wlan0 with hwaddr 00:0c:43:28:80:e8 and ssid "Armadillo"
wlan0: interface state COUNTRY_UPDATE->ENABLED
wlan0: AP-ENABLED

To verify the access point is up and running, look at the available wireless networks. In my case, ‘Armadillo’ is available and after entering the WPA2 key I have access to the device.

Success!

WAN Port DHCP and OpenWRT

Last weekend I installed OpenWRT (v12 Attitude Adjustment) on my WRT160Nv2 router device. Out of the “box”, the internal LAN is setup as 192.168.1.1, and I can ssh into the router for configuration. I plan to plug this router into another router device, so I would like to configure it for the following:

  • DHCP on the WAN port: If I take this to a hotel or hook it up to a another router device, I want it to automatically obtain an IP address on the WAN port
  • Private network on the LAN ports: 192.168.2.x addresses
  • [Optional] Enable wireless access so that I don’t have to plug my laptop computer into this router via Ethernet cable each time I access it.

WAN port configuration

To modify settings, one can either edit /etc/config/network directly, or use the unified configuration interface (UCI) to issue commands from the shell. I chose to do the latter. Of course you can also use the web interface if you have a normal router and not a WRT160Nv2.

The commands below modify the wan port to use DHCP to obtain an IP address and DNS settings, and then bring up the WAN interface.

uci set network.wan.proto=dhcp
uci commit network
ifup wan

To verify that the WAN port has an IP address, issue the ifconfig command and look for the IP address used from the DHCP server, in this the router device issued to me by my ISP.

ifconfig

As shown below, the WAN port is given the IP address 192.168.1.10.

eth0.2    Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
          inet addr:192.168.1.10  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7135 errors:0 dropped:406 overruns:0 frame:0
          TX packets:4675 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:4727515 (4.5 MiB)  TX bytes:745096 (727.6 KiB)

LAN IP address re-assignment

The DHCP server on my network is running on the private network 192.168.1.x, and that conflicts with the default configuration from the OpenWRT installation. The WRT160Nv2’s LAN ports need to be moved to another network. I decided to move them to 192.168.2.x.

uci set network.lan.ipaddr=192.168.2.1
uci commit network
reboot

Rebooting closes the SSH session, so reconnect to the router, but remember the address is now 192.168.2.1 for the router device!

Testing Internet access

After logging into the machine, I issued a ping command to http://www.google.com:

testdns

Success!

On WiMAX and XGPHS

I recently saw in the news that Sprint has run into some legal issues trying to pull the plug on its WiMAX network. That brought back memories to 2008 when I was working with WiMAX technology. I was working on a project to build a modem for XGPHS, or Next-Generation Personal Handyfone System. XGPHS was based on the WiMAX specification, but with improvements in performance for mobile access. This was all before Mobile WiMAX started to sprout up. The last thing I remember about XGPHS is that when the world economy crashed in 2008/2009, Willcom, the company leading the push to the XGPHS technology, was running into financial problems. What ever happened to XGPHS?

I had forgotten as well, but in 2007, NTT pulled the plug on PHS service and Wilcom was the last player in the game. Apparently in 2010, Willcom filed for bankruptcy, and then Willcom was acquired by Softbank. In 2014 it was sold to e-Mobile and renamed Y!Mobile. e-Mobile, however, was a data-only 3G provider originally.  Y!Mobile was then acquired by Softbank in 2015. I saw some Japanese language information stating that PHS may have its plug pulled in November 2022. However, that still leaves six years for another firm to try to acquire the technology and keep the system going.  Or maybe not, perhaps it will remain a technology used internally. Many hospitals and large factories use PHS internally for communicating with staff–usually managers.

As for XGPHS?  It turns out that XGPHS is still alive…sort-of.  Extended Global Platform (XGP) Forum is the group now representing XGPHS.  After a cursory look, XGP Forum is focusing on TD-LTE, and has its roots in the XGPHS that I once knew. @nifty offers a wireless service that uses the AXGP and LTE.

I was curious about some other mobile technology that was once big news in Japan when I lived there.  i-Mode was an Internet service offered by NTT DoCoMo for the FOMA service (UMTS network) customers. It was a proprietary network based on WAP-like technology and was hugely popular while I was in Japan. At the end of February 2015, NTT DoCoMo pulled the plug on the network. Smartphones killed the juggernaut of Japan’s mobile industry.

And WiMAX? Unlike in the US, it looks like there are still options for WiMAX in Japan.  UQ WiMAX appears to still be available, and @nifty is offering a WiMAX service as well. I am glad to see there is still some wireless technology diversity in Japan. I cannot say that much about where I live in the USA.