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

swatfa--The gpios are useful when you want to use the device as a "little computer" as opposed to as a router.  The market may be somewhat limited.  Even just bringing out the serial console and i2c to a header (or .1 inch through-holes) would be helpful.  With gpios you can control external devices--robots, vehicles, furnaces, any number of things.

A second usb port would have many uses (webcam + usb 3g).

77 (edited by swatfa 2012-12-23 00:48:27)

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

lizby wrote:

swatfa--The gpios are useful when you want to use the device as a "little computer" as opposed to as a router.  The market may be somewhat limited.  Even just bringing out the serial console and i2c to a header (or .1 inch through-holes) would be helpful.  With gpios you can control external devices--robots, vehicles, furnaces, any number of things.

A second usb port would have many uses (webcam + usb 3g).

As far as i know the device already has gpios. I will try to see if i can get the factory to add more to the pcb.

But unfortunatly an extra usb will not be possible for now. I might include a mini usb hub as an accessory with the device for the webcam plus 3g

The gpio configuration you posted earlier is it feasible in your opinion for this device? Or is there a simpler configuration you can advise on? So i can try to present it to the factory to see if they can include it

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

First of all, the HAME MPR-A1 (and clones) and the TP-Link TL-WR703N (and related TL-MR3020/TL-MR3040/TL-MR11U) are 2 different devices, with 2 different chips: the HAME is using a Ralink RT5350F chip, and the TP-Links an Atheros AR9331 chip.

Its is true however that both chips feature a 384 or 400MHz MIPS24kc, built-in 5x Ethernet switch, USB 2.0 Host and 802.1n Wifi and a set of peripherals, and thus play in the same category as low-cost integrated chip for portable, battery-operated routers.

Please also remember that although these chips contain a lot of pins, their purpose is clearly not for real-time, microcontroller-like operation as could be an AVR chip (used in Arduino boards), so their capacities in this domain are rather limited: because of Linux multi-tasking scheduling, don't expect controlling a hardware process with < 10 ms accuracy, meaning only very slow control is possible.

That said, and speaking about the HAME MPR-A1 from this thread, referring to the RT3050F preliminary datasheet (the RT3050F looks very similar to the RT5350F), this chip contains the following devices:

  • Clock/Timer/Reset/PLL Block

  • MIPS 24KEc (284 MHz) 32 KB Instruction Cache / 16 KB Data Cache CPU

  • 802.11n 2T2R 2.4 GHz RF

  • 802.11n 2T2R MAC BBP (Base Band Processor)

  • 5-Port Fast  Ethernet Switch

  • 8/16 bit NOR or 8 bit NAND Parallel Flash Controller (not used in HAME MPR-A1)

  • 16/32 bit SDRAM Controller (used in 16 bit mode in HAME MPR-A1)

  • 1x Full UART

  • 1x Lite UART (used as console in HAME MPR-A1)

  • 1x USB 2.0 OTG Controller + PHY

  • 1x I2C Interface

  • 1x I2S Audio Interface

  • 1x SPI Interface (used for Flash in HAME MPR-A1)

  • 1x PCM Codec Interface

  • Up to 52 GPIOs

The 52 GPIOs sound like a lot, but as they are actually sharing the chip pins with the other functions (multiplexing), there aren't so many that are really available.

Not counting that some of the GPIOs are already used to perform some onboard function:

  • GPIO0 - Reset Button

  • GPIO7 - USB Power

  • GPIO12 - USB Root Hub Power

  • GPIO13 - Unknown, but seems to be used in bootloader, maybe USB overcurrent input?

  • GPIO17 - Red Power LED

  • GPIO20 - Blue System LED

Looking at at the "1.3 Pin Sharing Scheme" section on page 17  of the RT3050F datasheet, and given that the RGMII_GPIO_MODE, SDRAM_GPIO_MODE and MDIO_GPIO_MODE are not available for the RT3050F (and probably too for the RT5350F),  and that the SPI_GPIO_MODE is not available because the HAME MPR-A1 uses SPI Flash memory:

  1. JTAG_GPIO_MODE is set during normal operation, as GPIO17 is used for the Red Power LED and GPIO20 for the Blue System LED, thus GPIO18/GPIO19/GPIO21 are also available, but no JTAG

  2. TXD2 (GPIO15) and RXD2 (GPIO16) are already used by the console

  3. as GPIO7 and GPIO12 are already used for the USB, Full UART, PCM and I2S interfaces are not available sad So, GPIO8 (TXD) and GPIO10 (RXD) cannot be used as a second Lite UART, but GPIO8/GPIO9/GPIO10/GPIO11 and GPIO14 seem to be available as simple GPIOs

  4. GPIO1 (I2C_SD) and GPIO2 (I2C_SCLK) are available

So, there is a total of 12 available GPIOs (including the console UART which is already available on pads under the battery), but no second UART, PCM, I2S or second USB interfaces. These signals (plus some additional GND, +5V, +3.3V power pins) could be brought out to a dual row 0.1" unmounted SMT header on the battery side of the PCB (like the existing UART), but not to a through-hole header because of the lack of space on the PCB.

Of course, this would require additional routing for the signals listed in the numbered list above, but it doesn't add anything to the BOM cost...

2x TP-Link TL-MR3020, 2x TP-Link TL-WR703N, 1x TP-Link TL-MR11U, 1x Hame MPR-L8

79 (edited by swatfa 2012-12-23 11:27:01)

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

Squonk wrote:

First of all, the HAME MPR-A1 (and clones) and the TP-Link TL-WR703N (and related TL-MR3020/TL-MR3040/TL-MR11U) are 2 different devices, with 2 different chips: the HAME is using a Ralink RT5350F chip, and the TP-Links an Atheros AR9331 chip.

Its is true however that both chips feature a 384 or 400MHz MIPS24kc, built-in 5x Ethernet switch, USB 2.0 Host and 802.1n Wifi and a set of peripherals, and thus play in the same category as low-cost integrated chip for portable, battery-operated routers.

Please also remember that although these chips contain a lot of pins, their purpose is clearly not for real-time, microcontroller-like operation as could be an AVR chip (used in Arduino boards), so their capacities in this domain are rather limited: because of Linux multi-tasking scheduling, don't expect controlling a hardware process with < 10 ms accuracy, meaning only very slow control is possible.

That said, and speaking about the HAME MPR-A1 from this thread, referring to the RT3050F preliminary datasheet (the RT3050F looks very similar to the RT5350F), this chip contains the following devices:

  • Clock/Timer/Reset/PLL Block

  • MIPS 24KEc (284 MHz) 32 KB Instruction Cache / 16 KB Data Cache CPU

  • 802.11n 2T2R 2.4 GHz RF

  • 802.11n 2T2R MAC BBP (Base Band Processor)

  • 5-Port Fast  Ethernet Switch

  • 8/16 bit NOR or 8 bit NAND Parallel Flash Controller (not used in HAME MPR-A1)

  • 16/32 bit SDRAM Controller (used in 16 bit mode in HAME MPR-A1)

  • 1x Full UART

  • 1x Lite UART (used as console in HAME MPR-A1)

  • 1x USB 2.0 OTG Controller + PHY

  • 1x I2C Interface

  • 1x I2S Audio Interface

  • 1x SPI Interface (used for Flash in HAME MPR-A1)

  • 1x PCM Codec Interface

  • Up to 52 GPIOs

The 52 GPIOs sound like a lot, but as they are actually sharing the chip pins with the other functions (multiplexing), there aren't so many that are really available.

Not counting that some of the GPIOs are already used to perform some onboard function:

  • GPIO0 - Reset Button

  • GPIO7 - USB Power

  • GPIO12 - USB Root Hub Power

  • GPIO13 - Unknown, but seems to be used in bootloader, maybe USB overcurrent input?

  • GPIO17 - Red Power LED

  • GPIO20 - Blue System LED

Looking at at the "1.3 Pin Sharing Scheme" section on page 17  of the RT3050F datasheet, and given that the RGMII_GPIO_MODE, SDRAM_GPIO_MODE and MDIO_GPIO_MODE are not available for the RT3050F (and probably too for the RT5350F),  and that the SPI_GPIO_MODE is not available because the HAME MPR-A1 uses SPI Flash memory:

  1. JTAG_GPIO_MODE is set during normal operation, as GPIO17 is used for the Red Power LED and GPIO20 for the Blue System LED, thus GPIO18/GPIO19/GPIO21 are also available, but no JTAG

  2. TXD2 (GPIO15) and RXD2 (GPIO16) are already used by the console

  3. as GPIO7 and GPIO12 are already used for the USB, Full UART, PCM and I2S interfaces are not available sad So, GPIO8 (TXD) and GPIO10 (RXD) cannot be used as a second Lite UART, but GPIO8/GPIO9/GPIO10/GPIO11 and GPIO14 seem to be available as simple GPIOs

  4. GPIO1 (I2C_SD) and GPIO2 (I2C_SCLK) are available

So, there is a total of 12 available GPIOs (including the console UART which is already available on pads under the battery), but no second UART, PCM, I2S or second USB interfaces. These signals (plus some additional GND, +5V, +3.3V power pins) could be brought out to a dual row 0.1" unmounted SMT header on the battery side of the PCB (like the existing UART), but not to a through-hole header because of the lack of space on the PCB.

Of course, this would require additional routing for the signals listed in the numbered list above, but it doesn't add anything to the BOM cost...

Thanks for the detailed information. I will be sure to pass it on to the factory.
Would it be possible to have a configuration list similar to something like this:
1 = 3V3    2 = 5V
  3 = GPIO0  4 = GPIO4
  5 = GPIO1  6 = GND
  7 = GPIO2  8 = TX
  9 = GPIO3  10= RX
11 = GND    12= GND
13 = i2cSCL 14= TX2
15 = i2cSDA 16= RX2

So that i can give it to the factory? Ideally as you mentioned if its something that does not increase the BOM and just requires some minor changes on the PCB that would be great to keep my overheads down.

One more thing. You mentioned that the chip is not designed for realtime microcontroller functionality. With this in mind, would there be any benefit in the changes that you are recommending?

Thanks

80 (edited by Squonk 2012-12-23 12:09:07)

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

swatfa wrote:

Thanks for the detailed information. I will be sure to pass it on to the factory.
Would it be possible to have a configuration list similar to something like this:
1 = 3V3      2 = 5V
3 = GPIO0   4 = GPIO4
5 = GPIO1   6 = GND
7 = GPIO2   8 = TX
9 = GPIO3   10= RX
11 = GND      12= GND
13 = i2cSCL 14= TX2
15 = i2cSDA   16= RX2

So that i can give it to the factory? Ideally as you mentioned if its something that does not increase the BOM and just requires some minor changes on the PCB that would be great to keep my overheads down.

Having a dual-row 0.1" SMT header is important, but I don't think that a specific header pinout is, just make sure to provide a GND pin close to RXD2/TXD2 and I2C_SCLK/I2C_SD for convenience as a ground reference, plus +5V and +3.3V power supply.

Hre is my suggestion:

 1 = 3V3              2 = 5V
 3 = GPIO11           4 = GPIO14
 5 = GPIO10           6 = GPIO18
 7 = GPIO9            8 = GPIO19
 9 = GPIO8            10= GPIO21
11 = GND              12= GND
13 = I2C_SCLK (GPIO2) 14= TXD2 (GPIO15)
15 = I2C_SD (GPIO1)   16= RXD2 (GPIO16)
swatfa wrote:

One more thing. You mentioned that the chip is not designed for realtime microcontroller functionality. With this in mind, would there be any benefit in the changes that you are recommending?

Yes, it is definitely useful for low-speed real-world control and communication with external microcontrollers that are able to provide this higher-speed control, opening the device to a lot of hacking applications.

EDIT:
As a 2x10 0.1" SMT R/A is a very common header, maybe something like this would be almost perfect:

 1 = 3V3               2 = 5V
 3 = GPIO11            4 = GPIO14
 5 = GPIO10            6 = GPIO18
 7 = GND               8 = GND
 9 = GPIO9            10 = GPIO19
11 = GPIO8            12 = GPIO21
13 = GND              14 = GND
15 = I2C_SCLK (GPIO2) 16 = TXD2 (GPIO15)
17 = I2C_SD (GPIO1)   18 = RXD2 (GPIO16)
19 = 3V3              20 = 5V
2x TP-Link TL-MR3020, 2x TP-Link TL-WR703N, 1x TP-Link TL-MR11U, 1x Hame MPR-L8

81 (edited by swatfa 2012-12-23 12:14:19)

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

Squonk wrote:

EDIT:
As a 2x10 0.1" SMT R/A is a very common header, maybe something like this would be almost perfect:

Thats excellent. Thanks. I will pass it on to the factory

82 (edited by Squonk 2012-12-23 12:21:18)

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

swatfa wrote:
Squonk wrote:

EDIT:
As a 2x10 0.1" SMT R/A is a very common header, maybe something like this would be almost perfect:

Thats excellent. Thanks. I will pass it on to the factory

Good luck, ask them for a non-mounted 2x10 SMT 0.1" pitch R/A header to replace the existing UART pads on the PCB bottom wink

2x TP-Link TL-MR3020, 2x TP-Link TL-WR703N, 1x TP-Link TL-MR11U, 1x Hame MPR-L8

83 (edited by lizby 2012-12-23 16:46:08)

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

Squonk--thank you for that detailed analysis of the GPIO usage in the reference design.  Of course, by modifying the design, other GPIOs could be used for USB Power and USB Root Hub Power (since they only need to be on/off), thus freeing those pins for the full UART.

But to minimize board redesign, your suggestion of running only the currently available GPIOs to SMT header pads is probably easiest.  While linux is not good for demanding real-time control, there are many uses for slower-acting devices, such as home automation.

Too bad about no chance for 2nd usb.  12 available GPIOs could make for a 16-pin header similar to the one I suggested.  The one I laid out would have the advantage of partialy replicating that of the raspberry pi, but really, any layout routed to a header would be a big step forward.  Here is my wish list.

  1 = 3V3            2 = 5V
  3 = i2cSCLK/GPIO2  4 = GPIO??
  5 = i2cSDA/GPIO1   6 = GND
  7 = GND            8 = TX
  9 = GPIO??        10 = RX
 11 = GPIO??        12 = GND
 13 = GPIO??        14 = GPIO??
 15 = GPIO??        16 = GPIO??

If this is too many pins, it could be reduced to 10 pins with GND on pin 7 replaced with a GPIO, or even 8 pins if RX were moved to pin 7.

84 (edited by lizby 2012-12-23 16:56:49)

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

Squonk's 20-pin header would be ideal, but if something smaller is required, be sure to include the i2c pins.  8 pins appears to me to be the minimum to give you console and control of remote devices with GPIO or I2C. 

Some Arduino and Pic and Picaxe microcontrollers support I2C slave communications, which could give about all the real-time control you could want, subject to commands from the master linux device.

85 (edited by swatfa 2012-12-23 18:32:09)

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

Thanks for all the feedback. I will try to push Squonks layout to the factory to see if its feasible. If its not too feasible, i will try to push through a smaller layout keeping in mind the i2c pins. I dont forsee any problems. It should be ok as long as it doesnt involve any major hardware mods.

Regarding a second USB. This will certainly be in the works for a possible second or third model release after this one. But not for this release since it would involve a complete redesign of the casing and pcb which is not in the works for the time being

86 (edited by lizby 2012-12-23 19:04:51)

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

swatfa--that sounds good.

On the Raspberry Pi, the I2C pins have the required pull-ups on the board.   That would be optimal on your board, but if not available could be worked around.

87 (edited by Squonk 2012-12-23 19:27:41)

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

Here is a set of clean patches for creating a working firmware for the HAME MPR-A1(should also work on most of the clones) from latest trunk:

Compiling

Just checkout latest trunk (revision 34872 as of this writing) in a directory of your choice and apply the patches:

mkdir whatever
cd whatever
svn co svn://svn.openwrt.org/openwrt/trunk
cd trunk
patch -p0 < path/to/dowloaded/patches/openwrt_add_pm26lq032_flash_support.txt
patch -p0 < path/to/dowloaded/patches/openwrt_add_rt3550_wlan_support.txt
patch -p0 < path/to/dowloaded/patches/openwrt_hame_mpr-a1_patch.txt
make menuconfig

Select:

  • Target System: (Ralink RT288x/RT3xxx)

  • Subtarget: (RT305x based boards)

  • Target Profile: (HAME MPR-A1)

Then select all the packages you want to include , save and exit.

then:

make -j n

...where "n" is the number of CPU + 1.

After a time that depends on your processing power (may take hours!), you should get a  firmware image named "openwrt-ramips-rt305x-mpr-a1-squashfs-sysupgrade.bin" in the "bin/ramips" directory and all corresponding packages in the "packages" subdirectory.

Flashing

I didn't tried using the flashing tool built in the original firmware's webadmin.

I used a TTL UART to USB converter (Nokia CA42 cable clone), connected like this:
http://imageshack.us/a/img821/9373/mprl8pcbbottom.png

You will need an Ethernet cable between your Linux PC and the device.

On the Linux PC side, you will need a terminal emulator ("sudo minicom" or "screen") and use a setup with 57600 bps, 8 bits, 1 stop bit, no parity, no hardware/software flow control and a tftp server running. In the following, it is assumed that you copied the "openwrt-ramips-rt305x-mpr-a1-squashfs-sysupgrade.bin" in the "bin/ramips" file at the root of the tftp server, generally "/tftpboot".

Power on the device, and be readdy to type in "2" asap:

U-Boot 1.1.7 (Dec 13 2011 - 13:49:42)                                           
                                                                                
Board: Ralink APSoC DRAM:  16 MB                                                
relocate_code Pointer at: 80fb4000                                              
******************************                                                  
Software System Reset Occurred                                                  
******************************                                                  
spi_wait_nsec: 42                                                               
spi device id: ef 40 16 0 0 (40160000)                                          
find flash: W25Q32BV                                                            
raspi_read: from:30000 len:1000                                                 
.raspi_read: from:30000 len:1000                                                
.============================================                                   
Ralink UBoot Version: 3.6.0.0                                                   
--------------------------------------------                                    
ASIC 5350_MP (Port5<->None)                                                     
DRAM_CONF_FROM: Boot-Strapping                                                  
DRAM_TYPE: SDRAM                                                                
DRAM_SIZE: 128 Mbits                                                            
DRAM_WIDTH: 16 bits                                                             
DRAM_TOTAL_WIDTH: 16 bits                                                       
TOTAL_MEMORY_SIZE: 16 MBytes                                                    
Flash component: SPI Flash                                                      
Date:Dec 13 2011  Time:13:49:42                                                 
============================================                                    
icache: sets:256, ways:4, linesz:32 ,total:32768                                
dcache: sets:128, ways:4, linesz:32 ,total:16384                                
                                                                                
 ##### The CPU freq = 360 MHZ ####                                              
 estimate memory size =16 Mbytes                                                
raspi_read: from:40028 len:6                                                    
.                                                                               
raspi_read: from:0 len:30004                                                    
....*************Is_update = 0 plat = 1**************                           
                                                                                
Please choose the operation:                                                    
   1: Load system code to SDRAM via TFTP.                                       
   2: Load system code then write to Flash via TFTP.                            
   3: Boot system code via Flash (default).                                     
   4: Entr boot command line interface.                                         
   7: Load Boot Loader code then write to Flash via Serial.                     
   9: Load Boot Loader code then write to Flash via TFTP.                       
                                                                                
You choosed 2                                                                   
                                                                                
 0                                                                              
                                                                                
2: System Load Linux Kernel then write to Flash via TFTP.                       
 Warning!! Erase Linux in Flash then burn new one. Are you sure?(Y/N)

Type "y", then enter the correct IPaddresses for the device and your PC, and the name of the firmware file:

 Please Input new ones /or Ctrl-C to discard
        Input device IP (192.168.1.1) ==:192.168.1.1
        Input server IP (192.168.1.2) ==:192.168.1.2
        Input Linux Kernel filename (openwrt-ramips-rt305x-mpr-a1-squashfs-sysupgrade.bin) ==:openwrt-ramips-rt305x-mpr-a1-squashfs-sysupgrade.bin

You should see the flashing taking place, followed by the normal OpenWrt boot sequence:

 netboot_common, argc= 3 

 NetTxPacket = 0x80FE6AC0 

 KSEG1ADDR(NetTxPacket) = 0xA0FE6AC0 

 NetLoop,call eth_halt ! 

 NetLoop,call eth_init ! 
Trying Eth0 (10/100-M)

 Waitting for RX_DMA_BUSY status Start... done


 Header Payload scatter function is Disable !! 

 ETH_STATE_ACTIVE!! 
Using Eth0 (10/100-M) device
TFTP from server 192.168.1.2; our IP address is 192.168.1.1
Filename 'openwrt-ramips-rt305x-mpr-a1-squashfs-sysupgrade.bin'.

 TIMEOUT_COUNT=10,Load address: 0x80100000
Loading: Got ARP REPLY, set server/gtwy eth addr (00:1d:09:d7:4c:49)
Got it
#################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##################
done
Bytes transferred = 2752516 (2a0004 hex)
NetBootFileXferSize= 002a0004
raspi_erase_write: offs:50000, count:2a0004
raspi_erase: offs:50000 len:2a0000
..........................................
raspi_write: to:50000 len:2a0000 
..........................................
raspi_read: from:50000 len:10000 
.raspi_read: from:60000 len:10000 
.raspi_read: from:70000 len:10000 
.raspi_read: from:80000 len:10000 
.raspi_read: from:90000 len:10000 
.raspi_read: from:a0000 len:10000 
.raspi_read: from:b0000 len:10000 
.raspi_read: from:c0000 len:10000 
.raspi_read: from:d0000 len:10000 
.raspi_read: from:e0000 len:10000 
.raspi_read: from:f0000 len:10000 
.raspi_read: from:100000 len:10000 
.raspi_read: from:110000 len:10000 
.raspi_read: from:120000 len:10000 
.raspi_read: from:130000 len:10000 
.raspi_read: from:140000 len:10000 
.raspi_read: from:150000 len:10000 
.raspi_read: from:160000 len:10000 
.raspi_read: from:170000 len:10000 
.raspi_read: from:180000 len:10000 
.raspi_read: from:190000 len:10000 
.raspi_read: from:1a0000 len:10000 
.raspi_read: from:1b0000 len:10000 
.raspi_read: from:1c0000 len:10000 
.raspi_read: from:1d0000 len:10000 
.raspi_read: from:1e0000 len:10000 
.raspi_read: from:1f0000 len:10000 
.raspi_read: from:200000 len:10000 
.raspi_read: from:210000 len:10000 
.raspi_read: from:220000 len:10000 
.raspi_read: from:230000 len:10000 
.raspi_read: from:240000 len:10000 
.raspi_read: from:250000 len:10000 
.raspi_read: from:260000 len:10000 
.raspi_read: from:270000 len:10000 
.raspi_read: from:280000 len:10000 
.raspi_read: from:290000 len:10000 
.raspi_read: from:2a0000 len:10000 
.raspi_read: from:2b0000 len:10000 
.raspi_read: from:2c0000 len:10000 
.raspi_read: from:2d0000 len:10000 
.raspi_read: from:2e0000 len:10000 
.raspi_read: from:2f0000 len:10000 
.raspi_erase: offs:2f0000 len:10000
.
raspi_write: to:2f0000 len:10000 
.
raspi_read: from:2f0000 len:10000 
.Done!
## Booting image at bc050000 ...
raspi_read: from:50000 len:40 
.   Image Name:   MIPS OpenWrt Linux-3.6.11
   Created:      2012-12-23  14:28:32 UTC
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    838219 Bytes = 818.6 kB
   Load Address: 80000000
   Entry Point:  80000000
raspi_read: from:50040 len:cca4b 
.............   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 16

Starting kernel ...

[    0.000000] Linux version 3.6.11 (mstempin@Mikeul) (gcc version 4.6.4 20121106 (prerelease) (Linaro GCC 4.6-2012.11) ) #1 Sun Dec 23 15:28:25 CET 2012
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[    0.000000] Ralink RT5350 id:1 rev:3 running at 360.00 MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 01000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x00ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x00ffffff]
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 4064
[    0.000000] Kernel command line:  board=MPR-A1 console=ttyS1,57600 mtdparts=spi0.0:192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,896k(kernel),2880k(rootfs),3776k@0x50000(firmware) 2
[    0.000000] PID hash table entries: 64 (order: -4, 256 bytes)
[    0.000000] Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] __ex_table already sorted, skipping sort
[    0.000000] Writing ErrCtl register=00005680
[    0.000000] Readback ErrCtl register=00005680
[    0.000000] Memory: 13576k/16384k available (1931k kernel code, 2808k reserved, 312k data, 176k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:48
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.010000] Calibrating delay loop... 239.61 BogoMIPS (lpj=1198080)
[    0.080000] pid_max: default: 32768 minimum: 301
[    0.080000] Mount-cache hash table entries: 512
[    0.090000] NET: Registered protocol family 16
[    0.100000] MIPS: machine is HAME MPR-A1
[    0.130000] bio: create slab <bio-0> at 0
[    0.140000] Switching to clocksource MIPS
[    0.150000] NET: Registered protocol family 2
[    0.160000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    0.180000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    0.190000] TCP: Hash tables configured (established 512 bind 512)
[    0.200000] TCP: reno registered
[    0.210000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.220000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.230000] NET: Registered protocol family 1
[    0.280000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.290000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.320000] msgmni has been set to 26
[    0.320000] io scheduler noop registered
[    0.330000] io scheduler deadline registered (default)
[    0.340000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.360000] serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
[    0.370000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[    0.390000] ramips-spi ramips-spi.0: master is unqueued, this is deprecated
[    0.410000] m25p80 spi0.0: found w25q32, expected pm25lq032
[    0.420000] m25p80 spi0.0: w25q32 (4096 Kbytes)
[    0.430000] 6 cmdlinepart partitions found on MTD device spi0.0
[    0.440000] Creating 6 MTD partitions on "spi0.0":
[    0.450000] 0x000000000000-0x000000030000 : "u-boot"
[    0.460000] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.480000] 0x000000040000-0x000000050000 : "factory"
[    0.490000] 0x000000050000-0x000000130000 : "kernel"
[    0.500000] 0x000000130000-0x000000400000 : "rootfs"
[    0.520000] mtd: partition "rootfs" set to be root filesystem
[    0.530000] mtd: partition "rootfs_data" created automatically, ofs=2F0000, len=110000 
[    0.540000] 0x0000002f0000-0x000000400000 : "rootfs_data"
[    0.560000] 0x000000050000-0x000000400000 : "firmware"
[    0.580000] ramips-wdt ramips-wdt: timeout value must be 0 < timeout <= 35, using 35
[    0.600000] TCP: cubic registered
[    0.610000] NET: Registered protocol family 17
[    0.620000] 8021q: 802.1Q VLAN Support v1.8
[    0.650000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    0.660000] Freeing unused kernel memory: 176k freed
[    5.120000] input: gpio-keys-polled as /devices/platform/gpio-keys-polled/input/input0
[    5.260000] Button Hotplug driver version 0.4.1
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
jffs2 not ready yet; using ramdisk
- init -

Please press Enter to activate this console. [   11.080000] Compat-drivers backport release: compat-drivers-2012-12-04
[   11.090000] Backport based on wireless-testing.git master-2012-12-06
[   11.100000] compat.git: wireless-testing.git
[   11.150000] cfg80211: Calling CRDA to update world regulatory domain
[   11.160000] cfg80211: World regulatory domain updated:
[   11.180000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   11.190000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   11.210000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   11.220000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[   11.240000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   11.250000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   11.910000] SCSI subsystem initialized
[   12.330000] usbcore: registered new interface driver usbfs
[   12.340000] usbcore: registered new interface driver hub
[   12.350000] usbcore: registered new device driver usb
[   14.890000] PPP generic driver version 2.4.2
[   15.310000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   15.580000] NET: Registered protocol family 24
[   15.760000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   16.770000] ehci-platform ehci-platform: Generic Platform EHCI Controller
[   16.780000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[   16.830000] ehci-platform ehci-platform: irq 26, io mem 0x101c0000
[   16.860000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[   16.870000] hub 1-0:1.0: USB hub found
[   16.880000] hub 1-0:1.0: 1 port detected
[   17.030000] nf_conntrack version 0.5.0 (214 buckets, 856 max)
[   17.760000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   17.770000] ohci-platform ohci-platform: Generic Platform OHCI Controller
[   17.780000] ohci-platform ohci-platform: new USB bus registered, assigned bus number 2
[   17.800000] ohci-platform ohci-platform: irq 26, io mem 0x101c1000
[   17.870000] hub 2-0:1.0: USB hub found
[   17.880000] hub 2-0:1.0: 1 port detected
[   18.040000] usbcore: registered new interface driver cdc_acm
[   18.050000] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[   18.210000] usbcore: registered new interface driver usbserial
[   18.230000] usbcore: registered new interface driver usbserial_generic
[   18.240000] USB Serial support registered for generic
[   18.250000] usbserial: USB Serial Driver core
[   18.300000] Initializing USB Mass Storage driver...
[   18.310000] usbcore: registered new interface driver usb-storage
[   18.320000] USB Mass Storage support registered.
[   18.460000] usbcore: registered new interface driver ums-alauda
[   18.490000] usbcore: registered new interface driver ums-cypress
[   18.530000] usbcore: registered new interface driver ums-datafab
[   18.560000] usbcore: registered new interface driver ums-freecom
[   18.600000] usbcore: registered new interface driver ums-isd200
[   18.630000] usbcore: registered new interface driver ums-jumpshot
[   18.660000] usbcore: registered new interface driver ums-karma
[   18.690000] usbcore: registered new interface driver ums-sddr09
[   18.730000] usbcore: registered new interface driver ums-sddr55
[   18.760000] usbcore: registered new interface driver ums-usbat
[   18.930000] usbcore: registered new interface driver ftdi_sio
[   18.950000] USB Serial support registered for FTDI USB Serial Device
[   18.960000] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
[   26.900000] device eth0.1 entered promiscuous mode
[   26.910000] device eth0 entered promiscuous mode
[   26.950000] br-lan: port 1(eth0.1) entered forwarding state
[   26.960000] br-lan: port 1(eth0.1) entered forwarding state
[   26.990000] ramips-wdt: timeout value 60 must be 0 < timeout <= 35, using 35
[   28.960000] br-lan: port 1(eth0.1) entered forwarding state
[   49.040000] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   49.060000] jffs2_build_filesystem(): unlocking the mtd device... done.
[   49.070000] jffs2_build_filesystem(): erasing all blocks after the end marker... done.
[   56.410000] jffs2: notice: (1279) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.



BusyBox v1.19.4 (2012-12-23 15:19:00 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 BARRIER BREAKER (Bleeding Edge, r34872)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------
root@OpenWrt:/# (Type return to get this prompt)
Tests

I have an MPR-L8 (HAME MPR-A1 clone) board with 4MB Flash and 16 MB SDRAM, purchased here for $19.

I used a Linkduino board (Arduino Leonardo-compatible board) requiring kmod-cdc-acm VCOM driver, and a SanDisk Cruzer Fit 16 GB formatted as VFAT.

Here are the results of the tests I did perform:

  • Boot is ok, except for 2 small warnings regarding "ramips-wdt" watchdog => not important

  • Ethernet switch is working: eth0 + eth0.1 + eth0.2 + ping working to/from my PC

  • WiFi is working: when enabled in "/etc/config/wireless" + "wifi up", I can connect to the "OpenWrt" AP and to the router from my PC using "telnet"

  • Red LED is working: blinks slowly during failsafe entry test until system is ready, then on: can be controlled via led-trigger-*

  • Blue LED is working: controlled via led-trigger-netdev on WiFi by default

  • Reset button is working with button hotplug: check by uncommenting the event in "/etc/hotplug2.rules" and creating an executable script "logger $BUTTON $ACTION" in "/etc/hotplug.d/button/buttons" and checking with "logread -f"

  • Failsafe is working, both by "f + enter" on the console or by pressing the reset switch when the red LED starts blinking during boot, then tried to "wget" the firmware from my PC and flash it => ok

  • unlike the TL-WR703N, the Arduino board attached to the USB host port as a CDC-ACM VCOM device is working flawlessly for hours without problem, displaying an Arduino-generated counter every second using "microcom -s 57600 /dev/ttyACM0"

  • USB power and root hub power can be controlled by "/sys/class/gpio/gpio7/value" and "/sys/class/gpio/gpio12/value" respectively, causing the Arduino board to power on/off and the root hub to show connect/disconnect events in the logs

  • USB mass storage is working too, I was able to mount a VFAT-formatted 16GB USB disk and browse it

Remaining Problems

The 16 MB SDRAM seems very limitating: depending on previous operations, I have seen some serious slowdowns while mounting the USB disk for example, or when turning on WiFi. No crash, but sitting at the prompt for up to minutes sad

I din't even tried to run LuCI!

However, the system seems stable as I experienced no crash or kernel oops.

Merry Christmas big_smile

2x TP-Link TL-MR3020, 2x TP-Link TL-WR703N, 1x TP-Link TL-MR11U, 1x Hame MPR-L8

88 (edited by lizby 2012-12-23 20:49:54)

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

Squonk--That's a very encouraging result--and thanks for the detailed guide.

swatfa--what flash and ram size do you anticipate?  As Squonk indicated, 16mb ram can be limiting, and 8mb flash as opposed to 4 would be preferable.  8 mb flash and 32mb ram would be adequate for many "little computer" purposes, and, as I understand, the cost difference for the greater capacity is not large.

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

lizby wrote:

Squonk--That's a very encouraging result--and thanks for the detailed guide.

swatfa--what flash and ram size do you anticipate?  As Squonk indicated, 16mb ram can be limiting, and 8mb flash as opposed to 4 would be preferable.  8 mb flash and 32mb ram would be adequate for many "little computer" purposes, and, as I understand, the cost difference for the greater capacity is not large.

Our devices come with 8mb flash and 32mb ram

90 (edited by swatfa 2012-12-23 21:17:29)

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

Also can people please advise on what would be the best packages to add to the openwrt Trunk on the device?

I was thinking the following;
- Shairport (for airplay streaming from Iphone)
- Opencloud or some form of cloud service (connect usb and share files on the web)
- OpenVPN client
- Webcam support
- internet radio
- Luci
- ip6
- 3G

Now due to limitations of the 8mb flash. Im assuming only some of thoose packages can be loaded and the rest would have to be on a usb stick maybe. Or perhaps the 8mb might be sufficient. I would have to check with the developer im working with

Can anyone advise on my package selections? Any additions or removals?
Just trying to get an idea of what packages would be popular.

91 (edited by lizby 2012-12-23 21:56:10)

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

By webcam support do you mean mjpg-streamer?

For serial, picocom kmod-usb-serial kmod-usb-serial-pl2303 kmod-usb-serial-cp210x kmod-usb-serial-ch341 kmod-usb-serial-ftdi coreutils-stty (coreutils-stty can be omitted if "stty" is checked in busybox)

For scp transfer of files, openssh-sftp-server

All that is needed for usb storage, vfat, ext2, ext3, fdisk, usbutils

For editing, nano

For easy emailing, ssmtp

gpio support.

i2c support:  kmod-i2c-core i2c-tools

I don't know the size of the programs you intend to include, but the above will fit in 4mb with the exception of nano and i2c (I've never had an openwrt device which easily supported i2c).

Of course, people can roll their own.  If you base your firmware on a release, rather than trunk, people can install additional programs with opkg--with trunk, incompatibilities may develop over time, expecially as libraries evolve).

92 (edited by swatfa 2012-12-23 21:59:42)

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

lizby wrote:

Of course, people can roll their own.  If you base your firmware on a release, rather than trunk, people can add additional programs with opkg.

Yes mjpg streamer

At this stage we have only been successful in compiling the trunk to work with our device. There is no indicator at this stage whether or not a release edition firmware will be compiled successfully or not before our launch date. It may have to be a case of compiling each package separatly. I will have to confirm with the developer im working with if there is any possibility of a release firmware

93 (edited by swatfa 2012-12-25 09:16:45)

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

Regarding a second USB port. One option that may be possible is to replace the usb port with two micro usb ports ( not including the power micro usb on the side).

This is the only solution to get two usb ports with the limited space without a major redesign of the pcb or casing. Would this be useful? This would mean using a micro usb to normal usb converter when connecting devices so it might be a nuisance. I will try in the meantime to see if the factory can think of a way to squeeze two normal usb ports but it might be unlikely

or alternatively i can offer a usb hub as an accessory. something like this:
http://cdn-static.zdnet.com/i/story/60/19/001448/drbott-t3-usb-hub.jpg

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

swatfa wrote:

Regarding a second USB port. One option that may be possible is to replace the usb port with two micro usb ports ( not including the power micro usb on the side).

This is the only solution to get two usb ports with the limited space without a major redesign of the pcb or casing. Would this be useful? This would mean using a micro usb to normal usb converter when connecting devices so it might be a nuisance. I will try in the meantime to see if the factory can think of a way to squeeze two normal usb ports but it might be unlikely

or alternatively i can offer a usb hub as an accessory. something like this:
http://cdn-static.zdnet.com/i/story/60/19/001448/drbott-t3-usb-hub.jpg

AFAIK, the RT5350 SoC features only a single USB port.

Adding more USB ports would require adding an USB hub chip onboard, or an external USB hub.

2x TP-Link TL-MR3020, 2x TP-Link TL-WR703N, 1x TP-Link TL-MR11U, 1x Hame MPR-L8

95 (edited by swatfa 2012-12-25 14:16:25)

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

Squonk wrote:
swatfa wrote:

Regarding a second USB port. One option that may be possible is to replace the usb port with two micro usb ports ( not including the power micro usb on the side).

This is the only solution to get two usb ports with the limited space without a major redesign of the pcb or casing. Would this be useful? This would mean using a micro usb to normal usb converter when connecting devices so it might be a nuisance. I will try in the meantime to see if the factory can think of a way to squeeze two normal usb ports but it might be unlikely

or alternatively i can offer a usb hub as an accessory. something like this:
http://cdn-static.zdnet.com/i/story/60/19/001448/drbott-t3-usb-hub.jpg

AFAIK, the RT5350 SoC features only a single USB port.

Adding more USB ports would require adding an USB hub chip onboard, or an external USB hub.

In that case i think a small external usb hub as an accessory is the easiest option
Ive also forwarded the gpios layout you suggested to the factory. Will let you know if its possible or not once i get feedback from them

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

That T3Hub is the right form factor, but the only one I found on ebay was outrageously expensive--$30US.

At 2-3$ it would be good.

97 (edited by Squonk 2012-12-25 19:24:05)

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

lizby wrote:

That T3Hub is the right form factor, but the only one I found on ebay was outrageously expensive--$30US.

At 2-3$ it would be good.

If 2 downstream ports + microSD card is enough for your needs, you may be interested in this one:
http://www.pearl.de/images/large/px5294_2_2.jpg

Available from here (in French) or here (in German), and probably from more places too.

2x TP-Link TL-MR3020, 2x TP-Link TL-WR703N, 1x TP-Link TL-MR11U, 1x Hame MPR-L8

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

Thanks, Squonk, two ports would be fine, but price is too high, and shipping to Canada would be even higher.  I just ordered two more of these:  http://www.ebay.com/itm/280960565116?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649

The form factor is not as good, but for $1.55, shipped, I can live with it.

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

Squonk wrote:
lizby wrote:

That T3Hub is the right form factor, but the only one I found on ebay was outrageously expensive--$30US.

At 2-3$ it would be good.

If 2 downstream ports + microSD card is enough for your needs, you may be interested in this one:
http://www.pearl.de/images/large/px5294_2_2.jpg

Available from here (in French) or here (in German), and probably from more places too.

Thanks Squonk. Thats actually quite perfect.
Not sure whether or not the SD card would be recognized in Openwrt.
Nonetheless the form factor and size would be ideal. I will try to contact the supplier and see if they can allocate for bulk orders

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

swatfa wrote:

Thanks Squonk. Thats actually quite perfect.
Not sure whether or not the SD card would be recognized in Openwrt, no specific driver is required.
Nonetheless the form factor and size would be ideal. I will try to contact the supplier and see if they can allocate for bulk orders

There is no problem having the SDCard recognized by OpenWrt: it is just seen as an USB disk.

However, it is no longer available from the original manufacturer (DeLock from TW), but there are many clones built around the same Alcor Micro's AU6350 USB hub + SDCard reader combo chip that I would also recommend for having this functionality built-in.

2x TP-Link TL-MR3020, 2x TP-Link TL-WR703N, 1x TP-Link TL-MR11U, 1x Hame MPR-L8