-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ramips: add support for Kimax U-25AWF 2.5" SATA WIFI HDD Enclosure #1402
Conversation
I only had a brief look at the PR, but it still has some of the issues I already outlined in #826.
And you managed to introduce a new issue by removing the ";;" in the vocore-* section if 01_leds. Please either close this PR, fix the issues by your self or find someone who is willing to do so. |
@mkresin I'm trying... now it compiles ok. What are "key code macros" plesae? |
Please reference nodes defined in the mt7620n.dtsi instead of redefine them:
vs.
Please have a look at the other mt7620n based dts files (like ZBT-CPE102.dts) and stick to the way it is done there. Please be prepared for more change requests. Might be that I find more if I have a closer look and do not get distracted by the obvious stuff all the time :-). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're on the right track but there are still a few issues that you need to address, see my comments below. Thanks.
target/linux/ramips/dts/U25AWF.dts
Outdated
reset { | ||
label = "reset"; | ||
gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; | ||
linux,code = <0x198>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the proper KEY_ value here as listed in the file @mkresin pointed you to
See how it's done here
target/linux/ramips/dts/U25AWF.dts
Outdated
poll-interval = <20>; | ||
reset { | ||
label = "reset"; | ||
gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the incorrect GPIO_ACTIVE level, you had '1' in the original patch which is GPIO_ACTIVE_LOW
.
target/linux/ramips/dts/U25AWF.dts
Outdated
compatible = "gpio-leds"; | ||
wifi { | ||
label="u25awf:red:wifi"; | ||
gpios=<&gpio3 0 GPIO_ACTIVE_HIGH>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too
target/linux/ramips/dts/U25AWF.dts
Outdated
|
||
lan { | ||
label="u25awf:green:lan"; | ||
gpios=<&gpio2 4 GPIO_ACTIVE_HIGH>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here too
}; | ||
|
||
&wmac { | ||
ralink,mtd-eeprom = <&factory 0>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you confirmed that the device gets the correct MAC address for the wireless interface?
target/linux/ramips/image/mt7620.mk
Outdated
define Device/u25awf | ||
DTS := U25AWF | ||
IMAGE_SIZE := $(ralink_default_fw_size_16M) | ||
IMAGES += factory.bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please drop the IMAGE and IMAGE/factory.bin line. No need to build a factory image that is identical to the sysupgrade image
target/linux/ramips/image/mt7620.mk
Outdated
@@ -193,6 +193,15 @@ define Device/gl-mt300a | |||
endef | |||
TARGET_DEVICES += gl-mt300a | |||
|
|||
define Device/u25awf | |||
DTS := U25AWF | |||
IMAGE_SIZE := $(ralink_default_fw_size_16M) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ralink_default_fw_size_16M
is 16121856 bytes (0xf60000) which doesn't match the size if your firmware partition. Please use 16064k as IMAGE_SIZE.
target/linux/ramips/dts/U25AWF.dts
Outdated
#include <dt-bindings/input/input.h> | ||
|
||
/{ | ||
compatible="u25awf","ralink,mt7620n-soc"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use compatible = "kimax,u25awf", "ralink,mt7620n-soc";
as compatible string.
target/linux/ramips/dts/U25AWF.dts
Outdated
|
||
/{ | ||
compatible="u25awf","ralink,mt7620n-soc"; | ||
model="KimaxU-25AWF"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use model = "Kimax U-25AWF";
here
Kimax U-25AWF is is a 2,5" HDD Enclosure with Wi-Fi/Eth conection and battery, based on MediaTek MT7620N. Patch rewritten from: https://forum.openwrt.org/viewtopic.php?pid=305643 Specification: - MT7620N CPU - 64 MB of RAM - 16 MB of FLASH - 802.11bgn WiFi - 1x 10/100 Mbps Ethernet - USB 2.0 Host - UART for serial console more on: https://wikidevi.com/wiki/Kimax_U25AWF Flash instruction: 1. Download lede-ramips-mt7620-u25awf-squashfs-sysupgrade.bin 2. Open webinterface a upgrade 3. After boot connect via ethernet to ip 192.168.1.1 Tested on: - Blueendless U-35WF which is the same hardware but without battery and with 3,5" drive enclosure Signed-off-by: Daniel Kucera <daniel.kucera@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks better, thank you. Please confirm that the wireless MAC advertised in LEDE is correct (matches the value written on the enclosure).
@f00b4r0 Hi, I can confirm that the device boot with the changes you ask to @danielkucera and I can confirm, that the mac address in lede is the same mac address reported in my boot loader (I have breed boot loader in my device), the enclosure doesn't have any mac address written on it, I add a boot log from my device with @f00b4r0 changes. I'll add a new boot log when @danielkucera do the new changes requested by @mkresin |
@Mynzer please run |
Here is the hash output from git log
Just tell me if you need to pull again the new changes |
@Mynzer please do |
Ok, now |
@Mynzer can you please confirm that all drivers are working correctly (LEDs, reset button, USB, ethernet, wifi)? |
Almost all work fine, Wifi and Ethernet leds work fine, for usb and internal enclosure hard drive, I have installed samba and create a share in LEDE, one form the internal hard drive of the enclosure and one for the usb memory on the usb port, and works good getting access and writing for both shares from my laptop, the only thing that do not work well is the reset button, it simply not reset to factory defaults. I don't know if it helps, but for breed boot loader I'm using breed-mt7620-reset13.bin |
You need to keep the reset button pressed for > 5sec to start a factory reset. If you press the button for < 5 sec a reboot is done. If the button can not distinguish between long and short press, the polarity (HIGH vs. LOW) is usually wrong. The easiest way to test if the button works at all, is to (short) press the button during boot at the time the LED blinks really fast. The device should switch to failsafe. The diag LED (here wlan) should blink insane fast and ssh connections to 192.168.1.1 are accepted. |
@Mynzer if you can enter breed command mode, please test the button using |
Hi again, @mkresin I've tried the steps that you recommend for testing the reset button, but unfortunately I could not put in failsafe the device (pressing the reset button on boot time), once that the device fully boot in LEDE, I've tried pressing the reset button of 3 seconds to make it reboot, and I've tried pressing for 6 seconds for factory reset but for now, both steps not work in the UA25AWF device. @danielkucera Here is the output from btntst from breed ` |
Seem to me the reset button gpio is wrong in the DTS. @Mynzer would you please build an image from my staging tree and test again! |
I have more one more question. Does the Kimax U-25AWF have more than one network port? There is currently a lan + wan port config applied by default. If the board has only a single lan port, we can make it way simpler. Maybe better to check this first, before another round of testing is required. |
@mkresin That's right, the Kimax U-25AWF only has a single lan port. |
@Mynzer for testing mkresins code you can do following in our working folder:
you don't need to recompile the whole project again. |
@Mynzer please pull my staging tree now. @danielkucera fine with with my changes? |
@mkresin yes, without objections. |
@danielkucera thanks for the clear instructions, that save a lot of time, and I successfully pull from mkresin staging tree @mkresin from commit Here is the boot log from this commit |
Took a quick look at the original firmware bootlog here and I notice this:
I don't know if that's relevant but I am concerned that by making the firmware partition in LEDE extend over that It also appears from that post and from your dmesg that there are several variants of that device and that the Blueendless and Kimax versions aren't exactly the same: @danielkucera mentions MT7620N, in line with the bootlog linked above which has DDR1 RAM, while @Mynzer dmesg output shows an MT7620A with DDR2 RAM. The commit message might want to reflect that. I wonder if that could also explain the discrepancy with the reset button. It might be a good idea if @danielkucera could confirm the last change works for him and provide dmesg output. |
@f00b4r0 my device is U-35WF but the original patch worked for me except the reset button - it didn't work as far as I remember. |
@danielkucera that btntst excerpt you posted, is it from your device? Because if it is, it shows GPIO 12. @Mynzer shows GPIO 13. |
@f00b4r0 no, it's not from mine. I found the picture on internet. |
@f00b4r0 Let me check if i could found the stock firmware from this device and check if i could go back to stock. My device It's marked on front Kimax, in the back Blueenndless and bottom BS-25AWF Maybe the difference is the revision of the board, in my device it's printed on board |
@f00b4r0 I could go back to stock using firmware from here using the luci web interface using Kimax-H1 firmware |
When i see that there was 2 stock firmwares version in the dropbox link, I decide to take time to test both firmwares in my device The HSY-02 firmware boot on my device and all woks fine except the reset button that not work, the same thing that was happening before @mkresin do the change in the dts file in the reset button. When i see the U25AWF stock firmware boot log firmware from openwrt forum I see all the things that @f00b4r0 mention before, that the original Kimax version have MT7620N and DDR1 but also notice this The H1 firmware is the original firmware that came in my device, with this firmware all work fine, including the reset button, there are other U25AWF users in the openwrt forum here, here and this Russian guy that have the U25AWF H1 version with MT7620A and DDR2 memory. The HSY-02 or H1 version it's displayed in the stock configuration web page of the device, and it seems that in the stock boot log too. So my conclusion is, that there are 2 versions of the Kimax U25AWF
With this information, I don't know if could be possible add support for the 2 versions of this device, maybe my ignorance is big, but it seems that the only difference, in the software side, it's the different gpio for the reset button. |
Oh my godness, it's getting complicated. To summarize, there are two different revisions of the Kimax U25AWF
Both of you are having the U25AWF-7620A-1153-V2.0 (MT7620A) board? If yes, we need to touch the DTS file again, since it includes the mt7620n.dtsi and has a compatible string for the mt7620n-soc. Is it confirmed that both revisions are named U25AWF? Is there any way do distinguish the devices from the outside (suffix H1/HSY-02, revision number or similar on the case)? How does one know which stock firmware needs to be installed? I would like to refrain from adding support for a revision which can not be tested at the moment. But I would like to name the board/image in a way that it is possible to understand it is meant for the MT7620A revision. @f00b4r0 thanks for bringing up the issue @Mynzer thanks for doing the research |
@mkresin Yes, my device it's U25AWF-7620A-1153-V2.0 MT7620A board, this user claims that have the same board, and this user says that have an U25AWF with MT7260A chipset. Both versions are named U25AWF, there is another version, the U25WF, but the case it's different and it use RT5350F chipset. It's not clear how to know which U25AWF version is each one from the outside, the external case is similar for both versions, and the info printed in the case i don't think that be reliable, because it change between sub manufacturers as mention in the openwt forum. The way that I think that could be more reliable to identify the device version could be checking the stock firmware web page configuration. This is the stock Kimax U25AWF MT7620N configuration page This is the stock Kimax U25AWF MT7620A configuration page And then unmount to check the revision board Kimax U25AWF MT7620A board with DDR2 RAM i don't think that unmount the board could be a big problem, because you need to disassembly the case to insert a sata hard drive, once you follow the same steps that you use to put the sata drive, you only need to remove two additional screws to pull out the board. Maybe the firmware image could be named u25awf-hsy02 for the MT7260N version (when it gets support in the future) and u25awf-h1 for the MT7620A version. |
@Mynzer I've reworked the commit in my staging tree. The board is now named Kimax U25AWF-H1 and uses the mt7620a stuff. Would you please do your testing once more (and hopefully for the last time). |
@mkresin I don't have problems testing all the necessary times that could be needed. Maybe i'm wrong, I'm still learning, but it could be that in the mt7620.mk file in the target/linux/ramips/image folder |
On spot! That was the change I missed. Seem to me now you're reviewing my changes ;-). It is fixed in my staging tree. You might need to remove the tmp directory within the LEDE directory to see the changed board name. |
@mkresin Now I can see the change in the board name, here is the boot log from your staging tree, commit All is working fine on the device (leds, internal hard drive, wifi, usb port, Ethernet, reset button). |
Nothing left to do. I've merged the commit. Thanks to all! |
Hello guys @danielkucera @mkresin @Mynzer , As you can see it has a different form-factor but considering the HW is the same I',m tempted to try this FW. The only thing different is that it has 2 x RJ45 - WAN and LAN instead of just one. Otherwise USB3.0 is there, USB2.0 (with card-reader) is there, maybe leds might be different but they aren't that important for now. Do you think I could flash this FW from stock web-update section? Thanks. |
Hi @cristipatty Mr. @danielkucera seem to be using this firmware on his U-35WF. The stock HSY-02 firmware don't make any verification in the firmware upgrade process, so you can flash it and maybe it could work with your BS-HD03WF device. The bad news is that I could not find any information, any internal pics or any information how your Router/HDDcase could be recovered, so in case of brick of your device, you are alone.. Now, in the best of the cases that the hardware is the same, and the device boot with OpenWRT/LEDE firmware, you will end with a device with not correct switch configuration (maybe 1 or none of the Ethernet ports will work). In case that you want full support for your device, you will need to provide information from your device and open a new PR, (maybe @danielkucera could help you opening the new PR if you kindly ask him for help and only if you are willing to take the risk and provide the info that the developers need). If you are interested in continue anyway,, I think that the best place to continue the discussion is in the forums, I don't think that the developers like to bring back closed PR, and maybe find there more people interested in bring support for your device. Greetings. |
I have the same model and clearly tempted to try, the problem is that it can become a brick, for the moment I only use it as sata to usb. |
Kimax U-25AWF is is a 2,5" HDD Enclosure with Wi-Fi/Eth conection
and battery, based on MediaTek MT7620N. Patch rewritten from:
https://forum.openwrt.org/viewtopic.php?pid=305643
Specification:
more on: https://wikidevi.com/wiki/Kimax_U25AWF
Flash instruction:
Tested on:
and with 3,5" drive enclosure
Signed-off-by: Daniel Kucera daniel.kucera@gmail.com