SNR-CPE-W4N Usb support

Hello. I added a usb port to the SNR-CPE-W4N router. This port is on the board, and I just soldered a connector to it. The Padavan firmware identifies the usb drive. The OpenWRT firmware cannot work with the usb port on this router. The lsusb command returns the error: unable to initialize libusb: -99

Required kmod-usb packages... have been added.

There is a suspicion that the CONFIG_USB_DEVICE configuration should be added to the kernel. Please add USB port support to the firmware for SNR-CPE-W4N. Or give me advice on how to solve the problem.

Sincerely, Egoriy

Since the USB port is not part of the original product and you added it as a mod...

this almost certainly won't happen for the firmware images available on the site. You'll need to do it yourself and build a customized image for your modified router.

You can start looking through the source code related to your device and see if any of the options are simply disabled and/or missing.

1 Like

Thank you. Where can I find the source code for this router?

https://firmware-selector.openwrt.org/?version=23.05.5&target=ramips%2Fmt7620&id=snr_cpe-w4n-mt click the tiny arrow, add the packages you need, and click request build.

1 Like

Thank you, but how do I change the kernel configuration and add usb support, for example CONFIG_USB_DEVICE

The op will likely need to edit source code and recompile.

This is the commit that added support for the devices

https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=3f201d1f8ece4ed363428f353558d44f9dbe98a5

1 Like

I sent an email to the author of the firmware. But he has been absent from this resource for more than a year...

How can I get the source code for openwrt-05.23.4-ramips-mt7621-snr_snr-cpe-me2-sfp-initramfs-kernel.bin ?

The code is linked in the commit. That should be all the necessary code for the unique features of that device.

1 Like

How can I add this solution to the mt7620n_snr_cpe-w4n-mt.dts file Soldered USB port to ARCHER C6, but it doesn't show up in dmesg. What next? - #7 by anymouse_404 and build the firmware?

Start at https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem

1 Like

Thank you. Is it possible to compile the firmware online on an external resource?

For compiling, you could theoretically spin up a VPS and set it up with the build system... probably won't be a free VPS, though because it'll use a fair amount of compute time.

I'd recommend that you setup a linux VM on your computer using VirtualBox... it's easy and free. Then get the build system running and you should be good to go.

anything is possible, it all comes down to your skills.

I'd boot a Linux dist off removable storage, like a SSD or NVME.

It,'s KaliLinux_2024.3_VB.7z for Oracle VirtualBox?
Or other?

I recommend Ubuntu.

1 Like

https://openwrt.org/docs/guide-developer/toolchain/install-buildsystem has been tested.

1 Like

If possible, give a link to a verified Ubuntu for Oracle Virtualbox image

Just download the official installation media for your desired distribution, it's a five minute job to install it in a virtual environment.

1 Like

Yesterday I built a basic firmware without usb. I flashed the router and it works. Today I will modify the source files.