Skip to content

Instantly share code, notes, and snippets.

@RikshaDriver
Last active February 23, 2025 03:30
Show Gist options
  • Save RikshaDriver/0388ba3f38f89eb975ebb0b915860ec2 to your computer and use it in GitHub Desktop.
Save RikshaDriver/0388ba3f38f89eb975ebb0b915860ec2 to your computer and use it in GitHub Desktop.
Compiling Realtek 8152, 8156 and 8157 ( RTL8152 ) drivers for QNAP NAS

Compiling Realtek RTL 8152, 8156 and 8157 drivers for QNAP NAS

Note

This guide was last updated on 17th Feb 2025

Many QNAP NAS devices only come with 1Gbe network interfaces. These devices can easily benefit from a simple network upgrade by connecting the ubiquitious 2.5Gbe USB NICs from Realtek. Unfortunately, some of the older QNAP NAS systems do not support the newer r8156 based 2.5Gbe NICs or r8157 based 5Gbe NICs as they run an older 4.x linux kernel and the r8152 source files included with the older linux kernel are based off an older codebase that predates the 8156/8157 series.

With some elbow grease however, we can build support for the 2.5 & 5 Gbe adapters and easily upgrade functionality.

rt_2 5gbe_qnap

VM & Build Environment Setup

Whilst any Linux build environment may be possible, I have chosen the older Debian 8. We need to download and install the latest Debian 8 i386 instance from Debian: https://www.debian.org/releases/jessie/debian-installer/

Build Essentials

Once our Linux VM is installed, we must also setup the environment for build. Login as "root" user and install the development packages using apt:

apt-get install build-essential libelf-dev bc

Other libraries may be required depending on the kernel/module build options

Compiler / Toolchain

In order to compile the kernel module for a respective QNAP system, we must identify the compiler on which the system was built. This can be done by querying the NAS itself using an SSH terminal:

cat /proc/version

This will show an output like:

Linux version 4.2.8 (root@U16BuildServer176) (gcc version 4.8.2 20131014 (prerelease) (crosstool-NG linaro-1.13.1-4.8-2013.10 - Linaro GCC 2013.10) ) #2 SMP Thu Jun 29 05:42:26 CST 2023

In the case of the TS-431P arm based system, the kernel was built using linaro-1.13.1-4.8-2013.10, so we need the relevant cross compiler. QNAP have not included this compiler in their GPL Open Source repository so we must obtain it from linaro: https://releases.linaro.org/archive/13.10/components/toolchain/binaries/gcc-linaro-aarch64_be-linux-gnu-4.8-2013.10_linux.tar.bz2

Extract the contents to a directory such as the /opt folder.

QNAP provides other platform cross-compilers on their sourceforge repository: https://sourceforge.net/projects/qosgpl/files/QNAP%20NAS%20Tool%20Chains/

Kernel Source

The NAS Kernel source is available on sourceforge: https://sourceforge.net/projects/qosgpl/files/QNAP%20NAS%20GPL%20Source/

In the example of the TS-431P, we will download and extract GPL_QTS-5.0.0-20211101_Kernel.tar.gz

To complete the build environment, we must copy the appropriate config file for kernel compilation.

In the case of the TS-431P:

cp ~/cp GPL_QTS/kernel_cfg/TS-X31X/linux-4.2-arm.config ~/GPL_QTS/src/linux-4.2/.config

Alternatively, one could also extract this config from the running NAS by downloading and extracting the contents under /proc/config.gz (if available).

This file can then be copied to the respective linux src folder.

Example:

gunzip config.gz
cp config ~/GPL_QTS/src/linux-4.2/.config

Compile Linux Kernel

With our build environment set up, we must then compile the linux kernel.

We can do so with a simple command (ensuring we reference our extracted folder locations appropriately:

make ARCH=arm CROSS_COMPILE=/opt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf- -C ~/GPL_QTS/src/linux-4.2/ scripts prepare modules_prepare

Compile Realtek Driver

Download precompiled drivers

Download optimized compiled driver:

Release Kernel Architecture Comments Link
2.19.2 4.2 ARMv7 32-bit Compiled for TS-x31x series Download

Other precompiled driver repositories:

Download from Realtek source

Download and extract the USB Linux drivers from Realtek's website: https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-usb-3-0-software https://www.realtek.com/Download/List?cate_id=585

As of (updated) writing, the current version is 2.19.2

If compiling for the older 4.x Linux kernel, we must first modify the contents of the r8152.c source file and replace strscpy with strlcpy for driver versions 2.17.1 onwards. This is to allow compilation on older kernel instances as these versions do not support the strscpy function.

If we don't change this function, we will see an error like below:

make: Entering directory '/root/GPL_QTS/src/linux-4.2'

  WARNING: Symbol version dump ./Module.symvers
           is missing; modules will have no dependencies and modversions.

  CC [M]  /root/r8152-2.17.1/r8152.o
/root/r8152-2.17.1/r8152.c: In function ‘rtl8152_get_drvinfo’:
/root/r8152-2.17.1/r8152.c:18623:2: error: implicit declaration of function ‘strscpy’ [-Werror=implicit-function-declaration]
  strscpy(info->driver, MODULENAME, sizeof(info->driver));
  ^
cc1: some warnings being treated as errors
scripts/Makefile.build:270: recipe for target '/root/r8152-2.17.1/r8152.o' failed
make[1]: *** [/root/r8152-2.17.1/r8152.o] Error 1
Makefile:1503: recipe for target '_module_/root/r8152-2.17.1' failed
make: *** [_module_/root/r8152-2.17.1] Error 2
make: Leaving directory '/root/GPL_QTS/src/linux-4.2'

We can quickly replace the functions in the file using sed:

sed -i -e 's/strscpy/strlcpy/g' r8152.c

Download From GitHub

Alternatively, download forked source from GitHub which contains the necessary fixes and enhancements: https://github.com/RikshaDriver/realtek-r8152-linux

Compilation

Now we can finally compile the Realtek module:

make ARCH=arm CROSS_COMPILE=/opt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf- -C ~/GPL_QTS/src/linux-4.2 M=`pwd` modules EXTRA_CFLAGS='-O2'

We should now have the succesfully compiled kernel module r8152.ko

Install Realtek Driver

In order to install the Realtek USB driver on our Linux system, we must overwite the existing r8152.ko module under /lib/modules/<kernel-version>/

For a quick an dirty test, upload the kernel module to a folder on the NAS, copy to the modules directory and run modprobe to remove and probe the kernel module. For example, the command for TS-431P (and related devices):

cp r8152.ko /lib/modules/4.2.8/
modprobe -r r8152
modprobe r8152

The Realtek driver should immediately show up as a network interface:

dmesg | grep 8152
[16401.642702] usbcore: deregistering interface driver r8152
[16404.197265] usbcore: registered new interface driver r8152
[16404.851196] r8152 2-4:1.0 eth2: v2.17.1 (2023/06/13)
[16404.856178] r8152 2-4:1.0 eth2: This product is covered by one or more of the following patents:

Tip

If experiencing adapter stability issues, it is possible the NAS may not be providing sufficient power to the adapter. Consider using an externally powered USB 3 Hub or a USB 3 Y cable which is connected to an external USB power source.

Install using autorun.sh

For a more permanent installation, the same commands can be run at startup using the autorun.sh capability of the NAS.

We must first tick the "Run user defined process during startup" option to allow autorun.sh loading during bootup.

The autorun.sh file must be stored on the flash storage.

QNAP provides a few methods of mounting the flash storage: https://www.qnap.com/en/how-to/faq/article/running-your-own-application-at-startup

In our case, we will do as follows:

/etc/init.d/init_disk.sh mount_flash_config

We can now manually create or upload our autorun.sh file to /tmp/nasconfig_tmp/autorun.sh

Example autorun.sh:

#!/bin/sh

echo "############ autorun.sh script start ############" >> /dev/kmsg

cp /share/CACHEDEV1_DATA/r8152.ko /lib/modules/4.2.8/
cp /share/CACHEDEV1_DATA/50-usb-realtek-net.rules /lib/udev/rules.d/50-usb-realtek-net.rules
modprobe -r r8152
modprobe r8152

sleep 5

udevadm control --reload-rules && udevadm trigger

sleep 10

echo "############  autorun.sh script end  ############" >> /dev/kmsg

Ensure autorun.sh is executable:

chmod +x /tmp/nasconfig_tmp/autorun.sh

Once completed, unmount the flash drive:

cd ~/
/etc/init.d/init_disk.sh umount_flash_config

Reboot and enjoy 2.5Gb/s or 5Gb/s speeds!

Install using QPKG

The Kernel module can also be packaged as a QPKG and run at startup as an application. This is similar to what is done with the Advanced Network Drivers application from QNAP.

Refer to the QDK guide for more details on creating a QPKG: https://cheng-yuan-hong.gitbook.io/qdk-quick-start-guide/

#!/bin/sh
echo "############ autorun.sh script start ############" >> /dev/kmsg
cp /share/CACHEDEV1_DATA/r8152.ko /lib/modules/4.2.8/
cp /share/CACHEDEV1_DATA/50-usb-realtek-net.rules /lib/udev/rules.d/50-usb-realtek-net.rules
modprobe -r r8152
modprobe r8152
sleep 5
udevadm control --reload-rules && udevadm trigger
sleep 10
echo "############ autorun.sh script end ############" >> /dev/kmsg
@59zCez
Copy link

59zCez commented Dec 3, 2024

Bummer, that is bad news...
Since this QNAP has a 64bit CPU but QOS is only 32bit (it sees only 3GB total) I was able to add 6GB of memory (2GB and 4GB) (total seen using dmidecode command just fine) I might install TrueNAS core 64bit (built on Debian) on it and see if it detects the usb adapter, but I will try with a spare machine as a test.

[~] # dmidecode --type 17

`# dmidecode 3.1
Scanning /dev/mem for entry point.
SMBIOS 2.6 present.

Handle 0x001E, DMI type 17, 28 bytes
Memory Device
Array Handle: 0x001D
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 4096 MB <----------------------
Form Factor: SODIMM
Set: None
Locator: DIMM0
Bank Locator: BANK 0
Type: DDR3
Type Detail: Synchronous
Speed: 1066 MT/s
Manufacturer: Kingston
Serial Number: 22561136
Asset Tag: Unknown
Part Number: HP687515-H66-MCN
Rank: Unknown

Handle 0x0020, DMI type 17, 28 bytes
Memory Device
Array Handle: 0x001D
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 2048 MB <-------------------------
Form Factor: SODIMM
Set: None
Locator: DIMM1
Bank Locator: BANK 1
Type: DDR3
Type Detail: Synchronous
Speed: 1066 MT/s
Manufacturer: 67
Serial Number: 66102111
Asset Tag: Unknown
Part Number: RMT3010EC58E8F13
Rank: Unknown
`

Thanks again for your time... I appreciate it.

@klemen866
Copy link

I know it is a long shot, but would there be any possibility to add wake-on-lan feature to the driver? Or is the absence of the wol hardware/compatibility issue?

@kawan2
Copy link

kawan2 commented Jan 3, 2025

Uploaded a new compile with feature RTL8152_S5_WOL active. Had to cheat by defining CONFIG_PM in the makefile since r8152.c wants both variables to expand the S5_WOL code. The TS-x31P .config does not have CONFIG_PM but probably newer NAS do have it.

@klemen866
Copy link

klemen866 commented Jan 3, 2025

Thanks, I will try it - I assume one of the wol files should be used. What is the difference between r8152-v7a-s5-wol.ko and r8152-v7a-s5-wol-d.ko?

Edit: I renamed r8152-v7a-s5-wol.ko to r8152.ko and restarted my NAS (TS-131K). The ethernet adapter is not recognised anymore (it worked fine with the previous - non wol - version of the same driver).

@astarktc
Copy link

astarktc commented Jan 4, 2025

I tried to figure this out on my own, but I think I need help here. I have a TS-653A, firmware QTS 5.2.2.2950. I have the WisdPi WP-UT5 usb adapter with the RTL8157 chip. I plugged it in, didn't see it as a network adapter in QNAP, but I could see it as a usb device with lsusb:

Bus 001 Device 002: ID 1005:b155 Apacer Technology, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 0bda:8157 Realtek Semiconductor Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

so that brought me here to this guide, I tried to follow the steps, but I got stuck at trying to find the exact files needed for compiling (something I've never done before in my life, in any context lol).

my cat proc/version result was:
Linux version 5.10.60-qnap (root@mini-builder-01) (x86_64-QNAP-linux-gnu-gcc (toolchain config: [gcc-4.9.2 binutils-2.25 glibc-2.21]) 4.9.2, GNU ld (GNU Binutils) 2.25) #1 SMP Thu Nov 14 01:01:55 CST 2024

which I figured out were the files provided by QNAP at https://sourceforge.net/projects/qosgpl/files/QNAP%20NAS%20Tool%20Chains/ and https://sourceforge.net/projects/qosgpl/files/QNAP%20NAS%20GPL%20Source/QTS%205.2.0/

I downloaded all the files and extracted them, and the folder structure of the Cross Toolchain SDK files did not at all match the example provided for linaro (make ARCH=arm CROSS_COMPILE=/opt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.10_linux/bin/arm-linux-gnueabihf- -C ~/GPL_QTS/src/linux-4.2/ scripts prepare modules_prepare) so that was a dead end for me. Very confusing.

The second problem was that the kernel files did not have any folders that matched my model number TS-653A. There were folders such as TS-X53B, TS-X53D, etc, but nothing for TS-X53A. I didn't find a .config file in /opt/GPL_QTS/src/linux-5.10, but there was a .config.old and something called Kconfig.

I also tried searching the NAS for /proc/config.gz but there was no such file.

Would anyone be able to point me in the right direction or compile it for me?

@kawan2
Copy link

kawan2 commented Jan 4, 2025

I uploaded r8152-2.19-x64-2025-01-04.zip compiled for TS-x73 (ARCH=x86_64 like your TS-653A). Not tested, but you can give it a go.

You'll probably need to ask QNAP for the right config folder for your TS-X53A. Get the x86_64 compiler from Sourceforge QNAP and issue make ARCH=x86_64 ...

@astarktc
Copy link

astarktc commented Jan 4, 2025

Nice! it worked on my first try. showed up in Network & Virtual Switch right away already configured at 5gb. Now I need to get the autorun to work properly. I followed the instructions and after reboot the adapter is gone, but comes back with manually running modprobe.

@eldoctorcool
Copy link

eldoctorcool commented Jan 5, 2025

Nice! it worked on my first try. showed up in Network & Virtual Switch right away already configured at 5gb. Now I need to get the autorun to work properly. I followed the instructions and after reboot the adapter is gone, but comes back with manually running modprobe.

I've run into the same issue. Every time I reboot the NAS (TS-431P) I have to manually apply the changes. Unsure why the autorun.sh isn't working.

I've managed to try a RTL8157 5GbE on the TS-431P and it works, but it shows as 2.5GbE and most of the info is "unknown"... but it seems to copy a lot faster than the 2.5GbE adapters I've tried. I just downloaded latest rev from @kawan2

BTW, thanks for doing this. Gave the TS-431P a new lease in life. Its been working rock solid for the past 5-6 years...

Do I need to copy the rules as well?

EDIT: it seems unable to set Jumbo frame to 9000...

EDIT2: and Connection Speed shows as --, and NIC model as well.

EDIT3: Using ip command to set the MTU gives this... again, this is an RT8157 5GbE USB adapter.

[~] # ip link set eth5 mtu 9000
RTNETLINK answers: Invalid argument

@kawan2
Copy link

kawan2 commented Jan 5, 2025

Issue dmesg and check for the echoed comment from the autorun.sh "### ..."

If the comment is absent from the log, then probably the autorun.sh is not being run. Check the instructions at the top about:
enable autorun in QNAP control panel -> hardware "run user processes during startup"

@eldoctorcool
Copy link

eldoctorcool commented Jan 5, 2025

Nothing at a glance, but then again, not sure if dmesg is going all the way back to init.

The autorun.sh is copied to the flash, and you can see it on the QNAP Web interface when you click to show it. I've enabled the flag to make it executable...

What does the rules file do? Don't drivers v2.19 need a new one? Thanks.

EDIT: Not sure if it matters, but here is the USB 5GbE Ethernet dongle.
https://www.amazon.com/gp/product/B0DF2TTT9H

@eldoctorcool
Copy link

Solution to the problem. Make sure you save the file in Unix text file format, if you use windows (in Notepad++) there is a Unix (LF) / Windows (CR/LF) box on the right bottom corner of the UI... you set that, and it all started magically working!

@klemen866
Copy link

Any follow-up to the wol issues I encountered on TS-131K? I also tried with the (renamed) r8152-v7a-s5-wol-d.ko driver, but the ethernet adapter was still not recognised.

@eldoctorcool
Copy link

Any follow-up to the wol issues I encountered on TS-131K? I also tried with the (renamed) r8152-v7a-s5-wol-d.ko driver, but the ethernet adapter was still not recognised.

I am using the 2.19 drivers compiled from here on a TS-431P without any issues, so not sure what is different between the 431P and the 131K

@klemen866
Copy link

I also use normal 2.19 driver on TS-131K without any issues, only the driver with added wol functionality does not work.

@eldoctorcool
Copy link

ah, thanks for the clarification then.

@kawan2
Copy link

kawan2 commented Jan 7, 2025

FYI, compilation generates driver files with debug symbols (the -d version). "strip -p --strip-unneeded" reduces the file size (without the -d version).

About the -wol version, when you issue dmesg, are there any error or informative messages that may provide clues about what could be wrong? You can compare the dmesg r8152, etc. messages, the working and non-working cases.

@klemen866
Copy link

This is the output of dmesg | grep 8152 using the wol driver:

[ 5.857802] usbcore: registered new interface driver r8152
[ 263.975148] usbcore: deregistering interface driver r8152
[ 264.036948] r8152: Unknown symbol usb_autopm_put_interface (err 0)
[ 264.043252] r8152: Unknown symbol usb_autopm_get_interface_async (err 0)
[ 264.050053] r8152: Unknown symbol usb_autopm_put_interface_async (err 0)
[ 264.056859] r8152: Unknown symbol usb_autopm_get_interface (err 0)

@astarktc
Copy link

astarktc commented Jan 8, 2025

Wanted to check in to say that turning on "run user processes during startup" fixed my autorun issue :)

The only weird thing that happened since then, was that I added a torrent to my instance of qbittorrent running on the NAS which caused all network interfaces (not just the usb) to be completely unreachabled, even after a reboot (likely because qbittorrent auto starts and tried the resume the same torrent). The solution that helped was to unplug the usb, reboot, and cross my fingers. When I tried to log in later, my access was restored, the torrent had finished, and I could plug in the usb adapter which was immediately recognized again.

I don't know why this happened, but I'm going to bypass the issue by setting up my torrents to run from my new minipc Proxmox server I just set up to offload Plex from the QNAP. Even before I bought the adapter, active torrents would basically freeze the web interface of qbittorrent until the download finished. But it never broke my ability to log into the QTS interface or SSH before.

@kawan2
Copy link

kawan2 commented Jan 8, 2025

Wavlink RTL8157 5 Gbps adapter $24 at Newegg. But need to get your own USB-C to USB3-A converter vs. the WisdPi WP-UT5 comes with USB-C + USB-A.
The first converter from eBay turned out to be USB2 not USB3 :( So check for that blue plastic 9 contacts USB3-A plug!
https://www.newegg.com/wavlink-uhp505-usb/p/0J2-008P-000B2

Preliminary results in 2.5 Gbps LAN .. very subjective and needs longer term verification -

  1. RTL8157 adapter plugged directly into the TS-431P has stable file transfers, without needing a USB3 hub
  2. file transfers seem to use a bit less CPU than RTL8156 (Resource Monitor eyeball measurement)
  3. reading files from TS-431P is same speed as RTL8156
  4. writing files to TS-431P is similar speed but smoother (less speed variation) than RTL8156. Due to slightly less CPU ??? 431P has only 2 CPUs.

@eldoctorcool
Copy link

Wavlink RTL8157 5 Gbps adapter $24 at Newegg. But need to get your own USB-C to USB3-A converter vs. the WisdPi WP-UT5 comes with USB-C + USB-A. The first converter from eBay turned out to be USB2 not USB3 :( So check for that blue plastic 9 contacts USB3-A plug! https://www.newegg.com/wavlink-uhp505-usb/p/0J2-008P-000B2

Preliminary results in 2.5 Gbps LAN .. very subjective and needs longer term verification -

  1. RTL8157 adapter plugged directly into the TS-431P has stable file transfers, without needing a USB3 hub
  2. file transfers seem to use a bit less CPU than RTL8156 (Resource Monitor eyeball measurement)
  3. reading files from TS-431P is same speed as RTL8156
  4. writing files to TS-431P is similar speed but smoother (less speed variation) than RTL8156. Due to slightly less CPU ??? 431P has only 2 CPUs.

Thanks for the report! :)

@kawan2
Copy link

kawan2 commented Jan 8, 2025

Oops, spoke too soon about not needing a USB3 hub :(
Looks like the RTL8157 still needs a USB3 hub for stable file transfers with the TS-431P.

@eldoctorcool
Copy link

eldoctorcool commented Jan 8, 2025 via email

@astarktc
Copy link

Ever since I installed this wisdpi adapter, I've been having a serious recurring issue. I don't know if it's the adapter, the driver or something wrong with my qnap.

But, every few days, all networking stops working (both the adapter and built-in nic). The lan light is a steady blinking orange, i can't log into the Qnap, and I can't do a proper shutdown. I have to hold down the power button until it shuts off and when it comes back online the networking is restored, most of the time. Sometimes I have to do this twice...

Normally I would be able to use the menu buttons on the front to initiate a reboot, but when this issue happens, that little screen stays blank and the buttons do nothing.

Every time i do this my raid10 array goes through a sync process :(

More strange is that the QNAP system logs show no sign of anything having happened.

Anyone have any ideas on how to figure this out?

@kawan2
Copy link

kawan2 commented Jan 21, 2025

Note the 'tip' in the top article about trying a USB3 hub between the NAS and the Realtek dongle. Scan the very early entries in this gist for user experiences.

If you have an ordinary unpowered USB3 hub on hand, try that first.

@eldoctorcool
Copy link

eldoctorcool commented Jan 21, 2025 via email

@astarktc
Copy link

I can try the hub, but, this most recent hard reset i did today of the NAS was with the adapter unplugged, and the issue came back right after startup finished :(

And, what's strange to me is that the adapter will be rock solid for multiple days in a row, then suddenly this "freeze" of the QNAP occurs. Is this the same symptom that others resolved with a powered hub?

@kawan2
Copy link

kawan2 commented Jan 21, 2025

You mentioned earlier that torrents could be issue, before you introduced the Realtek adapter. Can you stop the torrents or move them elsewhere? Since the issue occurs only after many days, it could be time consuming to test.

For me, the NAS ethernet ports were always fine, and the NAS kept working good after the Realtek adapter crapped out. So I could connect back to the NAS and see the r8152 error messages from dmesg.

@astarktc
Copy link

astarktc commented Feb 5, 2025

This weekend I decided to finally try some more troubleshooting, so I booted up my QNAP with the ethernet disconnected, once it was on, I connected it and logged in to see that qbittorrent was disabled (which I thought I had done of course) which ruled it out as the cause.

Being not sure what to do, I looked at some settings and made one change. I had previously manually set the Realtek as the primary adapter and the built-in NIC as secondary. So I turned that off and set everything back to automatic, and then left the ethernet connected to the realtek and no ethernet in the built-in NIC.

Lasted for several days, but today, it is once again inaccessible. I'm not sure what else to do. I don't know whether the OS is locking up, or just losing networking only. I wonder if I can write a script that can check for connectivity, and when it is lost for a certain amount of time, have it initiate a reboot of the NAS automatically or restart network services to avoid me having to hard shut down the device while I try to figure out the problem. If a script like this fails to get things back online when this situation happens, it points more to a system issue bigger than just the networking stack.

And what worries me is that there are other symptoms that point in that direction. For example, the status leds on the front all go static, meaning they stop blinking entirely. And the lcd display stops displaying anything when i press the buttons. But on the other hand, it just did it twice in a row, but the lan lights still turned on when i plugged into the local NIC after the freeze, and the lights were orange, indicating a degraded state.

It's probably time for me to replace it. But I was hoping to use it for a while longer until I'm ready to make that investment. Anyone have other ideas for me to try? Maybe it's a coincidence this started at the same time I set up the USB adapter? or something I modified along the way has had unintended consequences?

edit: one more important detail. sometimes this issue happens immediately after the reboot. not just after several days. 50/50 chance of either scenario. Then i have to shut it off a 2nd time.

Edit #2: This seems to be getting worse. i don't why I can't replicate what has worked all the other times I rebooted, but now, within minutes of every hard reset, networking is failing again. This is making it nearly impossible to make it through the steps to implement this script I had chatgpt help me create. I'm going to keep trying.....

@astarktc
Copy link

astarktc commented Feb 6, 2025

good news, i was able to get a script working properly. now we'll just wait and see if it helps during the next freeze :) the first time i tested it, it disappeared from crontab after the reboot...so i tried adding to /tmp/cron/crontab/admin using vi instead of doing sudo crontab -e. but i'm not sure if that command just opens that version anyway.

If there's a better way to permanently schedule it, I'd appreciate any advice. when i tested it, i was manually running the .sh file so i don't know if cron is actually running it every minute or not. gpt told me to add this line: */1 * * * * /path to file/network_monitor.sh

@bstirling2307
Copy link

Does anyone have this working on the ts-659 pro ii? if so how?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment