Git Product home page Git Product logo

Comments (6)

sanghavan avatar sanghavan commented on August 15, 2024

I got same issue on Xcode 9.0. on Xcode 8.3.3, it's still working.

from mmlanscan.

ThomasAriano avatar ThomasAriano commented on August 15, 2024

It looks like anything related to mac addresses will need to be removed/updated. As far as I can tell, the best case here will be returning a list of ip addresses on the network that respond to a ping.

from mmlanscan.

sanghavan avatar sanghavan commented on August 15, 2024

route.h.zip
Just remove the TARGET_IPHONE_SIMULATOR define check in route.h, and change 'net/route.h' to "route.h".

Remove TARGET_IPHONE_SIMULATOR define check

#if TARGET_IPHONE_SIMULATOR
#else
#endif

Now, it's working for me on Xcode 9.0

from mmlanscan.

ThomasAriano avatar ThomasAriano commented on August 15, 2024

@sanghavan After adding route.h to the project, I was able to get it to build without any errors, but the program still does not work. When I try to scan, it says that I am not connected to WiFi. Have you actually gotten it to work, or just build?

I believe LanProperties.m will need to be modified. At least for me, the ipAddress fails. More specifically, it looks like it can't find the wifi connection on the phone (which would be sa_family == AF_INET && ifa_name == @"eno"). The only things found on AF_INET are en1 and lo0.

Update:
I changed en0 to en1 and now its working. This may have to do with using the simulator, and will probably need to use en0 in production on a real phone. May edit with a TARGET_IPHONE_SIMULATOR define check...

from mmlanscan.

sanghavan avatar sanghavan commented on August 15, 2024

@ThomasAriano On your Mac it may have many interfaces as en0, en1. E.g: your Mac has Ethernet and WiFi build-in, then en0 is for Ethernet, en1 is for WiFi. en0 often used for main interface. If your Mac only has no Ethernet, then en0 is for WiFi.

On real device, WiFi is main interface. So en0 should be used.

from mmlanscan.

mavris avatar mavris commented on August 15, 2024

Hi guys, I fixed the errors. Thanks for your help

from mmlanscan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.