Project “W I R E L E S S F R E E D O M”

I use TELE2 4G/LTE internet connection at home, 4G Sim Only subscription € 25/ month…They call it Unlimited Data & Call / SMS (Call bundle is valid throughout the EU).

I do not use calls at all, but sms feature might be useful :) Why? Because in real it is not Unlimited Data…they give you 5gb data for 24 hours & then you need to extend traffic by sending sms to 1280 with text ‘NOG 1gb’ after that you get 1GB traffic etcetera…

At the beginning I used Wi-Fi hotspot on ZTE Axon Pro (A1P), but after couple days of usage, phone started to overheat & Wi-Fi signal gain was weak…

I decided to make my live easier by automating this traffic limit issue!

First of all it was necessary to find proper tools for 4G LTE Router scenario:

  1. LTE USB modem [witch should be compatible with Tele2 LTE FDD network.]
  2. Router [which should be flexible & mobile & support OpenWRT ]

My choice fell to:

ZTE MF821 100Mbps 4G FDD 1800/2100/2600MHz USB Modem Wireless Dongle

TP-Link MR3020 CPU Speed 400mhz/4meg of flash memory/32meg of RAM

These Team Did real great job! They created image based on currently latest openwrt image (Chaos Calmer)

http://ofmodemsandmen.com/

I do not describe OpenWrt installation process it is all described at tutorials:

http://ofmodemsandmen.com/tutorials.html

 

Tele2 LTE APN configuration:

System Information:

Network status:

SMS Messaging:

shell script to automate SMS sending (/www/nog.sh):

 

https://wiki.openwrt.org/doc/howto/sms-from-shell

 

Loop script to send SMS after 3 ping loss and useful commands:

root@LTE:/www# cat ./ip.sh 
while true; do
ping -c 3 8.8.8.8 | grep "0 packets received" > /dev/null && /www/nog.sh || echo Ping OK : $(date)
done
root@LTE:/www# 
root@LTE:/www# uqmi -d /dev/cdc-wdm0 --get-data-status
"connected"
root@LTE:/www# uqmi -d /dev/cdc-wdm0 --get-signal-info
{
 "type": "lte",
 "rssi": -82,
 "rsrq": -5,
 "rsrp": -111,
 "snr": 94
}
root@LTE:/www# uname -a
Linux LTE 3.18.23 #17 Sun Oct 1 18:09:51 PDT 2017 mips GNU/Linux
root@LTE:/www# date
Sun Oct 22 16:34:42 GMT 2017

gus@belomor.nl

https://www.tele2.nl/wp-content/uploads/2017/10/rolschaatsmeisje.gif

Measuring random IOPS with FIO – linux benchmark

cd /root
yum install -y make gcc libaio-devel || ( apt-get update && apt-get install -y make gcc libaio-dev </dev/null )
wget https://github.com/Crowd9/Benchmark/raw/master/fio-2.0.9.tar.gz ; tar xf fio*
cd fio*
make

[root@fio-2.0.9]# ./fio –randrepeat=1 –ioengine=libaio –direct=1 –gtod_reduce=1 –name=test2iops –filename=test2iops –bs=4k –iodepth=64 –size=4G –readwrite=randrw –rwmixread=75
test2iops: (g=0): rw=randrw, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=64
fio-2.0.9
Starting 1 process
test2iops: Laying out IO file(s) (1 file(s) / 4096MB)
Jobs: 1 (f=1): [m] [100.0% done] [4348K/1476K /s] [1087 /369 iops] [eta 00m:00s]
test2iops: (groupid=0, jobs=1): err= 0: pid=57379: Thu Oct 12 13:04:27 2017
read : io=3072.8MB, bw=3025.3KB/s, iops=756 , runt=1040084msec
write: io=1023.3MB, bw=1007.5KB/s, iops=251 , runt=1040084msec
cpu : usr=0.90%, sys=3.68%, ctx=1008614, majf=0, minf=2387
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.1%, 32=0.1%, >=64=100.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.1%, >=64=0.0%
issued : total=r=786622/w=261954/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
READ: io=3072.8MB, aggrb=3025KB/s, minb=3025KB/s, maxb=3025KB/s, mint=1040084msec, maxt=1040084msec
WRITE: io=1023.3MB, aggrb=1007KB/s, minb=1007KB/s, maxb=1007KB/s, mint=1040084msec, maxt=1040084msec

Disk stats (read/write):
dm-0: ios=786537/262034, merge=0/0, ticks=45719249/20810401, in_queue=66539178, util=100.00%, aggrios=786245/263118, aggrmerge=403/197, aggrticks=45722437/21592380, aggrin_queue=67313915, aggrutil=100.00%
sda: ios=786245/263118, merge=403/197, ticks=45722437/21592380, in_queue=67313915, util=100.00%
[root@fio-2.0.9]#

 

Links:

https://www.binarylane.com.au/support/solutions/articles/1000055889-how-to-benchmark-disk-i-o

https://www.thomas-krenn.com/en/wiki/Linux_I/O_Performance_Tests_using_dd

centos 7.3 – change kernel boot (EFI)

centos 7.3 – change kernel boot

Kernel panic at restart after so update kernel  3.10.0-693.2.2.el7.x86_64.

 

Very bad :(


[root@host ~]# awk -F\’ ‘$1==”menuentry ” {print $2}’ /etc/grub2-efi.cfg
CentOS Linux (3.10.0-693.2.2.el7.x86_64) 7 (Core)
CentOS Linux (3.10.0-514.26.2.el7.x86_64) 7 (Core)
CentOS Linux (3.10.0-514.21.1.el7.x86_64) 7 (Core)
CentOS Linux (3.10.0-514.el7.x86_64) 7 (Core)
CentOS Linux (0-rescue-0e327c42023a4efa9afc617730b4d6f2) 7 (Core)
[root@host ~]#

 

[root@host ~]# grub2-set-default 1

 

[root@host ~]# cat /boot/grub2/grubenv
# GRUB Environment Block
saved_entry=1
#########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################

[root@host ~]#

 

[root@host ~]# grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg

 

https://access.redhat.com/solutions/1605183

How to Change Default Kernel in CentOS 7

CentOS / RHEL 7 : Change default kernel (boot with old kernel)