OpenWRT and Running: Difference between pages

From Smithnet Wiki
(Difference between pages)
Jump to navigation Jump to search
 
 
Line 1: Line 1:
== Regulatory Domains ==
== Distances ==


iw reg set GB
See [https://www.calculator.net/pace-calculator.html Pace Calculator].
iw reg get


Regulatory domains defined in:
=== 5k ===
/lib/firmware/regulatory.db


* [https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git Regulatory Database Github]
{| class="wikitable"
!Date
!Location
!Time
!Pace (min/km)


See [https://openwrt.org/docs/guide-user/network/wifi/wifi_countrycode here] for explanation of format.
|-
|2023-08-26||South Norwood||20:15||4:03
|-
|2023-08-12||Swansea Bay||19:27||3:53


To build:
|}
* Install: python-m2crypro
* Edit db.txt as required
* python db2bin.py regulatory.db db.txt


== Channels ==
Target: 20:00 (4:00 min/km)


Taken from output of:
=== Half (21.1 km) ===
iw list


=== 2.4 GHz ===
{| class="wikitable"
!Date
!Location
!Time
!Pace (min/km)


CA
|-
* '''2412 MHz [1] (30.0 dBm)'''
|2023-09-03||London Big Half||1:36:57||4:36
* 2417 MHz [2] (30.0 dBm)
* 2422 MHz [3] (30.0 dBm)
* 2427 MHz [4] (30.0 dBm)
* 2432 MHz [5] (30.0 dBm)
* 2437 MHz [6] (30.0 dBm)
* 2442 MHz [7] (30.0 dBm)
* 2447 MHz [8] (30.0 dBm)
* 2452 MHz [9] (30.0 dBm)
* 2457 MHz [10] (30.0 dBm)
* 2462 MHz [11] (30.0 dBm)
* 2467 MHz [12] (disabled)
* 2472 MHz [13] (disabled)
* 2484 MHz [14] (disabled)


IN, SA
|}
* 2412 MHz [1] (20.0 dBm)
* 2417 MHz [2] (20.0 dBm)
* 2422 MHz [3] (20.0 dBm)
* 2427 MHz [4] (20.0 dBm)
* 2432 MHz [5] (20.0 dBm)
* 2437 MHz [6] (20.0 dBm)
* 2442 MHz [7] (20.0 dBm)
* 2447 MHz [8] (20.0 dBm)
* 2452 MHz [9] (20.0 dBm)
* 2457 MHz [10] (20.0 dBm)
* 2462 MHz [11] (20.0 dBm)
* 2467 MHz [12] (20.0 dBm)
* 2472 MHz [13] (20.0 dBm)
* 2484 MHz [14] (disabled)


TW
Target: 1:30:00 (4:16 min/km)
* 2412 MHz [1] (24.0 dBm)
* 2417 MHz [2] (24.0 dBm)
* 2422 MHz [3] (24.0 dBm)
* 2427 MHz [4] (24.0 dBm)
* 2432 MHz [5] (24.0 dBm)
* 2437 MHz [6] (24.0 dBm)
* 2442 MHz [7] (24.0 dBm)
* 2447 MHz [8] (24.0 dBm)
* 2452 MHz [9] (24.0 dBm)
* 2457 MHz [10] (24.0 dBm)
* 2462 MHz [11] (24.0 dBm)
* 2467 MHz [12] (disabled)
* 2472 MHz [13] (disabled)
* 2484 MHz [14] (disabled)


UK
=== Marathon (42.2 km) ===
* 2412 MHz [1] (20.0 dBm)
* 2417 MHz [2] (20.0 dBm)
* 2422 MHz [3] (20.0 dBm)
* 2427 MHz [4] (20.0 dBm)
* 2432 MHz [5] (20.0 dBm)
* 2437 MHz [6] (20.0 dBm)
* 2442 MHz [7] (20.0 dBm)
* 2447 MHz [8] (20.0 dBm)
* 2452 MHz [9] (20.0 dBm)
* 2457 MHz [10] (20.0 dBm)
* '''2462 MHz [11] (20.0 dBm)'''
* 2467 MHz [12] (20.0 dBm)
* 2472 MHz [13] (20.0 dBm)
* 2484 MHz [14] (disabled)


=== 5 GHz ===
{| class="wikitable"
!Date
!Location
!Time
!Pace (min/km)


CA
|-
* 5180 MHz [36] (23.0 dBm)
|2022-05-01||Milton Keynes||3:53:00||5:31
* 5200 MHz [40] (23.0 dBm)
|-
* 5220 MHz [44] (23.0 dBm)
|2023-05-01||Milton Keynes||3:34:04||5:04
* 5240 MHz [48] (23.0 dBm)
* 5260 MHz [52] (24.0 dBm) (radar detection)
* 5280 MHz [56] (24.0 dBm) (radar detection)
* 5300 MHz [60] (24.0 dBm) (radar detection)
* 5320 MHz [64] (24.0 dBm) (radar detection)
* 5500 MHz [100] (24.0 dBm) (radar detection)
* 5520 MHz [104] (24.0 dBm) (radar detection)
* 5540 MHz [108] (24.0 dBm) (radar detection)
* 5560 MHz [112] (24.0 dBm) (radar detection)
* 5580 MHz [116] (24.0 dBm) (radar detection)
* 5600 MHz [120] (disabled)
* 5620 MHz [124] (disabled)
* 5640 MHz [128] (disabled)
* 5660 MHz [132] (24.0 dBm) (radar detection)
* 5680 MHz [136] (24.0 dBm) (radar detection)
* 5700 MHz [140] (24.0 dBm) (radar detection)
* 5720 MHz [144] (24.0 dBm) (radar detection)
* 5745 MHz [149] (30.0 dBm)
* 5765 MHz [153] (30.0 dBm)
* 5785 MHz [157] (30.0 dBm)
* 5805 MHz [161] (30.0 dBm)
* 5825 MHz [165] (30.0 dBm)
* 5845 MHz [169] (disabled)
* 5865 MHz [173] (disabled)


IN
|}
* 5180 MHz [36] (30.0 dBm)
* 5200 MHz [40] (30.0 dBm)
* 5220 MHz [44] (30.0 dBm)
* 5240 MHz [48] (30.0 dBm)
* 5260 MHz [52] (24.0 dBm)
* 5280 MHz [56] (24.0 dBm)
* 5300 MHz [60] (24.0 dBm)
* 5320 MHz [64] (24.0 dBm)
* 5500 MHz [100] (24.0 dBm)
* 5520 MHz [104] (24.0 dBm)
* 5540 MHz [108] (24.0 dBm)
* 5560 MHz [112] (24.0 dBm)
* 5580 MHz [116] (24.0 dBm)
* 5600 MHz [120] (24.0 dBm)
* 5620 MHz [124] (24.0 dBm)
* 5640 MHz [128] (24.0 dBm)
* 5660 MHz [132] (24.0 dBm)
* 5680 MHz [136] (24.0 dBm)
* 5700 MHz [140] (24.0 dBm)
* 5720 MHz [144] (24.0 dBm)
* 5745 MHz [149] (30.0 dBm)
* 5765 MHz [153] (30.0 dBm)
* 5785 MHz [157] (30.0 dBm)
* 5805 MHz [161] (30.0 dBm)
* 5825 MHz [165] (30.0 dBm)
* 5845 MHz [169] (30.0 dBm)
* 5865 MHz [173] (30.0 dBm)


SA
Target: 3:30:00 (4:59 min/km)
* 5180 MHz [36] (20.0 dBm)
* 5200 MHz [40] (20.0 dBm)
* 5220 MHz [44] (20.0 dBm)
* 5240 MHz [48] (20.0 dBm)
* 5260 MHz [52] (20.0 dBm) (radar detection)
* 5280 MHz [56] (20.0 dBm) (radar detection)
* 5300 MHz [60] (20.0 dBm) (radar detection)
* 5320 MHz [64] (20.0 dBm) (radar detection)
* 5500 MHz [100] (27.0 dBm) (radar detection)
* 5520 MHz [104] (27.0 dBm) (radar detection)
* 5540 MHz [108] (27.0 dBm) (radar detection)
* 5560 MHz [112] (27.0 dBm) (radar detection)
* 5580 MHz [116] (27.0 dBm) (radar detection)
* 5600 MHz [120] (27.0 dBm) (radar detection)
* 5620 MHz [124] (27.0 dBm) (radar detection)
* 5640 MHz [128] (27.0 dBm) (radar detection)
* 5660 MHz [132] (27.0 dBm) (radar detection)
* 5680 MHz [136] (27.0 dBm) (radar detection)
* 5700 MHz [140] (27.0 dBm) (radar detection)
* 5720 MHz [144] (disabled)
* 5745 MHz [149] (disabled)
* 5765 MHz [153] (disabled)
* 5785 MHz [157] (disabled)
* 5805 MHz [161] (disabled)
* 5825 MHz [165] (disabled)
* 5845 MHz [169] (disabled)
* 5865 MHz [173] (disabled)


TW
== Training ==
* 5180 MHz [36] (23.0 dBm)
* 5200 MHz [40] (23.0 dBm)
* 5220 MHz [44] (23.0 dBm)
* 5240 MHz [48] (23.0 dBm)
* 5260 MHz [52] (23.0 dBm) (radar detection)
* 5280 MHz [56] (23.0 dBm) (radar detection)
* 5300 MHz [60] (23.0 dBm) (radar detection)
* 5320 MHz [64] (23.0 dBm) (radar detection)
* 5500 MHz [100] (23.0 dBm) (radar detection)
* 5520 MHz [104] (23.0 dBm) (radar detection)
* 5540 MHz [108] (23.0 dBm) (radar detection)
* 5560 MHz [112] (23.0 dBm) (radar detection)
* 5580 MHz [116] (23.0 dBm) (radar detection)
* 5600 MHz [120] (23.0 dBm) (radar detection)
* 5620 MHz [124] (23.0 dBm) (radar detection)
* 5640 MHz [128] (23.0 dBm) (radar detection)
* 5660 MHz [132] (23.0 dBm) (radar detection)
* 5680 MHz [136] (23.0 dBm) (radar detection)
* 5700 MHz [140] (23.0 dBm) (radar detection)
* 5720 MHz [144] (23.0 dBm) (radar detection)
* 5745 MHz [149] (30.0 dBm)
* 5765 MHz [153] (30.0 dBm)
* 5785 MHz [157] (30.0 dBm)
* 5805 MHz [161] (30.0 dBm)
* 5825 MHz [165] (30.0 dBm)
* 5845 MHz [169] (disabled)
* 5865 MHz [173] (disabled)


UK
{| class="wikitable"
* 5180 MHz [36] (23.0 dBm)
!Mon
* 5200 MHz [40] (23.0 dBm)
!Tue
* 5220 MHz [44] (23.0 dBm)
!Wed
* 5240 MHz [48] (23.0 dBm)
!Thu
* 5260 MHz [52] (20.0 dBm) (radar detection)
!Fri
* 5280 MHz [56] (20.0 dBm) (radar detection)
!Sat
* 5300 MHz [60] (20.0 dBm) (radar detection)
!Sun
* 5320 MHz [64] (20.0 dBm) (radar detection)
* 5500 MHz [100] (26.0 dBm) (radar detection)
* 5520 MHz [104] (26.0 dBm) (radar detection)
* 5540 MHz [108] (26.0 dBm) (radar detection)
* 5560 MHz [112] (26.0 dBm) (radar detection)
* 5580 MHz [116] (26.0 dBm) (radar detection)
* 5600 MHz [120] (26.0 dBm) (radar detection)
* 5620 MHz [124] (26.0 dBm) (radar detection)
* 5640 MHz [128] (26.0 dBm) (radar detection)
* 5660 MHz [132] (26.0 dBm) (radar detection)
* 5680 MHz [136] (26.0 dBm) (radar detection)
* 5700 MHz [140] (26.0 dBm) (radar detection)
* 5720 MHz [144] (26.0 dBm) (radar detection)
* 5745 MHz [149] (20.0 dBm) (radar detection)
* 5765 MHz [153] (20.0 dBm) (radar detection)
* 5785 MHz [157] (20.0 dBm) (radar detection)
* 5805 MHz [161] (20.0 dBm) (radar detection)
* 5825 MHz [165] (20.0 dBm) (radar detection)
* 5845 MHz [169] (20.0 dBm) (radar detection)
* 5865 MHz [173] (20.0 dBm) (radar detection)


ZA
|-
* 5180 MHz [36] (20.0 dBm)
|Recovery||Intervals||Easy/Marathon Pace||Easy/Progression||Rest||Parkrun ||Long Run
* 5200 MHz [40] (20.0 dBm)
|-
* 5220 MHz [44] (20.0 dBm)
|60+ min<br/>Easy 14 km with hill||60+ mins,<br/>Easy 14 km with hill<br/> with intervals of < 4 min/km||60+ min,<br/>5 min/km||60+ min,<br/>5 min/km||S & C Work||5 km race,<br/>easy run after||22 - 30 km
* 5240 MHz [48] (20.0 dBm)
* 5260 MHz [52] (20.0 dBm) (radar detection)
* 5280 MHz [56] (20.0 dBm) (radar detection)
* 5300 MHz [60] (20.0 dBm) (radar detection)
* 5320 MHz [64] (20.0 dBm) (radar detection)
* '''5500 MHz [100] (30.0 dBm)'''
* 5520 MHz [104] (30.0 dBm)
* 5540 MHz [108] (30.0 dBm)
* 5560 MHz [112] (30.0 dBm)
* '''5580 MHz [116] (30.0 dBm)'''
* 5600 MHz [120] (30.0 dBm)
* 5620 MHz [124] (30.0 dBm)
* 5640 MHz [128] (30.0 dBm)
* 5660 MHz [132] (30.0 dBm)
* 5680 MHz [136] (30.0 dBm)
* 5700 MHz [140] (30.0 dBm)
* 5720 MHz [144] (disabled)
* 5745 MHz [149] (disabled)
* 5765 MHz [153] (disabled)
* 5785 MHz [157] (disabled)
* 5805 MHz [161] (disabled)
* 5825 MHz [165] (disabled)
* 5845 MHz [169] (disabled)
* 5865 MHz [173] (disabled)


== Devices ==
|}


=== TP-Link Archer C2600 ===


* [https://openwrt.org/toh/tp-link/archer_c2600_v1 Device page]
S/C Excercises:
* 1.4 GHz CPU, 32 MiB flash, 512 MiB RAM
* Calf Raise
* Currently Installed: 22.03.5
* Bench Lunge
* Side Plank


=== TP-Link Archer C7 v4 ===
== Shoes ==


* [https://openwrt.org/toh/tp-link/archer_c7 Device page]
Current:
* 775 MHz CPU, 16 MiB flash, 128 MiB RAM
* ASICS Gel-Nimbus 24
* Currently Installed: 22.03.5
* ASICS NovaBlast 3


=== HooToo TripMate Nano (HT-TM02) ===
Consider:
 
* ASICS Get-Nimbus 25
* [https://openwrt.org/toh/hootoo/tripmate-nano Device page]
** £175 Runners Needed
* 360 MHz CPU, 8 MiB flash, 32 MiB RAM
** £175 ASICS online
* Currently Installed: 19.07.10
** Y19800 ASICS Japan
* Initial installation [https://forum.archive.openwrt.org/viewtopic.php?id=53014 here]
* ASICS Metaspeed Sky+
* Can remove kernel PPP packages
** £225 ASICS online
 
** Y27500 ASICS Japan
==== Mode on Startup ====
* Mizuno Wave Rebellion Pro
 
** £200 Runners Needed
Read status of buttons:
* Fuelcell Supercomp Pacer
 
** £170 Runners Needed
root@wifi-ht:~# cat /sys/kernel/debug/gpio
* Hoka Bondi X
  gpiochip0: GPIOs 0-21, parent: platform/10000600.gpio, 10000600.gpio:
** £180 Runners Needed
  gpio-7  (                    |ht-tm02:blue:wlan  ) out lo   
  gpio-10  (                    |reset              ) in  hi   
  gpio-12  (                    |ht-tm02:green:lan  ) out lo   
  gpio-14  (                    |modeswitch          ) in  lo   
root@wifi-ht:~#
 
For modeswitch, "lo" is Wired, "hi" is WiFi position.
 
Could also use [https://github.com/jefferyto/openwrt-slide-switch slide-switch] package. Biggest advantage of this is that it triggers at boot time, not just a switch change.
opkg install slide-switch
 
On startup On mode (button) change, copy files from /etc/config/config-wired or config-wireless to /etc/config with:
* etc/rc.d/S15config-mode -> /etc/config/config-mode
 
#!/bin/sh
#
# Set mode according to slide switch
#
CONFIG=/etc/config
state=$(grep modeswitch /sys/kernel/debug/gpio | sed 's/.*\(lo\|hi\).*/\1/')
case "$state" in
        lo)
                mode="wired"
                ;;
        hi)
                mode="wireless"
                ;;
        *)
                echo "unknown"
                return 1
                ;;
esac
message="Using config mode: $mode"
echo $message
logger $message
config="$CONFIG/config-$mode"
for file in $(ls $config)
do
        echo $file
        cp "$config/$file" $CONFIG
done
 
== Package Management ==
 
opkg update
opkg list
opkg list-installed
opkg install blah
opkg remove blah
 
== Reset ==
 
* Controlled by /etc/rc.button/reset
* Quick press of reset button reboots
* Failsafe (long press) forces network to:
** 192.168.1.1 / 255.255.255.0
** SSH open with root / no password
** "firstboot" command to revert to factory defaults
** Hard factory reset (to 192.168.1.1.): umount /overlay && jffs2reset && reboot now
** "mount_root" to mount root partition
 
== Configuration and Commands ==
 
=== Misc ===
 
* [https://busybox.net/downloads/BusyBox.html Busybox]
* [https://openwrt.org/docs/guide-user/base-system/uci UCI Configuration System]
* Show logging: logread -f
* wifi up
 
In /etc/config:
* wireless
* dhcp
* system
* network
* firewall
 
Custom startup scripts:
* /etc/rc.local
 
In /etc:
* sysupgrade.conf
 
=== DHCP ===
 
Custom options may be given per network, eg: for NTP:
* 42, 192.168.1.1
 
=== DNS ===
 
* resolv.conf symlinked to /tmp/resolv.conf which points to local dnsmasq service which delivers from its cache or via DNS servers pointed to by proxies resolv.conf.auto (DHCP client updated)
* See also [https://openwrt.org/docs/guide-user/base-system/dns_configuration here]
 
=== Wifi commands ===
 
iw phy0 info
iw reg get
iw reg set GB
 
See other [http://wireless.kernel.org/en/users/Documentation/iw#Scanning iw] commands and [http://git.kernel.org/cgit/linux/kernel/git/linville/wireless-regdb.git/tree/db.txt?id=HEAD Reg Database].
 
=== USB and File sharing ===
 
Add packages:
opkg install kmod-usb-core kmod-usb-storage usbutils block-mount luci-app-minidlna
 
Show device:
ls /dev/sd*
lsusb -t
 
Driver USB 1, 2, 3: uhci/ohci, ehci, xhci
 
Show device:
# block info /dev/sda1
/dev/sda1: UUID="9814-E49A" LABEL="2" VERSION="FAT16" TYPE="vfat"
 
Mount FAT32 USB stick:
/sbin/block mount
cd /mnt/sda1
 
See also [https://openwrt.org/docs/guide-user/storage/usb-drives here]
 
=== LEDs ===
 
* Panel LEDS: [https://openwrt.org/start?id=docs/guide-user/base-system/led_configuration LED Config]
* [https://openwrt.org/docs/techref/hardware/port.gpio GPIO]
 
=== Buttons ===
 
* Panel buttons: [https://openwrt.org/docs/guide-user/hardware/hardware.button Button Config].
 
procd interface:
 
root@hootoo:/etc/rc.button# ls
BTN_0    failsafe  power    reset    rfkill
root@hootoo:/etc/rc.button#
 
scripts need to be named according to the button name, like "BTN_0" or "wps" (see [https://openwrt.org/docs/guide-user/hardware/hardware.button here]). They receive values:
* $BUTTON: Name of button
* $ACTION: "pressed", "timeout" or "released". For released, script returns timeout seconds (for hold down).
* $SEEN: number of seconds
 
root@wifi-ht:/etc/rc.button# cat BTN_0
#!/bin/sh
logger "Button $BUTTON: $ACTION (Seen $SEEN)"
return 0
root@wifi-ht:/etc/rc.button#
 
==== C2600 ====
 
Has an additional "lights_toggle":
 
[ "${ACTION}" = "released" ] || exit 0
led="c2600:white:general"
device="wifinet3"
logger "Button $ACTION, will toggle Guest Wifi"
echo 1 > /sys/class/leds/$led/brightness
case $(uci get wireless.$device.disabled) in
    0)
        uci set wireless.$device.disabled=1
        logger "Wifi disabled"
    ;;
    1)
        uci set wireless.$device.disabled=0
        logger "Wifi enabled"
    ;;
esac
wifi reload
service network reload
sleep 1
echo 0 > /sys/class/leds/$led/brightness
return 0
 
=== 6in4 ===
 
Requires packages: 6in4 luci-proto-ipv6 and used tunnel from [https://tunnelbroker.net/ Hurricane Electric].
* Restart network
* In LUCI, edit wan6 and change protocol from DHCPv6 to RFC4213
* Set Remote IPv4 address (eg 74.82.46.6)
* Set Local IPv6 address
* Set IPv6 routed prefix (Routed /48)
* Dynamic tunnel
** Tunnel ID
** HE username/password
 
ping ipv6.google.com
 
Manual Config:
 
opkg install 6in4
 
uci set network.henet=interface
uci set network.henet.proto=6in4
uci set network.henet.peeraddr=[get IPv4 of HE gateway]
uci set network.henet.ip6addr='[IPv6 from HE]'
uci set network.henet.tunnelid=[HE tunnel ID]
uci set network.henet.username=[HE username]
uci set network.henet.password='[HE password]'
uci commit network
uci set firewall.@zone[1].network='wan henet'
uci commit firewall
ifup henet
/etc/init.d/firewall restart

Revision as of 16:43, 28 November 2023

Distances

See Pace Calculator.

5k

Date Location Time Pace (min/km)
2023-08-26 South Norwood 20:15 4:03
2023-08-12 Swansea Bay 19:27 3:53

Target: 20:00 (4:00 min/km)

Half (21.1 km)

Date Location Time Pace (min/km)
2023-09-03 London Big Half 1:36:57 4:36

Target: 1:30:00 (4:16 min/km)

Marathon (42.2 km)

Date Location Time Pace (min/km)
2022-05-01 Milton Keynes 3:53:00 5:31
2023-05-01 Milton Keynes 3:34:04 5:04

Target: 3:30:00 (4:59 min/km)

Training

Mon Tue Wed Thu Fri Sat Sun
Recovery Intervals Easy/Marathon Pace Easy/Progression Rest Parkrun Long Run
60+ min
Easy 14 km with hill
60+ mins,
Easy 14 km with hill
with intervals of < 4 min/km
60+ min,
5 min/km
60+ min,
5 min/km
S & C Work 5 km race,
easy run after
22 - 30 km


S/C Excercises:

  • Calf Raise
  • Bench Lunge
  • Side Plank

Shoes

Current:

  • ASICS Gel-Nimbus 24
  • ASICS NovaBlast 3

Consider:

  • ASICS Get-Nimbus 25
    • £175 Runners Needed
    • £175 ASICS online
    • Y19800 ASICS Japan
  • ASICS Metaspeed Sky+
    • £225 ASICS online
    • Y27500 ASICS Japan
  • Mizuno Wave Rebellion Pro
    • £200 Runners Needed
  • Fuelcell Supercomp Pacer
    • £170 Runners Needed
  • Hoka Bondi X
    • £180 Runners Needed