WLAN-Pi / wlanpi-core

wlanpi-core provides a way to share data between core services and applications on the WLAN Pi.
BSD 3-Clause "New" or "Revised" License
2 stars 6 forks source link

[BUG]: api/v1/network/wlan/getInterfaces doesn't appear to handle multiple interfaces #14

Open joshschmelzle opened 1 month ago

joshschmelzle commented 1 month ago

@bentumbler for awareness.

Endpoint response:

{
  "interfaces": [
    {
      "interface": "wlan2"
    }
  ]
}

Three interfaces plugged into host:

wlanpi@wlanpi-b18:~/dev/wlanpi-core $ iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=3 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

wlan1     IEEE 802.11  ESSID:off/any
          Mode:Managed  Access Point: Not-Associated   Tx-Power=3 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

pan0      no wireless extensions.

wlan2     no wireless extensions.

tailscale0  no wireless extensions.

wlanpi@wlanpi-b18:~/dev/wlanpi-core $ lspci
00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2711 PCIe Bridge (rev 20)
01:00.0 Network controller: Intel Corporation Wi-Fi 7(802.11be) AX1775*/AX1790*/BE20*/BE401/BE1750* 2x2 (rev 1a)

wlanpi@wlanpi-b18:~/dev/wlanpi-core $ lsusb
Bus 001 Device 004: ID 0846:9060 NetGear, Inc. Wireless_Device
Bus 001 Device 003: ID 0846:9060 NetGear, Inc. Wireless_Device
Bus 001 Device 002: ID 1a40:0801 Terminus Technology Inc. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
joshschmelzle commented 1 month ago
INFO:     Application startup complete.
Checking available interfaces
InterfacesRequested: dbus.Array([dbus.ObjectPath('/fi/w1/wpa_supplicant1/Interfaces/0')], signature=dbus.Signature('o'), variant_level=1)
Resolving Interface Path: /fi/w1/wpa_supplicant1/Interfaces/0
Found interface : wlan2
Available interfaces: [{'interface': dbus.String('wlan2', variant_level=1)}]
INFO:     <IP REDACTED>:63129 - "GET /api/v1/network/wlan/getInterfaces HTTP/1.1" 200 OK