Hi folks,
I've build a stand-alone station with the TP-Link MR3020. There's only a single 5V power supply. The overall power consumption is 2.5W on the primary side. No running PC is required. Internet connection is done over WIFI network. There are also no USB reconnect issues, as the connection is done directly through the internal serial port of the router.
With the hardware mods, the additional costs are about 20EUR. The router costs about 30EUR, but you don't need the USB breakout board and a power supply.
Software Setup
Most commands can be copied and pasted in the console window. See for additional information. Thanks to Ingmar for his great work!
1. Install OpenWRT
a) Download OpenWrt-Image to your PC:
b) Connect the Router with Power (USB) and Ethernet. Open your Browser and go to . Flash the downloaded Firmware-Image.
c) After that, the router reboots with OpenWRT. The IP is now 192.168.1.1
d) Download PuTTY:
e) Execute PuTTY and connect to the router over TELNET and IP 192.168.1.1.
f) Change the root password with the command "passwd". Close PuTTY.
You are now done with the very basic installation of OpenWRT.
2. Setup network and web-interface
a) Open PuTTY, connect over SSH.
b) Change the network IP settings
I assume that the IP of the TP-Link MR-3020 is 192.168.2.123 and your home router has the IP 192.168.2.1 .
Enter the commands:
uci delete network.lan.typeuci set network.lan.ipaddr=192.168.2.123uci set network.lan.gateway=192.168.2.1uci set network.lan.dns=192.168.2.1uci commit network/etc/init.d/network restart
Close the console window.
c) Once again, open a SSH connection with PuTTY, now with the new IP. Enter the following:
d) Access the web-interface (LuCI) with your browser:
Enter login (root) and your password. The setup is much easier with the web-interface.
e) Disable DHCP and Firewall
Note: The firewall isn't really needed for our purposes and disabling it doesn't mean that a security issue. But if you want to use the MR3020 as a router, with an dsl-modem plugged in the LAN port, you should re-enable the firewall!
* Go to System -> Startup
* Click on "Enabled" and "Stop" in the "dnsmasq" row (DHCP Server)
* Do the same with "firewall"
3. WLAN
Configuration is done through the web-interface.
a) Menu: Network -> Wifi
b) Click on "Enable"
c) Click on "Edit", then:
* Channel: auto
* Country (Advanced settings): Your country
* ESSID: Your network SSID
* Mode: Client
* Network: Uncheck the "lan" checkbox, check "unspecified -or- create" and enter "wifi"
* Change your other settings as desired.
Then click "Save & Apply". Check if all settings have been applied!
d) IP settings of WLAN interface: Network -> Interfaces -> WIFI -> Edit
* Protocol: "DHCP client" or "Static address"
* Click "Switch protocol"
After that, you can enter your desired settings.
e) Change MAC adress
Due to a config error, the LAN and WLAN interfaces have the same MAC adresses. You have to change one of them. It didn't work for me to change the WLAN Mac, but the LAN Mac worked.
* Go to Network -> Interfaces -> LAN -> Edit
* Change the MAC-Adress in the "Advanced Settings"
For example, you can use "01:02:03:04:05:06".
* Then click "Save & Apply"
* Reboot the router
IMPORTANT: Don't trust the MAC addresses in the Interfaces page, they are wrong! Use "ifconfig" in the console to show the correct MACs!
4. Install Blitzortung XLT Tracker
a) On the web-interface, go to System -> Software
b) Click on "Update lists"
c) Enter "kmod-usb-serial-ftdi" in the field "Download and install package:" and click ok.
d) Enter "http://blitzortung.ingmar.cc/openwrt/ipk/ba…T3-1_ar71xx.ipk" in the same field an click ok.
e) The startup script has to be installed through the console. Connect via SSH and enter
wget -O /etc/init.d/blitzortung_tracker http://blitzortung.ingmar.cc/openwrt/initscript.xlt.2012-07-02.txtchmod +x /etc/init.d/blitzortung_tracker/etc/init.d/blitzortung_tracker enable
The tracker settings:
touch /etc/config/blitzortung_trackeruci add blitzortung_tracker blitzortunguci set blitzortung_tracker.@blitzortung[0].gps=SiRFuci set blitzortung_tracker.@blitzortung[0].baudrate=500000uci set blitzortung_tracker.@blitzortung[0].gps_baudrate=4800uci set blitzortung_tracker.@blitzortung[0].device=/dev/ttyUSB0uci set blitzortung_tracker.@blitzortung[0].username=YourNameuci set blitzortung_tracker.@blitzortung[0].password=YourPassworduci set blitzortung_tracker.@blitzortung[0].region=1uci commit blitzortung_tracker
g) Reboot!
Done!
---------------------------------------------------------------------------------------------------
Hardware Mods
1. Direct Connection Mod
Unfortunately the USB connection isn't very stable. You can directly connect the controller board to the MR3020. So you don't need the expensive breakout board, but you have to open the case of the router.
a) Open the case:
b) The serial connector:
c) Connect TX on the router with RX on our controller board. Do the same with TX/RX and GND/GND.
d) Add a 10kOhm Resistor between Pin1 and 4 of the router connector.
e) The Linux-Device is /dev/ttyATH0 ! Change it in your settings:
f) Edit /etc/inittab.
Comment out the line with /dev/ttyATH0.
Before:
::sysinit:/etc/init.d/rcS S boot::shutdown:/etc/init.d/rcS K shutdownttyATH0::askfirst:/bin/ash --login
After:
::sysinit:/etc/init.d/rcS S boot
::shutdown:/etc/init.d/rcS K shutdown
#ttyATH0::askfirst:/bin/ash --login
Step-by-Step:
* Enter "vi /etc/inittab" on the console
* Navigate to the line with "ttyATH0::askfirst....."
* Push the Insert-Key on you keyboard.
* Enter "#"
* Push Esc
* Enter :wq and press Return
Pinout of the controller board: See the attatched pic.
Note: You don't need the "kmod-usb-serial-ftdi" package with this method.
2. 5V-only Mod
With this modification, you don't need an extra power source for 12V. You can use the 5V USB power provided by the router power supply. The overall power consumption of router (WLAN) + Blitzortung hardware is only 2.5W on the primary side of the power supply!
Parts not needed on the controller board:
- No power regulator (5V)
- No heatsink
- No DC-Jack
Additionall part:
- 5V to 12V DC-DC converter:
You have to find a solution for yourself on how to solder/connect the stuff. For example, the DC-DC-converter can be placed on an own breakout board. You can also build your own (cheap) step-up converter. You should add a resistor, to limit max. current. DC converters are not short-circuit-proof!
---------------------------------------------------------------------------------------------------
Notes:
- You can use the included ethernet cable to connect amplifier <-> controller-board. It's very short (0.5m), but that's enough distance to the amplifier.
- Don't place the router directly near the GPS. The GPS may loose the position. A distance of some centimetres is enough.
- Due to the low power consumption, a solar cell powered station is possible. The router is designed to work with USB surf-sticks. Of course, OpenWRT has to support them. With those two things together, the station could be installed in the middle of nowhere.
Regards
Tobias