Xiaomi MiWiFi R1D working build (Tested)

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
tsynik
DD-WRT User


Joined: 18 Apr 2014
Posts: 151

PostPosted: Wed Dec 24, 2014 17:23    Post subject: Reply with quote
<Kong> wrote:

No, if it comes to porting we don't use foreign code, unless we know it comes from someone who is an expert in this, without the unit you can't check if it is correct and does not have potential to destroy a unit. Plus there are usually small things that are not implemented, but users constantly ask for it to be fixed, like leds/buttons etc.

I've accepted code once and the "porter" missed a few details, which caused serious trouble. This hurts my reputation, the units I port are supposed to have full working buttons/leds... and can be flashed back and forth with oem/ddwrt fw without any tricks.


R1D worst unit to port in that case. I already soft bricked mine. There is no reset button at all (it's GPIO seen by kernel) and uart_en and boot_wait are OFF by default, so CFE hard accessible after reset nvram.
It have sflash with only 16MB and dual-boot kernel image, but, in case you switch to second and it's broken, it can be no way to switch back to 1st after resetting nvram (from CFE web for example).
Sponsor
<Kong>
DD-WRT Guru


Joined: 15 Dec 2010
Posts: 4339
Location: Germany

PostPosted: Sat Dec 27, 2014 8:24    Post subject: Reply with quote
tsynik wrote:
<Kong> wrote:

No, if it comes to porting we don't use foreign code, unless we know it comes from someone who is an expert in this, without the unit you can't check if it is correct and does not have potential to destroy a unit. Plus there are usually small things that are not implemented, but users constantly ask for it to be fixed, like leds/buttons etc.

I've accepted code once and the "porter" missed a few details, which caused serious trouble. This hurts my reputation, the units I port are supposed to have full working buttons/leds... and can be flashed back and forth with oem/ddwrt fw without any tricks.


R1D worst unit to port in that case. I already soft bricked mine. There is no reset button at all (it's GPIO seen by kernel) and uart_en and boot_wait are OFF by default, so CFE hard accessible after reset nvram.
It have sflash with only 16MB and dual-boot kernel image, but, in case you switch to second and it's broken, it can be no way to switch back to 1st after resetting nvram (from CFE web for example).


The 16MB flash is a bit small, but better than the 8MB in the EX6200, not sure if the current dd-wrt kernel would recognize the 16MB macronix correctly though. Wrong flash detection can perma brick your unit unless you can reprogramm the flash and I haven't seen any jtag on these boards. Thus no one knows how to jtag/swd these boards.

This is no problem for me though, even if I fully trash the flash. I built my self a little flasher that can backup/restore the flash in circuit, no need to power on the device, no soldering required:-)
tsynik
DD-WRT User


Joined: 18 Apr 2014
Posts: 151

PostPosted: Sat Dec 27, 2014 20:18    Post subject: Reply with quote
<Kong> wrote:

This is no problem for me though, even if I fully trash the flash. I built my self a little flasher that can backup/restore the flash in circuit, no need to power on the device, no soldering required:-)

You are lucky then ) Is it like spiflash.org unit? That's what I need to back it to life. I have full dump, but need a programmer and unsolder that macronix chip to switch with new correctly programmed one (it costs only $2).
bubbl3
DD-WRT Novice


Joined: 19 Feb 2010
Posts: 19

PostPosted: Thu Jan 15, 2015 7:06    Post subject: Reply with quote
tsynik wrote:
<Kong> wrote:

This is no problem for me though, even if I fully trash the flash. I built my self a little flasher that can backup/restore the flash in circuit, no need to power on the device, no soldering required:-)

You are lucky then ) Is it like spiflash.org unit? That's what I need to back it to life. I have full dump, but need a programmer and unsolder that macronix chip to switch with new correctly programmed one (it costs only $2).


Does it starts and sports a red led light?

I did manage to get mine back to life from a brick like that using it's firmware flash capability on boot, just need to stick the firmware on usb, connect it, then start it with the reset button pressed and it will usually restore to stock. It is a bit tricky with the timing but after some tries i managed to make it work!
tsynik
DD-WRT User


Joined: 18 Apr 2014
Posts: 151

PostPosted: Sat Jan 17, 2015 21:01    Post subject: Reply with quote
bubbl3 wrote:

Does it starts and sports a red led light?

I did manage to get mine back to life from a brick like that using it's firmware flash capability on boot, just need to stick the firmware on usb, connect it, then start it with the reset button pressed and it will usually restore to stock. It is a bit tricky with the timing but after some tries i managed to make it work!


Nope. Amber light with no action, HDD not powered too. It was stuck after flashing custom kernel to 2-nd flash partition and resetting nvram variables from CFE WEB interface, then switching to boot from that custom kernel by nvram option. Reset button do nothing, if kernel not booted (in case of R1D it's not hardware reset button, seen by CFE, but simple GPIO which is controlled by kernel itself). I think it's stupid idea to make design like this ) UART disabled by default, reset button do nothing for CFE itself.
bubbl3
DD-WRT Novice


Joined: 19 Feb 2010
Posts: 19

PostPosted: Mon Jan 19, 2015 7:07    Post subject: Reply with quote
tsynik wrote:
bubbl3 wrote:

Does it starts and sports a red led light?

I did manage to get mine back to life from a brick like that using it's firmware flash capability on boot, just need to stick the firmware on usb, connect it, then start it with the reset button pressed and it will usually restore to stock. It is a bit tricky with the timing but after some tries i managed to make it work!


Nope. Amber light with no action, HDD not powered too. It was stuck after flashing custom kernel to 2-nd flash partition and resetting nvram variables from CFE WEB interface, then switching to boot from that custom kernel by nvram option. Reset button do nothing, if kernel not booted (in case of R1D it's not hardware reset button, seen by CFE, but simple GPIO which is controlled by kernel itself). I think it's stupid idea to make design like this ) UART disabled by default, reset button do nothing for CFE itself.


Sucks, sorry for your brick then, i guess only way is to get a flasher and flash the chip :/
karmitho
DD-WRT Novice


Joined: 24 Jan 2015
Posts: 20
Location: Hong Kong

PostPosted: Wed Jan 28, 2015 8:02    Post subject: Reply with quote
chchia wrote:
By the way, there is a newer version compiled on 15 Nov and posted on 24 Nov.

I do not take credit for this build, the credit should go to fkp@wolf. thank you!


How can I upgrade to this version safely ?
Thank you !

I have tried the "mtd -r" command, but after reboot, the version is still 08nov2014

Shall I stick to this version ?

Thanks a lot !
aniki
DD-WRT Novice


Joined: 04 Jan 2013
Posts: 8

PostPosted: Tue Mar 31, 2015 15:52    Post subject: Re: Xiaomi MiWiFi R1D working build (Tested) Reply with quote
bubbl3 wrote:
I claim no credit for the build or the flashing procedure, this is the original chinese thread: http://bbs.xiaomi.cn/thread-10591878-1-2.html

Build is based on Kong 24880, everything is working, WiFi 2.4GHz and 5GHz, USB, NAS. Don't mind the disabled WAN in my screens as I flashed DD-WRT mainly because I wanted to use this as AP/NAS.

Suggested build is now DD-WRT v24-sp2 (11/08/14) - build fkpwolf@24880 for MiWiFi R1D -> dd-r1d-2014.11.8.trx







I also repartitioned the HD and reserved some space for future experiments with optware.


Flashing is not that hard, but you need to enable SSH access on your stock firmware R1D, the official procedure is here:

https://d.miwifi.com/rom/ssh

It is important to login with your Xiaomi account and having the router registered under it (best way is with the android app, google it, I'm not going to spend time on this here) as the file is personalized for your router and the page will also tell you your root password.

The file you need to flash to enable SSH is miwifi_ssh.bin


Procedure to flash miwifi_ssh.bin:

1. copy miwifi_ssh.bin on the root folder of a FAT32 formatted USB key.

2. disconnect the power from the router and connect the USB key to it.

3. keep the reset button pressed while you connect the power, release the reset button when the router orange led starts flashing.

4. wait 3-5 seconds, router will restart and SSH will be available on port 22


Procedure to flash DD-WRT

1. Download somewhere on your PC the file dd-r1d-2014.11.8.trx attached to this post.

2. Open an SSH connection with the router.

3. In command line give these commands:

nvram set boot_wait=on
nvram set wait_time=10
nvram commit


4. Set your network interface address as 192.168.1.100 and open a command prompt, once opened give this command:

ping -t 192.168.1.1

5. Reboot the router and as soon as it pings open http://192.168.1.1 in Firefox/Chrome

You'll see a page like this:


Browse for dd-r1d-2014.11.8.trx and click Upload

Be patient, you'll get a message of successful upload and the router will reboot, it will take a while, as soon as it pings and the led is blue you can login on DD-WRT web interface.

The firmware language defaults to chinese, on the usual first boot screen set username, password, password confirmation.

Then follow this to set the language to English:


Scroll down and select English from the dropdown box:


Scroll at the end of the page and click Apply Settings:


Then go to Services->NAS and enable Samba, reboot the router and it will automount the internal HD.
All the files you had on it will be in /mnt/sda4

If you wish to repartition your HD, easiest way is to take it out, connect it to a PC (USB or internal) and partition it (ext2/ext3) with an utility (Acronis Disk Director for Windows or GParted for Linux).


FAN Noise

If you think the FAN is too loud, you can turn off fan speed management and it will run at the slowest speed.
Open an SSH connection and use these commands:

nvram set fancontrol=off
nvram commit


Going back to the original firmware

THIS WILL FORMAT YOUR HD, BACKUP YOUR DATA

1. Download miwifi-stock.bin attached to this post and copy it on a FAT32 formatted USB key.

1. copy miwifi_ssh.bin on the root folder of a FAT32 formatted USB key.

2. disconnect the power from the router and connect the USB key to it.

3. keep the reset button pressed while you connect the power, release the reset button when the router orange led starts flashing.

4. this will take a while so be patient, the stock firmware will be flashed and the HD formatted, when the led is blue, you're done.

Do not try to flash the firmware from DD-WRT web interface, it will get stuck and brick the router!


Revisions

20-11-2014

- new build tested and it fixes several bugs:

* long term file transfers no longer hang the router
* led is now blue after boot
* HD temp is now visible in UI
* router can be used without internal HD
* several UI fixes and enhancements

- removed the miwifi_ssh.bin attachment as each router needs its specific one
- revised the installation procedure
- better and tested back to stock procedure


I use the app, register, downloaded the miwifi_ssh.bin, transfered to a thumb drive, plug in the thumb drive, power on with reset button hold down, until it reboots.

but i am unable to SSH using putty on port 22, where went wrong?
firmwu
DD-WRT Novice


Joined: 05 Apr 2015
Posts: 1

PostPosted: Sun Apr 05, 2015 6:16    Post subject: Re: Xiaomi MiWiFi R1D working build (Tested) Reply with quote
please move to "Services" -> "Services" -> "Secure Shell" section
enable the 'SSHd','SSH TCP Forwarding','Password Login' and 'Authorized Keys' should be empty.


aniki wrote:


I use the app, register, downloaded the miwifi_ssh.bin, transfered to a thumb drive, plug in the thumb drive, power on with reset button hold down, until it reboots.

but i am unable to SSH using putty on port 22, where went wrong?



1.jpg
 Description:
 Filesize:  71.79 KB
 Viewed:  20642 Time(s)

1.jpg


aniki
DD-WRT Novice


Joined: 04 Jan 2013
Posts: 8

PostPosted: Sat Apr 18, 2015 17:53    Post subject: Re: Xiaomi MiWiFi R1D working build (Tested) Reply with quote
firmwu wrote:
please move to "Services" -> "Services" -> "Secure Shell" section
enable the 'SSHd','SSH TCP Forwarding','Password Login' and 'Authorized Keys' should be empty.


aniki wrote:


I use the app, register, downloaded the miwifi_ssh.bin, transfered to a thumb drive, plug in the thumb drive, power on with reset button hold down, until it reboots.

but i am unable to SSH using putty on port 22, where went wrong?


Learn to read new guy.. i found out the issue.. the ssh will not work on new xiaomi, you have to downgrade to old version first.

The issue nos is i am only getting 260mbps whereas i should be getting 600mbps previously
tsynik
DD-WRT User


Joined: 18 Apr 2014
Posts: 151

PostPosted: Sun Apr 19, 2015 5:46    Post subject: Reply with quote
this dd-wrt build for xiaomi have bad mtd layout and may have issues.

it's better to flash custom CFE (so you can always restore your router in case of any failure) and Tomato firmware on it. More info and all binaries here.
chchia
DD-WRT User


Joined: 20 Dec 2009
Posts: 63

PostPosted: Fri Apr 24, 2015 17:47    Post subject: Reply with quote
there is a working tomato 129 for xiaomi router.

http://4pda.ru/forum/index.php?s=&showtopic=605963&view=findpost&p=38993608

and i am using it for few days already. so far perfect.
tsynik
DD-WRT User


Joined: 18 Apr 2014
Posts: 151

PostPosted: Sat Apr 25, 2015 19:49    Post subject: Reply with quote
And here is the source code of Tomato 129 with R1D support + ML (multi language support) + Advanced Tomato UI + USB audio modules + HFS FS support. Currently it's translated to Russian, but there are also Chinese dict in /www dir which can be easely added too.
tchaikovsky22
DD-WRT Novice


Joined: 23 Oct 2014
Posts: 4

PostPosted: Sun May 03, 2015 5:29    Post subject: help for newbie - Unable to flash Reply with quote
Hi folks
i followed the steps that bubbl3 mentioned.

i was able to login using putty and enter the nvram commands.
however i am unable to get the broadcom webpage to come up.
How does one change network interface address. Is it via IP setting in windows or some commands in putty client. i changed and then i started pinging but it says destination port unreachable.

can anybody help me pls... thanks in advance..
koyo23
DD-WRT Novice


Joined: 03 May 2015
Posts: 1

PostPosted: Sun May 03, 2015 13:48    Post subject: Reply with quote
I manage to brick my xiaomi router after i did a nvram erase after getting into tomato 129.

I just opened up the router and look a look at the board but dun seem to be able to find the serial connecters. Can the experts here point me to it.
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next Display posts from previous:    Page 3 of 7
Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum