Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

firstlogin: bring up wifi device before scanning #7803

Merged
merged 1 commit into from
Feb 8, 2025

Conversation

torte71
Copy link
Contributor

@torte71 torte71 commented Feb 8, 2025

Description

Firstlogin on a minimal image is not able to configure and use wifi.
(Server and desktop images work OK, as they have NetworkManager installed.)

Scanning accesspoints requires an activated wifi device.
An unconfigured networkd does not activate it (only NetworkManager does so).
As a result, firstlogin fails to scan for APs and skips setting up timezone and locales.
Activating the wifi device using ip link set ${WIFI_DEVICE} up before scanning fixes this.
(And can safely be done - there is no problem activating it multiple times, like it is the case with NetworkManager installed.)

How Has This Been Tested?

  • Initiated AP scan with deactivated wifi: command failed: Network is down (-100)
  • Activated an already active wifi device multiple times: No error.
  • Initiated AP scan with activated wifi: No error.
  • Built minimal image with modified armbian-firstlogin: Wifi is usable
  • Replaced armbian-firstlogin in server image before booting: Wifi is usable

Both images (with and without NetworkManager) were able to bring up and use wifi during armbian-firstlogin without any errors.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings

Scanning accesspoints requires an activated wifi device.
Networkd does not activate it (only NetworkManager does so).
As a result, firstlogin is not able to configure and use wifi on minimal
images, as only Server and Desktop images have NetworkManeger installed.
Activating the wifi device using "ip link set ${WIFI_DEVICE} up" before
scanning fixes this.
(And can safely be done - there is no problem activating it multiple
times, as it is the case with NetworkManager installed.)
@torte71 torte71 requested a review from a team as a code owner February 8, 2025 15:29
@github-actions github-actions bot added size/small PR with less then 50 lines Needs review Seeking for review BSP Board Support Packages labels Feb 8, 2025
@igorpecovnik
Copy link
Member

igorpecovnik commented Feb 8, 2025

Thank you! I hope we will manage to move this setup to armbian-config within next release and drop this code. There this works well.

@igorpecovnik igorpecovnik added Ready to merge Reviewed, tested and ready for merge 02 Milestone: First quarter release labels Feb 8, 2025
@igorpecovnik igorpecovnik merged commit a8abed8 into armbian:main Feb 8, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
02 Milestone: First quarter release BSP Board Support Packages Needs review Seeking for review Ready to merge Reviewed, tested and ready for merge size/small PR with less then 50 lines
Development

Successfully merging this pull request may close these issues.

2 participants