Skip to content

OS-X Support #24

Open
Open
@wonderkun

Description

@wonderkun

how to support mac os system?
Is there some advice ?

Activity

awkman

awkman commented on Apr 1, 2018

@awkman
Owner

@wonderkun you can refer to https://github.com/awkman/pywifi/blob/macos_dev/pywifi/_wifiutil_macos.py

I have implemented the basic functions in the macos_dev branch Because the connection flow of MacOS is different to Windows and Linux, I haven't finished the whole implementation for MacOS.
(I will try to borrow one macbook to continue this task...)

benbendemo

benbendemo commented on May 13, 2019

@benbendemo

@awkman I have used your _wifiutil_macos.py module to implement,firstly got this error "TypeError: descriptor 'encode' requires a 'str' object but received a 'objc.pyobjc_unicode'".

image

after translate unicode type to str type by using "params.ssid.encode('utf-8')",above typeerror seemed to be fixed,i don't know if it's the correct method.

image

but soon i got this problem as below.

image

image

after searched in google,i found out the "NSData" and "CWMutableNetworkProfile" are objective-c's functions,it's difficult for me to locate the cause.

could you offer some advice?

Zeal-Zhu

Zeal-Zhu commented on May 25, 2019

@Zeal-Zhu

I got the same error as you. Did you solve it eventually?@benbendemo

Jietu20190525-210113

benbendemo

benbendemo commented on Jun 2, 2019

@benbendemo

@Zeal-Zhu I didn't work it out.

davidchern

davidchern commented on Jan 15, 2020

@davidchern

Well, in line 105 of file _wifiutil_macos.py, there is one typo causing this error:

profile.setSsidData_(ssid_bytes)

It needs to be modified into:

profile.setSsidData_(ssid_data)

This will fix the error.

And hopefully this bugfix can be merged into that code. @awkman

benbendemo

benbendemo commented on Mar 2, 2020

@benbendemo

Well, in line 105 of file _wifiutil_macos.py, there is one typo causing this error:

profile.setSsidData_(ssid_bytes)

It needs to be modified into:

profile.setSsidData_(ssid_data)

This will fix the error.

And hopefully this bugfix can be merged into that code. @awkman

Thanks for your mention, it solved the problem.

sitz

sitz commented on Jul 12, 2023

@sitz

Bump on this issue.

I stumbled across this project to use for a python script to work with wifi on Mac but pip package doesn't support that it seems. It seems like some work was done for Mac support in macos_dev - but wasn't merged into main.

@awkman - Can I help somewhere to get that done if there is interest in maintaining this project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @sitz@awkman@benbendemo@wonderkun@davidchern

        Issue actions

          OS-X Support · Issue #24 · awkman/pywifi