Skip to content

Static network config docs do not reflect generate_network_config_bookworm.py options #18

Description

@alexhaydock

Problem

When setting up a PiAware system based on the 10.2 image, I noticed that the documentation on the Build Page here and on the Advanced Configuration page here imply that the following example would be a valid static network config:

wireless-type static
wireless-address 192.168.193.20
wireless-netmask 255.255.255.0
wireless-broadcast 192.168.193.255
wireless-gateway 192.168.193.1
wireless-nameservers 192.168.193.1

See:
Image

And:
Image

Detailed Error

However, when booting with this config, the wlan0 interface shows as down, because the generate-network-config.service fails with the following error:

Jun 27 19:30:58 piaware generate_network_config_bookworm[276]: Traceback (most recent call last):
Jun 27 19:30:58 piaware generate_network_config_bookworm[276]:   File "/usr/lib/piaware-support/generate_network_config_bookworm", line 4, in <module>
Jun 27 19:30:58 piaware generate_network_config_bookworm[276]:     run()
Jun 27 19:30:58 piaware generate_network_config_bookworm[276]:   File "/usr/lib/piaware-support/generate_network_config_bookworm.py", line 175, in run
Jun 27 19:30:58 piaware generate_network_config_bookworm[276]:     config_group = get_standard_config_group(extra_file_path)
Jun 27 19:30:58 piaware generate_network_config_bookworm[276]:                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jun 27 19:30:58 piaware generate_network_config_bookworm[276]:   File "/usr/lib/piaware-support/piaware_config.py", line 422, in get_standard_config_group
Jun 27 19:30:58 piaware generate_network_config_bookworm[276]:     cg.load_configs()
Jun 27 19:30:58 piaware generate_network_config_bookworm[276]:   File "/usr/lib/piaware-support/piaware_config.py", line 387, in load_configs
Jun 27 19:30:59 piaware generate_network_config_bookworm[276]:     file.load_config_from_file()
Jun 27 19:30:59 piaware generate_network_config_bookworm[276]:   File "/usr/lib/piaware-support/piaware_config.py", line 340, in load_config_from_file
Jun 27 19:30:59 piaware generate_network_config_bookworm[276]:     self.parse_config_from_list(config)
Jun 27 19:30:59 piaware generate_network_config_bookworm[276]:   File "/usr/lib/piaware-support/piaware_config.py", line 360, in parse_config_from_list
Jun 27 19:30:59 piaware generate_network_config_bookworm[276]:     raise ValueError(f"{self._filename}:{idx}: option {key} is deprecated.")
Jun 27 19:30:59 piaware generate_network_config_bookworm[276]: ValueError: /boot/firmware/piaware-config.txt:8: option wireless-broadcast is deprecated.

Simply removing the wireless-broadcast option from the config above results in a bootable config:

wireless-type static
wireless-address 192.168.193.20
wireless-netmask 255.255.255.0
wireless-gateway 192.168.193.1
wireless-nameservers 192.168.193.1

Resolution

I think the documentation needs updating to remove the references to wireless-broadcast.

To improve user experience I would also suggest that it might be worth updating generate_network_config_bookworm.py to fail-safe on at least this deprecated config option. If it can be ignored safely then doing so is probably a more user-friendly failure mode than failing to generate any network config. Especially since even after updating the docs there may still be copies floating around or in forum posts or ingested into LLMs that still reference wireless-broadcast.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions