WildernessLabs / Meadow_Issues

Public repo for bugs and issues with Meadow
15 stars 0 forks source link

NetworkConnectionEvent throws invalid Subnet and Gateway values #356

Closed fredmbarrett closed 1 month ago

fredmbarrett commented 9 months ago

The NetworkConnectionEvent throws invalid values (255.255.255.0) for the Gateway and Subnet properties (see trace below):

Bssid = B215A265B716
Channel = 0
AuthenticationType = WpaWpa2Psk
When = 09/28/2023 20:13:44
IpAddress = 10.0.1.197
Subnet = 255.255.255.0
Gateway = 255.255.255.255
Wifi network AllynTech-IoT is up, ip is 255.255.255.255
halyssonJr commented 3 months ago

@fredmbarrett , checking the network connect event, I think the Subnet(Ipv4 Mask), it's working when I tested.

Meadow StdOut: Wifi_NetworkConnected event fired...
Meadow StdOut: wifi.IsConnected = True
Meadow StdOut: IP address = 192.168.15.2
Meadow StdOut: Subnet = 255.255.255.0
Meadow StdOut: Gateway = 255.255.255.255

Otherwise, the Gateway IP isn't right. To confirm if the Subnet value was correct I connected to the same AP and ran $ route -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.15.1    0.0.0.0         UG    600    0        0 wlp0s20f3
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlp0s20f3
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
192.168.15.0    0.0.0.0         255.255.255.0   U     600    0        0 wlp0s20f3