Skip to content

[Request] (network_info_plus) Support for LAN / non-WiFi network device interfaces #420

Description

@guyluz11

Use case

Running on Windows 10 or Linux (Kubuntu).

While running the NetworkInfo().getWifiIP(); method I found out that this is only wifiIP, my Windows/Linux machine is connected via cable so it is throwing an error.

Tried get_ip_address but this is only public IP so not good.

Proposal

Replace NetworkInfo().getWifiIP(); with getIP method that will work no matter what network and platform we are on.

Activity

  1. changed the title [-]getWifiIP equivelent for all networks[/-] [+]network_info_plus getWifiIP equivelent for all networks[/+] on Aug 21, 2021
  2. changed the title [-]network_info_plus getWifiIP equivelent for all networks[/-] [+]network_info_plus getWifiIP equivalent for cable connected devices[/+] on Aug 21, 2021
  3. jpnurmi commented on Aug 21, 2021

    @jpnurmi
    Member

    Hi, thanks for the suggestion. We've been working on adding ethernet support to connectivity_plus. This is a good candidate for the next step as the two have similarities under the hood.

  4. guyluz11 commented on Aug 21, 2021

    @guyluz11
    ContributorAuthor

    Sounds good
    So if this is duplicate than reference the original and I will close this issue.

    Thanks

  5. github-actions commented on May 31, 2022

    @github-actions

    This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days

  6. guyluz11 commented on Jul 19, 2022

    @guyluz11
    ContributorAuthor

    This issue got closed by the bot, please reopen it as I need to keep track of getIp function for cable-connected devices.

  7. ShafiqSadat commented on Mar 28, 2024

    @ShafiqSadat

    +1

  8. changed the title [-]network_info_plus getWifiIP equivalent for cable connected devices[/-] [+][Request] (network_info_plus) Support for LAN / non-WiFi network device interfaces[/+] on Mar 28, 2024
  9. miquelbeltran commented on Mar 28, 2024

    @miquelbeltran
    Member

    Pasting here the proposal from #2750

    Plugin

    network_info_plus

    Use case

    https://github.com/YowFung/flutter_interfaces_plus Lists network card interfaces but network_info_plus show only wifi networks.

    Proposal

    Find all phisical and virtual network interfaces and find ip address for each one, by example, when share a network with the usb interface without wifi, using only the 3g or 4g internet connection, the expected is see two interfaces: 3g with the mac, address, etc and the usb hospot with the default broadcast, gateway and default dns server, loopback local interface, etc, like as ifconfig command:

    me@pc:~/ $ adb shell
    a73xq:/ $ uname -a
    Linux localhost 5.4.233-qgxx-xxxxxxxx-abxxxxxxxxxxxxx #1 SMP PREEMPT Sat Feb 10 04:28:52 KST 2024 aarch64 Toybox
    a73xq:/ $ ifconfig                                                                                                                                                                                         
    dummy0    Link encap:UNSPEC  
              inet6 addr: fe00::xxxx:xxxx:xxxx:xxxx/64 Scope: Link
              UP BROADCAST RUNNING NOARP  MTU:1500  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0 
              TX packets:2793 errors:0 dropped:0 overruns:0 carrier:0 
              collisions:0 txqueuelen:1000 
              RX bytes:0 TX bytes:532020 
    
    rmnet_ipa0 Link encap:UNSPEC  
              UP RUNNING  MTU:9216  Metric:1
              RX packets:237885 errors:0 dropped:0 overruns:0 frame:0 
              TX packets:283949 errors:0 dropped:0 overruns:0 carrier:0 
              collisions:0 txqueuelen:1000 
              RX bytes:9957889 TX bytes:57558124 
    
    wlan0     Link encap:UNSPEC    Driver icnss2
              inet addr:192.168.xxx.xx  Bcast:192.168.xxx.255  Mask:255.255.255.0 
              inet6 addr: 2800:xxx:xxxx:xxxx:xxxx:5aff:fe65:35b9/64 Scope: Global
              inet6 addr: fe80::xxxx:xxxx:xxxx:35b9/64 Scope: Link
              inet6 addr: 2800:xxx:xxxx:xxxx:xxxx:fb94:be77:6648/64 Scope: Global
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:19236399 errors:0 dropped:0 overruns:0 frame:0 
              TX packets:10371098 errors:0 dropped:906 overruns:0 carrier:0 
              collisions:0 txqueuelen:3000 
              RX bytes:22536808160 TX bytes:5731479254 
    
    lo        Link encap:UNSPEC  
              inet addr:127.0.0.1  Mask:255.0.0.0 
              inet6 addr: ::1/128 Scope: Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:81994 errors:0 dropped:0 overruns:0 frame:0 
              TX packets:81994 errors:0 dropped:0 overruns:0 carrier:0 
              collisions:0 txqueuelen:1000 
              RX bytes:169451848 TX bytes:169451848

    Actually the package should be called wifi_info_plus instead of network_info_plus.

  10. vanlooverenkoen commented on Nov 7, 2024

    @vanlooverenkoen

    On my raspberry pi with flutter-pi this works to detect the lan. (I have a wifi interface as well that is also connected or not connected, in both scenario's it shows the lan interface info as long as the lan is connected)

  11. vanlooverenkoen commented on Nov 10, 2024

    @vanlooverenkoen

    Use case

    Add support to return all network info. For example my mac has a wireless chip but with a dongle it also has a lan interface.

    My raspberrypi (with flutter-pi) has wifi & lan.

    The current situation is

    wifi & lan connected
    -> Lan info is returned

    Lan is connected & wifi is not connected
    -> Lan info is returned

    Wifi is connected & lan is not connected
    -> Wifi info is returned

    Proposal

    It would be nice to get a list of all interfaces. And have a way to fetch details for a specific interface. (default implementation can be used as is. and consider this as an param that can be passed to each function)

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions