Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for getting Mac Address of host with ip #7

Closed
guyluz11 opened this issue Jan 16, 2022 · 6 comments · Fixed by #139
Closed

Support for getting Mac Address of host with ip #7

guyluz11 opened this issue Jan 16, 2022 · 6 comments · Fixed by #139
Labels
platform limitation This feature or fix is limited to underlying platform features.

Comments

@guyluz11
Copy link
Collaborator

Getting Mac Address is very popular.

Will be nice to have.

@guyluz11
Copy link
Collaborator Author

Not sure if a dart package exist for that.

I have found from small research that this can be done using ARP (Address Resolution Protocol).

@git-elliot
Copy link
Collaborator

git-elliot commented Jan 17, 2022

Programmatically we can't get the mac address of devices above ios 7 and android 6. Source

get_mac package is there in pub.dev website but only supports Android and iOS, which is used to get mac_address of the device itself.

I also want to refer the issue from dart-sdk.

@git-elliot git-elliot added the platform limitation This feature or fix is limited to underlying platform features. label Jan 17, 2022
@guyluz11
Copy link
Collaborator Author

Interesting findings.

As the MAC address that we are searching are mainly of other devices in the local network I think the last link is more relevant to us.
It have closed-not-planned label so let's not count on it.
Let's just keep it with the platform limitation label that you have added :( and work in the meantime on the rest of the issues.

@guyluz11
Copy link
Collaborator Author

guyluz11 commented Aug 13, 2022

Found a flutter android only package arp_scanner, it comes with its limitations.
(not sure if also above or below)

Support only for Android Sdk Version 29 and above or below.

For Linux dart native as well as Linux Flutter I think we can execute terminal commands like arp -a, ip neigh.

I think For Mac dart native and Mac Flutter we can execute the command arp -a

For Windows dart native as well as Windows Flutter I think we can also execute the command arp -a.

I don't have a solution for ios but we can keep it for later.

I am saving this stack overflow issue here to post an answer if we solve it for that guy.

@guyluz11
Copy link
Collaborator Author

guyluz11 commented Aug 15, 2022

There are two ways to get an arp table.

  1. arp table stored on the device that is currently running,
  2. arp table that is stored on the router.

The first option looks like it has a few problems but can be possible on some of the platforms.

If I understand correctly from the question here it sounds like to get the arp table from the router we can use snmp (Simple Network Management Protocol).

I have found 2 dart packages for snmp dart_snmp, snmp.

So it seems that there is another path that we can take to add support for it.

@git-elliot git-elliot mentioned this issue Sep 21, 2022
@git-elliot git-elliot changed the title Support for getting Mac Address of with ip Support for getting Mac Address of host with ip Sep 21, 2022
@git-elliot git-elliot linked a pull request Sep 5, 2023 that will close this issue
@git-elliot
Copy link
Collaborator

Added mac address support for Desktop. Please open another issue to track specific platform limitations and possibilities

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform limitation This feature or fix is limited to underlying platform features.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants