Update: New network driver Odroid H2+ for CentOS 7.9 (r8125 LAN)

Update: I found the problem with the “buggy” network driver. It was actually the RAM which is behaving unstable. The RAM is Kingston HyperX Impact 8GB 2933MHz DDR4 CL17 – avoid it for the Odroid H2+. So both drivers should be stable enough.

Update 09.01.2021: I’ve built the driver for base 7.9 kernel  so you can install it from a flash drive, without a usb lan card. See the downloads section below.

Update: I updated the module version to 9.009.02. Downloads at the bottom.

Well the 9.003.05-1 version I found on ElRepo turned out to be buggy and killed my whole network. I downloaded the version r8125-9.004.01 driver from Realtek and applied the changes from the ELRepo patch. I made a new patch, so if you are interested in compiling the original source you can do this:

tar jxf r8125-9.004.01.tar.bz2
cd r8125-9.004.01
patch -p1 <../NickSoft-r8125-9.004.01-centos.patch
make --quiet
make install

Or you can get the rpms and rebuild from src rpm:

Make sure you update first. your kernel version needs to be higher than 3.10.0-1160.11.1.el7:
yum update

rpmbuild --rebuild --define "kversion $(uname -r)" r8125-kmod-9.004.01-1.el7.src.rpm

Then install the rpm:

rpm -Uvh /root/rpmbuild/RPMS/x86_64/kmod-r8125-9.004.01-1.el7.x86_64.rpm



Tagged with: , , , , ,
Posted in Beginners

Build Odroid H2+ network drivers for CentOS 7.9 (r8125)

Update: See how to build the updated r8125 driver (v 9.004.01) for Centos 7.9.

I just got my OdroidH2+ – a very nice x86 SBC. Unfortunately they don’t make OdroidH2 (with the 1Gb network card) anymore which has drivers built in into the CentOS kernel. So I’ll have to settle with the two Realtek RTL8125B  2.5Gbps network cards. I don’t know why they made this upgrade. Using SCP I barely reach 68 MB/s.

Anyway in order to build the driver I needed to find the source. I found this link which shows other people trying to build the driver from manufacturer sources. It didn’t work that well. The topic leads to a package elrepo kmod-r8125-9.003.05-1.el7_8.elrepo.x86_64 on elrepo repository. However it is for CentOS 7.8. So I downloaded the src rpm and built it on centos 7.9. Here is how to build it:

Note: If you don’t have USB network card to use temporarily to download the driver, download it on another pc and copy it using a flash drive.

install build tools
yum install make gcc gcc-c++ make autoconf automake rpm-build

The above command won’t work without internet. In order to make it work plug in a flash drive with CentOS install, mount it at /media/CentOS. Then edit /etc/yum.repos.d/CentOS-Media.repo and change enabled=0 to enabled =1. That should work although I didn’t test it. Anyway it’s not a bad idea to get a cheap Chinese USB LAN card just for situations like these.

Download the src rpm:
cd /home/
wget http://elrepo.reloumirrors.net/elrepo/el7/SRPMS/r8125-kmod-9.003.05-1.el7_8.elrepo.src.rpm

build the rpm (I’m not sure if root is needed, but I built it as root):
rpmbuild --rebuild --define "kversion $(uname -r)" r8125-kmod-9.003.05-1.el7_8.elrepo.src.rpm

Once this is finieshed the resulting rpm  will be in /root/rpmbuild/RPMS/x86_64/kmod-r8125-9.003.05-1.el7.x86_64.rpm

So install the rpm as follows:
rpm -Uvh /root/rpmbuild/RPMS/x86_64/kmod-r8125-9.003.05-1.el7.x86_64.rpm

Reboot and the LAN card should be done.



In case you are too lazy to build it yourself or you are having troubles here is a zip with the srpm and pre-built rpm:


But it’s always better idea to download it from reputable source and build it yourself. You shouldn’t be downloading rpms from random blogs 🙂


If you hate the non-sense names for the network interfaces you can change back to old eth0, eth1 … style like this:

Edit file /etc/default/grub and add net.ifnames=0 biosdevname=0 to line GRUB_CMDLINE_LINUX, for instance:

GRUB_CMDLINE_LINUX=" crashkernel=auto net.ifnames=0 biosdevname=0 rhgb quiet"

Then remake grub config:
grub2-mkconfig -o /boot/grub2/grub.cfg # for legacy installs
grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg # for EFI installs

Then rename the interface config file:
mv /etc/sysconfig/network-scripts/ifcfg-enp2s0 /etc/sysconfig/network-scripts/ifcfg-eth0

and edit it to change device name:
# cat /etc/sysconfig/network-scripts/ifcfg-eth0

Then do the same with ifcfg-enp3s0 -> eth1

Posted in Advanced, Linux

Make Christmas Lights (Part 2)

In part 1 we made 3 leds blink in different patterns. In this part we’ll connect to string of LEDs to make it look more like Christmas lights.

Read more ›

Tagged with: , , , ,
Posted in Make

Make Christmas Lights (part 1)

It’s Christmas time! Yeah! … Are you bored? Me too. Hearing the same Christmas songs every year all over again. Boring love movies on all channels and they aren’t even half good as they were before. So let’s make it more interesting. One thing I like about Christmas is that it lifts the spirits (when you are not bored to death by stupid music and bad movies). Another thing is the christmas lights everywhere. They blink, they glow, they do all kinds of weird and wonderful things. And it can become an obsession. The more you get involved into building the lights, the more pleasing it is to watch them. How about making a simple Christmas lights controller?

Read more ›

Tagged with: , , , ,
Posted in Make

Making a Bench Shelf

When I started with electronics I worked on an old plastic table which was quite unstable. I saw a kitchen table for half the price – brand new. They dropped the price because one of the legs had few scratches.
It has nice 5cm massive legs from thick sheet steel. It’s 100x80cm and it’s extendable to 130 cm length. It’s quite stable and cost me about 40EUR. Although it’s big I quickly run out of space – I got few more multimeters, a new oscilloscope and I planned to build/buy power supply, function generator and other stuff. So I decided to make a shelf.
Read more ›

Posted in Other

Rigol DS2072A first impression

I just received the Rigol DS2072A (the new version of the DS2000 series) oscilloscope and I though I can share my first impressions. It’s not a complete review because the good and bad sides I’ll mention are not actually tested in details to see how they interfere with the work process. I’ll probably post more detailed review after I spend more time working with the scope.

Read more ›

Tagged with: , , , , ,
Posted in Reviews

Delays in microcontrollers

Everyone says that it’s bad to use loops for delays in microcontrollers.  But why? It’s a lot easier to make it that way. In most cases there are macros available that’ll do the calculations for you and will make the correct loop to delay the precise time. Why would they do these macros if it’s bad to use them. Well it really depends on what you are doing. It’s not always bad. In this article I’ll show you the benefits of using interrupts and why/when it’s good to use them and when you should not to use them.

Read more ›

Tagged with: , ,
Posted in Advanced

Operational Amplifiers (op amps)

Well, internet is full of op amp tutorials. Wasting time for writing yet another tutorial which will say nothing new is not efficient. What I’ll do is to search for good tutorials and list them. I’ll also read/watch them and if I have something to add – I’ll write it. Also if you have troubles understanding something – drop me a line and I’ll try to explain it.

Read more ›

Posted in Beginners

Voltage, current, resistance, Ohm’s law.

You have never studied electronics it’s probably a good idea to learn about basic quantities voltage, current and resistace before you continue with electronics. If you know about it it’s still good to read this in order to confirm you don’t have bad knowledge about something. It’ll probably be boring because it’s mostly theory, but I’ll try to spice it a bit.
Read more ›

Posted in Beginners

First Steps with μControllers Part 3

(running the first program)

When you write programs for devices it’s a lot worse when something goes wrong. For example if you output the wrong signal, depending on your schematic you might be making a short circuit. Or if you are trying to run a LED with PWM you might make it run constantly  and the current could be too much. That’s why it’s better to run the program in simulator before running it on the MCU.

Read more ›

Tagged with: ,
Posted in Beginners