Help. I'd like to build a system with SQM but

With power supply and some storage included in price? And before, or after adding a network interface card for a second port? Regardless, those do look like a nice option if they will accept a NIC card. A bit more CPU on them than an R4S too.

Keep in mind that you either need to use a managed switch (for a router-on-a-stick configuration using VLANs to separate WAN and LAN traffic over the same singular ethernet port) or you need to get an additional ethernet port (e.g. USB3 gigabit ethernet dongle like tp-link's ue-300 to name one with decent reputation around here) or find a way to use the M.2 slot to attach ethernet. Both options will work, but neither comes for free, potentially changing the value comparison with the R4S somewhat.

There's this listing, for example, which includes power supply and 16GB eMMC for $55 shipped. A second NIC will need to be added, though. And the R4S price of $75 is without power supply :slight_smile:

Understood, but a USB3 adapter costs about $15, and with the 5070 available for $55 shipped (in the US), it seems to compare quite favorably on price and performance, and at least come close on power usage, to the R4S.

Is there any requirements for the SD cards on R4S? Minimum/recommended size and such?

What about writing the needed files on the SD card? Any requirements for that?

And lastly, what format method is the correct one... NTFS, FAT32, exFAT...?

i use ext4 on mine

The R4S will accept up to 128 GB SD card. I use a 32 GB card on mine, because that capacity is very inexpensive and I do not need more than MB's for my use as a router anyway.

Formatting your card as ext4 is far more flexible if you plan to make full use of the R4S with docker, etc. and want to utilize all the SD card storage. You can also enlarge the ext4 OpenWrt partition to make room for a LOT of packages. Disadvantages of ext4 include: a) every time you upgrade OpenWrt, you will need to manually set up your card partitions again, and b) if you need to reset the R4S, you will lose all your installed OpenWrt packages and have to reinstall them, and OpenWrt if not running a stable release, again.

An advantage of formatting your sd card as squashfs, provided you build your image using the Firmware Selector, is that if you reset the R4S to defaults all your packages that you select to be included with your Firmware Selector image will be retained. The disadvantage of squashfs is that it does not leave you a lot of room to install lots of package and it makes no use of the rest of your SD card.

I use squashfs, because I use the R4S as a basic gateway router and nothing else. I do install a fair number of packages and I still have 86 MB left for more packages. It meets my needs with margin to spare. But I do lay awake at night worrying about all those GB of storage on my SD card going to waste :laughing:

R4S is now powered and connected, and micro SD card is formatted (ext4) and the firmware is flashed.

The setup guide is more cryptic than I expected. Is there any guide for beginners? I followed the quick start guide here https://openwrt.org/docs/guide-quick-start/factory_installation

Section "Flash the firmware"

  1. check
  2. check
  3. "Unable to connect. An error occurred during a connection to 192.168.1.1"

What went wrong?

Very hard to tell what went wrong without more information, but I am going to guess that you installed a "SNAPSHOT" ext4 image, or you obtained your image (SNAPSHOT or stable) using the Firmware Selector and did not click on "customize..." option to add the luci package to your image, and now you are trying to access the R4S from your web browser?

"luci" is the OpenWrt web browser interface. It is included in pre-compiled stable image downloads, but it is not included by default in any (stable or SNAPSHOT) images created with the Firmware Selector tool, nor is it included in pre-compiled SNAPSHOT images. No "luci", no worky :wink:

The good news is that this is really easy to fix.

You could start over using the Firmware Selector and add "luci" to your image. Or if your R4S has internet access, and you built a stable version (22.03.03 for example) with the Firmware selector tool, you can log into your router from the command line and install luci like this:

ssh root@192.168.1.1
opkg update
opkg install luci

If you are using a SNAPSHOT image, there is a good chance the kernel version has already changed and packages will not be compatible with the kernel version in your image. This is one of the down sides to using SNAPSHOT - you need to install the packages you want by adding them to the Firmware Selector customize list (so they are built right into your image for you - highly recommended by the way, it works great), or you need to install them right after you install snapshot - before the developers update the kernel again.

I did everything as the quick start guide said, and what it didn't say is that I have to install LuCI. The step 3 was 'log on the router via web interface'. Like I said this is more cryptic than I expected.

I downloaded the firmware from here: https://openwrt.org/toh/views/toh_fwdownload?dataflt[Model*~]=r4s and clicked on the link under "Firmaware OpenWRT install URL". The file name is "openwrt-22.03.3-rockchip-armv8-friendlyarm_nanopi-r4s-ext4-sysupgrade.img". Is this a wrong file?

When R4S is connected I can't get online. Only pwr led is on.

The image you selected already has Luci, so that isn't the problem. 9 times out of 10, it is the problem, so I made a wrong guess.

How did you transfer the image you downloaded to the sd card? It needs to be written as a disk image, so you cannot just copy the file to the sd card with Windows Explorer for example. You need to use a tool like Belena Etcher in Windows - others if you use linux.

Here is a link: https://www.balena.io/etcher

I'll try to give more detailed information from now on.

I used Etcher to flash the sd card. "Flash from file.... Select target... Flash!"

I just insterted the card reader and opened the sd card. Windows explorer shows it's empty. I think I saw somewhere a mention that ext4 is not compatible with Windows so is that the reason, or is it possible that flashing was unsuccessful even though Etcher said "Flashing succesfull"`?

Maybe I did something wrong with formatting? Does the info on the pic look correct?

Another question,... Should I get online even though OpenWRT is not yet installed, or is R4S just hardware that needs the software before it can connect to the net?

I just flashed an image on an old Windows 10 machine I have to test what you see.

Windows Explorer cannot access the SD card to even show me it is empty after I flash an ext4 image - I just get a message asking me to format the sd card. So it seems strange that Windows shows you an empty disk after you flash your SD card with the OpenWrt ext4 image. That could be a clue?

There are two partitions on the sd card after I plug it into my linux desktop: kernel and rootfs; and rootfs has all the OpenWrt files I would expect on it. In other words, I confirmed my test flash worked fine.

The partition layout you show looks about right though. Here is what my flash looks like:
image

1 Like

The default OpenWrt configuration has a reasonable "safe" firewall configuration, so if you connect the Ethernet from your modem to the R4S "WAN" port and your computer to the "LAN" Ethernet port, you do not have too much to worry about. I would change your root password first thing to something better than "admin" though.

For testing though, you should be able to connect your R4S LAN port directly to an Ethernet port on your Windows computer, and access the R4S at 192.168.1.1; either through the web browser, or by logging into your R4S from the command prompt with ssh.

Logging through the browser ends up with a connection error and "root@192.168.1.1" also ends up with the error, "Port 22: unknown error". I wonder if my device is faulty?

Try giving your Windows machine a static ip on the 192.168.1.x subnet?

Finally R4S got online! After several attempts, for the first time the SYS led lit up, then the WAN led and finally the LAN led. I have already had a chance to explore LuCI. So many new things that I've hardly heard of. Anyway, I finally get to study how to install OpenWRT. What could possibly go wrong... :slight_smile:

There are still some things Im not sure about. Is the firmware I downloaded suitable as is, or do I need to do some customization, and do I have to collect all the desired packages before flashing the sd card, or can I install them later via LuCI.... or does my R4S currently use the OpenWRT software that is flashed on the SD card??

I don't have many needs for now and the main thing is to reduce the bufferbloat, which has been a big problem in games and online calls. Bufferbloat has fluctuated between 40 and 80 ms even in fairly low load and to over 3000 ms in heavy load. The recent measuring: DS: 42-3230 ms / US: 21-893 ms. The only workaround so far has been to disable RWIN auto-tuning, but the trade-off is dropping internet speed (DS from 300 mbits to 15-35 mbits / US from 20 mbits to 8-16 mbits). It's also quite frustrating to set it on and off every now and then.

Hi,

install luci-app-sqm package and then configure it according to the guides below. That should be a good starting point.

1 Like

Thank you. I carefully read the instructions and managed to reduce the bufferbloat but I guess there is still work ahead. The resuts: DL Active: 14-463 ms / UL Active: 8-40 ms. Grade A. DSLReports gave similar results but I don't know how reliable the testing is since there's only one server I can connect (Zurich).

Btw... Does bridging the Fritzbox disable its firewall? Or do I have now two firewalls in a row?

That depends a bit on the details, but typically a bridged interface is not subject to NAT and firewalling (even tough that is possible in Linux).