OpenWrt Forum Archive

Topic: HAME MPR-A1 - Small and cheap router with built-in battery

The content of this topic has been archived between 12 May 2015 and 2 May 2018. Unfortunately there are posts – most likely complete pages – missing.

This device seems to be identical to the MiFi F1 which  has a wiki page
http://wiki.openwrt.org/doku.php

An MPR-A1 trunk build as of Nov 23, 2013 (r38896) when flashed to the device did detect 32 MB of RAM. However the ethernet port was mapped to WAN and it was set up to get an address for a DHCP server. So to access the device connect the ethernet to the LAN port of another router and access through that. Once you get to the device - you can modify /etc/config/network to map all the enabled ports (0,1,2,3,4) to LAN. As it turns out port 4 is the port for the physical Ethernet and so that needs to be part of the LAN VLAN. To do a permanent fix - edit target/linux/ramips/base-files/etc/uci-defaults/02_network by inserting comments as follows and then rebuild. This ensures that all the ports in the VLAN get assigned to the LAN.

#     if [ `swconfig dev rt305x port $port get lan` = "0" ]; then
#     wanports="$port $wanports"
#     else
lanports="$port $lanports"
#     fi

To be safe first flash the initramfs image (as per the MPR-A2 wiki page) and then the sysupgrade image which is built from trunk. Look at the MPR-A2 wiki page for tips on configuring the build



NiHaoMike wrote:

Amazon has it for under $15 including shipping. Only 16MB but not bad for that price...
http://www.amazon.com/BrainyTrade-Mobil … =3g+router

I can't seem to control the LEDs on this router. The blue LED is supposed to light up when a WiFi client associates with the router - but that isn't happening.  It is mapped to GPIO 20 and is listed in /etc/config/system - but no luck.

Hello, we're currently using the HAME MPR-A2 as a DLNA media server and NAS.
However the transfer speeds are not very good - ranging from 0.5 - 2 MB/s, which means the user experience suffers.
While this is probably mainly due to hardware limitations, do you have any recommendations on how to speed this up?

Hi,

I have prepared manual how to upgrade no name routers from ebay without any soldering.
Upgrade to JiapengLi u-boot
Upgrade to minimal version of Openwrt firmware

Mini USB Portable 3G/4G WiFi Hotspot IEEE 802.11b/g/n 150Mbps Wireless Router

PCB bottom

pcb top


http://my-embedded.blogspot.com/2013/12 … 5350f.html

(Last edited by pratanczuk on 23 Dec 2013, 01:15)

Thanks @pratanczuk, nice tutorial and welcome on board!

However, I would suggest that you move this stuff to the OpenWrt Wiki, so it will be better indexed by Google and will allow the community to modify it!

You can just create a new product page in the hardware list of supported device, taking an existing product as template, and move your contents almost verbatim.

Also, your statement that the stock U-Boot bootloader's Ethernet is broken is false: the Ralink-provided modified U-Boot does not contain a TFTP client like the standard one, but it does contain a TFTP server, so that you can push an image to flash, see:
http://wiki.openwrt.org/toh/asus/rt-g32 … for.rev.c1

My guess is that Ralink originally did that so you don't have to run a TFTP server on the host side and just need a TFTP client on the PC.

This doesn't mean that the stock U-Boot will take an OpenWRT image as-is, it looks like there is still some kind of restriction that I am trying to figure out (like the firmware name containing some kind of pattern), so it still may be required to replace this bootloader by a known-good one.

I would also be very careful regarding which image/bootloader to flash: I bought a few "Mifi-F10" router during December 15% off AliBaba bargain sale at $8.45/piece (now back at $10.25: http://www.aliexpress.com/item/Mini-Por … 456.html), and these ones feature 4 MB Flash and 32 MB SDRAM cool ... It is thus required to use the 32 MB versions of Jiapengli's U-Boot instead of the default 16 MB version.

And before anything, I would suggest to backup all MTD partitions to the USB mass storage using:

for i in 1 2 3 4; do cp /dev/mtd${i}ro /media/sda1/mtd${i}.img; done

Hi,

backup and migration to openwrt wiki is an good idea. Thanks for info regarding TFTP.

I have created a few images: https://code.google.com/p/rcc/source/br … uter%2Fimg

audio_streamer.bin    3.4 MB
default.bin    2.4 MB
dlna_server.bin    3.6 MB
internet_radio.bin    3.1 MB
mini.bin    1.6 MB
mini_gargoyle_web.bin    2.4 MB
mini_luci_web.bin    2.1 MB
mini_luci_web_wifi.bin    2.4 MB
mqtt_server.bin    2.4 MB
serial_server.bin    1.6 MB
video_streamer.bin 2.1 MB

all for 16MB version.

(Last edited by pratanczuk on 2 Jan 2014, 12:37)

Lots of good work there, pratanczuk.

Have you located i2c pads on the board, GPIO1 - I2C_SD and GPIO2 - I2C_SCLK?

I investigated further on my "Mifi-F5" router: the Ralink-modified U-Boot contains a TFTP server but no TFTP client, and there are some additional restrictions on the firmware you are able to flash.

First, the "Image Name" must contain some tags, mine is "ZLMnet?MIFI10N?", I didn't push the test too far, but replacing the firmware by an OpenWRT one with the default name fails with "Bad illegal image !".

From the kernel partition saved as above, I used "binwalk" to extract the combined kernel/rootfs:

$ binwalk Kernel 

DECIMAL       HEX           DESCRIPTION
-------------------------------------------------------------------------------------------------------------------
0             0x0           uImage header, header size: 64 bytes, header CRC: 0xF78DA7F, created: Tue Jul 16 15:14:46 2013, image size: 3657218 bytes, Data Address: 0x80000000, Entry Point: 0x803B6000, data CRC: 0xB632FDC7, OS: Linux, CPU: MIPS, image type: OS Kernel Image, compression type: lzma, image name: "ZLMnet?MIFIF10N?"
64            0x40          LZMA compressed data, properties: 0x5D, dictionary size: 33554432 bytes, uncompressed size: 6415715 bytes

I then rebuilt the image using:

$ mkimage -A mips -O linux -T kernel -C lzma -a 0x80000000 -e 0x803B6000 -n "ZLMnet?MIFIF10N?" -d _Kernel.extracted/zimage uimage.bin
$ binwalk uimage.bin 

DECIMAL       HEX           DESCRIPTION
-------------------------------------------------------------------------------------------------------------------
0             0x0           uImage header, header size: 64 bytes, header CRC: 0x37E7B8A7, created: Thu Jan  2 23:45:47 2014, image size: 3657218 bytes, Data Address: 0x80000000, Entry Point: 0x803B6000, data CRC: 0x16F9B842, OS: Linux, CPU: MIPS, image type: OS Kernel Image, compression type: lzma, image name: "ZLMnet?MIFIF10N?"
64            0x40          LZMA compressed data, properties: 0x5D, dictionary size: 33554432 bytes, uncompressed size: 6415715 bytes

Please note that the "data CRC" differs between the original image and the reconstructed image, although the kernel/rootfs is exactly the same byte for byte... It means that the CRC calculation was probably altered in some way to prevent people from messing with the router firmware...

When I try to flash the reconstructed image, I get a "Fuke you, illegal fireware !!!" message...

As a conclusion, I don't think it is worth pushing the investigation any further, as it may lead to solutions that are very device-specific (each Chinese manufacturer can alter the CRC its own way), so I think that @pratanczuk's method to replace both the bootlader and firmware from userland is better!

@pratanczuk: how did you generate these different binaries (OpenWRT release + patch)? I need to generate some for my 32MB version!

Also, do you have any information regarding the GPIOs you have found (where are they accessible on a picture)?

(Last edited by Squonk on 4 Jan 2014, 20:48)

Hello.

I got the same mini WiFi 3G router with the one pratanczuk is using but with 32MB SDRAM. I managed to get OpenWRT trunk (MPR-A1 profile) running on it quite fine (note: needs a patch in ralink_soc_eth.c). The only problem I can't figure out is how to get the LEDs working. I can see them both light up when the router boots up but then the are turned off.

Any ideas about what I could try?

lizby wrote:

Lots of good work there, pratanczuk.

Have you located i2c pads on the board, GPIO1 - I2C_SD and GPIO2 - I2C_SCLK?


Not yet, but I am going to smile

Squonk wrote:

@pratanczuk: how did you generate these different binaries (OpenWRT release + patch)? I need to generate some for my 32MB version!
Also, do you have any information regarding the GPIOs you have found (where are they accessible on a picture)?


Hi Squonk,

I have prepared Image builder and additional scripts to simplify building process. I am going to publish this image builder and addons.

GPIO (I2C ) is still under investigation.

(Last edited by pratanczuk on 8 Jan 2014, 01:37)

pratanczuk wrote:
Squonk wrote:

@pratanczuk: how did you generate these different binaries (OpenWRT release + patch)? I need to generate some for my 32MB version!
Also, do you have any information regarding the GPIOs you have found (where are they accessible on a picture)?


Hi Squonk,

I have prepared Image builder and additional scripts to simplify building process. I am going to publish this image builder and addons.

GPIO (I2C ) is still under investigation.

Regarding 32 MB, I will remove parameter mem=16M, it can be passed from u-boot in bootargs variable

I want to build my own kernel/rootfs from scratch and bootloader if required, so I would like to know if you just used the standard MPR-A1  or any other profile or created your own, and in this case, if you applied additional patches that are not already in latest BB.

For the bootloader, my guess is that I can use JiapengLi's uboot256.img - (RT5350 32M RAM Uboot,support 32M SDRAM).

@pratanczuk: How did you get the GPIO list? Are you sure they are all working as described, and did yo ufigured out where to find them?

anarchy99 wrote:
neuro wrote:

Hello, we're currently using the HAME MPR-A2 as a DLNA media server and NAS.
However the transfer speeds are not very good - ranging from 0.5 - 2 MB/s, which means the user experience suffers.
While this is probably mainly due to hardware limitations, do you have any recommendations on how to speed this up?

if you are having problems while using openwrt then i think it's not due to hardware limitations as this guy says he can stream 720p videos without problems

http://www.amazon.com/Mobile-Wireless-Router-Broadband-Hotspot/product-reviews/B00B6XPQR2/ref=dp_top_cm_cr_acr_txt?showViewpoints=1

also there exists similar device with 8MB flash and 64MB RAM but since i cleared browser history i was unable to find it anymore. maybe somebody here knows where to get it?

We did some more testing and it seems to depend on the device playing the video.
The hardware is definitely not capable of real-time streaming a high-definition video, however with enough buffering playback seems to work ok.

My GPIO research.
http://i.imgur.com/kHVW2Ox.jpg

(Last edited by anton.rad on 14 Jan 2014, 15:57)

anton.rad wrote:

My GPIO research.

Great!

Nice work @pratanczuk

So there are (at least) two versions of this router - 16MB versus 32MB? Anyway to tell the difference before buying? Any recommended supplier? Thanks

pratanczuk wrote:

Hi,

I have prepared manual how to upgrade no name routers from ebay without any soldering.
Upgrade to JiapengLi u-boot
Upgrade to minimal version of Openwrt firmware

Mini USB Portable 3G/4G WiFi Hotspot IEEE 802.11b/g/n 150Mbps Wireless Router

PCB bottom

pcb top


http://my-embedded.blogspot.com/2013/12 … 5350f.html

King0fK0ng wrote:

Nice work @pratanczuk

So there are (at least) two versions of this router - 16MB versus 32MB? Anyway to tell the difference before buying? Any recommended supplier? Thanks

Yes, but there is no way to tell, unless the seller is ready to connect it and log in a shell and type "free": the "Total Mem" is then >= 16384 for a 32 MB device. I doubt any seller will accept to do that, though wink

I got my 32 MB ones at this seller on AliBaba:
http://www.aliexpress.com/item/Mini-Por … 00456.html

But I can't promise they will ship 32 MB versions to you!

Hello, I'm currently having trouble connecting the MPR-A2 to the internet.
I tried both WLAN and Ethernet and neither worked.

While it was possible to connect to an existing AP while still providing the OpenWrt AP by enabling WDS, the device failed to get an IP address.
When checking via the FritzBox webinterface, I could also see that the device was connected to the AP but did not have an IP.
The same thing happened when using Ethernet - a connection but no IP.

Has anyone seen similar behaviour?
Does it work properly for you?

anton.rad wrote:

My GPIO research.

Hi @anton.rad,

Can you please explain how did you manage to get these GPIOs?

Do you have a DT file or some mods that you can contribute to help us find out the remaining GPIOs?

Hi everyone,
I have a Hame A15 (3g wireless router).

I would like to install openwrt on it without any soldering but only using ethernet/usb/wlan connection.

According to pratanczuk post, it should be possible (http://my-embedded.blogspot.com/2013/12 … 5350f.html).

Anyone who has tested this procedure on Hame A15? If so, after installing openwrt trunk firmware, does 3G usb connection (and sharing) work?

Thanks in advance for any support smile

Squonk wrote:

@pratanczuk: How did you get the GPIO list? Are you sure they are all working as described, and did yo ufigured out where to find them?


Hi,

I have take it from RT5350 spec.

I have released images for 16/32M version: (wifi , firewall, ppp excluded at this step):
https://code.google.com/p/rcc/source/br … r%2Fimg_32


audio_streamer.bin    3.6 MB (tested)   
default.bin    2.4 MB
dlna_server.bin    3.6 MB (tested)
internet_radio.bin    3.1 MB (tested)
mini.bin    1.6 MB (tested)
mini_luci_web.bin    2.1 MB
mini_luci_web_wifi.bin    2.4 MB
mqtt_server.bin    2.4 MB (tested)
serial_server.bin    1.6 MB (tested)
uboot256.img    103 KB    r342
video_streamer.bin    2.1 MB (tested)

and  image builder: https://code.google.com/p/rcc/source/br … 64.tar.bz2

@Squonk config included.

Manual:
To generate all images just run ./generate_all.sh
To change configuration modify ./image_builder_rt5350.sh and content of "Files" directory.

Have a fun
Pawel

Thanks @pratanczuk

cacodemon79 wrote:

Hi everyone,
I have a Hame A15 (3g wireless router).

I would like to install openwrt on it without any soldering but only using ethernet/usb/wlan connection.

According to pratanczuk post, it should be possible (http://my-embedded.blogspot.com/2013/12 … 5350f.html).

Anyone who has tested this procedure on Hame A15? If so, after installing openwrt trunk firmware, does 3G usb connection (and sharing) work?

Thanks in advance for any support smile

Hi Pratanczuk, can you help me? smile

@cacodemon79

I don't know what exactly is inside a Hame A15.

Do you have a telnet access with the mtd_write utility available like on the Mifi-F5?

How much RAM do you have, 16 or 32MB?

And as a backup, I suggest you to be ready to use a soldering iron, just in case wink

(Last edited by Squonk on 21 Jan 2014, 15:26)