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

Ap0+wifi up down rebased [simultaneous WiFi-as-hotspot AND WiFi-as-client] #2380

Merged
merged 93 commits into from May 2, 2020

Conversation

jvonau
Copy link
Contributor

@jvonau jvonau commented May 1, 2020

Fixes Bug

Removes Dup's commits that really should not be pushed but otherwise identical to #2337

Description of changes proposed in this pull request.

number of commit reduced from 177 to 86

@holta holta added this to the 7.1 milestone May 1, 2020
@holta holta changed the title Ap0+wifi up down rebased Ap0+wifi up down rebased [simultaneous WiFi-as-hotspot AND WiFi-as-client] May 1, 2020
@holta
Copy link
Member

holta commented May 1, 2020

I used WiFi to install this PR #2380 onto a regular PC laptop = 133-u20-desk-BIG-PR2380 = 10.8.0.26

  1. After the install completed and the ensuing reboot, is "dual wifi" supposed to work on a regular laptop like this?

    /etc/iiab/iiab.env showed "HOSTAPD_ENABLED=True" and 'brctl show' showed "ap0" ...both as they should, but perhaps "dual wifi" is not expected to work due to firmware quirks? In any case, when my phone attempted to connect to SSID "133-u20-desk-BIG-PR2380" it stalled for several minutes each time, showing "Obtaining IP address..." (meanwhile the laptop's WiFi connection to the Internet continued to work).

  2. So I tried to change /etc/iiab/local_vars.yml to "wifi_up_down: False" and then run ./iiab-network which failed:

    2020-05-01 17:41:52,274 p=4957 u=root n=ansible | TASK [network : Create /etc/hostapd/hostapd.conf from template] ****************
    2020-05-01 17:41:52,396 p=4957 u=root n=ansible | fatal: [127.0.0.1]: FAILED! => {"changed": false, "msg": "AnsibleUndefinedVariable: 'iiab_wireless_lan_iface' is undefined"}

@jvonau thanks for helping or logging in directly to 10.8.0.26 to diagnose if you can!

@jvonau
Copy link
Contributor Author

jvonau commented May 2, 2020

1 9ee93d7 systemd-networkd was not being enabled on wifi gateway (no_net_restart) installs resulting in br0 not being active upon reboot.

2 for the wifi only issue f8a59b4 Didn't show up while the ethernet cable was inserted..

@holta
Copy link
Member

holta commented May 2, 2020

Warning: @jvonau & I discovered that changing from wifi_up_down: False to wifi_up_down: True [1] can get very confusing, e.g. on Ubuntu 20 Server after I put /etc/netplan/02-iiab-config.yaml [2] in place to connect to WiFi-to-Internet.

[1] Make this change within /etc/iiab/local_vars.yml -- which then requires you to run cd /opt/iiab/iiab && ./iiab-network && reboot

[2] Include your "building's" SSID & password at the end, as seen in the 02-iiab-config.yml template at https://github.com/iiab/iiab/wiki/IIAB-Platforms#operating-systems (indentation is very important, and tabs are not tolerated!)

Underlying Reason This Can Get Confusing: hostapd can run IIAB's hotspot on the wrong radio channel (iw dev shows frequencies/channels) if you don't (1) turn off IIAB's hotspot first, using iiab-hotspot-off (2) set wifi_up_down: True in /etc/iiab/local_vars.yml (3) run cd /opt/iiab/iiab && ./iiab-network && reboot

So if you omitted step (1) above, before making the transition to wifi_up_down: True in steps (2) and (3) -- it's possible you might still be able to recover (getting hostapd onto the correct channel/frequency, to match that of the "building's" upstream WiFi) by running...

  • iiab-hotspot-off
  • systemctl restart netplan-wpa-wlp2s0
  • cd /opt/iiab/iiab && ./iiab-network
  • reboot

Finally, IIAB's 'dual wifi' (simultaneous upstream & downstream WiFi) can be verified as likely working if most/all these things are true...

  • /etc/iiab/iiab.env contains HOSTAPD_ENABLED=True
  • Running brctl show shows ap0 in the rightmost column
  • systemctl status hostapd looks good?
  • And of course test that your IIAB's knowledge/learning hotspot is working, using a nearby phone or other WiFi-enabled device!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants