Senior Member

Rank: 2

Credits
93
Device
Mi Pad
Online time
15 Hours
Send PM

[Tips & Tutorials] Xiaomi MiWiFi R1D working DD-WRT build (Tested)

[ Promote]
26997 46 |
21:17, Nov-09-2014 | From PC
|
|
Go to reply no.
This post was edited by bubbl3 at 21:21, Nov-09-2014

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.







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 as the page will also tell you your root password.

The file you need to flash to enable SSH is miwifi_ssh.bin, you can download it here:

https://dl.dropboxusercontent.com/u/1767311/r1d/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


[B]Procedure to flash DD-WRT[/B]

1. Download somewhere on your PC the file DD-R1D.trx, download it here:

https://dl.dropboxusercontent.com/u/1767311/r1d/DD-R1D.trx

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.trx and click Upload

Be patient, you'll get a message of successful upload and the router will reboot, it will take a while, led will always be orange from now on so don't worry, as soon as it pings 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 this commands:

nvram set fancontrol=off
nvram commit



Going back to the original firmware

1. Download miwifi-stock.bin and copy it on the internal HD of the router.

https://dl.dropboxusercontent.com/u/1767311/r1d/miwifi-stock.bin

2. Open an SSH connection and move to the path containing the file.

3. Use this command to flash the firmware:

mtd -r write miwifi-stock.bin linux

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


There is a new build that came out today, I didn't have the time to test it, adventurous guys can give it a spin:

https://dl.dropboxusercontent.com/u/1767311/r1d/dd-r1d-2014.11.8.trx

Be careful as I didn't test it so I can't say it will work or have issues!!


Favorite8 Share

Rated by 5 people   Experience Reason  

discodave + 5 Fantastic!
s4tch + 1 Thanks!
Pikatchu + 1 Awesome!
NgukZ + 10 Awesome!
grapox + 1 Awesome!

Experience +18  View Rating Log

Platinum Member

Rank: 4

Credits
2776
Device
Mi 4c
Online time
199 Hours
Send PM

Mi KeyMi BandMi WiFi RouterFantastic!FlashholicMIUI 2015MIUI 6MIUI 8I Love MIUIAwesome!Mi 3Redmi 21400K Forum MembersFan Of MIUI Ex-Yu 1st AnniversaryMIUI 50 Million UsersMIUI 4th AnniversaryHappy Singles' Day900K Forum Members500K Forum Members800K Forum MembersMIUI 100 Million UsersFan Of  MIUI AzerbaijanFan Of MIUI Bangladesh300K Forum MembersOlympics MedalSummer Mi BunnyI Love Mi BunnyAlpaca Mi Bunny OTA FeedbackRingtone Star Android GuruAndroid ElfForum Contest LoverMIUI FollowerUpdates LoverMIUI Medals CollectorHumor MasterMIUI Global Forum 2014Die-hard MIUI FanPioneer of MIUI English Forum MIUI FB FollowerDebate MasterMost Active MIUIer

18:45, Oct-02-2015 | From PC
|
This post was edited by blackie99 at 13:53, Oct-02-2015

ROM is based on kernel 2.6.36 which is an older  type of Openwrt (Attitude Adjustment 12.09) without included support for IPV6.
I tried to find a possibility to make the router working with IPV6 or to find a custom ROM based on a newer Openwrt (like AA 12.09.1, Barrier Breaker or Chaos Calmer) but my efforts were in vain. If someone will found something please post.

Senior Member

Rank: 2

Credits
93
Device
Mi Pad
Online time
15 Hours
Send PM
 Author| 07:36, Jan-16-2015 | From PC
|
tchaikovsky19 replied at 2015-1-16 01:14
Hi folks. What impact would disabled WAN have?

You don't need to disable the wan if you don't want to.

Basically ti disables the port and you can assign it to the switch. If like me you want to use it as an Access Point, this gives you 2 lan ports instead of 1.

Senior Member

Rank: 2

Credits
56
Device
0
Online time
13 Hours
Send PM

MIUI 2015MIUI Fan from IndiaMIUI Global Forum 2014

22:35, Dec-29-2014 | From PC
|
anybody else has tried this. is this working? pls let me know. i am keen to port DD WRT on my xiaomi mi wifi router.

Diamond Member

Rank: 5Rank: 5

Credits
1637
Device
Mi 6
Online time
45 Hours
Send PM

Mi HomeMIUI 2016Awesome!I Love MIUIMIUI Devices ContestRedmi NoteXiaomi Mi 4Fan Of MIUI IndiaHappy New Year2014 ChristmasMIUI 4th AnniversaryMIUI Fan from TurkeyMIUI Fan From IndonesiaMerry ChristmasMIUI Happy MedalMIUI World TourGamer Mi BunnyMiPopMIUI 10MIUI FollowerAndroid Guru2017 Annual AwardsMi MIX 2MIUI Global Forum 2014

19:11, Jan-08-2015 | From PC
|
thanks bro
Life Is Short.....Enjoy It!

Platinum Member

Rank: 4

Credits
4447
Device
Redmi Note 3
Online time
189 Hours
Send PM

Mi BandMIUI 6MIUI 2015Awesome!Mi TVMi Note ProRedmi 1SXiaomi Mi 4Mi NoteRedmi 2Redmi 3Redmi NoteMIUI Fan from MalaysiaMIUI 100 Million UsersFan Of MIUI IndiaThanksgiving DayMIUI Fan From Singapore2014 ChristmasFan Of  MIUI AzerbaijanHilal Ramadan 500K Forum MembersMIUI Fan from IndiaMIUI Fan From IndonesiaMIUI Marathon Medal600K Forum MembersMIUI Fan From BrazilMIUI PMIUI SXiaomi 5th AnniversaryFan Of MIUI BangladeshGamer Mi BunnyI Love Mi BunnySurpriseMIUI Weekly Devices QuizHumor MasterMIUI 8th AnniversaryMi TalentMIUI FB FollowerXiaomi 8th AnniversaryMIUI Global Forum 2014Android ElfForum Contest LoverMi Lover MedalMi Story Teller

19:53, Jan-08-2015 | From PC
|
thanks bro.
Better Late than NEVER
Share Your Knowledge, Not Show Your Knowledge

Junior Member

Rank: 1

Credits
19
Device
0
Online time
1 Hours
Send PM
20:55, Jan-10-2015 | From PC
|
What do you mean by

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

Manually change the computer use to ssh IP to 192.168.1.00 with subnet 255.255.255.0 and gateway 192.168.1.1 ?

Senior Member

Rank: 2

Credits
93
Device
Mi Pad
Online time
15 Hours
Send PM
 Author| 14:39, Jan-15-2015 | From PC
|
huilam replied at 2015-1-10 20:55
What do you mean by

4. Set your network interface address as 192.168.1.100 and open a command prom ...

Yes manually change the network interface config, IP 192.168.1.100 MASK 255.255.255.0
No gateway needed, leave it blank.

Junior Member

Rank: 1

Credits
23
Device
0
Online time
1 Hours
Send PM
00:09, Jan-16-2015 | From PC
|
This post was edited by kp_hk at 00:34, Jan-16-2015

thanks a lot.
i have waited so long after upload the dd-r1d-*.trx file, the ping still got not response. how long did you guys take to finish the flashing?
i can see the led is turn blue from orange.

================================

after the led turned blue, i just notice i still can access the original miwifi interface from 192.168.31.1?! Seem the flashing process is failed, will try again.


===============================


seem wait_time=10 is not enough to upload the trx file, changed to 20 and it flashed successfully.
thanks

Senior Member

Rank: 2

Credits
93
Device
Mi Pad
Online time
15 Hours
Send PM
 Author| 00:16, Jan-16-2015 | From PC
|
This post was edited by bubbl3 at 00:18, Jan-16-2015
kp_hk replied at 2015-1-16 00:09
thanks a lot.
i have waited so long after upload the dd-r1d-*.trx file, the ping still got not respo ...

You are probably done, try to switch your lan back to dhcp and get an ip assigned from the router.
EDIT: just read your post, try again and let me know.

Junior Member

Rank: 1

Credits
23
Device
0
Online time
1 Hours
Send PM
00:40, Jan-16-2015 | From PC
|
This post was edited by kp_hk at 00:43, Jan-16-2015
bubbl3 replied at 2015-1-16 00:16
You are probably done, try to switch your lan back to dhcp and get an ip assigned from the router.
...

yes, i increased the wait_time and it's ok now.

but how can i login to ssh again? because from the ddwrt interface the ssh option is disabled

thanks

===========================================

oops... i got it, i need to enable sshd under service tab
thanks

Senior Member

Rank: 2

Credits
93
Device
Mi Pad
Online time
15 Hours
Send PM
 Author| 00:58, Jan-16-2015 | From PC
|
kp_hk replied at 2015-1-16 00:40
yes, i increased the wait_time and it's ok now.

but how can i login to ssh again? because from the ...

Niceto know it worked out :)

Credits Management

Quick Reply Top Return to the list