Set network card to AP mode in OSX
Asked Answered
R

0

8

I am trying to do OSX's internet sharing from the command line and there doesn't seem to be a command for it, so I'm trying to do it manually by turning the network card to access point mode. I can't seem to find anything about how to turn the wireless card into AP mode on the mac. Linux would use iwconfig (which OSX doesn't have) and I've monitored the files that network sharing opens, but no dice so far.

It looks related to wifid, but the documentation for wifid only says "Don't invoke wifid directly". Also played with the airportd command, but it doesn't seem to let the card go into AP mode. There must be a way to do it, since internet sharing creates an access point.

TL;DR:Does anyone know how to turn on Internet Sharing from the command line?

Robena answered 12/8, 2015 at 23:5 Comment(7)
If you downvote, please explain why in the comments.Robena
The way in which it used to be done doesn't appear to work anymore...Inept
Well, thanks for looking anyway :(Robena
You might get a better response on superuser.com serverfault.com or networkengineering.stackexchange.comGrassofparnassus
@SnakeCharmer: There is a way to toggle the InternetSharing preference on/off then turn Wi-Fi on/off, and load/unload the daemon, although it seems a bit dicey in the way it works (or doesn't).Inept
That's interesting, could you give the commands you found?Robena
I don't know how to do what you're asking as I'm not much of a OSX guy. However, in a roundabout way that could get you much more functionality in addition to completing what you're trying to accomplish, you could build aircrack-ng from source. The suite has plenty of tools to manipulate your wireless card, if it's supported.Fontaine

© 2022 - 2024 — McMap. All rights reserved.