Skip to content

Commit 35f46fe

Browse files
committed
minor fixes
1 parent 15bfc93 commit 35f46fe

17 files changed

Lines changed: 352 additions & 279 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
*~
12
cache
23
dist
34
temp
45

56
node_modules/
7+
68
/docs/packages/**
79
!/docs/packages/index.md
810

docs/.vitepress/config.mts

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,13 @@ function sidebarGuide(): DefaultTheme.SidebarItem[] {
108108
link: '/guide/packages-selection',
109109
collapsed: true,
110110
items: [
111-
{ text: 'Build customization', link: '/guide/packages-selection' },
112111
{ text: 'Network Profiles', link: '/guide/network-profiles' }
113112
] },
114113
{ text: 'Build LibreMesh',
115-
link: '/build',
114+
link: '/build/',
116115
collapsed: true,
117116
items: [
118-
{ text: 'Build methods', link: '/build/' },
117+
// { text: 'Build methods', link: '/build/' },
119118
{ text: 'ImageBuilder', link: '/build/imagebuilder' },
120119
{ text: 'lime-sdk', link: '/build/lime-sdk' },
121120
{ text: 'Buildroot', link: '/build/buildroot'}
@@ -193,23 +192,26 @@ function sidebarReference(): DefaultTheme.SidebarItem[] {
193192
{ text: 'Configuration', link: 'configuration' },
194193
{ text: 'lime-config', link: 'lime-config' },
195194
{ text: 'Flavors', link: 'flavors' },
196-
{ text: 'Default protocols', items: [
197-
{ text: 'Batman-adv', link: 'network/protocols/batman-adv'},
198-
{ text: 'Babeld', link: 'network/protocols/babeld'},
195+
{ text: 'Default protocols',
196+
collapsed: true,
197+
items: [
198+
{ text: 'Batman-adv', link: 'protocols/batman-adv'},
199+
{ text: 'Babeld', link: 'protocols/babeld'},
199200
]},
200201
{ text: 'lime-files', items: [
201-
{ text: 'System options', link: 'system' },
202-
{ text: 'Network options', link: 'network/', items: [
203-
{ text: 'General options', link: 'network/#general-options'},
202+
{ text: 'System', link: 'system' },
203+
{ text: 'Network', link: 'network/', items: [
204+
{ text: 'General', link: 'network/#general-options'},
204205
{ text: 'DNS servers', link: 'network/#dns-servers'},
205206
{ text: 'Protocols list', link: 'network/protocols-list'},
206207
{ text: 'Protocols options', link: 'network/protocols-options'},
207-
{ text: 'Interface specific options', link: 'network/interface-specific'},
208+
{ text: 'Interface specific', link: 'network/interface-specific'},
208209
] },
209-
{ text: 'WiFi options', link: 'wifi', items: [
210-
{ text: 'General options', link: 'wifi'},
211-
{ text: 'Band specific options', link: 'wifi/band-specific'},
212-
{ text: 'Interface specific options', link: 'wifi/interface-specific'},
210+
{ text: 'WiFi', link: 'wifi/', items: [
211+
{ text: 'General', link: 'wifi/#general-options'},
212+
{ text: 'Modes', link: 'wifi/modes'},
213+
{ text: 'Band specific', link: 'wifi/band-specific'},
214+
{ text: 'Interface specific', link: 'wifi/interface-specific'},
213215
] },
214216
{ text: 'Generic UCI configs', link: 'generic_config' },
215217
{ text: 'Hardware detection',

docs/getting-started.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,18 @@ Refers the the page [`Build LibreMesh`](/build/) for instructions on how to buil
4242
Install the firmware on your device following the installation method reported in the [wiki of OpenWrt](https://openwrt.org)
4343
or, if not present, search the instruction in the **`git-commit` message** left from who added the support for that device model. See the [Table of Hardware](https://toh.openwrt.org).
4444

45-
https://openwrt.org/docs/guide-quick-start/factory_installation
46-
4745
::: tip NOTE
48-
It is strongly adviced to **install OpenWrt first**:
46+
If your device runs OEM firmware it is adviced to **install OpenWrt first**:
47+
:::
48+
4949
1. Download the latest `stable` firmware for your device from the [`OpenWrt Firmware Selector`](https://firmware-selector.openwrt.org).
50-
If your device runs OEM firmware use the `factory` for first time installation.
50+
Use the `factory` image for first time installation. See the OpenWrt wiki page [Factory Install: First Time Installation](https://openwrt.org/docs/guide-quick-start/factory_installation):
5151
2. Check that the OpenWrt device boot and function properly.
5252
Beware that OpenWrt by default doesn't turn on the Wi-Fi.
5353
Turn it on from `LuCi` from the menu `Network` / `Wireless`.
54-
3. Upgrade to LibreMesh:
54+
3. Upgrade to LibreMesh using a `sysupgrade` image:
5555
- upload the firmware via the web interface `LuCI` from the menu `System` / `Backup / Flash Firmware`.
5656
- or via ssh using the command `sysupgrade -n firmware.bin`
57-
:::
5857

5958

6059
## Connecting to the router

docs/guide/packages-selection.md

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
outline: deep
33
---
4-
54
<script setup>
65
import { data as openwrt } from '/openwrt.data.js'
76
</script>
@@ -18,7 +17,8 @@ It is **highly discouraged** to `upgrade` packages. Read the OpenWrt's [`Upgrade
1817
:::
1918

2019
::: warning ath9k warning
21-
Routers with Atheros radios and the `ath9k` driver have a known bug that cause them to become deaf, if you are using an OpenWrt older than 24.10.6 be sure to include the libremesh package `wifi-unstuck-wa`
20+
Routers with Atheros radios and the `ath9k` driver have a known bug that cause them to become deaf,
21+
if you are using an OpenWrt older than 24.10.6 be sure to include the libremesh package `wifi-unstuck-wa`
2222
:::
2323

2424
::: warning ath10k warning
@@ -69,26 +69,32 @@ Additionally these packages could be `excluded` in the firmware build:
6969

7070
:::
7171

72-
The same formatted as list
72+
The same list to use when building with Buildroot.
7373
::: code-group
7474

7575

7676
``` [{{ openwrt.stable_version }}]
77-
-dnsmasq
78-
-odhcpd-ipv6only
79-
-apk-mbedtls
80-
-ca-bundle
81-
-ppp
82-
-ppp-mod-pppoe
77+
cat << EOF >> .config
78+
CONFIG_PACKAGE_dnsmasq=m
79+
CONFIG_PACKAGE_odhcpd-ipv6only=m
80+
CONFIG_PACKAGE_apk-mbedtls=m
81+
CONFIG_PACKAGE_ca-bundle=m
82+
CONFIG_PACKAGE_ppp=m
83+
CONFIG_PACKAGE_ppp-mod-pppoe=m
84+
EOF
85+
make defconfig
8386
```
8487

8588
``` [{{ openwrt.oldstable_version }}]
86-
-dnsmasq
87-
-odhcpd-ipv6only
88-
-opkg
89-
-ca-bundle
90-
-ppp
91-
-ppp-mod-pppoe
89+
cat << EOF >> .config
90+
CONFIG_PACKAGE_dnsmasq=m
91+
CONFIG_PACKAGE_odhcpd-ipv6only=m
92+
CONFIG_PACKAGE_opkg=m
93+
CONFIG_PACKAGE_ca-bundle=m
94+
CONFIG_PACKAGE_ppp=m
95+
CONFIG_PACKAGE_ppp-mod-pppoe=m
96+
EOF
97+
make defconfig
9298
```
9399

94100
:::

docs/guide/upgrade.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,26 @@ In **production environments with multiple LibreMesh nodes** deployed, it is adv
88
:::
99

1010
Refers to the OpenWrt Wiki for details about the upgrade process:
11+
- [Sysupgrade](https://openwrt.org/docs/techref/sysupgrade)
1112
- [Upgrading OpenWrt firmware using LuCI and CLI](https://openwrt.org/docs/guide-user/installation/generic.sysupgrade)
1213
- [Preserving OpenWrt settings during firmware upgrade](https://openwrt.org/docs/guide-quick-start/admingui_sysupgrade_keepsettings)
1314

1415

16+
## Sysupgrade
17+
The default OpenWrt command `sysupgrade` preserve:
18+
- files defined in `/lib/upgrade/keep.d`
19+
- the list of `conffiles` (configuration files defined by certain packages) that has been changed:
20+
- See the whole list for `apk` with `cat /lib/apk/packages/*.conffiles`
21+
- See the whole list for `opkg` with `cat /usr/lib/opkg/info/*.conffiles`
22+
23+
Initial files are preserved in `/rom/` and changed files are created at `/overlay/upper/`.
24+
25+
```
26+
apk add diffutils
27+
diff /overlay/upper/etc/config/babeld /rom/etc/config/babeld
28+
```
29+
30+
1531
## Examples
1632

1733
### Upgrade to a new major OpenWrt release

docs/reference/configuration.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ The options contained in these files are merged and overwritten from the lowest
2424

2525
::: tip Interface specific options
2626
Interface specific options have to be included in `lime-node` or `lime-<MAC>`.
27-
If in `lime-community` they'll cause unpredictable behaviour.
2827
:::
2928

3029
### Parametrizable options

docs/reference/lime-config.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,22 @@ outline: deep
66
The command `lime-config` configures LibreMesh on top of OpenWrt.
77

88
## lime-files
9-
Merge them from the low level `lime-defaults` to top level `lime-node` to produce the complete configuration in `lime-autogen`
9+
These files are merged from the low level `lime-defaults` to top level `lime-node` to produce the complete configuration in `lime-autogen`.
1010

1111
## Modules
12-
Modules are configured in this order `hardware_detection`, `wireless`, `network`, `firewall`, `system`, `generic_config`
12+
Modules are configured in this order `hardware_detection`, `wireless`, `network`, `firewall`, `system`, `generic_config`.
1313

1414
### hardware_detection
1515
Loads all packages starting with `lime-hwd-*`
1616
`lime-hwd-openwrt-wan` configures the OpenWrt wan port as WAN. If disabled, or the package is not installed, the wan port is configured as LAN.
1717

1818
### wireless
1919
Scan the OpenWrt device to find existing radios.
20-
Produce the UCI configuration for each radio, loading configs from `lime-autogen` in the order: `wifi`, `2ghz`|`5ghz`, specific `radioN`
20+
Produce the UCI configuration for each radio, loading configs from `lime-autogen` in the order:
21+
- `config lime 'wifi'` (wifi general options)
22+
- `config lime '5ghz'` (band specific options)
23+
- `config lime '2ghz'` (band specific options)
24+
- `config radioN` (radio specific options)
2125

2226
### network
2327

@@ -103,28 +107,23 @@ config zone
103107
Set `hostname` and `root_password`
104108

105109
### generic_config
106-
Apply the sections `generic_uci_config`, `copy_asset` and `run_asset`
110+
Reads and execute the sections `generic_uci_config`, `copy_asset` and `run_asset`.
111+
Apply custom UCI configuration or copy/execute shell scripts.
112+
See the page [Generic Config](generic_config) for detailed options.
107113

108-
#### generic_uci_config
114+
115+
## Commit changes
116+
Changes are committed by the command `lime-config` and written in `/etc/config/` files.
117+
::: tip
118+
Be sure to do not loose the connection to your device after the configuration.
119+
To apply the changes the **safest way** is to perform a `reboot` of the device.
120+
:::
121+
122+
### lime-apply
123+
On most cases one can skip the reboot running the command `lime-apply` which calls the OpenWrt `reload_config`.
124+
Depending on the changed configurations a full restart of some services may be required, like `wireless`, `network` and `firewall`.
109125
```
110-
config generic_uci_config 'uhttpd_https'
111-
list uci_set 'uhttpd.main.redirect_https=0'
126+
lime-config; lime-apply; wifi; \
127+
/etc/init.d/network restart; \
128+
/etc/init.d/firewall restart
112129
```
113-
By default `uhttpd` is instructed to avoid force redirect from `http` to `https`
114-
115-
#### copy_asset
116-
--! copy_asset copy an file from the assets directory into a specified path.
117-
--! The node asset directories are /etc/lime-assets/node and /etc/lime-assets/community.
118-
--! The community directory should contain the same files in all the community nodes.
119-
--!
120-
--! config copy_asset collectd
121-
--! option asset 'community/collectd.conf' # or 'node/collectd.conf' or 'community/mynode_collectd.conf'
122-
--! option dst '/etc/collectd.conf'
123-
--!
124-
125-
#### run_asset
126-
--! Executes a file from the assets directory scheme explained in copy_asset.
127-
--!
128-
--! config run_asset dropbear
129-
--! option asset 'community/dropbear.sh'
130-
--! option when 'ATFIRSTBOOT' # ATFIRSTBOOT, ATCONFIG

docs/reference/network/index.md

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,44 @@ outline: deep
33
---
44

55
# Network options
6+
Configuration for each network device is calculated from:
7+
- the **general options** in `config lime network`,
8+
- an (optional) **interface specific section** relative to that specific network device.
9+
10+
## Default values
11+
Default values as per `/etc/config/lime-defaults`
12+
```
13+
config lime network
14+
option primary_interface 'eth0'
15+
option main_ipv4_address '10.%N1.0.0/16'
16+
option anygw_dhcp_start '2'
17+
option anygw_dhcp_limit '0'
18+
option main_ipv6_address 'fd%N1:%N2%N3:%N4%N5::/64'
19+
list protocols ieee80211s
20+
list protocols lan
21+
list protocols anygw
22+
list protocols batadv:%N1
23+
list protocols olsr:14
24+
list protocols olsr6:15
25+
list protocols olsr2:16
26+
list protocols babeld:17
27+
list protocols bmx7:18
28+
list resolvers 4.2.2.2 # b.resolvers.Level3.net
29+
list resolvers 141.1.1.1 # cns1.cw.net
30+
list resolvers 2001:470:20::2 # ordns.he.net
31+
option bmx7_mtu '1500'
32+
option bmx7_publish_ownip false
33+
option bmx7_over_batman false
34+
option bmx7_pref_gw none
35+
option bmx7_wifi_rate_max 'auto'
36+
option bmx7_enable_pki false
37+
option batadv_orig_interval '2000'
38+
option batadv_routing_algo 'BATMAN_IV'
39+
option anygw_mac "aa:aa:aa:%N1:%N2:aa"
40+
option use_odhcpd false
41+
```
642

743
## General options
8-
The default values as per `lime-defaults`
944
```
1045
config lime 'network'
1146
option primary_interface 'eth0'
@@ -17,13 +52,15 @@ config lime 'network'
1752
- Type: `string`
1853
- Default: `eth0`
1954

20-
2155
```
2256
config lime network
2357
option primary_interface 'eth0'
2458
```
2559

26-
The mac address of this device will be used in different places
60+
The mac address of this device will be used in different places.
61+
An partial list includes:
62+
- Options parametrized with `%Mn`
63+
- Batman-adv soft interfaces use the last 3 bytes from main interface bat0 which is equal to the mac of `primary_interface`
2764

2865
### main_ipv4_address
2966
- Type: `<static>|<parametrized>|<network-address>`

docs/reference/network/interface-specific.md

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,25 @@ Available protocols: `apbb, batadv, babeld, bgp, bmx7, client, lan, manual, olsr
1919
If you use the protocol `manual` do not specify other protocols, may result in an unpredictable behavior/configuration (likely you loose connection to the node)
2020
:::
2121

22-
## WAN port
23-
Configure an network ethernet port as WAN using the protocol `wan` or `static`.
22+
## Examples
23+
### WAN port
24+
Configure a network ethernet port as WAN using the protocol `wan` or `static`.
2425

25-
### wan (DHCP)
26+
::: tip
27+
LibreMesh in the default flavor preserve the default openwrt WAN port.
28+
This interface gets created by `lime-hwd-openwrt-wan` package in case an ethernet WAN port is detected.
29+
**Disable the default interface** `lm_hwd_openwrt_wan` if you intend to configure a different port as wan.
30+
:::
31+
32+
#### Disable default
33+
```
34+
config net lm_hwd_openwrt_wan
35+
option autogenerated 'false'
36+
```
37+
- `autogenerated 'false'` - Specify that the configuration of the WAN ethernet port has been manually edited.
38+
39+
40+
#### wan (DHCP)
2641
Use `wan` protocol to get Internet connectivity via DHCP
2742
```
2843
config net port1_wan
@@ -31,7 +46,7 @@ config net port1_wan
3146
3247
```
3348

34-
### static (ipv4)
49+
#### static (ipv4)
3550
Use `static` protocols and specify the router 'IPv4/subnet' and the gateway IPv4.
3651
```
3752
config net port1_wan
@@ -41,7 +56,7 @@ config net port1_wan
4156
option static_gateway_ipv4 '192.168.1.1'
4257
```
4358

44-
### static (ipv6)
59+
#### static (ipv6)
4560
Use `static` protocols and specify the router 'IPv6/subnet' and the gateway IPv6.
4661
```
4762
config net port1_wan
@@ -51,15 +66,15 @@ config net port1_wan
5166
option static_gateway_ipv6 'fe80::1'
5267
```
5368

54-
## LAN port
69+
### LAN port
5570
Configure `lan1` for users to connect to, not for connection to other nodes.
5671
```
5772
config net port1
5873
option linux_name 'lan1'
5974
list protocols 'lan'
6075
```
6176

62-
## Mesh only port
77+
### Mesh only port
6378
The protocol `batadv:%N1` needs to be specified if the other node is in the same mesh cloud i.e. same `ap_ssid`.
6479
```
6580
config net port1

0 commit comments

Comments
 (0)