plus_plugins icon indicating copy to clipboard operation
plus_plugins copied to clipboard

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

Open guyluz11 opened this issue 4 years ago • 8 comments

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.

guyluz11 avatar Aug 21 '21 09:08 guyluz11

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.

jpnurmi avatar Aug 21 '21 12:08 jpnurmi

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

Thanks

guyluz11 avatar Aug 21 '21 13:08 guyluz11

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

github-actions[bot] avatar May 31 '22 15:05 github-actions[bot]

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

guyluz11 avatar Jul 19 '22 20:07 guyluz11

+1

ShafiqSadat avatar Mar 28 '24 05:03 ShafiqSadat

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.

miquelbeltran avatar Mar 28 '24 14:03 miquelbeltran