Identify commited memory over use guilty application

Written by pmd - - no comments

I'm running some script every day on my raspberry and after some fairly long time it could execute with efficiency.

When checking Munin data I could see an obvious raise on commited memory but I never looked for the guilty application. I was restarted the raspberry evry 3-4 months to purge commited memory.

 

But recently I found out how to purge the commited memory and avoided restarting the raspberry (as you can see above commited dropped without restarting during march 2026). Source: Server crashing because of out of memory

It is written: 

In this case there are large commits that are not actively used by apps. You can see that the committed memory is much larger then the active memory. 
To quickly find likely culprits, use:

ps aux --sort -vsz | head

 

 

Indeed I could find that the guilty application raising slowly the commited memory was Airsonic. Restarted it purged the commited memory. I will restart airsonic (bi-)weekly from now on.
=> see above end of 6th day of 13th week.

When my script bugged and did not close all chromium instances I could also identify and kill them. 
=> see above April 2nd and end of April 5th

 

 

 

OpenWRT on NanoPi R5C + RTL8822CE wifi + e3372h in NCM

Written by pmd - - no comments

⚫ First NanoPi R5C boot : FriendlyWrt

I plugged the power supply and an ethernet cable on LAN port, then loooking for its IP:

Microsoft Windows [version 10.0.26200.8037]
(c) Microsoft Corporation. Tous droits réservés.

C:\Users\pmdzsite>ipconfig

Configuration IP de Windows


Carte Ethernet Ethernet :

Suffixe DNS propre à la connexion. . . : lan
Adresse IPv6. . . . . . . . . . . . . .: fd00:ab:cd::503
Adresse IPv6. . . . . . . . . . . . . .: fd00:ab:cd:0:5d68:a257:a970:8026
Adresse IPv6 temporaire . . . . . . . .: fd00:ab:cd:0:e866:7838:fe12:b5b2
Adresse IPv6 de liaison locale. . . . .: fe80::9e3e:7b64:ccc6:5b0b%37
Adresse IPv4. . . . . . . . . . . . . .: 192.168.2.216
Masque de sous-réseau. . . . . . . . . : 255.255.255.0
Passerelle par défaut. . . . . . . . . : 192.168.2.1

[...]

insert screenshots 

 

 

⚫ Installing OpenWRT

OpenWRT product page: FriendlyARM NanoPi R5C
From above link I downloaded this file: openwrt-rockchip-armv8-friendlyarm_nanopi-r5c-ext4-sysupgrade.img.gz
Go to SystemeMMC Tools
Upload the file and wait till it's finished.
Power off, power on.

At next restart it looks like this:

C:\Users\pmdzsite>ipconfig

Configuration IP de Windows


Carte Ethernet Ethernet :

Suffixe DNS propre à la connexion. . . : lan
   Adresse IPv6. . . . . . . . . . . . . .: fde7:4f19:93c5::bcb
   Adresse IPv6. . . . . . . . . . . . . .: fde7:4f19:93c5:0:633c:63c8:81f3:e911
   Adresse IPv6 temporaire . . . . . . . .: fde7:4f19:93c5:0:3005:426d:2e90:c165
   Adresse IPv6 de liaison locale. . . . .: fe80::9e3e:7b64:ccc6:5b0b%37
   Adresse IPv4. . . . . . . . . . . . . .: 192.168.1.216
   Masque de sous-réseau. . . . . . . . . : 255.255.255.0
   Passerelle par défaut. . . . . . . . . : 192.168.1.1

But I can't connect to luci... Trying with SSH:

C:\Users\pmdzsite>ssh root@192.168.1.1

BusyBox v1.37.0 (2026-01-02 17:07:02 UTC) built-in shell (ash)
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r33744-eba6fa859e
 -----------------------------------------------------

 === WARNING! =====================================
 There is no root password defined on this device!
 Use the "passwd" command to set up a new password
 in order to prevent unauthorized SSH logins.
 --------------------------------------------------

root@OpenWrt:~#
root@OpenWrt:~# apk list -I
apk-mbedtls-3.0.5-r3 aarch64_generic {feeds/base/system/apk} (GPL-2.0-only) [installed]
attendedsysupgrade-common-9 noarch {feeds/packages/feeds/packages/utils/attendedsysupgrade-common} (GPL-2.0) [installed]
base-files-1686~eba6fa859e aarch64_generic {feeds/base/base-files} (GPL-2.0) [installed]
busybox-1.37.0-r6 aarch64_generic {feeds/base/utils/busybox} (GPL-2.0) [installed]
ca-bundle-20250419-r2 noarch {feeds/base/system/ca-certificates} (GPL-2.0-or-later MPL-2.0) [installed]
dnsmasq-2.92-r1 aarch64_generic {feeds/base/network/services/dnsmasq} (GPL-2.0) [installed]
dropbear-2025.89-r1 aarch64_generic {feeds/base/network/services/dropbear} (MIT) [installed]
e2fsprogs-1.47.3-r1 aarch64_generic {feeds/base/utils/e2fsprogs} (GPL-2.0) [installed]
firewall4-2025.03.17~b6e51575-r2 aarch64_generic {feeds/base/network/config/firewall4} (ISC) [installed]
fstools-2026.02.15~8d377aa6-r1 aarch64_generic {feeds/base/system/fstools} (GPL-2.0) [installed]
fwtool-2025.10.03~04cd252e-r1 aarch64_generic {feeds/base/system/fwtool} (GPL-2.0) [installed]
getrandom-2025.10.30~6f78fa49-r1 aarch64_generic {feeds/base/system/ubox} (GPL-2.0) [installed]
hostapd-common-2026.03.23~3f9b7ae0-r1 aarch64_generic {feeds/base/network/services/hostapd} (BSD-3-Clause) [installed]
iw-6.17-r1 aarch64_generic {feeds/base/network/utils/iw} (GPL-2.0) [installed]
jansson4-2.15.0-r1 aarch64_generic {feeds/base/libs/jansson} (MIT) [installed]
jshn-2026.03.13~81563384-r1 aarch64_generic {feeds/base/libs/libubox} (ISC) [installed]
jsonfilter-2026.03.16~b9034210-r1 aarch64_generic {feeds/base/utils/jsonfilter} (ISC) [installed]
kernel-6.12.79~6945287675c932dcffda14a61342f3e6-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-cfg80211-6.12.79.6.18.7-r1 aarch64_generic {feeds/base/kernel/mac80211} (GPL-2.0-only) [installed]
kmod-crypto-aead-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-crypto-ccm-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-crypto-cmac-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-crypto-crc32c-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-crypto-ctr-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-crypto-gcm-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-crypto-geniv-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-crypto-gf128-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-crypto-ghash-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-crypto-hash-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-crypto-hmac-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-crypto-manager-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-crypto-null-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-crypto-rng-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-crypto-seqiv-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-crypto-sha3-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-crypto-sha512-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-gpio-button-hotplug-6.12.79-r5 aarch64_generic {feeds/base/kernel/gpio-button-hotplug} (GPL-2.0) [installed]
kmod-hwmon-core-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-i2c-core-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-lib-crc-ccitt-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-lib-crc32c-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-libphy-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-mac80211-6.12.79.6.18.7-r1 aarch64_generic {feeds/base/kernel/mac80211} (GPL-2.0-only) [installed]
kmod-mdio-devres-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-mii-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-nf-conntrack-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-nf-flow-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-nf-log-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-nf-log6-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-nf-nat-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-nf-reject-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-nf-reject6-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-nfnetlink-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-nft-core-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-nft-fib-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-nft-nat-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-nft-offload-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-phy-realtek-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-ppp-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-pppoe-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-pppox-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-r8169-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
kmod-rtw88-6.12.79.6.18.7-r1 aarch64_generic {feeds/base/kernel/mac80211} (GPL-2.0-only) [installed]
kmod-rtw88-8822c-6.12.79.6.18.7-r1 aarch64_generic {feeds/base/kernel/mac80211} (GPL-2.0-only) [installed]
kmod-rtw88-8822ce-6.12.79.6.18.7-r1 aarch64_generic {feeds/base/kernel/mac80211} (GPL-2.0-only) [installed]
kmod-rtw88-pci-6.12.79.6.18.7-r1 aarch64_generic {feeds/base/kernel/mac80211} (GPL-2.0-only) [installed]
kmod-slhc-6.12.79-r1 aarch64_generic {feeds/base/kernel/linux} (GPL-2.0-only) [installed]
libblkid1-2.41.3-r1 aarch64_generic {feeds/base/utils/util-linux} (LGPL-2.1-or-later) [installed]
libblobmsg-json20260313-2026.03.13~81563384-r1 aarch64_generic {feeds/base/libs/libubox} (ISC) [installed]
libc-1.2.5-r5 aarch64_generic {feeds/base/libs/toolchain} (GPL-3.0-with-GCC-exception) [installed]
libcomerr0-1.47.3-r1 aarch64_generic {feeds/base/utils/e2fsprogs} (GPL-2.0) [installed]
libe2p2-1.47.3-r1 aarch64_generic {feeds/base/utils/e2fsprogs} (GPL-2.0) [installed]
libext2fs2-1.47.3-r1 aarch64_generic {feeds/base/utils/e2fsprogs} (GPL-2.0) [installed]
libf2fs6-1.16.0-r4 aarch64_generic {feeds/base/utils/f2fs-tools} (GPL-2.0-only) [installed]
libgcc1-14.3.0-r5 aarch64_generic {feeds/base/libs/toolchain} (GPL-3.0-with-GCC-exception) [installed]
libjson-c5-0.18-r1 aarch64_generic {feeds/base/libs/libjson-c} (MIT) [installed]
libjson-script20260313-2026.03.13~81563384-r1 aarch64_generic {feeds/base/libs/libubox} (ISC) [installed]
libmbedtls21-3.6.5-r1 aarch64_generic {feeds/base/libs/mbedtls} (GPL-2.0-or-later) [installed]
libmnl0-1.0.5-r1 aarch64_generic {feeds/base/libs/libmnl} (LGPL-2.1+) [installed]
libnftnl11-1.3.1-r1 aarch64_generic {feeds/base/libs/libnftnl} (GPL-2.0-or-later) [installed]
libnl-tiny1-2025.12.02~40493a65-r1 aarch64_generic {feeds/base/libs/libnl-tiny} (LGPL-2.1) [installed]
libpthread-1.2.5-r5 aarch64_generic {feeds/base/libs/toolchain} (GPL-3.0-with-GCC-exception) [installed]
librt-1.2.5-r5 aarch64_generic {feeds/base/libs/toolchain} (GPL-3.0-with-GCC-exception) [installed]
libsmartcols1-2.41.3-r1 aarch64_generic {feeds/base/utils/util-linux} (LGPL-2.1-or-later) [installed]
libss2-1.47.3-r1 aarch64_generic {feeds/base/utils/e2fsprogs} (GPL-2.0) [installed]
libubox20260313-2026.03.13~81563384-r1 aarch64_generic {feeds/base/libs/libubox} (ISC) [installed]
libubus20251202-2025.12.02~3cc98db1-r1 aarch64_generic {feeds/base/system/ubus} (LGPL-2.1) [installed]
libuci20250120-2025.12.02~66127cd7-r1 aarch64_generic {feeds/base/system/uci} (LGPL-2.1) [installed]
libuclient20201210-2026.02.20~7a0aa2e4-r1 aarch64_generic {feeds/base/libs/uclient} (ISC) [installed]
libucode20230711-2026.02.27~934bb593-r1 aarch64_generic {feeds/base/utils/ucode} (ISC) [installed]
libudebug-2026.01.16~875e1a7a aarch64_generic {feeds/base/libs/udebug} (GPL-2.0) [installed]
libustream-mbedtls20201210-2026.03.01~99f1c0db-r1 aarch64_generic {feeds/base/libs/ustream-ssl} (ISC) [installed]
libuuid1-2.41.3-r1 aarch64_generic {feeds/base/utils/util-linux} (BSD-3-Clause) [installed]
logd-2025.10.30~6f78fa49-r1 aarch64_generic {feeds/base/system/ubox} (GPL-2.0) [installed]
mkf2fs-1.16.0-r4 aarch64_generic {feeds/base/utils/f2fs-tools} (GPL-2.0-only) [installed]
mtd-27 aarch64_generic {feeds/base/system/mtd} (GPL-2.0+) [installed]
netifd-2026.02.26~69a5afc9-r1 aarch64_generic {feeds/base/network/config/netifd} (GPL-2.0) [installed]
nftables-json-1.1.6-r1 aarch64_generic {feeds/base/network/utils/nftables} (GPL-2.0) [installed]
odhcp6c-2026.01.25~24485bb4-r1 aarch64_generic {feeds/base/network/ipv6/odhcp6c} (GPL-2.0) [installed]
odhcpd-ipv6only-2026.03.16~160e5fa3-r1 aarch64_generic {feeds/base/network/services/odhcpd} (GPL-2.0) [installed]
openwrt-keyring-2025.12.10~f0670054-r1 aarch64_generic {feeds/base/system/openwrt-keyring} (GPL-2.0) [installed]
owut-2026.03.30~670907a5-r1 noarch {feeds/packages/feeds/packages/utils/owut} (GPL-2.0-only) [installed]
partx-utils-2.41.3-r1 aarch64_generic {feeds/base/utils/util-linux} (GPL-2.0-or-later) [installed]
ppp-2.5.2-r3 aarch64_generic {feeds/base/network/services/ppp} (BSD-4-Clause) [installed]
ppp-mod-pppoe-2.5.2-r3 aarch64_generic {feeds/base/network/services/ppp} (BSD-4-Clause) [installed]
procd-2026.03.13~58eb263d-r1 aarch64_generic {feeds/base/system/procd} (GPL-2.0) [installed]
procd-seccomp-2026.03.13~58eb263d-r1 aarch64_generic {feeds/base/system/procd} (GPL-2.0) [installed]
procd-ujail-2026.03.13~58eb263d-r1 aarch64_generic {feeds/base/system/procd} (GPL-2.0) [installed]
r8169-firmware-20260309-r1 aarch64_generic {feeds/base/firmware/linux-firmware} () [installed]
rpcd-2025.12.03~ffb9961c-r1 aarch64_generic {feeds/base/system/rpcd} (ISC) [installed]
rpcd-mod-file-2025.12.03~ffb9961c-r1 aarch64_generic {feeds/base/system/rpcd} (ISC) [installed]
rpcd-mod-rpcsys-2025.12.03~ffb9961c-r1 aarch64_generic {feeds/base/system/rpcd} (ISC) [installed]
rtl8822ce-firmware-20260309-r1 aarch64_generic {feeds/base/firmware/linux-firmware} () [installed]
uboot-envtools-2026.01-r1 aarch64_generic {feeds/base/boot/uboot-tools} (GPL-2.0 GPL-2.0+) [installed]
ubox-2025.10.30~6f78fa49-r1 aarch64_generic {feeds/base/system/ubox} (GPL-2.0) [installed]
ubus-2025.12.02~3cc98db1-r1 aarch64_generic {feeds/base/system/ubus} (LGPL-2.1) [installed]
ubusd-2025.12.02~3cc98db1-r1 aarch64_generic {feeds/base/system/ubus} (LGPL-2.1) [installed]
uci-2025.12.02~66127cd7-r1 aarch64_generic {feeds/base/system/uci} (LGPL-2.1) [installed]
uclient-fetch-2026.02.20~7a0aa2e4-r1 aarch64_generic {feeds/base/libs/uclient} (ISC) [installed]
ucode-2026.02.27~934bb593-r1 aarch64_generic {feeds/base/utils/ucode} (ISC) [installed]
ucode-mod-digest-2026.02.27~934bb593-r1 aarch64_generic {feeds/base/utils/ucode} (ISC) [installed]
ucode-mod-fs-2026.02.27~934bb593-r1 aarch64_generic {feeds/base/utils/ucode} (ISC) [installed]
ucode-mod-nl80211-2026.02.27~934bb593-r1 aarch64_generic {feeds/base/utils/ucode} (ISC) [installed]
ucode-mod-rtnl-2026.02.27~934bb593-r1 aarch64_generic {feeds/base/utils/ucode} (ISC) [installed]
ucode-mod-ubus-2026.02.27~934bb593-r1 aarch64_generic {feeds/base/utils/ucode} (ISC) [installed]
ucode-mod-uci-2026.02.27~934bb593-r1 aarch64_generic {feeds/base/utils/ucode} (ISC) [installed]
ucode-mod-uclient-2026.02.20~7a0aa2e4-r1 aarch64_generic {feeds/base/libs/uclient} (ISC) [installed]
ucode-mod-uloop-2026.02.27~934bb593-r1 aarch64_generic {feeds/base/utils/ucode} (ISC) [installed]
urandom-seed-3 aarch64_generic {feeds/base/system/urandom-seed} (GPL-2.0-only) [installed]
urngd-2025.10.03~f17e33d9-r1 aarch64_generic {feeds/base/system/urngd} (GPL-2.0 BSD-3-Clause) [installed]
usign-2025.10.03~c4c72b1b-r1 aarch64_generic {feeds/base/system/usign} (ISC) [installed]
wifi-scripts-1.0-r1 noarch {feeds/base/network/config/wifi-scripts} (GPL-2.0) [installed]
wireless-regdb-2026.02.04-r1 noarch {feeds/base/firmware/wireless-regdb} (ISC) [installed]
wpad-basic-mbedtls-2026.03.23~3f9b7ae0-r1 aarch64_generic {feeds/base/network/services/hostapd} (BSD-3-Clause) [installed]
zlib-1.3.2-r1 aarch64_generic {feeds/base/libs/zlib} (Zlib) [installed]
root@OpenWrt:~#

Luci is not installed by default???

I changed the IP adress to be able to connect R5C to my ISP router:

root@OpenWrt:~# uci set network.lan.ipaddr='192.168.2.1'
root@OpenWrt:~# uci set network.lan.netmask='255.255.255.0'
root@OpenWrt:~# uci commit network
root@OpenWrt:~# /etc/init.d/network restart
client_loop: send disconnect: Connection reset
 

Let's try to reinstall from another file. I downloaded openwrt-25.12.2-rockchip-armv8-friendlyarm_nanopi-r5c-ext4-sysupgrade.img.gz from here.

Sent it to /tmp of the rooter doing like this:

C:\Users\pmdzsite>scp -O C:\Users\pmdzsite\Downloads\openwrt-25.12.2-rockchip-armv8-friendlyarm_nanopi-r5c-ext4-sysupgrade.img.gz root@192.168.2.1:/tmp
openwrt-25.12.2-rockchip-armv8-friendlyarm_nanopi-r5c-ext4-sysupgrade.img.gz                               100%   11MB  18.3MB/s   00:00

C:\Users\pmdzsite>

Then install it still using command line:

C:\Users\pmdzsite>ssh root@192.168.2.1<br />
[...]
root@OpenWrt:~# cd /tmp
root@OpenWrt:/tmp# sysupgrade /tmp/openwrt-25.12.2-rockchip-armv8-friendlyarm_nanopi-r5c-ext4-sysupgrade.img.gz
Wed Apr  1 15:21:26 GMT 2026 upgrade: Reading partition table from bootdisk...
Wed Apr  1 15:21:26 GMT 2026 upgrade: Reading partition table from image...
Wed Apr  1 15:21:26 GMT 2026 upgrade: Saving config files...
Wed Apr  1 15:21:27 GMT 2026 upgrade: Commencing upgrade. Closing all shell sessions.
Command failed: Connection failed
root@OpenWrt:/tmp# Connection to 192.168.2.1 closed by remote host.
Connection to 192.168.2.1 closed.

C:\Users\pmdzsite>

Success I have the Luci interface + ssh access !!!

C:\Users\pmdzsite>ssh root@192.168.2.1

BusyBox v1.37.0 (2026-03-25 20:09:53 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
-----------------------------------------------------
OpenWrt 25.12.2, r32802-f505120278 Dave's Guitar
-----------------------------------------------------

=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------


OpenWrt recently switched to the "apk" package manager!

OPKG Command APK Equivalent Description
------------------------------------------------------------------
opkg install apk add Install a package
opkg remove apk del Remove a package
opkg upgrade apk upgrade Upgrade all packages
opkg files apk info -L List package contents
opkg list-installed apk info List installed packages
opkg update apk update Update package lists
opkg search apk search Search for packages
------------------------------------------------------------------

For more information visit:
https://openwrt.org/docs/guide-user/additional-software/opkg-to-apk-cheatsheet

root@OpenWrt:~#

Using Luci interface I finally could connect R5C to my ISP wifi router using wifi.

 

At the end I installed OpenWRT 24.10.2. It did not improve Wifi issue at startup but I kept it (see below patch).

⚫ Configuring OpenWRT

⚪ Disabling IPv6 on LAN

  • Network > Interfaces > Edit lan interface > DHCP Server > IPv6 Settings
    Disable RA-Service, DHCPv6-Service, NDP-Proxy, and make sure Designated Master is unchecked.
  • Network > Interfaces > Edit lan interface > Advanced Settings
    IPv6 assignment length disabled.

⚪ Enable wifi interfaces one by one to avoid looping bug

When configuring wifi interfaces one after the other, all works well. Then at next reboot, all interfaces want to restart at same moment and obviously RTL8822CE driver bugs.
I had to put this to get wifi working after a reboot

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

sleep 45
logger "Realtek fix: Force reset for wlan and phy0-ap0"

#worked with 25.12.2 version of openwrt but not with 24.10.2
#ip link set wlan down
#ip link set phy0-sta0 down
#sleep 5
#ip link set wlan up
#ip link set phy0-sta0 up

logger "Realtek fix: Disabling wifi interfaces"
uci -q set wireless.@wifi-iface[1].disabled=1
uci -q set wireless.@wifi-iface[0].disabled=1
uci commit wireless
sleep 1
wifi reload
sleep 5

logger "Realtek fix: Enabling wifi interfaces"
uci -q set wireless.@wifi-iface[0].disabled=0
uci commit wireless
sleep 1
wifi reload
sleep 5
uci -q set wireless.@wifi-iface[1].disabled=0
uci commit wireless
sleep 1
wifi reload

logger "Realtek fix: done"

exit 0

⚪ Installing Smart Queue Management 

The issue is the following. When watching streaming videos, if I use another device to surf the internet (twitter, instagram, ...), the stream freezes for a while and/or degrade quality.
To try to solve thie issue, I installed SQM following that OpenWRT website page.

opkg update
opkg install luci-app-sqm

To maximize performance most modern devices will benefit from enabling under LuCI > Network > Interfaces > Global network options > Packet Steering (all CPUs).

Doing a speed test, i'm getting about DOWNLOAD 80+ Mbit/s UPLOAD 80+ Mbit/s (R5C WWAN is CLIENT Wifi ac, channel 149, width 80 MHz, country code US).

So I setup the SQM like this:

  • Network > SQM QoS > Basic settings
    • Interface name => chose the wifi client interface
    • Download speed (ingress) => 60000
    • Upload speed (egress) => 50000
  • Network > SQM QoS > Queue discipline
    • Queueing discipline => fq_codel
  • Network > SQM QoS > Link Layer Adaptation
    • Link layer => Ethernet with overhead: select for e.g. VDSL2.
    • Per Packet Overhead (bytes) => 34

⚪ Logging and checking temperatures, and much more

The case of the R5C feels hot when touching it. Checking temperatures one shot in commamd line:

# awk '{printf "%5.1f C \n", $1/1000}' /sys/class/thermal/thermal_zone*/temp
 48.9 C
 47.8 C
#

Then I wanted to log data. Found that webpage

# opkg update
# opkg install luci-app-statistics
# opkg install collectd-mod-ethstat collectd-mod-ipstatistics collectd-mod-irq collectd-mod-load collectd-mod-ping collectd-mod-powerdns collectd-mod-sqm collectd-mod-thermal collect
d-mod-wireless
# /etc/init.d/collectd enable

After installing the packages and rebooting rooter, a new menu appears in Statistics > Setup. 

⚪ Logging Network usage

Ultimatly my router will be getting internet from 4G usb device. I wanna know how much internet I consume currently to understand later what monthly plan I should chose.
Reading that reddit thread I then follow this webpage.

# opkg update
# opkg install luci-app-vnstat2

Check your WAN connection you wana monitor (chose correct alias in bold):

# . /lib/functions/network.sh; network_get_device if_wan wwan; echo "Your WAN Interface is: $if_wan"
Your WAN Interface is: phy0-sta0
#

You need to determine the max bandwidth of your connection in Mbit. IA told me 

Pour trouver la vitesse maximale (capacité théorique) de votre carte Wi-Fi AC afin de configurer vnStat, vous devez identifier son Link Speed (vitesse de liaison). Contrairement à l'Ethernet, cette vitesse varie selon la distance et les obstacles, mais vous pouvez trouver le maximum que votre matériel supporte actuellement.
Pourquoi c'est important pour vnStat ? Le Wi-Fi AC (802.11ac) peut théoriquement atteindre 1300 Mbps ou plus, mais en pratique, votre lien peut être à 433 ou 867 Mbps. Si vous réglez MaxBandwidth trop bas dans vnstat.conf, vnStat ignorera le trafic dépassant cette limite. Conseil : Pour une carte Wi-Fi AC, réglez MaxBandwidth à 1300 ou 2000 pour être sûr de ne rien rater, même si votre connexion internet est plus lente.

So 1000 will be fine since I limited the link using SQM at about 60 Mbit.

# nano /etc/vnstat.conf

I set it like this:

# default interface (leave empty for automatic selection)
;Interface "phy0-sta0"

# maximum bandwidth (Mbit) for all interfaces, 0 = disable feature
# (unless interface specific limit is given)
;MaxBandwidth 1000

# how often (in seconds) interface data is updated
;UpdateInterval 300

Then:

# nano /etc/config/vnstat
config vnstat
        list interface          phy0-sta0

Creating the database:

# vnstat --add -i phy0-sta0
Adding interface "phy0-sta0" to database for monitoring.
vnStat daemon will automatically start monitoring "phy0-sta0" within 5 minutes if the daemon process is currently running.
#

Ran these commands to enable the daemon + auto start the daemon if you reboot your device:

# /etc/init.d/vnstat enable
# /etc/init.d/vnstat start

Then restarted the R5C and got a new luci menu: Status > Traffic Monitor

To make it persistent I used method 2. Just I had to mofify this:

  • Removed: "$(vnstat_option DatabaseDir)"
  • Replaced by: "/var/lib/vnstat"

It will backup on proper hot reboot (from luci interface by example) and every 12 hours (midnight and midday to prevent more or less decent data loss in case of sudden power loss). Crontab line:

0 */12 * * * /etc/init.d/vnstat_backup backup

 

⚪ Wireguard to be able to administrate router from outside

# opkg update
# opkg install wireguard-tools luci-proto-wireguard

Import peer configuration.

In Peers make sure Allowed IPs are local netwoek and wireguard network + ends by /24.

Add a Persistent Keep Alive to keep the router accessible any time (I did not because I am using ping in Statistics (luci-app-statistics). 

 

⚪ Expanding disk space 

BE CAREFUL: doing the following I lost vnstat2 data backup and script to backup data every 12h and at hot reboot of device.

There is an eMMC 64GB, but the available space after OpenWRT installation is of 98.33MiB. Fills tight as 35MiB are already used. Would like to expand it just in case. 

Before manipulation OpenWrt 24.10.2 is installed. 

# opkg update  &&  opkg install owut

Following:

  1. Expanding root partition and filesystem script not working - Installing and Using OpenWrt - OpenWrt Forum
  2. owut: OpenWrt Upgrade Tool

To avoid data loss, go to System > Backup/Flash firmware. Then in configuration tab add the extra files you need to save. In my case:

## This file contains files and directories that should
## be preserved during an upgrade.

# /etc/example.conf
# /etc/openvpn/

# added by pmd
/etc/init.d/vnstat_backup
/etc/vnstat_backup.tar.gz

Then I made a backup. System > Backup/Flash firmware. Click Generate archive. 

# owut upgrade

But it finishes with an error:

ERROR: Build failed with status 500 (--version-to 24.10.6 --device rockchip/armv8:friendlyarm_nanopi-r5c:ext4)
The above errors are often due to the upgrade server lagging behind the
build server, first suggestion is to wait a while and try again

The above not working I have specified same version destination:

# owut upgrade --version-to 24.10.2
ASU-Server https://sysupgrade.openwrt.org
Upstream https://downloads.openwrt.org
Target rockchip/armv8
Profile friendlyarm_nanopi-r5c
Package-arch aarch64_generic
Version-from 24.10.2 r28739-d9340319c6 (kernel 6.6.93)
Version-to 24.10.2 r28739-d9340319c6 (kernel 6.6.93)
48 packages are out-of-date
There are 0 missing and 1 modified default packages
Request hash:
05fbeb33d6a335cb7ab52baef274682b0722f6df465435b34f514940a50c5a2d
--
Status: queued - 0 ahead of you
Progress: 0s total = 0s in queue + 0s in build
--
Status: container_setup
Progress: 12s total = 0s in queue + 12s in build
--
Status: validate_manifest
Progress: 29s total = 0s in queue + 29s in build
--
Status: building_image
Progress: 77s total = 0s in queue + 77s in build
--
Status: done
Progress: 81s total = 0s in queue + 81s in build

Build succeeded in 81s total = 0s in queue + 81s to build:
Image saved : /tmp/firmware.bin
Installing /tmp/firmware.bin and rebooting...
#

After reboot:

# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root               990.7M     34.8M    939.9M   4% /
tmpfs                     1.9G      1.8M      1.9G   0% /tmp
tmpfs                   512.0K         0    512.0K   0% /dev

 

⚪ Installing and configuration of e3372h stick to get LTE WAN

# opkg update
# opkg install kmod-usb2 kmod-usb3 kmod-usb-net-huawei-cdc-ncm comgt-ncm kmod-usb-serial kmod-usb-serial-option kmod-usb-serial-wwan luci-proto-ncm usb-modeswitch kmod-usb-serial-ipw
# opkg install nano picocom curl
# reboot

Go to Network > Interfaces and create Add new interface... with following parameters:

General settings:
 | Protocol => NCM
 | Bring up on boot => YES
 | Modem device => /dev/cdc-wdm0
 | Network Mode => LTE
 | IP Protocol => IPv4
 | APN => mmsbouygtel.com
 | PAP/CHAP username => keep empty if not necessary
 | PAP/CHAP password => keep empty if not necessary
Firewall setting:
 |  Assign firewall-zone as => wan
Advanced setting:
 | Use default gateway=> YES (put NO if you are testing and don't want all network output through this interface

Save and apply and after this router should be connected to internet (check modem led not blinking anymore).

 

⚪ Avoir some logging 

Sun Apr 19 14:11:22 2026 daemon.warn dnsmasq[1]: possible DNS-rebind attack detected: dns.msftncsi.com
Sun Apr 19 14:11:22 2026 daemon.warn dnsmasq[64]: possible DNS-rebind attack detected: dns.msftncsi.com
Sun Apr 19 14:12:32 2026 daemon.warn dnsmasq[1]: possible DNS-rebind attack detected: dns.msftncsi.com
Sun Apr 19 14:13:44 2026 daemon.warn dnsmasq[1]: possible DNS-rebind attack detected: dns.msftncsi.com
Sun Apr 19 14:13:44 2026 daemon.warn dnsmasq[1]: possible DNS-rebind attack detected: dns.msftncsi.com
Sun Apr 19 14:13:44 2026 daemon.warn dnsmasq[65]: possible DNS-rebind attack detected: dns.msftncsi.com
Sun Apr 19 14:15:10 2026 daemon.warn dnsmasq[1]: possible DNS-rebind attack detected: dns.msftncsi.com
Sun Apr 19 14:15:13 2026 daemon.warn dnsmasq[1]: possible DNS-rebind attack detected: dns.msftncsi.com
Sun Apr 19 14:15:14 2026 daemon.warn dnsmasq[1]: possible DNS-rebind attack detected: dns.msftncsi.com

Trying this (source IA...):

# uci add_list dhcp.@dnsmasq[0].rebind_domain='dns.msftncsi.com'
# uci commit dhcp
# /etc/init.d/dnsmasq restart
udhcpc: started, v1.36.1
udhcpc: broadcasting discover
udhcpc: no lease, failing
#

 

⚪ Out of any of above subjects

Once evrything will be running well, possibly install dd-wrt on the WRL3500L (to have proper broadcom wifi driver) and configure as a switch + wifi AP:
https://wiki.dd-wrt.com/wiki/index.php/Wireless_Access_Point

Classified in : OpenWRT - Tags : none

Гимн Казахстана на домбре

Written by pmd - - no comments

Normal tuning of Dombra:

 

Very basic version

G|---3--2--3--5--5-----3--2--3--5--7--7-----8--8--7--8--8-----7--5--7--8-10-10----12-12-10-12-12----|
D|---0--0--0--0--0-----0--0--0--0--0--0-----0--0--0--0--0-----0--0--0--0--0--0-----0--0--0--0--0----|

G|--12-12-10-12-12----15-15-15-14-12--7----10-10-10--9--7--3-----2--0--2--3--0----|
D|---0--0--0--0--0-----0--0--0--0--0--0-----0--0--0--0--0--0-----0--0--0--0--0----|
Classified in : Guitare - Tags : none

Excel : changer les couleurs des courbes de tous les graphiques en meme temps

Written by pmd - - no comments

Voici une macro VBA qui va modifier tous les graphiques de la feuille active uniquement, en appliquant une couleur spécifique à chaque série (courbe) dans chaque graphique de la feuille active.

Code VBA à utiliser :

  • Appuie sur Alt + F11 pour ouvrir l’éditeur VBA.
  • Clique sur Insertion > Module.
  • Colle ce code :
Sub ColorerCourbesGraphiques()
    Dim ch As ChartObject
    Dim s As Series

    For Each ch In ActiveSheet.ChartObjects
        With ch.Chart
            If .SeriesCollection.Count >= 1 Then
               .SeriesCollection(1).Format.Line.ForeColor.RGB = RGB(128, 128, 128) ' Gris
            End If
            If .SeriesCollection.Count >= 2 Then
                .SeriesCollection(2).Format.Line.ForeColor.RGB = RGB(0, 112, 192) ' Bleu
            End If
            If .SeriesCollection.Count >= 3 Then
                .SeriesCollection(3).Format.Line.ForeColor.RGB = RGB(255, 0, 0) ' Rouge
            End If
        End With
    Next ch

    MsgBox "Couleurs mises à jour pour tous les graphiques de la feuille active."
End Sub
 

Important :

  • Cette macro ne modifie que les graphiques de la feuille active.
  • Si tu veux l’appliquer à une autre feuille, sélectionne-la avant d’exécuter la macro.
  • Tu peux ajuster les couleurs en modifiant les valeurs RGB.

 

Classified in : Office - Tags : none

OpenWRT on WNR3500L + E3272 in NCM

Written by pmd - - no comments

⚫ Installed OpenWRT on WNR3500L

login as: root
root@192.168.1.1's password:

BusyBox v1.35.0 (2023-04-27 20:28:15 UTC) built-in shell (ash)
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 22.03.5, r20134-5f15225c1e
 -----------------------------------------------------
root@OpenWrt:~#

[OpenWrt Wiki] NETGEAR WNR3500U/WNR3500L
I wanted to install 24.10.0 but it was impossible to connect to a wifi and install all necessary packets.
I installed 22.03.5.

⚫ Expected configuration

One OpenWRT router getting internet access through a 4G USB dongle using NCM connection (much faster than PPP).

⚫ Preparing

Update package list:

# opkg update

Install necessary packets to manage e3272 huawei 4g usb stick:

# opkg install kmod-usb2 kmod-usb3 kmod-usb-net-huawei-cdc-ncm comgt-ncm kmod-usb-serial kmod-usb-serial-option kmod-usb-serial-wwan luci-proto-ncm usb-modeswitch kmod-usb-serial-ipw

Install package to have wifi N available:

# opkg install kmod-brcmsmac

Install some tools for editing files and communicate with 4g usb stick:

# opkg install nano picocom

Activate USB port power supply:

# nvram set board_id=U12H136T99_NETGEAR
# nvram set boardflags=0x00000710
# nvram commit

Remove b43 wifi driver whci does not enable wifi N:

# opkg remove kmod-b43
# rm /etc/modules.d/b43 (probably unecessary)

Here switch OFF the router, and switch ON.

Router will be using brcmsmac wifi driver so you can use wifi N (WNR3500L v1 woking perfectly but wifi in Wireless-G only). 
For information there is another propriatory driver available which might have better performances but I didn't get it working (broadcom-wl). It takes too much space (I used this script to free the space when opkg couln't install fully)

Router is ready to be configured.

⚫ Configuration of e3272 stick

Disconnect from previously connected wifi.

See some information about the USB 4g stick e3272 here: OpenWRT on GL-AR750 + E3372 in NCM + receive SMS (2023) - pmd

Go to Network > Interfaces and create Add new interface... with following parameters:

General settings:
 | Protocol => NCM
 | Bring up on boot => YES
 | Modem device => /dev/cdc-wdm0
 | Network Mode => LTE
 | IP Protocol => IPv4
 | APN => mmsbouygtel.com
Firewall setting:
 |  Assign firewall-zone as => wan

Save and apply and after this router should be connected to internet (check modem led not blinking anymore).

For information this is how to discuss with modem with AT commands continuously or in one line for shell script:

root@OpenWrt:~# picocom -b 115200 /dev/ttyUSB1
picocom v3.1

port is        : /dev/ttyUSB1
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        :
omap is        :
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no

!! Settings mismatch !! Type [C-a] [C-v] to see actual port settings
Type [C-a] [C-h] to see available commands
Terminal ready
AT
OK
AT+CSQ
+CSQ: 11,99


OK

ERROR
AT^SETPORT?
^SETPORT:FF;10,12,16,A1,A2

OK
   <<<<<<<<<<<<<<<<<< here I did CTRL+A then CTRL+X
Terminating...
Thanks for using picocom
root@OpenWrt:~#

root@OpenWrt:~# echo -e "AT+CSQ\r" | picocom -b 115200 -q --exit-after 2000 /dev/ttyUSB1
AT+CSQ
+CSQ: 10,99

OK
root@OpenWrt:~#

⚫ Get APN in command line

root@OpenWrt:~# uci get network.wwan4g.apn
mmsbouygtel.com
root@OpenWrt:~#

⚫ Find best place for USB 4g stick

Once the modem is connected, you can use this file to monitor signal strength to find the best place for USB 4g stick.

root@OpenWrt:~# nano /root/csq_monitor2.sh
#!/bin/sh
DEVICE="/dev/ttyUSB1"  # update as necessary
if [ ! -e "$DEVICE" ]; then
  echo "Erreur : $DEVICE introuvable"
  exit 1
fi

echo "Lecture du signal AT+CSQ via $DEVICE (Ctrl+C pour arrêter)..."

while true; do
  # On lit toute la sortie de picocom
  RAW_OUTPUT=$(echo -e "AT+CSQ\r" | picocom -b 115200 -q --exit-after 2000 "$DEVICE" 2>/dev/null)

  # On filtre uniquement la ligne avec +CSQ
  RESPONSE=$(echo "$RAW_OUTPUT" | grep "+CSQ:" | tr -d '\r')

  if [ -n "$RESPONSE" ]; then
    VALUE=$(echo "$RESPONSE" | cut -d ':' -f2 | cut -d ',' -f1 | tr -d ' ')
    echo -n "$(date +%H:%M:%S) -> $VALUE"
    case "$VALUE" in
      [0-9])         QUAL="/31 (Très faible)" ;;
      1[0-4])        QUAL="/31 (Moyen)" ;;
      1[5-9])        QUAL="/31 (Bon)" ;;
      2[0-9]|3[0-1]) QUAL="/31 (Excellent)" ;;
      99)            QUAL="/31 (Inconnu)" ;;
      *)             QUAL=" (?)" ;;
    esac
    echo "$QUAL"
  else
    echo "$(date +%H:%M:%S) -> Pas de réponse"
    sleep 1
  fi

  #sleep 1
done
root@OpenWrt:~# chmod +x /root/csq_monitor2.sh
root@OpenWrt:~# /root/csq_monitor2.sh
Lecture du signal AT+CSQ via /dev/ttyUSB1 (Ctrl+C pour arrêter)...
12:26:32 -> 30/31 (Excellent)
12:26:35 -> 29/31 (Excellent)
12:26:37 -> 29/31 (Excellent)
12:26:39 -> 28/31 (Excellent)
12:26:42 -> 31/31 (Excellent)
12:26:44 -> 28/31 (Excellent)
12:26:47 -> 29/31 (Excellent)
^CTerminated
root@OpenWrt:~#

 

⚫ Fix modem disconnection automatically 

Inspiration scripts from here: https://openwrt.org/docs/guide-user/network/wan/wwan/ethernetoverusb_ncm

Create a shell script that will ping an adress every minute to check connectivity status:

# nano /root/connectivityCheck.sh
----------
#!/bin/sh

# Enter the FQDNs you want to check with ping (space separated)
# Script does nothing if any tries to any FQDN succeeds
FQDN="www.google.com"
FQDN="$FQDN www.amd.com"
FQDN="$FQDN www.juniper.net"

# Sleep between ping checks of a FQDN (seconds between pings)
SLEEP=3                         # Sleep time between each retry
RETRY=3                         # Retry each FQDN $RETRY times
SLEEP_MAIN=60                   # Main loop sleep time
SLEEP_RESTSTART_NETWORK=240     # Waiting time before retrying after an interface reset

check_connection()
{
  for NAME in $FQDN; do
    for i in $(seq 1 $RETRY); do
      ping -c 1 $NAME > /dev/null 2>&1
      if [ $? -eq 0 ]; then
        #echo "ping $NAME OK"
        #echo "ping $NAME OK" | logger -t "connectivityCheck.sh[$$]" -p info
        return 0
      fi
      #echo "ping $NAME NOK"
      echo "ping $NAME NOK" | logger -t "connectivityCheck.sh[$$]" -p info
      sleep $SLEEP
    done
  done
  # If we are here, it means all failed
  return 1
}

echo "Starting connectivityCheck.sh" | logger -t "connectivityCheck.sh[$$]" -p info

while true; do
  check_connection
  if [ $? -ne 0 ]; then
    echo "All ping for connectivity check failed... Trying reconnecting..." | logger -t "connectivityCheck.sh[$$]" -p info
    /etc/init.d/ncm-network start
    sleep $SLEEP_RESTSTART_NETWORK
  else
    sleep $SLEEP_MAIN
  fi
done

As you see, above script will be calling /etc/init.d/ncm-network if connectivity is lost.
Let's create it:

# nano /etc/init.d/ncm-network
----------
#!/bin/sh /etc/rc.common

# Interface to send AT commands
DEVICE='/dev/ttyUSB1'
# Interface name from /etc/config/network
IFNAME='wwan4g'
# Your APN:
APN=$(uci get network.wwan4g.apn)

START=70
STOP=90

start() {
        if [ -e ${DEVICE} ]; then
                #/etc/init.d/smstools3 stop
                ifdown $IFNAME
                sleep 3
                echo -n "1-1" > /sys/bus/usb/drivers/usb/unbind
                sleep 3 # waiting for USB disconnection
                echo -n "1-1" > /sys/bus/usb/drivers/usb/bind
                sleep 10 # waiting for USB connection
                echo -ne "AT^NDISDUP=1,0\r\n" > ${DEVICE}
                echo "AT^NDISDUP=1,0 > ${DEVICE}" | logger -t "ncm-network[$$]" -p info
                sleep 3 # wait for disconnect
                echo -ne "AT+CGATT=0\r\n" > ${DEVICE}
                echo "AT+CGATT=0 > ${DEVICE}" | logger -t "ncm-network[$$]" -p info
                sleep 3 # wait for detach from network
                echo -ne "AT+CFUN=0\r\n" > ${DEVICE}
                echo "AT+CFUN=0 > ${DEVICE}" | logger -t "ncm-network[$$]" -p info
                sleep 10 # wait for activate plane mode
                echo -ne "AT+CFUN=1\r\n" > ${DEVICE}
                echo "AT+CFUN=1 > ${DEVICE}" | logger -t "ncm-network[$$]" -p info
                sleep 10 # wait for deactivate plane mode (activate radio)
                #echo -ne "AT^NDISDUP=1,1,\"${APN}\"\r\n" > ${DEVICE}
                #echo "AT^NDISDUP=1,1,\"${APN}\" > ${DEVICE}" | logger -t "ncm-network[$$]" -p info
                #sleep 3 # wait for connect
                ifup $IFNAME
                echo "/etc/init.d/ncm-network start ${DEVICE} executed" | logger -t "ncm-network[$$]" -p info
                #sleep 45
                #/etc/init.d/smstools3 start
        else
                echo "No such device ${DEVICE}" | logger -t "ncm-network[$$]" -p info
        fi
}

stop() {
        if [ -e ${DEVICE} ]; then
                #/etc/init.d/smstools3 stop
                ifdown $IFNAME
                sleep 3
                echo -ne "AT^NDISDUP=1,0\r\n" > ${DEVICE}
                echo "AT^NDISDUP=1,0 > ${DEVICE}" | logger -t "ncm-network[$$]" -p info
                echo "/etc/init.d/ncm-network stop ${DEVICE} executed" | logger -t "ncm-network[$$]" -p info
        else
                echo "No such device ${DEVICE}" | logger -t "ncm-network[$$]" -p info
        fi
}

Above script will be restarting the network if connectivity loss is confirmed by /root/connectivityCheck.sh.

To have /root/connectivityCheck.sh monitoring connectivity status, you need to start it at rooter startup. In luci interface, go to System > Startup > Local startup and add this lines before exit 0:

sleep 180 # waiting for router to be started for sure
/root/connectivityCheck.sh &

exit 0

⚫ Identify Wi-Fi connection as metered automatically

Identify Wi-Fi connection as metered on Android automatically
Extract from /etc/config/dhcp:

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option leasetime '12h'
        option dhcpv4 'server'
        list dhcp_option '43,ANDROID_METERED'


Identify Wi-Fi connection as metered on Windows automatically (see next link to have it working on Windows AND iOS)
Identify Wi-Fi connection as metered on Windows and iOS automatically (see section Mimicking an iOS hotspot)
Extract from /etc/config/wireless (so you need to apply it on all wifi Access Point):

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'bcm47xx_soc/bcma0:1'
        option band '2g'
        option cell_density '0'
        option htmode 'HT20'
        option channel '11'
        option legacy_rates '1'
        option txpower '19'
        list hostapd_options 'vendor_elements=DD0A0017F206010103010000'

 

⚫ BONUS

Connecteur RJ45 catégorie 6 pour Grade 3 + support modulaire TN002S
Connectiques et Modules de brassage

Support RJ45 Ethernet Keystone pour rail DIN Hutschiene
DELOCK 86141

DIN rail frame for Keystone
Alternative?
CAT7 RJ45 Keystone Shielded Slot FTP Zinc Alloy Module Connector LAN Network Insert Tool-Free Coupler For 10GB Internet Plug

Meubles

Written by pmd - - no comments

Meuble d'entrée

10 planches + pieds ou base de meuble non précisée ici :

    Largeur (cm) Hauteur (cm) Profondeur (cm)
le porte chapeau 105 1.5 30
l'assise 105 1.5 43.5
2x triangle 1.5 30 30
3x support assise 1.5 31.5 41.5
contre mur 105 220 1.5
bas meuble 105 1.5 43
porte 105 33 1.7


Classified in : DIY - Tags : none

Travaux appartement

Written by pmd - - no comments

Quelques réparations Janvier 2025

Porte de la chambre :

Le montant de la porte, du côté charnière, était chancelant. La porte ne fermait plus. Manifestement l'artisant n'a pas mis beaucoup de mousse...

Achat/utilisation de quelques outils et consommables:
Visseuse perceuse Bosh ☑️
Meche bois 8☑️
Perceuse à percussion☑️
Longue meche beton 8☑️
Longues vis + chevilles☑️
Fraise conique pour pourvoir cacher la vis☑️
Mousse pour porte? ❌ car les vis ont été préférées.
Colle a bois☑️
Platre ☑️
Peinture blanche ☑️
Pinceau ☑️

Renforcement avec une grosse vis de 8x120mm au niveau de chaque charnière. Ensuite comblage au platre, ponçage, peinture. Collage des caches côté chambre.

 

Armoire de la chambre :

La porte de gauche ne ferme plus. Les charnières des portes de gauche et centrale sont tordues.

Achat/utilisation de quelques outils et consommables:
Visseuse perceuse Bosh ☑️
Meche bois 5 ☑️
6x charnières extra grande ouverture ☑️

Réalisation d'un maquette pour créer un chablon (pas de photo) afin de savoir ou percer.

 

Radiateur :

Bizarre le radiateur est très sale comme s'il venait d'un chantier. Trace d'enduit dans les ailettes... Il y a une fuite en plein milieu entre deux éléments.

Achat/utilisation de quelques outils et consommables:
Ne pas oublier clé 6 pans pour fermer le T de réglage ☑️
Tournevis plat pour dépressuriser le radiateur ☑️
Chiffons + Papier de verre + Loctite 7235 ☑️
Fluorosilicone 16x1cm et 20x1cm ☑️
2x colliers de serrage métallique >16cm ☑️
Холодная сварка si la technique avec fluorosilicone ne fonctionne pas ☑️ non utilisé

Technique du sac plastique pour devier la fuite en attandant de réparer.
Circulation d'eau coupée aux deux té puis dépressurisation.
Nettoyage au tournevis pour enlever le plus gros.
Puis nettoyage avec une chaussette sèche, puis imbibée de Loctite 7235.
Installation du fluorosilicone puis serrage avec le collier métallique.
Remise en service.

 

Porte entrée :

On peut normallement fermer la porte depuis l'exterieur. Mais impossible de fermer à clé depuis l'interieur. Et le loquet une fois fermé est parfois très dur à ouvrir donc... enfermé à l'intérieur.

Achat/utilisation de quelques outils et consommables:
Huile pour le loquet ☑️

Le loquet a été sorti de la porte. Le mécanisme a été nettoyé et huilé. Nikel.
Les caches serrures ont été retirés et réajustés.

 

Salle de bain :

Achat/utilisation de quelques outils et consommables:
Vis pour tiroir ☑️

La planche du tiroir ne tenait plus très bien. Scotch double face retiré puis refixée avec 5 vis.
Nettoyage de la vitre de douche avec mélange grand-mère.
Le tuyau d'évacuation d'eau de la machine à laver fuyait. Le tuyau d'évacuation a été enfoncé plus profondément.
Ajustement chasse d'eau car il fallait maintenir le bonton appuyé pour faire couler l'eau. Deux petites pièces orange ont été retirées qui empechait d'enfoncer suffisamment le bouton pour déclencher et automaintenir la chasse d'eau.

Classified in : DIY - Tags : none

Updating RAM on 8530w laptop

Written by pmd - - no comments

Solved: add memory - HP Support Community - 5788315
=> 2x4GB maximum

HP EliteBook 8530w RAM Replacement - Tutoriel de réparation iFixit

Memoria Ram DDR2 2GB 4GB PC2-6400S 800MHz PC2-5300S 667MHZ 200PIN 1.8V Non-ECC SO-DIMM Desktop Laptop Memory CL5 Dual Channel | AliExpress
Memoria Ram DDR2 2GB 4GB PC2-6400S 800MHz PC2-5300S 667MHZ 200PIN 1.8V Non-ECC SO-DIMM Desktop Laptop Memory CL5 Dual Channel | AliExpress
=> Bought 2x4GB PC2-6400 800MHz SODIMM for about 37 USD.
=> Will update from 2x2GB to 2x4GB when mounted.

But the improvement from 4GB to 8GB is actually disapointing. Not a big step to a faster laptop like the SSD was.

10 minutes options trading and ETF investing

Written by pmd - - no comments

10-Minute Options Trading and ETF Investing: Rapidly Build Wealth, Retire Early, and Live Free from the Worry of Market Crashes
Written by TRAVIS WILKERSON.

Knowing about options likely help reading this book. At least it will greatly help to put the presented strategy into action.

See previous books I read to learn about options:

  1. Get Rich with Options: Four Winning Strategies Straight from the Exchange Floor
  2. Create Your Own Hedge Fund: Increase Profits and Reduce Risk with ETFs and Options

He is presented two ways to manage a portfolio. One way to reach a 6-figures account (using ETF + LEAP option CALL), and a way to keep account growing in a slower way but taking emotions into account (using ETF + LEAP option CALL + LEAP option PUT).

Buy-and-Old is a very good startegy but there is a way to enhance it safely enough.

Travis tells to start the portfolio at any day of the year then to balance the portfolio every January.

He is using LEAP options (Long-term Equity Anticipation Securities (LEAPS) are a type of stock or index option with notably longer expiration dates as compared to standard options) expiring in December.

🔵 Managing the portfolio up to 100k

He is using SPY ETF + buying At The Money CALL option (to boost profit... in a bull market ⚠).

The allocation is the following :

  • 80% to buy SPY
  • 20% to buy SPY CALL ATM

As of today 12/09/2024 :

  • The furthest available SPY option is at expiration 18/12/2026.
  • CALL at 555 strike cost 74.65 USD so one CALL would cost 7465 USD.
    • 20% of the portfolio is 10000 x 0.2 = 2000 USD
    • SPY seems too big to trade options for a small account.
    • An account of 37325 USD would buy 1 CALL.
  • SPY is trading at 555.29 USD => (37325 - 7465) / 555.29 = 53.8 shares to buy.

To be review in January 2025...

🔵 Managing the portfolio above 100k

To become richer up to 100k, you could invest agressively. But to stay rich you need to invest conservatively. 

He is using SPY ETF + buying At The Money CALL option (to boost profit... in a bull market ⚠) + buying At The Money PUT option (as an insurance against losses and emotions).

Here is what you buy when you follow the enhanced buy & hold blueprint:

  1. SPY broad-based index fund in buy-and-old mode for safe and stable returns
  2. PUT option as an insurance against the stock market
  3. CALL option to pay for the PUT and to boost the returns

How you allocate?

One options controls 100 shares. So you would buy:

  • 1 PUT and 1 CALL if you own between 0 and 150 shares of SPY
  • 2 PUT and 2 CALL if you own between 151 and 250 shares of SPY
  • 3 PUT and 3 CALL if you own between 251 and 350 shares of SPY
  • etc...

As of today 12/09/2024 :

  • The furthest available SPY option is at expiration 18/12/2026.
  • CALL at 555 strike cost 74.65 USD so one CALL would cost 7465 USD.
  • PUT at 555 strike cost 44.75 USD so one PUT would cost 4475 USD.
    • 7465 + 4475 = 11940 USD
  • SPY is trading at 555.29 USD => (100000 - 11940) / 555.29 = 158.6 shares to own.

158 shares of SPY makes it 87735 USD or 87.7% of the portfolio.
1 PUT + 1 CALL makes it 11940 USD or 11.9 % of the portfolio.
The remaining money (324.18 USD) stay in cash (or less to pay the trading fees 😉).

To be review in January 2025...

 

Edit 25/11/2024:
P/L => (10859-7465)+(2927-4475)+158*(595.51-555.29) = +8200.76 USD

Edit 18/01/2025:
P/L => ((101.72-74.65)+(30.10-44.75))*100+(597.58-555.29)*158 = + 7923.82 USD
Value after selling put and call => ((101.72)+(30.10))*100+(597.58)*158 = +107599.64 USD + 324.18 USD

As of today 18/01/2025 :

  • The furthest available SPY option is at expiration 17/12/2027.
  • CALL at 595 strike cost 106.66 USD so one CALL would cost 10666 USD.
  • PUT at 595 strike cost 50.0 USD so one PUT would cost 5000 USD.
    • 10666 + 5000 = 15666 USD
  • SPY is trading at 597.58 USD => (107923.82 - 15666) / 597.58 = 154.4 shares to own.
  • Owned SPY shares : 158
  • Instead of selling shares I bring equivalent of 4 shares in cash : 4 x 597.58 => 2400 USD
  • Remaining Cash 230.50 USD

 

Edit 13/01/2026:
P/L => ((160.00-106.66)+(29.39-50.00))*100+(693.77-597.58)*158 = + 18471.02 USD versus 18/01/2025
Value after selling put and call => ((160)+(29.39))*100+(693.77)*158 = +128554.66 USD + 230.50 USD

As of today 13/01/2026 :

  • The furthest available SPY option is at expiration 20/01/2028.
  • CALL at 690 strike cost 94.45 USD so one CALL would cost 9445 USD.
  • PUT at 690 strike cost 55.11 USD so one PUT would cost 5511 USD.
    • 9445 + 5511 = 14956 USD
  • SPY is trading at 693.77 USD => (128785.16 - 14956 ) / 693.77 = 164.07 shares to own.
  • Owned SPY shares : 158
  • No need to bring cash, need to only buy 6 more shares
  • Remaining Cash (0.07 SPY share) => 50.88 USD

 

Classified in : Options - Tags : none
Rss feed of the articles