This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
resources:tools-software:a2b-bus-analyzer:faq [27 Jan 2023 14:55] – Added clarification about which devices are supported S Fernandez | resources:tools-software:a2b-bus-analyzer:faq [09 Feb 2023 16:48] – Device not found in GUI S Fernandez | ||
---|---|---|---|
Line 66: | Line 66: | ||
A: Some instances may already be active or enabled remotely. Check the task manager, then remove any unneeded instances. | A: Some instances may already be active or enabled remotely. Check the task manager, then remove any unneeded instances. | ||
+ | |||
+ | ** Q: I can see my Analyzer Device in the Device Manager but the Analyzer GUI does not show it, what is the problem? ** | ||
+ | A: There are different reasons why the analyzer GUI may not be able to detect the Analyzer board. | ||
+ | |||
+ | * The A2B Analyzer device is being powered via USB which is not supported.\\ Please power it with the power supply that was enclosed with the product. | ||
+ | * The port that the A2B Analyzer device is already in use by another application in the system.\\ By default the GUI uses port 5000. While the UI tries to detect when other applications are using the port and show a user notification, | ||
+ | To know if your computer is using port 5000 you can run the command netstat -abon and search for 5000 in your results. | ||
** Q: How do I export a .dat file from Sigma studio? ** | ** Q: How do I export a .dat file from Sigma studio? ** | ||
Line 158: | Line 165: | ||
** Q: Can a device be used from the UI and the SDK at the same time? ** | ** Q: Can a device be used from the UI and the SDK at the same time? ** | ||
A: The shared libraries used by the SDK and the UI are completely separate and they do not interact. This means that when trying to use the same device, both the UI and the SDK try to use the same USB which results in a failure. | A: The shared libraries used by the SDK and the UI are completely separate and they do not interact. This means that when trying to use the same device, both the UI and the SDK try to use the same USB which results in a failure. | ||
+ | |||
+ | ===== FAQs on Advanced Use cases ===== | ||
+ | |||
+ | ** Q: How can I record more than 2 channels with the A2B Bus Analyzer? ** | ||
+ | |||
+ | A: In the current implementation, | ||
+ | |||
+ | If you need to record more channels, you can set up the required channels to USB Out in the UI and then capture the USB Out traffic with the following python script. This script only deals with the saving of the data. If you are using the user-accessible SDK with python scripts instead of the UI you can also incorporate the relevant parts of this code to your own scripts. | ||
+ | |||
+ | Steps to follow: | ||
+ | |||
+ | * Install python 3.8.5: https:// | ||
+ | * Install python modules directly: python -m pip install datetime scipy numpy sounddevice | ||
+ | * Install pyinstaller dependency: pip install pyinstaller (optional if you want to create an executable instead of running the script from python) | ||
+ | |||
+ | **Python Script in file A2B_Bus_Analyzer_USBIn_Audio_Record.py** | ||
+ | <code python> | ||
+ | import sys | ||
+ | import os | ||
+ | from scipy import signal | ||
+ | from scipy.io import wavfile | ||
+ | import sounddevice as sd | ||
+ | |||
+ | def record_audio(sec=5): | ||
+ | # Function to detect peak freq in the wav file | ||
+ | fs = 48000 | ||
+ | seconds = sec | ||
+ | searchStr = " | ||
+ | strDevices = str(sd.query_devices()) | ||
+ | valDevice = strDevices.find(searchStr) | ||
+ | if (valDevice == -1): | ||
+ | print(" | ||
+ | exit(1) | ||
+ | deviceNum = int(strDevices[valDevice-3: | ||
+ | print(" | ||
+ | sd.default.device = [deviceNum, 4] | ||
+ | myrecording = sd.rec(int(seconds * fs), samplerate=fs, | ||
+ | sd.wait() | ||
+ | if os.path.exists(" | ||
+ | input(" | ||
+ | os.remove(" | ||
+ | wavfile.write(' | ||
+ | |||
+ | if __name__==" | ||
+ | while True: | ||
+ | run_time = input(" | ||
+ | print(" | ||
+ | record_audio(int(run_time)) # Use this for recording line in connected | ||
+ | </ | ||
+ | * Generate a Python executable: Generate .exe by running the command below (optional to generate an executable for the script) | ||
+ | - pyinstaller --onefile A2B_Bus_Analyzer_USBIn_Audio_Record.py | ||
+ | - .exe will be generated in the dist folder | ||
+ | |||
+ | **Note**: Create the .exe once in your PC and then use .exe for further recording sessions. | ||
+ | |||
+ | The command prompt just expects no. of seconds for recording. | ||
+ | The multi-channel wav file is recorded as audio-stream.wav. | ||
+ |