Repository navigation
[Request] (network_info_plus) Support for LAN / non-WiFi network device interfaces #420
Description
Activity
- changed the title
[-]getWifiIP equivelent for all networks[/-][+]network_info_plus getWifiIP equivelent for all networks[/+]on Aug 21, 2021 - changed the title
[-]network_info_plus getWifiIP equivelent for all networks[/-][+]network_info_plus getWifiIP equivalent for cable connected devices[/+]on Aug 21, 2021 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.
Sounds good
So if this is duplicate than reference the original and I will close this issue.Thanks
- addedHacktoberfestIssues taking part in HacktoberfestIssues taking part in Hacktoberfest
on Sep 28, 2021 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
This issue got closed by the bot, please reopen it as I need to keep track of getIp function for cable-connected devices.
Reacted by J-P Nurmi and Falrom+1
- 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 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_plusshow 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
ifconfigcommand: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_plusinstead ofnetwork_info_plus.Reacted by DanielBerrioB and mori yutaOn 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)
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 returnedLan is connected & wifi is not connected
-> Lan info is returnedWifi is connected & lan is not connected
-> Wifi info is returnedProposal
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)
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.