THANKS. Unfortunately we do't have an MDM, and our steps is
Develop an APP for users.
Users log into the APP and download their profile for 802.1X auth.
Install the profile manually(double click to install)
connect to the cable or the specific SSID
start auto-authentication.
The problem is users have to select the profile and click CONNECT or something to auth at the first time. That's why I said MANUALLY.
That could be a confusing operation. Writing a guidance is still hard to understand for some users. So I'm searching a way to help them bypass CLICKING the CONNECT BUTTON by command or coding.
Post
Replies
Boosts
Views
Activity
I wrote a script and everything worked will when run by python.
import objc
from CoreLocation import CLLocationManager
import logging
location_manager = CLLocationManager.alloc().init()
location_manager.requestWhenInUseAuthorization()
logger = logging.getLogger()
logger.setLevel(logging.INFO)
fh = logging.FileHandler('/Users/xpeng/Downloads/logging.log')
fh.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
fh.setFormatter(formatter)
ch.setFormatter(formatter)
logger.addHandler(fh)
logger.addHandler(ch)
if __name__ == '__main__':
bundle_path = '/System/Library/Frameworks/CoreWLAN.framework'
objc.loadBundle('CoreWLAN',
bundle_path=bundle_path,
module_globals=globals())
iface = CWInterface.interface()
logger.info(str(iface.interfaceName()))
logger.info(iface.ssid())
networks, error = iface.scanForNetworksWithSSID_error_(None, None)
for network in networks:
logger.info(network.ssid())
But after I pyinstaller -w -F test.py and excute sudo open path_to_app, the log was like
2024-03-13 18:10:51,931 - root - INFO - en1
2024-03-13 18:10:51,935 - root - INFO - None
2024-03-13 18:10:53,546 - root - INFO - None
2024-03-13 18:10:53,547 - root - INFO - None
2024-03-13 18:10:53,547 - root - INFO - None
2024-03-13 18:10:53,547 - root - INFO - None
2024-03-13 18:10:53,547 - root - INFO - None
2024-03-13 18:10:53,547 - root - INFO - None
2024-03-13 18:10:53,547 - root - INFO - None
2024-03-13 18:10:53,548 - root - INFO - None
2024-03-13 18:10:53,548 - root - INFO - None
2024-03-13 18:10:53,548 - root - INFO - None
2024-03-13 18:10:53,548 - root - INFO - None
2024-03-13 18:10:53,548 - root - INFO - None
2024-03-13 18:10:53,548 - root - INFO - None
2024-03-13 18:10:53,548 - root - INFO - None
2024-03-13 18:10:53,548 - root - INFO - None
2024-03-13 18:10:53,548 - root - INFO - None
2024-03-13 18:10:53,549 - root - INFO - None
2024-03-13 18:10:53,549 - root - INFO - None
2024-03-13 18:10:53,549 - root - INFO - None
2024-03-13 18:10:53,549 - root - INFO - None
I did grant test location permission in system preferences.
Is there any other thing must do before I pack?