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

Major: Nero combine with TPU, new link aggregation networking #110

Merged
merged 7 commits into from
Feb 28, 2024

Conversation

jr1221
Copy link
Contributor

@jr1221 jr1221 commented Feb 26, 2024

Changes

  • Removes TPU access point configurations and packages
  • Switches network/interfaces functionalilty to be run by a very simple shell script. It has two arguments, init run on boot and deinit run before shutdown. S40quicknet triggers such runs in a blocking manner. This shell script modprobes and creates all necessary links, as well as manages the lifetime of wpa_supplicant. Therefore disables ifupdown scripting.
  • Adds to that script a probe of the module bonding and usage of iproute2 to configure a linux bonded interface at bond0. Such an interface queries both wlan0 and wlan1 every 100 miliseconds for a change in state, and shifts network packets to the currently active interface. If both interfaces are active, wlan1 (2.4ghz) takes precedence as it will always be faster.
  • Modifies the existing station mode LEDs to flash as follows:
    🔴 : Solid --> HaLow on, in use; Blinking --> HaLow connected, inactive; Unlit --> no HaLow link
    🟡 : Solid --> 2.4 ghz on, and implied in use; Blinking --> No connection for either interface (wireless offline); Unlit --> no 2.4ghz link
    Both Unlit --> Software or hardware failure, HaLow HAT most likely not active
    Further requres existing station mode LED checks to use json jq parsed iproute2 commands to ensure stability.
  • Adds a wpa_supplicant_base.conf to go along with wpa_supplicant_halow.conf, which by default only connects to the router H68K.

Nero:
Get rid of nero defconfig, use TPU for everything.

Previous oversights fixed:

  • enables wpa_supplicant syslog support
  • enables wpa_supplicant logfile
  • switches access point LEDs to parse iproute2 in one case

Notes

Reconnection to primary (2.4ghz) is awfully slow (1+ minutes). If this code further holds up, migrating quicknet to AP may be in order (and nero if it remains).

Test Cases

  • All combinations of network loss/restoration work at any time after boot.
  • current networking behavior is the same.
  • nero works

Checklist

It can be helpful to check the Checks and Files changed tabs.
Please reach out to your Project Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.

  • All commits are tagged with the ticket number
  • No merge conflicts
  • [n/a] All checks passing
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #94

Color codes:
Red --> Off (halow off), Blink (halow on, unused), Solid (halow on, used)
Yellow --> Blink (halow+2.4/5 interfaces off), Solid (2.4/5 on, implied used)
All dark --> Failure (should not occur with natural network combinations)
@jr1221 jr1221 requested a review from nwdepatie February 26, 2024 21:21
@jr1221 jr1221 self-assigned this Feb 26, 2024
@jr1221 jr1221 linked an issue Feb 27, 2024 that may be closed by this pull request
Copy link
Contributor

@nwdepatie nwdepatie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm and tested

odysseus/odysseus_tree/board/tpu/config.txt Show resolved Hide resolved
@jr1221 jr1221 merged commit ac86334 into develop/initial-hw-validation Feb 28, 2024
@jr1221 jr1221 deleted the nero-tpu-merge-plus-94 branch February 28, 2024 20:23
jr1221 added a commit that referenced this pull request Mar 2, 2024
* initial implementation

* add our own ner bonding package, color codes

Color codes:
Red --> Off (halow off), Blink (halow on, unused), Solid (halow on, used)
Yellow --> Blink (halow+2.4/5 interfaces off), Solid (2.4/5 on, implied used)
All dark --> Failure (should not occur with natural network combinations)

* in progress quicknet

* update leds further

* misc fixes, can works

* initial nero merge

* refactor overlays, nero fixups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Validation] - CAN Validation [Networking] - Enable network switching on TPU to prefer 2.4 Ghz if available
2 participants