A while back, my wife noticed that the HooToo HT-TM02 was on a special deal at Amazon. So she bought me another one. This is the second one I have. The one I got before is in daily use as an internet radio and is doing a fantastic job. But the problem is that I don't want to mess about with it, because I might break my radio! So this *second* one gives me something to actually play about with...
As before, I immediately installed OpenWrt on it. The installation procedure involves adding some extra storage which gives some additional space during the install process. So you need to plug in a correctly formatted USB thumbdrive. The instructions advise you to check whatever USB storage you have added is working before proceeding. But when I did it this time I forgot to check, so there was a slightly tense moment! Anyway it must have been fine, because the install went without a hitch. Phew.
Then I upgraded to the latest released version of OpenWrt (which was Chaos Calmer 15.05.1) and reset it to the default configuration. I like to work from a clean starting point. So this gives me a good hackable little linux toy to play with. I expect that most of my effort will be continue to be programmed in Nim and cross-compiled.
So here are my notes on configuring the basics when setting up a HooToo HT-TM02 with OpenWrt. This should make it easy to repeat if I need to do a factory reset. It assumes that there is a home router with an address of 192.168.1.1, so works around that. Obviously, it assumes that OpenWrt has already been installed on the HooToo. The aim is to have the HooToo connecting to an existing wifi network, so you can get to it wirelessly, and it can download packages and updates. But also, a network cable still works if required. Here goes:
- Start with OpenWrt defaults. Connect with a network cable and get an IP address from DHCP
- Don't connect to any other networks, because it will clash with the router
- Now point a browser to 192.168.1.1
- Log-in without a password and then set a new password straight away
- Edit the LAN address of the HooToo to 192.168.0.1 but leave DHCP on
- Save and then reboot the HooToo, it now should not clash with your router
- After the reboot, unplug and re-plug the network cable, just to be sure
- Point your browser to the new address, 192.168.0.1 and log in again
- Now, scan for your own wifi and click "Join Network"
- Enter your wifi passphrase
- Assign the wifi connection to the firewall zone "LAN", but otherwise, use the defaults and save
- Check the HooToo has an internet connection (eg go to: System->Software and click "Update Lists")
Connecting via a cable should now give a DHCP address in the 192.168.0.x range, so using a cable is also possible in case wifi is not an option. For me, this is a pretty good starting point; now the fun stuff begins.
For my wedding anniversary this year, my wife bought me a Hootoo HT-TM02 (amongst other things). How nerdy is that? But it's a nice little machine which can have the default firmware replaced with OpenWrt. For about USD $16.00 it's a very cheap way to have an embedded Linux machine. Personally, I didn't even try the standard firmware and put OpenWrt on straight away. It was pretty easy, but you need a USB stick to give the device some extra storage during the initial upgrade process. The instructions are here and the process was very smooth.
As soon as I had the initial OpenWrt installation, I decided to switch to trunk OpenWrt, so I used the
sysupgrade command to install the 15.05 trunk image from here. So this left me with a device running trunk OpenWrt. I then held the reset button in (whilst the device was powered on) for 30 seconds to make sure that the configs were all at default settings.
Next, I decided to install relayd to bridge the LAN (ethernet) port with my existing Wi-Fi network. I followed the instructions here and that seemed to work fine. I felt that I had followed those instructions exactly; but the OpenWrt firewall was still getting in the way. So I just went ahead and disabled the firewall by using:
After doing that, I can switch off the Wi-Fi on my laptop, connect a network cable between the Hootoo and the laptop and I'm on my network. The Hootoo is acting as a bridge between my own Wi-Fi and its own ethernet socket, very nice!
The next thing I need to do is cross-compile some code and get it running on the Hootoo.