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

Cannot use SoundCard on MacOS Big Sur using DMG #864

Closed
NeuroForLunch opened this issue May 1, 2021 · 7 comments · Fixed by #945
Closed

Cannot use SoundCard on MacOS Big Sur using DMG #864

NeuroForLunch opened this issue May 1, 2021 · 7 comments · Fixed by #945
Labels
cannot reproduce Described behaviour cannot be reproduced help wanted macOS

Comments

@NeuroForLunch
Copy link

Expected Behavior

SoundCard sampling to work

Actual Behavior

Screen Shot 2021-04-30 at 6 48 10 PM

Platform Specifications
  • OS: MacOS Big Sur
  • URH version: v2.9.2
  • Python version: 3.9
  • Installed via DMG
@NeuroForLunch
Copy link
Author

Apparently this is due to the app not asking for microphone permission and I can't find a way to manually grant it.

I bypassed this problem by using

pip install cython
pip install pyaudio
python -m pip install --upgrade urh

and now audio works but there's another problem: it won't let me set the default frequency below 100k. I can type in a lower frequency but when I press okay and reopen settings, its back to 100k.

Screen Shot 2021-04-30 at 7 49 09 PM

Screen Shot 2021-04-30 at 7 44 37 PM

@NeuroForLunch NeuroForLunch changed the title Cannot use SoundCard on MacOS Big Sur Cannot use SoundCard on MacOS Big Sur using DMG May 1, 2021
@andynoack
Copy link
Collaborator

Closed due to inactivity

@NeuroForLunch
Copy link
Author

The issue still remains

@andynoack
Copy link
Collaborator

Actually this duplicates with #865. I just checked the soundcard backend limits and a center frequency of 0 (although that doesn't make sense) is possible, therefore the 100k "Bug" should only be a cosmetic issue.
To date we have no longer MAC machines in the lab, so a MAC related update from us is rather unlikely at the moment. Sorry for that! Of course we are happy to accept your Pull Request. I propose to reopen this issue for a limited time again, asking for Community support.

@andynoack andynoack reopened this Oct 19, 2021
@andynoack andynoack added cannot reproduce Described behaviour cannot be reproduced help wanted macOS labels Oct 19, 2021
@NeuroForLunch
Copy link
Author

Thank you. Is the best experience with URH on windows or linux?

@andynoack
Copy link
Collaborator

It was developed under linux and made compatible (as far as possible) with Windows and MAC.

@gramss
Copy link

gramss commented Dec 31, 2021

Just gathering some useful information to fix this issue.

Based on the apple docs, one need to add the property NSMicrophoneUsageDescription to the Info.plist of the packaged application in order to access the microphone properly.

So it would probably be good to add some properties to that Info.plist around here, to fix the DMG-Release:

import plistlib
with open("pyinstaller/urh.app/Contents/Info.plist", "rb") as f:
p = plistlib.load(f)
p["NSHighResolutionCapable"] = True
p["NSRequiresAquaSystemAppearance"] = True
with open("pyinstaller/urh.app/Contents/Info.plist", "wb") as f:
plistlib.dump(p, f)

For launching urh directly from the MacOS terminal, the terminal itself should need to be whitelisted.

I also found this thread from the QT forum to be relevant:

Note that the security prompt seems to use the app name from the following Info.plist field to register the app.
<key>CFBundleIdentifier</key>
<string>Company Name.Application Name</string>

This python sub-function might also be interesting for generating useful content of a Info.plist.

jopohl added a commit that referenced this issue Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cannot reproduce Described behaviour cannot be reproduced help wanted macOS
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants