Installation of a piratebox on T-Link MR3040

I just received the TL-MR3040 wifi portable access by T-link. This little box is really like the mr3020 i had for my piratebox with the main advantage of having and internal battery making the piratebox mobile for a small price ! For actually 38€ (but you may found it at lower price) it is an interesting and compact solution to bring you piratebox out.

I’ll try in the next part of this article to detail the installation process as friendly as possible. Never forget that this kind of operations are not always easy and may damage your device. Do it at your own risk.

Here it is

The MR3040 is a tiny box having a size similar to an iPhone containing a wifi router, initially to be a 3G bridge, and a 2000mah battery making it an autonomous system. Regarding the photo available on Internet it way not easy for me to get an idea of its size. I hope the following photo will help you.

TL-MR3040 autonomous piratebox

The system has an internal battery looking like a cell-phone battery. This one can be removed but I assume it will not easy to change it later. Sometime I would prefer to have a bigger system with 3 standard LR6 battery … but don’t complain, regarding the price, it is a perfect solution.

I’ll later tell you how the autonomy looks like …

 

 

 

Battery inside the TL-MR3040

The battery inside the MR-3040 looks like the photo on the right, the battery is removable and can be refill by connecting the adapter to the usb power plug.

The MR3040 also provides an USB master connector where we will connect a USB stick for storage. The Ethernet port will be used for configuration.

Internally the mr3040 have 32MB of memory a flash of 4MB and works at 400MHz. Characteristics are similar to mr3020 but the CPU differs

Before starting you need to notice that by executing the next steps you will lost the warranty of the product and coming back to the original state may not always possible or at least could require complex operations I’ll not describe (I mean I hope, otherwise it would mean I was in trouble …)

To proceed the piratebox installation you need to have :

  • The TL MR3040 device
  • An usb stick
  • An Ethernet cable

For the USB stick, I recommend to find a small component in term of physical size but as large as possible in term of storage. Change it after installation is possible but not totally easy so use the good one first it the best. Personally I installed the piratebox on a 32GB measuring about 1cm². I paid 34€ for it.

The USB Stick must be FAT32 formated and clean before proceeding.

Change MR3040 firmware for OpenWRT one

  • Download the OpenWRT firmware you will found here ; you can also check for the latest version directly on the OpenWRT related page here.
  • Plug the TP-link, Connect it to your Ethernet network, activate the device using the power switch
  • Configure your laptop to be able to connect to the MR3040 when needed. Under linux you can create an extra IP by executing the following command : “ifconfig eth0:1 192.168.0.2 up” as root
  • Verify you can communicate with the device, normally assigned to 192.168.0.1 by using the following command : “ping 192.168.0.1”. You should get no error.

 

  • Connect to the MR3040 user interface. Open your favorite browser, then get http://192.168.0.1
  • Mr3040 will prompt for login/pass, the default one are admin/admin
  • Go to Firmware upgrade menu

Click on the following menu item to upgrade firmware

Click on System Tools menu then select firmware upgrade sub-menu.

The screen on the right will appear.

Click on browse file button to select the firmware file previously downloaded.

Then click on Upgrade.

This upgrade will take about 3-5 minutes then, then web interface will disappear.

  • The new default address of the MR3040 is now 192.168.1.1. You must change you IP configuration on your laptop. When on Linux, as root, type “ifconfig eth0:1 192.168.1.2 up”
  • Connect to the MR3040 using the telnet command : “telnet 192.168.1.1
  • Change the password, type “passwd” command ; this will activate ssh server.

MR3040 with OpenWRT – First login

  • Edit file /etc/config/network using the vi command. A tutorial can be found here.

The file should look like this when your Internet Gateway is 10.0.0.254 like me. Otherwise you must adapt. option gateway is the IP address of your Internet router (it should be the same gateway as your laptop) ; list dns is the DNS Ip address, the same your laptop have.

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config interface 'lan'
        option ifname 'eth0'
        option type 'bridge'
        option proto 'static'
        option ipaddr '10.0.0.31'
        option netmask '255.255.255.0'
        option gateway '10.0.0.254'
        list dns '10.0.0.254'

Save and Quit

  • Restart the MR3040 device : in the terminal type reboot command
  • After 30 seconds you should ping the MR3040 to its new IP : 10.0.0.31
  • Connect to the mr3040 : ssh -l root 10.0.0.31
  • Ensure you are able to acces Internet by pinging www.google.com

Install PirateBox software on T-Link MR3040

  • Install the USB module
opkg update
opkg install kmod-usb-uhci
insmod uhci
insmod usb-ohci
  • Ensure your usb stick in connected
  • Ensure the different needed website are working. If one of them do not respond, stop here and try again later
ping daviddarts.com
ping piratebox.aod-rpg.de
  • Install the PirateBox Software
cd /tmp 
wget http://piratebox.aod-rpg.de/piratebox_0.5.1_all.ipk
opkg update && opkg install piratebox*
  • You can optionally install Kareha Image Board. This looks like a kind of tchat application
 /opt/piratebox/bin/install_piratebox.sh /opt/piratebox/conf/piratebox.conf imageboard
  •  Change admin password
vi /opt/piratebox/www/board/config.pl

# System config^M
 use constant ADMIN_PASS => 'CHANGEME';     # Admin password. For fucks's sake, change this.^M
 use constant SECRET => 'CHANGEME';         # Cryptographic secret. CHANGE THIS to something to

[...]
  • Save & Exit then type reboot command to restart the MR3040. Unplug the Ethernet cable
  • Connect to the PirateBox using the “PirateBox – Share Freely” Wifi network !
  • Enjoy !

References

14 thoughts on “Installation of a piratebox on T-Link MR3040

  1. Hi,
    I think you are doing some useless steps in your howto.
    Enabling wifi should be done by the install of the piratebox-package.

    Do you want to contact me for optimizing and talking about your howto?

    kind regards
    Matthias

    • Sure i’ll be happy to discuss don’t hesitate to comment here and i’ll send you an email also

  2. Thanks a lot for this easy to follow tutorial.

    Less than an hour after opening the box it was up and running (kingston 16gb in a 5mm format).

    Merci !

    I already tried parallel access, and multiple uploads and downloads. So far that’s not bad at all:
    – quick upload of big files and small files from laptop, ,
    – somme difficulties for sending files from an android phone but it was due to conflicts on the phone side, makes me wonder on usage ease
    – From the ipad I’ve not yet managed to send anything yet but live streaming is working perfectly.

    PS: you might want to update the link to the “vi” guide as it’s far from being the best one for people not used to terminal stuff (especially for such simple manipulation)

  3. Hello!
    Great, but the download website for the firmware ist down!
    Do you have any idea where i can download the firmware for the mr3040?
    Thanks!
    Etoma

  4. Can you mount the USB drives to different systems later? Are they mini boot loaders? or mini kernerls or just “FS”? If just FS, can multiples be used for seperate use?

  5. Hello

    I have done all the process for installation and even installed Kahera image board, but missed to do the final step ” Change admin password” ….

    I have rebooted the router and it works as a pirate box, but I have some questions :
    – what is the use of the Kahera image board ?!?
    – now when trying to “Change admin password” and use “vi /opt/piratebox/www/board/config.pl” …. there is no “config.pl” available … only “kahera.pl” …. what is the use of “System config” ? where can I now change the pwds ? how to use them next ?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.