edison-fw / edison-oobe

MIT License
1 stars 2 forks source link

rewrite-wip: wifi scanning while not active #8

Closed htot closed 3 years ago

htot commented 3 years ago

Hi @mwallnoefer,

afbeelding

Eventhough wifi is not powered, it scans for AP's.

However according to connman, it is powered:

/net/connman/technology/wifi
  Name = WiFi
  Type = wifi
  Powered = True
  Connected = False
  Tethering = False
htot commented 3 years ago

Then when flipping the switch it says powered (but in connman nothing changed). afbeelding The idea of course is to select a Wifi AP, see if we can connect (which also stored the password), quickly change back so the current (wired) doesn't break, click save and then only activate permanently in the last step (Activate).

mwallnoefer commented 3 years ago

Please re-try with my latest commit https://github.com/mwallnoefer/edison-oobe/commit/fe0e904f9ad20173e74453be7578b0dff5c9c767.

htot commented 3 years ago

Now I am already connected. I get: afbeelding

It returns none for the inet address, probably because the function _getIFaceIP() broke, there is no 'inet addr:' in

root@yuna:~# ifconfig wlan0
wlan0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC>  mtu 1500  metric 1
        inet 192.168.178.59  netmask 255.255.255.0  broadcast 192.168.178.255
        inet6 fe80::7a4b:87ff:fead:4d70  prefixlen 64  scopeid 0x20<link>

Maybe it would be better to retrieve the inet from connman?:

connmanctl> services  wifi_784b87ad4d70_4f503335204578747261203547_managed_psk
  IPv4 = [ Method=dhcp, Address=192.168.178.59, Netmask=255.255.255.0, Gateway=192.168.178.1 ]
  IPv6 = [ Method=auto, Address=2001:981:6fec:1:7a4b:87ff:fead:4d70, PrefixLength=64, Privacy=disabled ]

Also now I realize it was never correct, we can have IPv6 without IPv4, and the code only showed IPv4.

mwallnoefer commented 3 years ago

It returns none for the inet address, probably because the function _getIFaceIP() broke, there is no 'inet addr:' in

Okay I have still not flashed the latest image, here it is still working fine.

htot commented 3 years ago

Maybe it would be better to retrieve the inet from connman?:

In the past I tried to use python3-pyconnman to prevent shell scripts breaking, but this was beyond my python/dbus skills.

mwallnoefer commented 3 years ago

This should have been fixed by: https://github.com/mwallnoefer/edison-oobe/commit/0f8f314ef1502f41d23c9431e548c3a6c02584ff which does not rely on ifconfig. So it should be working on both old and new images :).

htot commented 3 years ago

Yes, this works for me.

htot commented 3 years ago

I fixed up the code for showing Wired network , except _getIFaceIP is now not working probably due to the interface not being called eth0 as we expect in wired_form(). On my machine it is called enp0s17u1u1. Hail systemd. When I modify that afbeelding

mwallnoefer commented 3 years ago

I fixed up the code for showing Wired network , except _getIFaceIP is now not working probably due to the interface not being called eth0 as we expect in wired_form(). On my machine it is called enp0s17u1u1. Hail systemd. When I modify that afbeelding

Attention that one belongs to issue #7 (wired networks not wifi), so this issue may be closed.