[Solved] Adding new device request Cudy X6(V2)

Hello everyone,

I wanted to share some information about the Cudy X6 (VERSION 2) router and its compatibility with OpenWrt. While the v2 version of the router is not officially supported by OpenWrt, it appears that the device's GPIO and dts files are available on the Cudy website, including the recovery mode.

Here is the link to the Cudy X6 router's support page. Please find Cudy X6(V2): http://www.cudytech.com/openwrt_software_download

I hope it will be helpful for publish OpenWrt firmware for Cudy X6 (V2) router. in cudytech they have unoffcial openwrt firmware for v2. but wlan(5ghz only, link provided) has issue Please let me know if I need to add anything. I really want Openwrt on My cudy X6 (V2) router. Many things can be done with OpenWrt

dts:

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

#include "mt7621.dtsi"

#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>

/ {
	compatible = "cudy,x6", "mediatek,mt7621-soc";
	model = "CUDY X6";

	aliases {
		led-boot = &led_internet_blue;
		led-failsafe = &led_internet_blue;
		led-running = &led_internet_blue;
		led-upgrade = &led_internet_blue;
		label-mac-device = &gmac0;
	};

	chosen {
		bootargs = "console=ttyS0,115200";
	};

	keys {
		compatible = "gpio-keys";

		reset {
			label = "reset";
			gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_RESTART>;
		};

		wps {
			label = "wps";
			gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
			linux,code = <KEY_WPS_BUTTON>;
		};
	};

	leds {
		compatible = "gpio-leds";

		led_internet_blue: internet_blue {
			label = "blue:internet";
			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
		};

		internet_red {
			label = "red:internet";
			gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
		};
	};

};

&spi0 {
	status = "okay";

	flash@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <50000000>;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "u-boot";
				reg = <0x0 0x30000>;
				read-only;
			};

			partition@30000 {
				label = "u-boot-env";
				reg = <0x30000 0x10000>;
				read-only;
			};

			factory: partition@40000 {
				label = "factory";
				reg = <0x40000 0x10000>;
				read-only;
			};

			partition@50000 {
				compatible = "denx,uimage";
				label = "firmware";
				reg = <0x50000 0xf80000>;
			};

			partition@fd0000 {
				label = "debug";
				reg = <0xfd0000 0x10000>;
				read-only;
			};

			partition@fe0000 {
				label = "backup";
				reg = <0xfe0000 0x10000>;
				read-only;
			};

			bdinfo: partition@ff0000 {
				label = "bdinfo";
				reg = <0xff0000 0x10000>;
				read-only;
			};
		};
	};
};

&pcie {
	status = "okay";
};

&pcie1 {
	wifi@0,0 {
		compatible = "mediatek,mt76";
		reg = <0x0000 0 0 0 0>;
		mediatek,mtd-eeprom = <&factory 0x0000>;
	};
};

&gmac0 {
	nvmem-cells = <&macaddr_bdinfo_de00>;
	nvmem-cell-names = "mac-address";
};

&switch0 {
	ports {
		port@0 {
			status = "okay";
			label = "lan1";
		};

		port@1 {
			status = "okay";
			label = "lan2";
		};

		port@2 {
			status = "okay";
			label = "lan3";
		};

		port@3 {
			status = "okay";
			label = "lan4";
		};

		port@4 {
			status = "okay";
			label = "wan";
			nvmem-cells = <&macaddr_bdinfo_de00>;
			nvmem-cell-names = "mac-address";
			mac-address-increment = <1>;
		};
	};
};

&state_default {
	gpio {
		groups = "uart3", "jtag";
		function = "gpio";
	};
};

&bdinfo {
	compatible = "nvmem-cells";
	#address-cells = <1>;
	#size-cells = <1>;

	macaddr_bdinfo_de00: macaddr@de00 {
		reg = <0xde00 0x6>;
	};
};

GPIO:
image

There's not many OpenWRT developers, and they likely don't currently (nor will they) have this device.

Your best option if you want it to be supported is to implement this yourself.
You can find a similar mt7621 device currently in OpenWRT, and do a bunch of copy-paste to get a similar set of data for your device. Swap in the DTS file that you got from the manufacturer, and hope that it aligns with the current OpenWRT master.

https://openwrt.org/docs/guide-developer/add.new.device

Once you start to go down this path, and make some progress (i.e. have a working build environment, can build the stock OpenWRT for a similar mt7621 device, have created your similar structure for your new device) then you could revisit this post in the 'For Developers' section (i.e. the section where developers would post) and add any challenges that you can't work out on your own.

This is basically the same answer you received in your 1st thread, remember ?
What made you think things had changed over the weekend ?

have you tried the firmware version V1 ?

the dts file of the two versions being identical

That's why it is solved dear. There is a saying "LEGE THAKLE SHOB SHOMBHOB HOY". You can use chatgpt to translate. As you have free time to commenting. Thanks

I comprehend the issue and have resolved it. I appreciate your sincere guidance.

Hello everyone,

I recently purchased the Cudy X6 V2 router, which is advertised on the manufacturer's website as supporting 5GHz on Openwrt. The firmware is here on their website: http://www.cudytech.com/openwrt_software_download . However, upon testing the router, I have found that it either does not support 5GHz at all or experiences significant lag when attempting to use it on OpenWrt.

I have tried troubleshooting the issue, but to no avail. What's more frustrating is that the router works perfectly on stock firmware, which makes me believe that this is a software issue that needs to be resolved.

As a customer, I expect the products I purchase to work as advertised, and I am disappointed that this has not been the case with the Cudy X6 V2 router. I am reaching out to see if anyone else has experienced this issue and if there are any known solutions.

Thank you for taking the time to read my post, and I hope to receive some feedback or solutions soon.

Best regards

If you use Cudys zombie version of openwrt, you should ask them why it isn't working, but I'm pretty sure they haven't committed themselves to openwrt in any way.

V2 isn't supported by us.

1 Like

Then, this would be a better URL: https://www.cudy.com/support

The Cudy firmware is functioning adequately. Additionally, they have introduced an OpenWrt (publisher Cudy) specifically for their Cudy X6 hardware V2 router. Unfortunately I think, the 5GHz WiFi feature is not operational due to a channel issue. The Model X6 V2 hardware can support higher channel numbers, but the OpenWrt modifications for the V2 router may have a defect as it appears to have been modeled after the V1 router, which cannot support lower channel numbers(V2). V1 has official OpenWrt release.This could be the reason why OpenWrt is not functional on the Cudy X6 V2 router. To address this issue, it would be helpful if OpenWrt could release firmware for the Cudy X6 V2, which would solve the problem altogether.

What's stopping you ?
Openwrt is in this case you, read Adding support for TP-Link vx230v - #8 by lleachii

Until then:

It appears you are using firmware that is not from the official OpenWrt project.

When using forks/offshoots/vendor-specific builds that are "based on OpenWrt", there may be many differences compared to the official versions (hosted by OpenWrt.org). Some of these customizations may fundamentally change the way that OpenWrt works. You might need help from people with specific/specialized knowledge about the firmware you are using, so it is possible that advice you get here may not be useful.

You may find that the best options are:

Install an official version of OpenWrt, if your device is supported (see https://firmware-selector.openwrt.org).
Ask for help from the maintainer(s) or user community of the specific firmware that you are using.
Provide the source code for the firmware so that users on this forum can understand how your firmware works (OpenWrt forum users are volunteers, so somebody might look at the code if they have time and are interested in your issue).
If you believe that this specific issue is common to generic/official OpenWrt and/or the maintainers of your build have indicated as such, please feel free to clarify

1 Like

This topic was automatically closed after 8 days. New replies are no longer allowed.